c#使用halcon判断hobject有没有赋值
1个回答
2015-08-26
展开全部
HObject 型ho_Image转BYTE型的pImage,示意代码
GetImagePointer1(ho_Image, &hv_Pointer, &hv_Type, &hv_Width, &hv_Height);
BYTE *p=(BYTE *)hv_Pointer[0].L();
int height= (Hlong)hv_Height;
int width = (Hlong)hv_Width;
memcpy(pImage,p,width*height*sizeof(BYTE));
GetImagePointer1(ho_Image, &hv_Pointer, &hv_Type, &hv_Width, &hv_Height);
BYTE *p=(BYTE *)hv_Pointer[0].L();
int height= (Hlong)hv_Height;
int width = (Hlong)hv_Width;
memcpy(pImage,p,width*height*sizeof(BYTE));
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询