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
0 answers

Image Processing: Segmentation of Optic Disc

I'm new in image processing. I work in my project now to segment optic disc in retinal images. I did the ROI selection, red channel extraction, applying filter, thresholding, and then morphological operations. Here is the code and the input…
1
vote
1 answer

How do I find local threshold for coefficients in image compression using DWT in MATLAB

I'm trying to write an image compression script in MATLAB using multilayer 3D DWT(color image). along the way, I want to apply thresholding on coefficient matrices, both global and local thresholds. I like to use the formula below to calculate my…
Nitwit
  • 291
  • 3
  • 13
1
vote
1 answer

How to clean (delete) a black frame/boundaries/countour at the edges of the image after adaptive thresholding

I applied adaptive gaussian thresholding to my .tif image, but the black frame (contour) on the edges was created. Can't understand why and how to delete. I would be very grateful for your help! p.s. After …
1
vote
1 answer

How to fix the colors of the image to get a better thresholding result?

I'm trying to threshold the hand in the following image original image using the following code: img = cv2.GaussianBlur(crop_img,(25,25),0) img_YCrCb = cv2.cvtColor(img, cv2.COLOR_BGR2YCrCb) #skin color range for hsv color space …
1
vote
1 answer

Change background color for Thresholderd image

I have been trying to write a code to extract cracks from an image using thresholding. However, I wanted to keep the background black. What would be a good solution to keep the outer boundary visible and the background black. Attached below is the…
1
vote
0 answers

Unable to fully fill features with thresholding

I am using MATLAB to analyze some features on a grayscale image through thresholding. I have the following code snippet which is able to identify most of the features of interest (an example is attached). However, imfill is unable to fully fill…
Ari
  • 35
  • 3
1
vote
2 answers

OpenCV running otsu thresh on video gives weird window

I am trying to run this opencv code to run otsu tresh on my image and get mask import cv2 import numpy as np video = cv2.VideoCapture('video.mp4') # loop runs if capturing has been initialized while True: # reads frames from a camera …
Dark Apostle
  • 189
  • 4
  • 18
1
vote
1 answer

Interpretation SSIM skimage.metrics.structural_similarity()

I am working with medical images in python. I generate a binary threshold of this image (ImageA, 0, 1 encoded). From this image, I run a detection algorithm that generates another image B (also binary 0,1 encoded) and aims to detect the structures…
Phil
  • 29
  • 5
1
vote
2 answers

How can I get the required ROI in the below image using OpenCV (Python)?

So, I'm working on finding the small components on an electric chip that can be seen in the image. Till now, I have been working on finding the contours and then applying the Morphology operation and drawing the rectangles. I am attaching the…
Hasnain Khan
  • 323
  • 2
  • 7
1
vote
0 answers

Making threshold images smoother and thinner to use in point cloud

I have 75 photos of a "light section", and I thresholded the pictures. Now, I want to make those thresholds smoother and thinner because I will use them to calculate a point cloud. I don't know how to make them thinner, smoother, and more…
1
vote
1 answer

more thresholding algoritms in Python?

. I have been using ImageJ to process images, but now I would like to have my workflow entirely in Python, if possible. Until now I found everything I need using OpenCV, except one thing: ImageJ has a really nice number of thresholding methods which…
terauser
  • 53
  • 5
1
vote
1 answer

OpenCV output of Adaptive Threshold

I am a newbie in android, and open CV both. However, I am trying to take an image from the camera, convert it into the desired format, and pass it to the tflite model. Code for capturing image, and applying image processing to it. public Mat…
1
vote
1 answer

Threshold an image using RBG

I would like to threshold an image, but instead of the output being black and white I would like it to be white and some other color. I was able to achieve this using a nested for-loop however this is slow and I was wondering if anyone knows any…
1
vote
2 answers

Finding a better threshold in a more accurate manner in OpenCV

I have a grayscale image, the dominant colors in the background are shades of white and light gray, I have tried using otsu binarization but it gave no good results, so I decided according to the histogram below to write manually: img_gray[img_gray…
JammingThebBits
  • 732
  • 11
  • 31
1
vote
2 answers

Reduce components included by otsu threshold python opencv

I am trying to segment the blue components from a set of images. In most images where blue components have a large spread, otsu thresholded image works properly well. However, for images where blue components are minimal, the results are not ok…
1 2
3
12 13