Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
6669 Discussions

Image change detection using ippiNormRel_L2_8u_C1R

cks2k2
Beginner
155 Views
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.
0 Kudos
5 Replies
SergeyKostrov
Valued Contributor II
155 Views
Quoting cks2k2
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.

[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

cks2k2
Beginner
155 Views
Hi Sergey, what type of statistical analysis are you doing for the difference image?
SergeyKostrov
Valued Contributor II
155 Views
Quoting cks2k2
Hi 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).

SergeyKostrov
Valued Contributor II
155 Views
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
SergeyKostrov
Valued Contributor II
155 Views
...There is also an example Motion Estimation Algorithms using SSE3on Intel website...


Please take a look at attached zip-file.

Reply