I just started using SS2-optimized image processing, but I have no idea for 3-channel 24-bit color images. My pixel data organized by BGR BGR BGR ..., unsigned char 8-bi, so if I want to implement Color2Gray with a C / C ++ instruction for SSE2 / SSE3 / SSE4, how would I do it? Do I need to align (4/8/16) for my pix data? I read the article: http://supercomputingblog.com/windows/image-processing-with-sse/ But this is ARGB 4-channel 32-bit color, it accurately processes 4 color pixel data each time. Thanks!
//Assume the original pixel: unsigned char* pDataColor=(unsigned char*)malloc(src.width*src.height*3);//3 //init pDataColor every pix val // The dst pixel: unsigned char* pDataGray=(unsigned char*)malloc(src.width*src.height*1);//1
// RGB-> Gray: Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
optimization image-processing opencv instructions sse2
user2163635
source share