Ask Your Question
1

android : Blur detection using OpenCV

asked 2019-09-27 06:31:19 -0600

quinch gravatar image

updated 2019-09-30 07:30:57 -0600

Hello, i am developing an application which is capture the users id's images and OCR from those id's so i need to detect blur using OpenCV because some time users capture images in lighting condition. so that time OCR not work properly.

edit retag flag offensive close merge delete

Comments

and how exactly is your question releated to opencv ? what have you tried already ?

berak gravatar imageberak ( 2019-09-27 06:40:13 -0600 )edit

code:

val destination = Mat()
        val matGray = Mat()
        Utils.bitmapToMat(bitmap, sourceMatImage)
        Imgproc.cvtColor(sourceMatImage, matGray, Imgproc.COLOR_BGR2GRAY)
        Imgproc.Laplacian(matGray, destination, 3)
        val median = MatOfDouble()
        val std = MatOfDouble()
        Core.meanStdDev(destination, median, std)
        return DecimalFormat("0.00").format(Math.pow(std.get(0, 0)[0], 2.0)).toDouble()
quinch gravatar imagequinch ( 2019-09-27 06:52:10 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-09-30 05:25:53 -0600

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-09-27 06:31:19 -0600

Seen: 1,765 times

Last updated: Sep 30 '19