I am beginner in CV. My camera crash every time. I mean camera light is ON but the there is no camera display Could someone help me? Here is the code Answer i think you put waitKey in wrong place, I hope below code will work !
Tag: image-processing
How to take n block of a 3d array in python?
I had 328 grayscale images with the size 128*128 and I convert all of them into a 3D array with the shape (128,128,328). Now I want to convert it into 5 separated 3d arrays with the shape of (128,128,64) without changing in sequence. As you can see 328 is not divisible by 64 and using dsplit function is not working.
cv2.boundingRect creating issue
I am working on preprocessing images of digits. Each image contains a single number and some unwanted contours . This noise or contours can be in the form of lines or small dots. My task is to remove these contours. So I decided to use the following algorithm Find all contours Sort the contours according to the area in descending
Unable to generate contour on segmented image using OpenCV based on a specific color(cv2.inRange)
I have a segmented image, which is output of an AI model.The next step is to create contour and overlay on the original image(non segmented)using OpenCV around a specific color on the segmented image. I tried with the below code snippet. But unfortunately I am unable to generate mask and contour which returns empty array. Any leads would be appreciated
Why does thresholding on image give a different result compared to when it is in an image with other things?
I have an image that when I apply a binary threshold on it, it gives a different result compared to when it is in an image with other things. I’m not sure if I’m setting the parameters for the thresholding function incorrectly as I took the example from the OpenCV documentation. Link to documentation: https://docs.opencv.org/4.x/d7/d4d/tutorial_py_thresholding.html In my test program, I
OpenCV transform image shape transformation into a given contour
Does anyone know whether it’s possible to transform image A into image B contour if their shapes are random, using OpenCV or any other python libraries that work with images? Here is what I have so far with 2 images: I’ve been able to find draw contours of the bulb and insert a fox in it using bitwise_and method, but
plt.imshow() display the image inside another image
I am new to Python and I apologize if this is very basic. I am doing image processing but when I read a png image using cv2 and then display the image using plt.imshow() it gives me strange images(Image with extra boundries). I did the following. I am attaching the resulting images here. [the original image] [After displaying the image
How to resize image without losing pixel qualityin python?
I have an 32×32 image. I resize it for 512×512 in python, quality and view of image is not same when I resize it in paint. original image resized-with-paint resized-with-python What is needed to add to have same result as Paint? Answer Use: for that effect. It is not really a “loss of quality” that you are seeing – it
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
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