简体   繁体   English

使用Intel IPP镜像BGR(24位)图像

[英]Mirror BGR (24 bit) image using Intel IPP

I'm trying to mirror a raw (without image header) BGR image, 8 bit per pixel, using the following code: 我正在尝试使用以下代码镜像原始(无图像标头)BGR图像,每像素8位:

void mirrorBGR(byte* src, byte* dst, UINT width, UINT height, UINT pitch_s, UINT pitch_d)
    {
        IppiSize size;
        size.width = width;
        size.height = height;
        IppStatus status = ippiMirror_8u_C3R(src, pitch_s, dst ,pitch_d, size, ippAxsVertical);
        if (status != ippStsNoErr)
        {
            printf("Mirror RGB24 failed: %d",status);
        }
    }

The image size is 640x360. 图像尺寸为640x360。 pitch_s = pitch_d = width = 640. What could be the problem? pitch_s = pitch_d =宽度=640。可能是什么问题?

Pitch is the scanline length for source & dest bitmaps. 间距是源和目标位图的扫描线长度。

If you use no padding, at least it should 640 (width) * 3 (bytes per pixel) = 1920 如果不使用填充,则至少应为640(宽度)* 3(每像素字节)= 1920

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM