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
0
votes
1 answer

Robust estimation of volume of transparent liquid using image processing

I'm working on a project which involves determining the volume of a transparent liquid (or air if it proves easier) in a confined space. The images I'm working with are a background image of the container without any liquid and a foreground image…
0
votes
2 answers

Opencv, Python - How to remove the gray pixels around the date text

I am trying to remove the grayish “noise” surrounding the dates using Python/OpenCV to help the OCR (Optical Character Recognition) to recognize the dates. The original image looks like this:…
koayst
  • 2,095
  • 3
  • 17
  • 16
0
votes
0 answers

How can I avoid the overflow?

I need to convert an image to HSV. I used the library OpenCV but when I run my algorithm I have the following warning: RuntimeWarning: overflow encountered in ubyte_scalars I want to calculate distance between two HSV piexels. I implemented the…
AlexDr
  • 13
  • 4
0
votes
0 answers

thresholding base on histograms

I have an image which I want to turn into a binary one(only black and white) I want to determine the threshold based on the histogram of the image, so in the min point in the hist the thresholding will begin. for example I have attached a photo of a…
Hodaya
  • 1
  • 1
0
votes
0 answers

How to solve Mat RIO assertion failure error

I am getting error with the following code where 'src' is a gray image - applyLocalThresh(cv::Mat &src, cv::Mat& out){ double maxVal, minVal; cv::Mat output; int top, bottom, left , right; int borderType = cv::BORDER_CONSTANT; cv::Scalar…
0
votes
0 answers

How to binarize an image using local thresholding with opencv

I want to binarize an image using local thrersholding( localized Otsu, Niblack, Sauvola ). I have implemented global Otsu. See the following…
0
votes
1 answer

How to obtain solid shape with adaptive threshold

Is it possible to get solid shape with adaptive threshold? In my case (A) I can only get hollow shape, but it seems like in some cases (B) it is possible to get solid shape. (see picture below) What is the requirement of the input to achieve solid…
0
votes
2 answers

Thresholding without using OpenCV

I need to threshold my image without using OpenCV function. I know this way only, but in this case I am using cv2.threshold function from OpenCV: img = cv2.imread('filename', 0) _, thresh = cv2.threshold(img,127,255,cv.THRESH_BINARY) How can I…
rauffatali
  • 43
  • 1
  • 6
0
votes
0 answers

Standardize dirty images by pre-processing for OCR

I'm working on a project to study the problem faced in OCR'ing images from different sources however this question is limited to camera captured images. samples are from books , question papers etc What I'm looking for is a way by which I can make…
0
votes
1 answer

Apply two thresholds on a image to detect the edge

I am trying to detect edges on a welding image. On one side of the image i can easily detect the edge by using simple thresholding in open cv with the threshold value that matched in this area, but this threshold value is too low for the other side.…
0
votes
1 answer

MATLAB: Prepare an RGB image for digit and letter recognition

I need a Matlab function that prepares an image for digit and letter recognition. What I need now is to convert the original RGB image to a binary image that every pixel in it is white except the pixels corresponding to letters and digits, as well…
sci9
  • 700
  • 1
  • 7
  • 21
0
votes
1 answer

Byte array into the greyscale. Android take photo

When I am making photo in android I receive a byte array from camera. I would like to convert this array(image) into the 2 colors - white and black. Any ideas? Changing camera mode to mono/negative is not a sollution for me. Greetings. EDIT1: Code…
CallMePedro
  • 51
  • 3
  • 19
0
votes
1 answer

Python OpenCV cv2.threshold is not finding straight horizontal lines/rows in image (jpg)

I have a .jpg containing an image of a table which I am attempting to extract to Excel, using Python. I am following an example from…
GoodJuJu
  • 1,296
  • 2
  • 16
  • 37
0
votes
0 answers

Python,Image processing , Morphology

This is our image processing homework, I know that we have to use morphological methods,and some cv2 methods like threshold , and we have to work on it as a colorful picture cause in Gray scale we will lose some information which we need. We have to…
0
votes
0 answers

Thresholding image in LAB color space

I'm thresholding an image in LAB space (to extract certain color on DAB stained tissue slide). However I'm stumped as to what values to put for the thresholded pixel. Both 0 and 255 mean a color on the a-channel and b-channel. Using 127 (neutral…
Darshat
  • 73
  • 1
  • 1
  • 5