Im preprocessing a qrcode to read it. I threshold the image, but sometimes I get a fuzzy black output, sometimes i get the proper binary image. Why is this happening? IM using C# and Emgucv.
Here is my code:
Image<Gray, byte> grayimg = inoutImg.Convert<Gray, byte>();
grayimg = grayimg.ThresholdBinary(new Gray(this.tbbcrthreshold.Value), new Gray(255));
bcrthreshimgbox.Image = grayimg.Bitmap;
This is the Image im trying to threshold:
And this is the Image I get sometimes after i crop the image using roi :
Because of this, im unable to read the code.