Loading of 1-bit images

Loading of 1-bit images

andrea.teschioni@elsag.it's picture


Dear Sirs,
I have to manage (e.g. load) images having
depth of 1 bit.

Is it possible to do that with IppiMalloc_8u_C1 or does it exist something
specific ?

Thanks and regards
Andrea Teschioni

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Deleted user's picture

I don't think you can work with 1 bit depth images in IPP. You have to convert to 8 bits.

i.e.

ippiMalloc_8u_C1(width, height, step);
ippiConvert_1u8u_C1R(p1bitImage, step1bit, 0, p8bitImage, step8bit, roiAll);

Out of curiosity, what are you working on? Are there many embedded systems or software engineering jobs available in northern italy? Next year I would like to work there! :)

Ross

andrea.teschioni@elsag.it's picture

Thank you very much for your answer Ross.

For the second question, I was born and I live in Genoa, very nice town in Northern Italy on the sea.

I think that at this time it's not easy to find employments on embedded systems and so on in my town, but I think that in Milan you could find it easier.

Regards.
Andrea

andrea.teschioni@elsag.it's picture

Ross,
I tried your suggestion but it does not seem work well.

Could you better explain the solution ?

vladimir-dudnik (Intel)'s picture

Hi,

IPP does not have functions to work with 1u images directly. Instead of that we propose you to convert 1u image to 8u image (there are special functions in IPP to do that) and after converting it you can use any IPP functions wich work with 8u data.

Regards,
Vladimir

andrea.teschioni@elsag.it's picture

Hi Vladimir and thank you for your answer.

I effectively tried to use IppiMalloc_8u_C1R
and then IppiConvert_1u8u_C1R but it seems
not working.

Perhaps I do wrongly use the "steps" in the IppiConvert
procedure ...

Could you help me in this ?

Thank you again
Andrea

vladimir-dudnik (Intel)'s picture

Well,

at least, I can try:)

In IPP, the step parameter is always in bytes. It specifies number of bytes between adjacent lines in image. For example, for image with width 9x3 bits step should be 2 if there is no any padding bytes at the end of line.

Regards,
Vladimir

Login to leave a comment.