All Questions
88 questions
1vote
2answers
124views
How can I produce a delta plot between two RGB image with the same pixel size? [closed]
I have two RGB images of representing plot of a scalar variable on some geometry. My goal is to find a way to plot the difference of that variable btween the two images and color it with a custom ...
-1votes
1answer
83views
How to correctly extract white pixels from binary images and display them correctly on the plotlib?
This is a binary image, I want to calculate the distance between two edges of the pixel, then display it on a drawing board. I handle it when it does not have branches, but when it has branches like ...
0votes
0answers
44views
Does the Intensity of color in OpenCV image matter?
Here is a simple code which puts a text value onto a black frame and displays it: frame = np.zeros((50,200,3)) org=(0,45) font=cv2.FONT_HERSHEY_SIMPLEX fontScale=1 fontColor=(1,0,0) ##rgb out_img =...
0votes
1answer
105views
Rotate 2D numpy array about a specific line
I am trying to rotate an image about a specific line drawn within the image. Think of the image of a random 2D numpy array. I have two specific points in the array through which I would like to plot a ...
1vote
1answer
4kviews
Creating an image mask using polygon points coordinates
I have a grayscale image with size (1920,1080) that I''m trying to create a mask for. I used an external software to manually get the points of interest (polygon). There are now 27 coordinates points ...
0votes
1answer
98views
Why is 'plt.imshow' showing the original image when the actual values are changed?
What is the problem of this piece of code? It modifies the values but when it wants to show me the actual modified image, it will show me the original image again. Am I doing something wrong? And let ...
2votes
2answers
1kviews
Quantify longest axis and width of irregular shapes within a single image
Original question I have about 80-100 images such as (A). Each image is composed of shapes that were filled with black color after marking the outline in ImageJ. I need to extract each individual ...
0votes
2answers
137views
Removing MSB bit of a image [closed]
can I remove MSB bit of a image without using open cv or matlab in python img = Image.open(image) arrayimg = asarray(img) i have already read the image nd it is converted to array too, now i want to ...
0votes
1answer
1kviews
Can the output of plt.imshow() be converted to a numpy array?
My intention is to use matplotlib to convert a coloured image into a grayscale image and use colormap to display it in the Viridis scale. The code for that is as follows: import numpy as np import ...
-1votes
2answers
983views
How to scale numpy array (image) values to a certain range quickly, without changing the image in any way?
I have a numpy array H_arr representing the following image: (IMG 1) and I wish to convert its values in the range [0,1], let's call this new array as New_arr, in such a way that the original image ...
0votes
1answer
2kviews
Improving a median filter to process images with heavy impulse (salt&pepper) noise
I have this image which has been heavily obscured by impulse(salt&pepper) noise and I am trying to filter it using a median filter. I was able to filter the picture to a slightly readable state, ...
1vote
0answers
89views
Why does the output of PIL look different to matplotlib
I am doing some image processing in Python. I was originally using PIL to display my image but the output didn't look right to me so I used matplotlib instead and that seems to result in the output I ...
0votes
3answers
165views
Unclear difference in displaying the same image by opencv and matplotlib [with example code & exported .npy file]
In continue to my previous question (that still not answered here) Here is a simple code with some unsuccessful attempts and exported image.npy file that illustrates the problem: ''' conda install ...
0votes
0answers
62views
Processing material on images to a separate graph in python
I'm processing a file of images that are in encoded in RGB and contain material. The material is any non-background pixel with the background being purple or RGB(37, 150, 190) At the moment I have 2 ...
28votes
4answers
27kviews
Reading *.mhd/*.raw format in python
Can anyone please tell me the way I can read a dataset containing .mhd/.raw files in python?