johnson-pkt / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

drawKeypoints and drawMatches Error #166

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Get Keypoints and find Matches between 2 images.
2.Call drawKeypoints or drawMatches using DrawMatchesFlags.DEFAULT
3.

What is the expected output? What do you see instead?
drawMatches:A new image (CvMap) with the keypoints matches and lines between 
the points on the images.
drawKeypoints: A new image (CvMap) with the keypoints over the original image.

What version of the product are you using? On what operating system?
Windows 7 64b
Last Version of JavaCV and OpenCV 2.3.1

----------------------

img2 (CvMat CV_8UC1 loaded from jpg)
res(empty CvMat CV_8UC1)
keyPoints2 (KeyPoint object with all the points found, from img2)

I call the method:

opencv_features2d.drawKeypoints(img2, keyPoints2, res, CvScalar.YELLOW, 
DrawMatchesFlags.DEFAULT);

And my result is a black image, it seams that when I am using 
DrawMatchesFlags.DEFAULT flag, "res" remains empty.

But if I change the flag to: DRAW_OVER_OUTIMG, and replace res with img2, I get 
the points over the image.

I think there is something wrong when the method has to create a new image 
(res) from my original one (img2) drawing the points.

Any help will be great!
Thanks
Walter

Original issue reported on code.google.com by walter.g...@gmail.com on 6 Mar 2012 at 7:21

GoogleCodeExporter commented 8 years ago
Does that function work any differently when called from C++ without JavaCV?

Original comment by samuel.a...@gmail.com on 7 Mar 2012 at 5:50

GoogleCodeExporter commented 8 years ago
Hey Samuel!
I am sorry, but I found the problem, it wasn't an issue with the code, it was 
an issue with the height of my "res" variable. 
So sorry, and thanks for answering me!
We can delete, or close this issue.
Walter G.

Original comment by walter.g...@gmail.com on 7 Mar 2012 at 5:57

GoogleCodeExporter commented 8 years ago
Ok! thanks for letting me know

Original comment by samuel.a...@gmail.com on 29 Mar 2012 at 12:43