开发者

Why do emgu images have arrays with extra elements for height?

Just noticed something strange and wondered if there was a reason for it.

I have a grayscale image in EmguCV (.net wrapper for openCV). If this image has C channels (1 for grayscale, 3 for RGB), a width of X pixels and a height of Y pixels, the data array is co开发者_Go百科nsistently of the form:

[Y,X+2,C]

Anyone know why?


EmguCV wrapping Opencv relies on its optimization. Opencv's IplImage requires each row of the data matrix to be aligned by 4 bytes. This is done mainly because of the SSE optimization in OpenCV and to optimize data fetching. SSE optimization is one of the technique that make opencv run fast.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