GDAL driver and OpenCV
How I can set/enable GDAL driver support into OpenCV ? It seems a compile time setting, but I cannot find any source of documentation regarding this point.
How I can set/enable GDAL driver support into OpenCV ? It seems a compile time setting, but I cannot find any source of documentation regarding this point.
test java code for StructuredEdgeDetection
Mat image = Imgcodecs.imread("my_image_path", Imgcodecs.IMREAD_LOAD_GDAL | Imgcodecs.IMREAD_COLOR);
StructuredEdgeDetection p = Ximgproc.createStructuredEdgeDetection("model/model.yml.gz");
Mat fsrc = new Mat();
image.convertTo(fsrc, CvType.CV_32F, 1.0 / 255.0);
Mat edges = new Mat(fsrc.size(), fsrc.type());
p.detectEdges(fsrc, edges);
Core.multiply(edges, new Scalar(255), fsrc);
Imgcodecs.imwrite("my_path" + "edges.png", fsrc);
Asked: 2017-09-30 06:56:40 -0600
Seen: 934 times
Last updated: Nov 10 '17
what is your OS and compiler?
I have Win 8.1 64bit. I am open to any compiler. Overall I use OpenCv 3.2 Java.
did you compile OpenCV from source before?
I never compiled before. I just downloaded packages with Maven in my Java project and configured OpenCv DLL in my environment
I am also wondering if there is a release/version already compiled with GDAL.
i have just compiled OpenCV 3.3 with GDAL support. if you want to compile i can help you.
thank you, I will appreciate. If you have some instruction or if you could share your compiled open cv, it would be great.
you can find my
opencv_imgcodecs330.dll
uploded here try to rename it opencv_imgcodecs320.dll and replace yours (backup yours first) i guess it may work (if you have opencv_imgcodecs320.dll already). otherways we will look another way.Thank you, I just downloaded your dll. Later I will try, even if dll dimensions seem very different between mine (about 24 mb) and your dll. I will let you know asap.
Or may be such dll has to be added to my opencv_java320.dll ?