图像灰度反转实验,需要对图像显示属性作设置,步骤为:view—》graph—》Image,按照数据手册上的设置,将Start Address —R Source 设置为 dbImage Start Address —G Source dBImage Start Address —B Source 后,单击ok,弹出警告对话框 Start Address :identifier not found :dbImage 这是什么原因啊?有研究过的吗? 其实也并不太明白,为什么R,G,B的起始地址要从 dBImage 开始。
__________________________________________________________________________________________________________________________
#define IMAGEWIDTH 80
#define IMAGEHEIGHT 80
#define MODEGRAYBAR 0
#define MODEGRAY 1
#define MODEPHOTO1 2
#define MODEPHOTO2 3
#define MODEPHOTO3 4
#define MODEPHOTO4 5
void InitImage(unsigned int nMode,unsigned char *pImage,int nWidth,int nHeight);
unsigned char dbImage[IMAGEWIDTH*IMAGEHEIGHT];
unsigned char dbTargetImage[IMAGEWIDTH*IMAGEHEIGHT];
/* 直方图统计实验程序 */
int main()
{
InitImage(MODEGRAYBAR,dbImage,IMAGEWIDTH,IMAGEHEIGHT);
Reverse(IMAGEWIDTH,IMAGEHEIGHT);
InitImage(MODEGRAY,dbImage,IMAGEWIDTH,IMAGEHEIGHT); //BreakPoint
Reverse(IMAGEWIDTH,IMAGEHEIGHT);
InitImage(MODEPHOTO1,dbImage,IMAGEWIDTH,IMAGEHEIGHT); //BreakPoint
Reverse(IMAGEWIDTH,IMAGEHEIGHT);
InitImage(MODEPHOTO2,dbImage,IMAGEWIDTH,IMAGEHEIGHT); //BreakPoint
Reverse(IMAGEWIDTH,IMAGEHEIGHT);
InitImage(MODEPHOTO3,dbImage,IMAGEWIDTH,IMAGEHEIGHT); //BreakPoint
Reverse(IMAGEWIDTH,IMAGEHEIGHT);
InitImage(MODEPHOTO4,dbImage,IMAGEWIDTH,IMAGEHEIGHT); //BreakPoint
Reverse(IMAGEWIDTH,IMAGEHEIGHT);
while (1); //BreakPoint
}
|