Skip to content
Advertisement

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

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

Advertisement