All Questions
27 questions with no upvoted or accepted answers
3votes
1answer
79views
Out of core resampling
I have a large image file (single band) that do not fit in my ram. I wan to read it as numpy array (data) and plot it using matplotlib, possibly using imshow(data). I know how to do it for a small-...
2votes
1answer
389views
Blend two images in python to not lose intensity
In Introduction to Applied Linear Algebra – Vectors, Matrices, and Least Squares in page 234 there is an example that will solve the least squares problem to find the lamp powers that result in the ...
2votes
0answers
54views
How can I change the values of all the clusters obtained in an image to a new range that represents different levels of color intensity?
I'm doing some image analysis of samples of pseudomona. I'm using k-means clustering to obtain different levels of presence of the bacteria along the sample, as it changes tonality as it increases its ...
2votes
1answer
2kviews
using python drag & drop selected image segment
My requirement is i need to drag an image to desired location. Based on the link board-drawing code to move an oval the following is the code snapshot i tried. I am not getting any errors its blank. ...
2votes
1answer
610views
How to extract specific points in Matplotlib graph? (python)
From an image, I have computed a mean value over each column and created a graph. This is the output (without letters and marked points). Most graphs have a behavior like graphs marked with blue, ...
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 ...
1vote
0answers
440views
joint histogram without using inbuilt functions
So, I'm writing a function to create a 2d joint histogram of two images in Python. This is the code I have written to produce the histogram. import numpy as np Img1=imread(img1.jpg) Img2=...
1vote
2answers
906views
updated:IndexError: index 0 is out of bounds for axis 0 with size 0?
I have a questions about the following codes: I want to return 2 values in this function, one is orig_image which is fine, the other one is the cx,cx is the x-coordinate of the center of the biggest ...
1vote
2answers
1kviews
Converting all non-black pixels into one colour doesn't produce expected output
I am trying to select non-black pixel and then colour them to black and the black pixels to white. I used a solution provided on Stack Overflow but so far it isn't working for me. import numpy as np ...
1vote
0answers
44views
numpy slicing screws image colors (werid)
I have an RGB image as an ndarray print(img.shape) >>> (64, 64, 3) I want to store a bunch of images into another ndarray: batch = np.empty((64, 64, 3, 2)) batch[...,0] = img Now if I do ...
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
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 ...
0votes
0answers
67views
Not able to see black and white image after threshold application
I am working on a project for detecting lines using threshold values in HLS image format. I wrote the following code for it. It is not giving any errors but the output I am getting is just a black ...
0votes
1answer
69views
why am I getting a ValueError: could not broadcast input array from shape (3,) into shape (4,)
I'm trying to find all red pixels in a png file and output a binary image file, and I feel like I'm close. I have to use double for loops as it's a requirement for my assignment. this is is what I ...
0votes
0answers
41views
Wrong shape when converting RGB array into image by plt.imshow()
I was trying to make a filter in python to achieve oil painting effect. It seems that the filter works perfectly, but something went wrong when I was trying to convert RGB array into image. code: from ...