Ask Your Question
1

GDAL driver and OpenCV

asked 2017-09-30 06:56:40 -0600

procton gravatar image

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.

edit retag flag offensive close merge delete

Comments

what is your OS and compiler?

sturkmen gravatar imagesturkmen ( 2017-09-30 07:46:13 -0600 )edit

I have Win 8.1 64bit. I am open to any compiler. Overall I use OpenCv 3.2 Java.

procton gravatar imageprocton ( 2017-09-30 08:01:04 -0600 )edit

did you compile OpenCV from source before?

sturkmen gravatar imagesturkmen ( 2017-09-30 08:05:32 -0600 )edit

I never compiled before. I just downloaded packages with Maven in my Java project and configured OpenCv DLL in my environment

procton gravatar imageprocton ( 2017-09-30 08:16:56 -0600 )edit

I am also wondering if there is a release/version already compiled with GDAL.

procton gravatar imageprocton ( 2017-09-30 12:18:34 -0600 )edit

i have just compiled OpenCV 3.3 with GDAL support. if you want to compile i can help you.

sturkmen gravatar imagesturkmen ( 2017-09-30 13:36:22 -0600 )edit

thank you, I will appreciate. If you have some instruction or if you could share your compiled open cv, it would be great.

procton gravatar imageprocton ( 2017-09-30 19:04:00 -0600 )edit
1

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.

sturkmen gravatar imagesturkmen ( 2017-09-30 22:43:13 -0600 )edit

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.

procton gravatar imageprocton ( 2017-10-01 02:55:30 -0600 )edit

Or may be such dll has to be added to my opencv_java320.dll ?

procton gravatar imageprocton ( 2017-10-01 02:58:42 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2017-11-10 13:29:52 -0600

procton gravatar image

updated 2017-11-10 14:18:09 -0600

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);
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-09-30 06:56:40 -0600

Seen: 913 times

Last updated: Nov 10 '17