cloudelin / javacv

Automatically exported from code.google.com/p/javacv
0 stars 0 forks source link

cvGet2D incorrect parameter passing #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello Samuel,
Hope you are doing well.  I believe I have found a bug in cvGet2D(image, x,y).  
It behaves as if the x coordinate is actually the y coordinate.  I passed in a 
320 x 240 image and as soon as x gets to be 240 it throws an out of range 
exception. I've downloaded the latest version and this is still occurring.

Best Regards,
Greg.  

P.S. Wow, had a lot of imports to change on that last update :D !

What steps will reproduce the problem?
1.pass in 320 x 240 image
2.when x becomes > 240 error is thrown

What is the expected output? What do you see instead?
return the pixel scalar

What version of the product are you using? On what operating system?
the latest release
Fedora Core 13

Please provide any additional information below.

Original issue reported on code.google.com by supert...@gmail.com on 20 Nov 2010 at 7:22

GoogleCodeExporter commented 9 years ago
It's actually cvGet2D(matrix, i, j) where i is the row index, and j the column 
index... For completeness, it can also access an image as if it were a matrix, 
but it's not recommended.

Original comment by samuel.a...@gmail.com on 20 Nov 2010 at 8:37

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by supert...@gmail.com on 20 Nov 2010 at 3:29