halcon指针生成Hobject图像

//ImageWidth:图像宽度 
//ImageHeight:图像高度 
//R_Outptr: 红色通道图像数据流 
//G_Outptr: 红色通道图像数据流 
//B_Outptr: 红色通道图像数据流 
//返回值:HObject对象 
public HObject ImagePtrToHobject(int ImageWidth, int ImageHeight, ref byte[] R_Outptr,ref byte[] G_Outptr,ref byte[] B_Outptr) 

HObject Image; 

unsafe 


fixed (byte* ImageBufferPtr = ImageBuffer) 



HOperatorSet.GenImage3(out Image, "byte", ImageWidth, ImageHeight, new IntPtr(R_Outptr), new IntPtr(G_Outptr), new IntPtr(B_Outptr)); 


return Image; 




}

发布了42 篇原创文章 · 获赞 6 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/u014090257/article/details/89672688
今日推荐