HTuple ht_width, ht_height;
GetImageSize(g_pDlg->m_hImageFourOne, &ht_width, &ht_height);
int width, height;
width = ht_width[0].L();
height = ht_height[0].L();
unsigned char* ptr = new unsigned char[width* height];
//将图像转换为unsinged char*
HTuple hv_Type,hv_Typedsa;
HObject m_hImage,m_hImage1;
Byte *ptr1;
try
{
GetImagePointer1(m_hImageFourOne, &hv_Typedsa, &hv_Type, &ht_width, &ht_height);
ptr1 = (Byte*)(Hlong)hv_Typedsa;
}
catch(HException &except)
{
int a=0;
}
GenImage1Extern(&(m_hImage),"byte",ht_width,ht_height,(Hlong)ptr1,0);
HALCON12通过get_image_pointer1 (Image, Pointer, Type, Width, Height)获取到图像指针怎么转化为BYTE数据
最新推荐文章于 2023-06-02 17:03:53 发布