Ask Your Question

Revision history [back]

Brigthtness detecction

I am currently working on a project to detect the brightness of an IDCARD. I am using OPENCV and C # to perform Image processing. Can someone help me as I can detect the brightness in any environment taking into account that it will work with different resolutions (Cameras). This is my code.

Imgproc.CvtColor(p0: dstMask, p1: gray, p2: Imgproc.ColorRgb2gray); Imgproc.GaussianBlur(gray, briQ, new LogicStudio.Camera.Core.Size(11, 11), 0); Imgproc.Threshold(briQ, thresh, 200, 255, Imgproc.ThreshBinary);

Core.MinMaxLocResult minmaxResultBlur = Core.MinMaxLoc(briQ); double maxval = minmaxResultBlur.MaxVal; double minval = minmaxResultBlur.MinVal; if (maxval >= 252 && minval >= 0.0 && minval <= 30.0 ) { Imgproc.PutText(input, "Brillos detectados mueva la camara..!!", new LogicStudio.Camera.Core.Point(20, 200), 4, 1.0, new Scalar(0, 255, 0)); }

Brigthtness detecction

I am currently working on a project to detect the brightness of an IDCARD. ID card. I am using OPENCV OpenCV and C # C# to perform Image processing. Can someone help me as I can detect the brightness in any environment taking into account that it will work with different resolutions (Cameras). camera resolutions. This is my code.code:

Imgproc.CvtColor(p0: dstMask, p1: gray, p2: Imgproc.ColorRgb2gray);
Imgproc.GaussianBlur(gray, briQ, new LogicStudio.Camera.Core.Size(11, 11), 0);
Imgproc.Threshold(briQ, thresh, 200, 255, Imgproc.ThreshBinary);

Imgproc.ThreshBinary);

Core.MinMaxLocResult minmaxResultBlur = Core.MinMaxLoc(briQ); double maxval = minmaxResultBlur.MaxVal; double minval = minmaxResultBlur.MinVal; if (maxval >= 252 && minval >= 0.0 && minval <= 30.0 ) { { Imgproc.PutText(input, "Brillos detectados mueva la camara..!!", new LogicStudio.Camera.Core.Point(20, 200), 4, 1.0, new Scalar(0, 255, 0)); }

}