- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The ippiCompare method requires 2 source and a temp. destination image for comparison. In some cases, it is enough to know the comparison result (bool) instead of having the difference pixels as well... Is there any fast and efficient way to do this with IPP?
Thanks,
Tamas
The ippiCompare method requires 2 source and a temp. destination image for comparison. In some cases, it is enough to know the comparison result (bool) instead of having the difference pixels as well... Is there any fast and efficient way to do this with IPP?
Thanks,
Tamas
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - mailtamas-nagy.net
Hi,
The ippiCompare method requires 2 source and a temp. destination image for comparison. In some cases, it is enough to know the comparison result (bool) instead of having the difference pixels as well... Is there any fast and efficient way to do this with IPP?
Thanks,
Tamas
The ippiCompare method requires 2 source and a temp. destination image for comparison. In some cases, it is enough to know the comparison result (bool) instead of having the difference pixels as well... Is there any fast and efficient way to do this with IPP?
Thanks,
Tamas
Hi Tamas,
Do you mean you hope to use a logical operation on compare two images, then you may try use ippiXor, for example, ippiXor_8u_C1IR(), In-place operation, it will use only two image, and write the result (Bool) in result image. ( 0 if same, 1 if difference)
Thanks
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tamas,
I don't see a function in ipp that would do the trick. Here are 3 solutions :
- To reduce the temp buffer size you could do an AbsDiff/Compare line by line and check if the Max/Min is 0/IPP_MAX_8U. Anyway, this will require 2 pass (AbsDiff/Compare then Max/Min).
- You could also use memcmp on the whole images or line by line if you require ROI.
- You could write a simple function which does exactly what you want using intrinsics or inline asm
For speed consideration, this will depend mostly on your data. For the 1st method, if images are the same most of the time, just sum the max of each line then compare otherwise, compare after each line.
Matthieu
I don't see a function in ipp that would do the trick. Here are 3 solutions :
- To reduce the temp buffer size you could do an AbsDiff/Compare line by line and check if the Max/Min is 0/IPP_MAX_8U. Anyway, this will require 2 pass (AbsDiff/Compare then Max/Min).
- You could also use memcmp on the whole images or line by line if you require ROI.
- You could write a simple function which does exactly what you want using intrinsics or inline asm
For speed consideration, this will depend mostly on your data. For the 1st method, if images are the same most of the time, just sum the max of each line then compare otherwise, compare after each line.
Matthieu
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page