Ask Your Question
1

How to compile opencv-341.jar and opencv_java341.dll with org.opencv.face?

asked 2018-04-08 22:47:43 -0600

JavaMaster gravatar image

updated 2018-04-14 21:43:26 -0600

How to compile opencv-341.jar and opencv_java341.dll with org.opencv.face for 64 bits and 32 bits.

I am testing the latest versions of opencv and opencv_contrib, but I have errors 2279.

I downloaded opencv from https://github.com/opencv/opencv/tree...

I downloaded opencv_contrib from https://github.com/opencv/opencv_contrib

I have opencv 3.4.1 in the path C: /opencv/opencv-3.4.1 and the path of the opencv_contrib modules is C: \ opencv \ opencv_contrib-master \ modules

After clicking on the Generate button of CMake GUI, I clicked on the Open Project button that is in CMake on the right side of the Generate button.

After clicking on the Generate button of CMake GUI, I clicked on the Open Project button that is in CMake on the right side of the Generate button and Visual Studio 2017 was opened with the project generated by CMake. Then in the Visual Studio file browser, in the CMakeTargets folder I right click on the ALL_BUILD file and then click on Compile. Visual Studio was in Debug and Win32 mode by default.

First:

Severity Code Description Project File Line Status suppressed
Error C3646 'CV_OVERRIDE': unknown invalidation specifier opencv_phase_unwrapping c: \ opencv \ opencv_contrib-master \ modules \ phase_unwrapping \ src \ histogramphaseunwrapping.cpp 54

Second:

Severity Code Description Project File Line Status suppressed
Error C3646 'CV_OVERRIDE': unknown invalidation specifier opencv_phase_unwrapping c: \ opencv \ opencv_contrib-master \ modules \ phase_unwrapping \ src \ histogramphaseunwrapping.cpp 58

Third:

Severity Code Description Project File Line Status suppressed
Error C3646 'CV_OVERRIDE': unknown invalidation specifier opencv_phase_unwrapping c: \ opencv \ opencv_contrib-master \ modules \ phase_unwrapping \ src \ histogramphaseunwrapping.cpp 60

Fourth:

Gravedad    Código  Descripción Proyecto    Archivo Línea   Estado suprimido
Error   C2079   'CV_FINAL' utiliza class 'cv::plot::Plot2dImpl' sin definir opencv_plot c:\opencv\opencv_contrib-master\modules\plot\src\plot.cpp   56

Fifth

Severity Code Description Project File Line Status suppressed
Error C2143 syntax error: missing ';' in front of ':' opencv_plot c: \ opencv \ opencv_contrib-master \ modules \ plot \ src \ plot.cpp 56

Sixth:

Severity Code Description Project File Line Status suppressed
Error C2059 syntax error: ':' opencv_plot c: \ opencv \ opencv_contrib-master \ modules \ plot \ src \ plot.cpp 56

Seventh:

Severity Code Description Project File Line Status suppressed
Error C2059 syntax error: 'public' opencv_plot c: \ opencv \ opencv_contrib-master \ modules \ plot \ src \ plot.cpp 56

Eighth

Severity Code Description Project File Line Status suppressed
Error C2143 syntax error: missing ';' in front of '{' opencv_plot c: \ opencv \ opencv_contrib-master \ modules \ plot \ src \ plot.cpp 57

Nineth:

Severity Code Description Project File Line Status suppressed
Error C2447 '{': the function header is missing (formal list of previous style?) Opencv_plot c: \ opencv \ opencv_contrib-master \ modules \ plot \ src \ plot.cpp 57

Tenth:

Severity Code Description Project File Line Status suppressed
Error C2027 use of the type 'cv :: plot :: Plot2dImpl' without defining opencv_plot c: \ opencv \ opencv_contrib-master \ modules \ plot \ src \ plot.cpp 465

etc etc etc . . . . Up to 2279 errors in different .cpp files

Here is a text file where I show the visual studio output. https://drive.google.com/file/d/1Plk4...

edit retag flag offensive close merge delete

Comments

