Ask Your Question
1

android : Blur detection using OpenCV

asked Sep 27 '19

quinch gravatar image

updated Sep 30 '19

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.

Preview: (hide)

Comments

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

berak gravatar imageberak (Sep 27 '19)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 (Sep 27 '19)edit

1 answer

Sort by » oldest newest most voted
1

answered Sep 30 '19

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Sep 27 '19

Seen: 1,857 times

Last updated: Sep 30 '19