Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6774 Discussions

IPP black/white threshold (like iplThreshold)

sdl
Beginner
560 Views
Hi,
I'm currently investigating and benchmarking IPP as an upgrade to IPL and noticed that a straightforward threshold function is missing.
I'm looking for a threshold function that sets pixels either to the maximum value (if higher that the threshold) or to the minimum value (if lower). So for a 8-bit image, pixels will be either set to 255 or 0 (like the IPL function iplThreshold).

The function closest matching this functionality is Threshold_LTValGTVal, but not all pixels can be changed because you can't have overlapping threshold values and can only use greater or less than, or otherwise I get the error ippStsThresholdErr.
Also, any of the threshold functions with a settable specified value take twice as long as IPL!
Any suggestions on what best to use?
Cheers.
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
560 Views

Hello,

you probably can use sequence of two IPP functions, ippiThreshhold_LTVal and ippiThreshold_GTVal

Vladimir

0 Kudos
chris_griffin
Beginner
560 Views
pace_sdl,

Was there any followup on the performance issue that you raised here?

I have similar performance concerns about IPP, and I'm seeking to understand why it seems to be slower for some operations (like Set) than regular C++ code doing the same pixel set operation.

Any info helpful,

Chris



0 Kudos
Vladimir_Dudnik
Employee
560 Views

Hello Chris,

we constantly work on improving performance of IPP functions. Could you please an example of code which demostrate the case when regular C++ is faster then ippiSet function?

Regards,
Vladimir

0 Kudos
chris_griffin
Beginner
560 Views
Hi Vladimir,

I ran across this a few weeks ago. When I get a chance, I'll put together a code sample which times the two against each other. Right now its hard because the calls are buried in my image class methods, and the code which calls them would be hard to share here.

Look back sometime next week, as I'm anxious to understand this.

Thanks!
Chris

0 Kudos
Vladimir_Dudnik
Employee
560 Views

Ok, will wait for your case.

Vladimir

0 Kudos
Reply