converting masked image area to signal

converting masked image area to signal

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

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

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

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

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

Vladimir

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

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

Leave a Comment

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