EmguCV中 Image<'TColor, TDepth>与 Bitmap之间的转换

在EmguCV的文档中搜索bitmap ,可以查询到

Image<'TColor, TDepth>.Bitmap Property 

The Get property provide a more efficient way to convert Image<Gray, Byte>, Image<Bgr, Byte> and Image<Bgra, Byte> into Bitmap such that the image data is shared with Bitmap. If you change the pixel value on the Bitmap, you change the pixel values on the Image object as well! For other types of image this property has the same effect as ToBitmap() Take extra caution not to use the Bitmap after the Image object is disposed The Set property convert the bitmap to this Image type. 

通过读取或者设置Image<'TColorTDepth>.Bitmap的属性就可以方便的经行两者之间的转换.

当你修改Image<>.bitmap的像素的时候,image<>的内容也会变化-----两者操作的是同一个对象.

你可能感兴趣的:(bitmap)