Ask Your Question
1

How to extract data from edge detection of a video

asked 2014-11-20 01:31:58 -0600

maheshmcw gravatar image

updated 2017-09-10 16:39:48 -0600

Hi i am new to image processing.I want to predict a video status.assume if someone blur a video i need to find out that .to do this i get a original video and add the blur effect and compare original one and blur one.Using edge detection i want to compare these two videos.So i want to use canny edge detection.Is there any guide to help to do this project.I want to extract some information in edge video.i thought using canny edge detection identify edge and extract information from it.

edit retag flag offensive close merge delete

Comments

HI! Please precise your problem: if you want to see if someone blur a video, I would do differently than using Canny. So do you really need a binary edge map (canny) comparison or not?

petititi gravatar imagepetititi ( 2014-11-20 16:41:46 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-11-22 09:23:39 -0600

Hi!

I thing the best way to do this is to compare the mean edge response of the original video with the blurred one., You can do it like this:

Mat imgSrc, imgTest;
Mat edgeSrc, edgeTest;
double totalSum = 0, nbFrame = 0;
while(!srcVideo.empty())
{
   imgSrc = srcVideo.getFrame();
   imgTest= testVideo.getFrame();
   Sobel(imgSrc, edgeSrc, -1, 1, 0);
   Sobel(imgTest, edgeTest, -1, 1, 0);
   totalSum += sum(edgeSrc)[0] - sum(edgeTest)[0];
   nbFrame += 1.;
}
totalSum /= nbFrame ;

Then using totalSum, you know if the second video is blurred or not (if totalSum < 0, the test video is blurred...)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-11-20 01:31:58 -0600

Seen: 242 times

Last updated: Nov 22 '14