flyhighyjw / javacv

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

opencv_features2d.drawMatches with DrawMatchesFlags.DEFAULT #383

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Calculate descriptors and keypoints for two images (for example by BRISK)
2. Use opencv_features2d.drawMatches with new empty IplImage
3.

What is the expected output? What do you see instead?
Method should write to output image two images with drawed matches on top of 
them.
I see instead black image. I was able to draw matches by using 
DrawMatchesFlags.DRAW_OVER_OUTIMG but without source images.

What version of the product are you using? On what operating system?
Android 2.3.4, JavaCv September 15, 2013 version 0.6

Please provide any additional information below.

IplImage matchesSource = IplImage.create(imageToCompare.width() + 
sourceFrame.width(), imageToCompare.height(), opencv_core.IPL_DEPTH_8U, 3);

opencv_features2d.drawMatches(imageToCompare, imageKeyPointsSource, 
sourceFrame, keyPointsSource, matches,
                            matchesSource, CvScalar.GREEN, CvScalar.RED, null, DrawMatchesFlags.DEFAULT);

Original issue reported on code.google.com by adamszer...@gmail.com on 17 Nov 2013 at 1:42

GoogleCodeExporter commented 8 years ago
Could you please provide a small sample main() method that reproduces this 
problem on Java SE? Or does this only occur on Android?

Original comment by samuel.a...@gmail.com on 17 Nov 2013 at 1:49

GoogleCodeExporter commented 8 years ago
I didn't try it on Java SE, i need it on Android only. I can put my class with 
asynsTask.

If you have any idea, please share it.

Original comment by adamszer...@gmail.com on 17 Nov 2013 at 1:53

Attachments:

GoogleCodeExporter commented 8 years ago
Hmm, after rebuilding my project and changing opencv_core.IPL_DEPTH_8U to 
imageToCompare.depth() it works with default flag. But i have no idea why, 
because I'm only using pencv_core.IPL_DEPTH_8U.

Original comment by adamszer...@gmail.com on 17 Nov 2013 at 2:08

GoogleCodeExporter commented 8 years ago
In the end, have you figured out what is going on? Sounds to me like it might 
be caused by memory corruption...

Original comment by samuel.a...@gmail.com on 7 Jan 2014 at 12:59

GoogleCodeExporter commented 8 years ago
The API changed in recent versions of JavaCV (actually JavaCPP Presets for 
OpenCV), so I'll mark this as Done, but let me know if this issue happens 
again, thanks!

Original comment by samuel.a...@gmail.com on 27 Dec 2014 at 3:45