C++中Halocn的HObject与HImage互相转换

void HobjectToHimage(const HObject hobject,  HImage& image) 

            HTuple pointer, type, width, height; 
            GetImagePointer1(hobject, &pointer, &type, &width, &height); 
            image.GenImage1(type, width, height, pointer); 

void HimageToHobject(Hobject& hobject, const HImage image)
{
    HTuple pointer, type, width, height;
     pointer = image.GetImagePointer1(&type, &width, &height);
    gen_image1(&hobject, "byte", width, height, pointer);
}

你可能感兴趣的:(#,Halcon,c++)