Questions tagged [image-thresholding]

To be used with regards to converting any image to a binary image having two values 0 and 1. It is a simple elementary image segmentation step.

For details on various methods used visit THIS WIKI PAGE

189 questions
1
vote
1 answer

How to find out whether a line present in one image is subset of another line present in different image using opencv in python?

I have two images say imageA and imageB as shown below. Now I need to check whether the line present in imageB already exists in image A or not (i.e) line present in imageB should be the subset of line present in imageA. I used image subtraction in…
1
vote
2 answers

Approximating edge with rough outline - OpenCV

I've been researching and trying a couple functions to get what I want and I feel like I might be overthinking it. One version of my code is below. The sample image is here. My end goal is to find the angle (yellow) of the approximated line with…
1
vote
1 answer

How to eliminate small irregular shaped squares and to retain only lines and curves in an image using opencv in python?

In the below image, I need to extract only the straight and curved lines and eliminate all other extra boxes as shown below. I am a newbie to OpenCV. Can someone help me with this? Input Image : Expected Output Image:
1
vote
0 answers

Applying adaptive thresholding on Canny edge detection

I want to remove the blurred background of images in my project dataset, and I already get a pretty nice solution in here using Canny edge detection. I want to apply an adaptive thresholding on the double threshold value requirements of Canny. I…
1
vote
1 answer

how can i obtain a representation of the roofs from a aerial image using rgb differences?

So i´m learning image processing in python and i came across an exercise on which i'm having strugle to solve. It's given an aerial image: Aerial Image The objective is to individualize all the roofs in one image leaving the rest of it (background)…
1
vote
0 answers

Adjust Threshold Within Macro ImageJ

I'm looking to write a macro which requires user input to segment kidneys through thresholding. I'm currently running this: selectWindow("Cortex"); //run("Threshold..."); title = "WaitForUserDemo"; msg = "If necessary, use the \"Threshold\" tool…
1
vote
1 answer

MATLAB convert graythresh output into actual intensity

I am trying to find the threshold of a 3D image that is 258 x 318 x 801 double. I first reshaped the image into 1D array and then used graythresh ROI = reshape(postImg,[],1); thresh = graythresh(ROI); But I was trying to find the actually intensity…
March2020
  • 13
  • 4
1
vote
0 answers

How to better segmentation for the complex image?

I need to segment the testes image and detect testes tubules. But I was able to only segmented testes lumens. I need to segment the whole tubules. How should I proceed? Explanatory image:
1
vote
0 answers

C++ threshold operation to make any pixels that are not black into white

I have implemented a Gaussian blur to allow for the blurring of an image. This image is saved as 'stage2_blurred'. I then want to re-input this 'stage2_blurred' image to then make any pixels that are not black into white, and save the newly created…
user13012331
1
vote
1 answer

OpenCV Each pixel in the return image from adaptiveThreshold function is value 255

I apply adaptive thresholding to gray scale image, and I would like to apply normal thresholding to the return image of that function. This doesn't work since somehow every pixel in the return image is set to 255. I don't understand why this is…
Peyton Hanel
  • 374
  • 1
  • 3
  • 13
1
vote
1 answer

How to remove a rough line artifact from image after binarization

I am stuck in a problem where I want to differentiate between an object and the background(having a semi-transparent white sheet with backlight) i.e a fixed rough line introduced in the background and is merged with the object. My algorithm right…
1
vote
1 answer

Image Segmentation in MATLAB using adaptive threshold function

I have written some lines of code using the following function: adaptivethreshold(IM,ws,c) and it gives me a Mask bw. I multiply this mask with my original image bb and show the…
1
vote
1 answer

Scikit image otsu thresholding producing zero threshold

I am doing some preprocessing on an image, After applying Otsu thresholding on the image I am getting zero threshold while on another image it’s working fine from skimage import filters from skimage.io import imread img = imread(img_path,…
arush1836
  • 1,327
  • 8
  • 19
  • 37
1
vote
1 answer

how to conditionally apply threshold in opencv

I have 2 types of image to deal. one with white background and another type with dark background. My requirement is to apply different thresholds for each type for ex : for white back ground (thresh, img_bin) = cv2.threshold(img, 128 , 255,…
1
vote
0 answers

Guidance on how to filter out the notices from the IMAGE before OCR

I have being working on OCR the image by python for a while but there are still rooms to be improved so your input and thoughts will be helpful. This is what I am currently doing and the ratio of successfully getting a valid ocrText output is…