Image change detection using ippiNormRel_L2_8u_C1R

Image change detection using ippiNormRel_L2_8u_C1R

I am trying to determine if a series of images that I am streaming from a camera attached to a microscope is the same (up to some limit) - basically to know if the camera or sample under inspection has been moved.Since the images are streamed live the change detection has to be fast. The technique also has to be able to handle some random image noise and small changes in overall illumination of the sample.Looking at the ippIP Demo app, I saw something called Image Compare under ippIP/Image Statistics. I've been playing around with ippiNormRel_L2_8u_C1R() and it seems to work OK. Is this an acceptable way to achieve what I want? Or are there better/more robust methods? I read about background differencing in the IPP manual, as well as other methods like cross correlation.

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting cks2k2I am trying to determine if a series of images that I am streaming from a camera attached to a microscope is the same (up to some limit) - basically to know if the camera or sample under inspection has been moved.

[SergeyK] I use a different technique inan application that receives a video stream from a web camera.
Since a frame rate in my case can be up to120 fps I use a subtract operation between alast frame and
a previous frame. Itsatisfies all performance requirements. In essence, I do almost the same
thing as you do. That is, the applicationtries to detect if some target has moved.
Since the images are streamed live the change detection has to be fast. The technique also has to be able to handle some random image noise and small changes in overall illumination of the sample. Looking at the ippIP Demo app, I saw something called Image Compare under ippIP/Image Statistics. I've been playing around with ippiNormRel_L2_8u_C1R() and it seems to work OK.

[SergeyK] L2-norm of pixel values ( Equation: n = SQRT(SUM |src1 - src2|^2 / SUM |src2|^2) ) can not
be faster than a simple subtract operationfollowed by some statisticalanalysis. However,
a set of tests could help you to identify afastest method for detection of image differences.

Is this an acceptable way to achieve what I want? Or are there better/more robust methods? I read about background differencing in the IPP manual, as well as other methods like cross correlation.

[SergeyK] In case of a real-time applications I wouldn't use a Cross Correlation method.

Best regards,
Sergey

Hi Sergey, what type of statistical analysis are you doing for the difference image?

Quoting cks2k2Hi Sergey, what type of statistical analysis are you doing for the difference image?

Average andStandard Deviation.Also,the most "changed" area of the image isdefined and then displayed ( ROI).

Quoting cks2k2...Or are there better/more robust methods?..
Anothermethod ofdetecting differencesin two frames / imagescould bebased on using Intel instruction PSADBW (Sum of Absolute Differences/ SAD ) or
a set of intrinsic functions _mm_sad_... .

There is also an example Motion Estimation Algorithms using SSE3on Intel website. I could try to find itif you're interested.

Please alsotake a look at:

http://en.wikipedia.org/wiki/Sum_of_absolute_differences

for a more generic description of themethod thatcompares two imagesusing SAD.

Best regards,
Sergey

Quoting Sergey Kostrov...There is also an example Motion Estimation Algorithms using SSE3on Intel website...

Please take a look at attached zip-file.

Attachments: 

AttachmentSize
Downloadapplication/zip W_motion_est.17686.zip6.6 KB

Leave a Comment

Please sign in to add a comment. Not a member? Join today