please remove the screenshots,they're useless here (especially the one with the errormessages. we cannot translate it, as long as it is an image !)

please add the resp. information AS TEXT, not as images. thank you.

berak gravatar imageberak ( 2018-04-09 11:19:42 -0600 )edit

What is your problem with the images? You are always saying the same thing. Always say do not include images. I think that the best way to understand mistakes is with an image. The image shows the most specific error, more detailed. I placed the images to show the steps in detail. It is better understood with images. Do not you think? If you want to help, you should upload a video tutorial explaining how to compile opencv and the java face libraries. There are many users asking the same thing as me, you always respond, I have read other posts and I have seen that you always respond, but it does not help 100%.

JavaMaster gravatar imageJavaMaster ( 2018-04-09 11:57:35 -0600 )edit

I asked many questions and did not answer any. I already deleted the images, I just placed one, where the errors appear. There are thousands of errors as the image shows. How do you intend to copy and paste all the errors in the post ?. You always criticize and never help. I already wrote in text an error of many, read the error? There are many errors, and apparently they are syntax in some c ++ files of the modules that I included.

JavaMaster gravatar imageJavaMaster ( 2018-04-09 14:02:59 -0600 )edit

this looks like your opencv_contrib and opencv main repo slightly differ in version (synchonization problem)

can you try to get latest master for both repos, and try again from scratch, with cmake ?

berak gravatar imageberak ( 2018-04-10 02:53:29 -0600 )edit

Ok I'll try. Should I download the two that appear in this link? Yes? https://github.com/opencv

JavaMaster gravatar imageJavaMaster ( 2018-04-10 15:07:09 -0600 )edit

What is the opencv version for opencv_contrib?

JavaMaster gravatar imageJavaMaster ( 2018-04-10 19:20:17 -0600 )edit

I just tried with version 3.3 of opencv and opencv_contrib, but I get 4860 errors.

Severity Code Description Project File Line Status suppressed
Error C2079 'CV_FINAL' uses class 'cv :: plot :: Plot2dImpl' without defining opencv_plot c: \ opencv \ opencv_contrib_master \ modules \ plot \ src \ plot.cpp 56

Severity Code Description Project File Line Status suppressed
Error C2143 syntax error: missing ';' in front of ':' opencv_plot c: \ opencv \ opencv_contrib_master \ modules \ plot \ src \ plot.cpp 56

Severity Code Description Project File Line Status suppressed
Error C2059 syntax error: ':' opencv_plot c: \ opencv \ opencv_contrib_master \ modules \ plot \ src \ plot.cpp 56

etc etc....

JavaMaster gravatar imageJavaMaster ( 2018-04-10 20:37:12 -0600 )edit

the CV_FINAL things were added 2 weeks ago. so it can't be 3.3.

try again with latest master branch for both repos, clean up your build folder, and start all over.

berak gravatar imageberak ( 2018-04-11 00:03:45 -0600 )edit

You can do a videotutorial to show step by step the procedure of compiling opencv and opencv_contrib?

JavaMaster gravatar imageJavaMaster ( 2018-04-11 11:04:25 -0600 )edit

i can't and i won't. (i also hate videotutorials, with some kind of passion, personally. talking heads, not facts, bah.)

berak gravatar imageberak ( 2018-04-11 11:07:22 -0600 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2018-04-09 02:26:43 -0600

berak gravatar image

updated 2018-04-09 04:53:04 -0600

you need:


there is also an easy to use pretrained openface cnn (in the Dnn module), you could use it like this:

Dnn net = dnn.readNetFromTorch("openface.nn4.small2.v1.t7");
Mat inputBlob = dnn.blobFromImage(image, 1./255, Size(96,96), Scalar(), true, false);
net.setInput(inputBlob);
feature = net.forward();

then you can compare features obtained above with a plain L2 norm.

(note, that this will also work oncolor images !)

edit flag offensive delete link more

Comments

I edited the procedures I did. Can you look and help me please?

JavaMaster gravatar imageJavaMaster ( 2018-04-09 10:58:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-04-08 22:47:43 -0600

Seen: 2,920 times

Last updated: Apr 14 '18