24小时热门版块排行榜    

CyRhmU.jpeg
查看: 203  |  回复: 0

bemy1004

银虫 (小有名气)

[求助] C代码输入求助

各位懂C/C++的高手,请帮忙看看下面的代码中Image需要怎样输入?我想实现将一幅RGB的图像信息(高、宽、通道数)读入到img中。
具体代码如下:
{
        Image img;
        img.imgPtr = (ImgPtr)&ImgRGBPool8[0];  //不太理解该步

        img.cols = 352;
        img.rows = 288;  //设置图像尺寸

        BYTE* PICTUREDATA = (BYTE*)0xee000000;
        memcpy(img.imgPtr, PICTUREDATA, img.cols * img.rows *sizeof(char));
}
其中 Image 为结构体
typedef struct Image
{
        ImgPtr  imgPtr;
        int rows;
        int cols;
}Image;
数组指针ImgRGBPool8为四维数组
//8bits*3 cell
unsigned char  ImgRGBPool8[MaxMatNum][RGBCHANNEL][MAXROWS][MAXCOLS];
#define MaxMatNum  2;
#define RGBCHANNEL 3;
#define MAXROWS   400;
#define MAXCOLS   400;       

个人能力有限,30金币不成敬意!
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 bemy1004 的主题更新
信息提示
请填处理意见