Hi, I am new to IPP society. I believe the problemcould be solved by using IPP image process functions.
My problem is following:
There are two Grayscaleimages(8 bits) which havesame width andheight . Let image1 be first image and image2 be the second image. Let Image2 rotate 45 degree, so in image2, there are some area is black.
Ineed to use IPPfunctions to process images so that thefinal image will be: in black area of image2, final image will show image1's correspondingarea(so image2 has total transparency in black area). In no black area of image2, final image will show image2's corresponding area. Final image's width and height is same as image1 and image2.
It seems I should use ippiAlphaComp_8u_AC1R
or ippiAlphaCompC_8u_C1R with "OUT" type compositingoperation.
However, from testing, it doens' look right. From description in imageing tersm ,
"OUT" type operation should be " A outside B. NOT_B acts as a matter for A.
A shows only where B is not visible".
But I get mixed resultwhere A andB bothare visible. Only correct result where
B is not visible.
Could you please give detail help on how shouldI do this?
Thank you very much for the help!
alpha composition compute all of image1 and image 2 data. You may see mixed image result. Possibly you can check the mask copy function, use image B data as mask. It will only copy none zero (not black) data:
ippiCopy_8u(image2, int srcStep, image1, int dstStep, IppiSize roiSize, image2, int maskStep);