I’m coding a program which’ll take an image for an input, check it against images in a database and output the image with the same hash However, when using hash(“imagepath”) 2 of the same images give different hashes, even when the only difference is the image’s name, which makes me believe the name is the issue Is there a way
Tag: image
Reading URL image content from HTTPResponse in Python
I have an image URL in the form of a shareable Google Drive link that I would like to access in my Python script. Below is what I have been trying: However I know this returns an HTTPResponse. I have already consulted this and this thread to no avail. How do I get rid of all the other content in
Given a image, a pixel point and a radious in pixels. How do I find the pixel coordenate of the circle border it creates
Given an image matrix, I want to find the pixel points coordinates of all points/pixels in the border of a given circle with center (x,y), where x and y are integers and radius r, where r is also an integer. Considering the border is 1 pixel thick. Ony this outer edge is what I need to find. I’m having trouble
is there a way to manipulate image without saving to a file first?
I’m trying to collect img data for my ML/DL project. I need facial data so, I have to detect the face and crop around it. I have a bunch of img URLs that I searched online. Normally I would save them in a file using requests library, but would it be possible to do it in-memory? I looked at some
Trying to resize image on 2nd window of Tkinter GUI
This code will open a main window with an image, then another window with the same image. Is there any way to resize the image to be smaller? (go to # !>>> IMAGE 2 (2nd window)) Here is the code: Answer I see Bryan Oakley has already posted an answer your question, but I’ll supplement it with my own, which
How to convert 0-1 image float array to 0-255 int array
Plot results in: Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). and only displays an image in the first subplot Used image Answer The issue is photo*=255 is still an array of floats. Look at the photo array. Add photo = photo.astype(int) after photo*=255. X in .imshow should be
Remove white borders from segmented images
I am trying to segment lung CT images using Kmeans by using code below: The problem is the segmented lung still contains white borderers like this: Segmented lung (output): Unsegmented lung (input): The full code can be found in Google Colab Notebook. code. And sample of the dataset is here. Answer For this problem, I don’t recommend using Kmeans color
numpy.AxisError: axis 2 is out of bounds for array of dimension 0
I’m creating a program the requires a black and white image and two arrays containing the X and Y coordinates of both black and white pixels respectively. I have a program that utilizes OpenCV and binary thresholding to create a black and white image (code source). Hear is the code I have in full so far. The problem I have
Black and white color addition
When red is mixed with green, I get yellow as expected. But when white is mixed with black, I should get normally grey but I get white. Shouldn’t I get grey? Here is the code: Answer I think what @Cris Luengo said (“If you want to get gray, average the white and black pixels together”) is valid; Also I think
How to make a nxn filter to perform custom opertions in image array?
I am working with various images and I wanted to implement a method but I have no idea where to start. So I am looking forward to some suggestions. My idea as a method is to take an image array and after selecting a region of interest and then we say the selectedROI is 10×10 region of pixels as a