Ask Your Question

Santhosh's profile - activity

2013-10-09 08:11:37 -0600 received badge  Editor (source)
2013-10-09 08:10:48 -0600 asked a question Value of bytes in the bytes array are changed after calling Opencv method

In my .net project, I am using cvInvoke.cvWarpPerspective() to crop the image from the source image using the specified matrix.

My code as follows,

CvInvoke.cvWarpPerspective(image.Ptr, result.Ptr, transform.Ptr, (int) WARP.CV_WARP_INVERSE_MAP, default(MCvScalar));

For 5X5 and 7X7 images, the values of bytes in the bytes array are changed after calling cvInvoke.cvWarpPerspective.

For 8X8 and 10X10 images, it works fine.

Normally, width of the image is padded with additional pixels (bytes) so that the width is dividable with 4 or 8, depending on the memory management architecture. That makes it more efficient and faster to handle the image in the memory. But here, the value of bytes in the bytes array are changed. Its quite contrary for me.

Please help me to resolve the issue.