VuongNM / cvblob

Automatically exported from code.google.com/p/cvblob
GNU Lesser General Public License v3.0
0 stars 0 forks source link

label image widthstep incorrect #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call cvLabel and produce a label image
2. Try to iterate through that image's data by adding widthStep to the data 
pointer for every row traversed, and retrieve values

What is the expected output? What do you see instead?
I run into a memory problem when the row number is 1/4 of the total number of 
rows in the image.  I took a closer look at the data and from what I can tell 
from the values I retrieve, widthStep seems to be 4x what it should be.  When I 
divide it by 4 during the traversal, everything works out great.  Something to 
do with storing a 1-byte uchar in what OpenCV expects to be an 4-byte unsigned 
integer space, maybe?

What version of the product are you using? On what operating system?
OpenCV 2.4.1
Windows 7 x64

Please provide any additional information below.

Original issue reported on code.google.com by m...@adornably.com on 25 Jul 2013 at 1:34