Ask Your Question

david cairns's profile - activity

2020-01-03 00:10:56 -0600 commented question skew angel correction using java

I have tried this :- BOOL CScannedDocTestDoc::OnOpenDocument(LPCTSTR lpszPathName) { m_Image.Destroy(); HRESULT

2020-01-02 00:10:01 -0600 asked a question skew angel correction using java

skew angel correction using java I read the tutorial about skew angel correction in this site. but i need to convert tho

2019-12-09 08:15:28 -0600 edited question Glare detection in image

Glare detection in image Hi all, i'm trying to detect glare in image using opencv 3.3.1 in my android application. i am

2019-12-09 07:30:44 -0600 received badge  Organizer (source)
2019-04-12 04:17:34 -0600 received badge  Enthusiast
2019-03-06 00:39:29 -0600 marked best answer Glare detection in image

Hi all,

i'm trying to detect glare in image using opencv 3.3.1 in my android application. i am use GaussianBlur and than using MinMaxLocResult get the min and max value of the glare. it's working find but sometime if background is black and image does not contain any glare also detect glare.

Here the code :-

   public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) 
   {
    final Mat Rgba = inputFrame.rgba();
    Mat grayScaleGaussianBlur = new Mat();
    Imgproc.cvtColor(Rgba , grayScaleGaussianBlur, Imgproc.COLOR_BGR2GRAY);
    Imgproc.GaussianBlur(grayScaleGaussianBlur, grayScaleGaussianBlur, new Size(5, 5), 0);

    Core.MinMaxLocResult minMaxLocResultBlur = Core.minMaxLoc(grayScaleGaussianBlur);

    final double maxval = minMaxLocResultBlur.maxVal;
    final double minval = minMaxLocResultBlur.minVal;


    if (maxval >= 253.0 && minval > 0.0 && minval < 20.0) {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                try {

                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });

    } else {
        if (popup.isShowing()) {
            runOnUiThread(new Runnable() {

                @Override
                public void run() {

                }
            });

        } else {

            Bitmap rotatedBitmap = Bitmap.createBitmap(Rgba.cols(), Rgba.rows(), Bitmap.Config.ARGB_8888);
            Utils.matToBitmap(Rgba, rotatedBitmap);
        }
    }
2019-03-06 00:39:29 -0600 received badge  Scholar (source)
2019-01-04 07:03:17 -0600 commented question how to match two images

above snippet of code is right what actual problem you face?

2018-12-26 04:39:46 -0600 received badge  Supporter (source)
2018-12-19 03:23:13 -0600 commented question Glare detection in image

anyone have an idea about this issue???

2018-12-19 03:13:43 -0600 received badge  Student (source)
2018-12-19 01:40:24 -0600 received badge  Editor (source)
2018-12-19 01:40:24 -0600 edited question Glare detection in image

Glare detection in image Hi all, i'm trying to detect glare in image using opencv 3.3.1 in my android application. i am

2018-12-19 01:37:16 -0600 asked a question Glare detection in image

Glare detection in image Hi all, i'm trying to detect glare in image using opencv 3.3.1 in my android application. i am