Ask Your Question

Revision history [back]

How to improve grayscale image quality for eye detection?

Hei guys,

Currently I am converting preview frames into grayscale using the codes below:

        Imgproc.cvtColor(matYuv, matRgb, Imgproc.COLOR_YUV420sp2RGB, 4);
        Imgproc.cvtColor(matRgb, matGray, Imgproc.COLOR_RGB2GRAY, 0);

I am using this preview frames for eye detection using haarcascades_eye.xml cascade classifier. Before passing the region of interest for eye detection, I'm doing some preprocessing as below:

        Imgproc.equalizeHist(matGray, matGray);

However, I find that the image produces is distorted as in "white washed" when the lighting is low and as a consequence, the eye detection is bad. Is there any preprocessing that can be done to enhance this images?

Thanks.

click to hide/show revision 2
retagged

updated 2014-06-23 05:02:25 -0600

berak gravatar image

How to improve grayscale image quality for eye detection?

Hei guys,

Currently I am converting preview frames into grayscale using the codes below:

        Imgproc.cvtColor(matYuv, matRgb, Imgproc.COLOR_YUV420sp2RGB, 4);
        Imgproc.cvtColor(matRgb, matGray, Imgproc.COLOR_RGB2GRAY, 0);

I am using this preview frames for eye detection using haarcascades_eye.xml cascade classifier. Before passing the region of interest for eye detection, I'm doing some preprocessing as below:

        Imgproc.equalizeHist(matGray, matGray);

However, I find that the image produces is distorted as in "white washed" when the lighting is low and as a consequence, the eye detection is bad. Is there any preprocessing that can be done to enhance this images?

Thanks.

click to hide/show revision 3
retagged

updated 2014-06-23 05:02:39 -0600

berak gravatar image

How to improve grayscale image quality for eye detection?

Hei guys,

Currently I am converting preview frames into grayscale using the codes below:

        Imgproc.cvtColor(matYuv, matRgb, Imgproc.COLOR_YUV420sp2RGB, 4);
        Imgproc.cvtColor(matRgb, matGray, Imgproc.COLOR_RGB2GRAY, 0);

I am using this preview frames for eye detection using haarcascades_eye.xml cascade classifier. Before passing the region of interest for eye detection, I'm doing some preprocessing as below:

        Imgproc.equalizeHist(matGray, matGray);

However, I find that the image produces is distorted as in "white washed" when the lighting is low and as a consequence, the eye detection is bad. Is there any preprocessing that can be done to enhance this images?

Thanks.