Questions tagged [adaptive-threshold]

80 questions
2
votes
0 answers

Detecting a sheet of paper inside an image like cam-scanner app

Out of an image, I need to extract a sheet of paper, just like camscanner app does, https://www.camscanner.com/ I know that I can do this by detecting the edges of the sheet of paper i want to detect. And later performing perspective transform. I…
2
votes
1 answer

Calculate binary optimal threshold ImageJ based on foreground/background mean

I was researching on how to calculate an Optimal Threshold for ImageJ and found this explanation of the Otsu Thresholding, which I thought made perfect sense for me to use. I've struggled with implementing it though, and after some thought I found a…
gizmo
  • 81
  • 8
2
votes
0 answers

How to reconstruct the signal by applying thresholding on wavelet coefficients?

I want to reconstruct a 1D audio signal by thresholding the wavelet coefficients. First of all, I read the audio signal and normalised it. After that I added white Gaussian noise. Subsequently I calculated the maximum volume level for…
2
votes
0 answers

Connect broken lines of detected wrinkles in an image using Java opencv

I am working on a program to detect wrinkles in an image taken from a high resolution camera. Currently the project is in its starting phase. I have performed the following steps until now: Convert to grayscale and contrast the image. Remove…
edeesan
  • 326
  • 3
  • 16
2
votes
0 answers

Adaptive threshold crash

I'm segmenting characters using adaptiveThreshold(crops_gray, crops_gray_resized, 255, CV_ADAPTIVE_THRESH_GAUSSIAN_C, CV_THRESH_BINARY_INV,121,-35); I'm also using adaptiveThreshold(crops_gray, thresh, 255, CV_ADAPTIVE_THRESH_GAUSSIAN_C,…
GodIsAnAstronaut
  • 351
  • 5
  • 17
2
votes
0 answers

OpenCV Adaptive Thresholding in Java

The javadoc mentions signature of adaptive threshold function as adaptiveThreshold(src, dst, maxValue, adaptiveMethod, thresholdType, blockSize, C) I need to somehow put in values for blockSize and C(offset) automatically given a particular image.…
2
votes
1 answer

Javascript Bradley adaptive thresholding implementation

I have been trying to implement Bradley Adaptive thresholding. I know there is a python code in one of the stack overflow questions. But i am struggling to implement the same in JS by following that. Can anyone please help me? So far my code is: …
thegeek
  • 81
  • 2
  • 7
2
votes
1 answer

OpenCV / C++ - How to use adaptiveThreshold on vector instead of Mat?

I have a question about using the adaptiveThreshold function from OpenCV in C++. (Here is it's documentation.) void adaptiveThreshold(InputArray src, OutputArray dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double…
nburk
  • 22,409
  • 18
  • 87
  • 132
2
votes
2 answers

Robust image segmentation in OpenCV

I'm trying to write an OpenCV program that counts fish eggs for someone else. It currently takes their uploaded image, normalizes, blurs, thresholds, dilates, distance transforms, thresholds again, and then finds contours (like in a typical…
vityav
  • 268
  • 3
  • 14
2
votes
1 answer

OpenCV binary adaptive threshold OCR

I need to convert some images to binary for OCR. Here are the functions I am using: Mat binarize(Mat & Img, Mat& res, float blocksize, bool inverse) { Img.convertTo(Img,CV_32FC1,1.0/255.0); CalcBlockMeanVariance(Img,res, blocksize,…
Clip
  • 3,018
  • 8
  • 42
  • 77
2
votes
2 answers

Adaptive Thresholding - Implementation of the Minimum Error Thresholding Method

I'm trying to implement the following Minimum Error Thresholding (By J. Kittler and J. Illingworth) method in MATLAB. You may have a look at the PDF: Scribd - Minimum Error Thresholding. DocDroid - Minimum Error Thresholding. My code is: function…
Royi
  • 4,640
  • 6
  • 46
  • 64
2
votes
2 answers

Disconnected contours after adaptive threshold

I'd like to adaptively threshold this image to find the outer border using findContours() from OpenCV. I use an adaptive threshold for the usual reason: global thresholding, even with Otsu's method, does not adequately compensate for differences in…
1''
  • 26,823
  • 32
  • 143
  • 200
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
0 answers

extract rectangular shape id card area from an image

I have a hundreds of ID card images which some of them provided below: (Disclaimer: I downloaded the images from the Web, all rights (if exist) belong to their respective authors) As seen, they are all different in terms of brightness,…
bit_scientist
  • 1,496
  • 2
  • 15
  • 34
1
vote
2 answers

How can I improve color thresholding output?

See: Converting An Image To A Cartoon Using OpenCV In the above article they have the following image: And, they wanted to obtain an output like the following: I ran the following script: import cv2 window_name = 'image' img =…
user366312
  • 16,949
  • 65
  • 235
  • 452