1
$\begingroup$

I have clear images of cards vs blurry images of card. My task is to capture photo when the image is not blurry, as you can see from the description I need this code to run in real time on android device.

I have done some background reserarch on this topic 'Identify blurry image'. And found out few interesting solutions.

  1. Apply opencv transforms such as laplace or sobel filter. The blurry image will have less edges. And then using techniques such as SVM to find out which image has less edges
  2. Use other opencv transforms similar to sobel to get edges of images and then find image with less edges.

Although these transforms produce good output. They are badly slow. I need something which has speed similar to tflite object detection using android. Taking this logic in my mind my obvious step was to annotate images 1500(blurred cards) vs 1500(non blurry cards) and retrain ssdmobilenet model using tensorflow object detection api.

My dataset

(clear) enter image description here

(blur) enter image description here

However when I exported the trained model to android I completely messy output, it appears as though the model has not learned anything from the data. My question is Is this problem solvable using object detection api as I mentioned above ? if yes where am I going wrong ? If no what are the fastest alternatives to detect blur in real time

$\endgroup$
  • 1
    $\begingroup$ The easiest way would be not to use any ML. Just run canny edge detection (it's blazingly fast) and count pixels, which are edges. $\endgroup$ – Piotr Rarus - Reinstate Monica Nov 29 '19 at 14:37
  • $\begingroup$ @PiotrRarus-ReinstateMonica How do you generalize this problem ? lets say for iowa state I have 75 dots for clear image and 10 dots for blurry image for frame 1 in the video for frame 2 I get 25 dots for clear image and 15 dots for blurry image (this can be due to external lighting conditions) each time these number of dots will change depending on lighting conditions and glare on the card. I dont know how this solution can work out in real world without applying SVM, a step which I want to avoid because I want blur vs no blur in real video footage. $\endgroup$ – Ajinkya Nov 30 '19 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.