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.

converting masked image area to signal

attemarkus
Beginner
169 Views
I want to do some calculations with masked area of the image with ipps functions. So is there some nice way to convert only masked area of the image to signal representation ? I know target signal length i.e. how many pixels masked area covers.

thanks,

Markus
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
169 Views
Markus,

do you mean 2D to 1D translation? I do not think we have anything else than just copy 2D area on row by row basis to 1D buffer of appropriate size.

Regards,
Vladimir
attemarkus
Beginner
169 Views
Vladimir,
Yes I meant that. So I need to check for every pixel is it masked or not.

Maybe in future you could add this kind of function to library. I think it would be quite useful when analyzing / extracting features of segmented images.

Regards,

Markus
Vladimir_Dudnik
Employee
169 Views

So you are looking for ippiCopy function with mask? What data type and number of channels do you consider important for your case?

Vladimir

attemarkus
Beginner
169 Views
Yes, ippiCopy with mask but so that destination is signal wich contains only masked values:

example

image
1 2
3 4

mask
0 1
1 0

result signal:
2 3

For result signal I currently calculate cosine and I also use sorting and SubCRev

For my purposes I need datatype Ipp32f. And I need only one channel operation, because I have 3 channel planar image. Or would it be much faster to copy with function ippiCopy_32f_C3P3MR (*) than three times with ippiCopy_32f_C1MR ?

( * ) actually library does not even contain function ippiCopy_32f_C3P3MR

regards,
Markus
Vladimir_Dudnik
Employee
169 Views
Markus,

this seems to be very speific usage and there is no much opportunities for cpu optimization. To be honest I do not see a value of putting that functionality into IPP (it will not be significantly faster compiled C code).

Regards,
Vladimir
Reply