Ask Your Question

DavidCh's profile - activity

2020-03-08 12:15:38 -0500 received badge  Popular Question (source)
2016-04-13 17:54:15 -0500 received badge  Student (source)
2016-03-02 09:53:06 -0500 received badge  Enthusiast
2016-02-22 16:40:12 -0500 commented answer Build Opencv 3.1 + Contrib (face module) for Java

Actually, forget about it, my path contained an accentuated character which opencv seems to dislyke. Thanks again.

2016-02-22 07:10:55 -0500 received badge  Scholar (source)
2016-02-21 16:07:03 -0500 commented answer Build Opencv 3.1 + Contrib (face module) for Java

That was brillant, thanks Berak it worked ! I managed to generate the jar and the DLL. Thank you so much !

Unfortunately I'm now facing another sort of issue which is that the Imcodecs.imread() returns an empty Mat. It's the same with your very usefull sample you provided earlier. Mat m = Imgcodecs.imread(f.getAbsolutePath(), 0);

I know it's not the topic of this question but any thoughts on that ? I can create another question if you prefer. Thanks.

2016-02-21 16:03:39 -0500 received badge  Supporter (source)
2016-02-21 09:48:04 -0500 commented answer Build Opencv 3.1 + Contrib (face module) for Java

OK, thanks I will try that tonight. I'm back to a full of hope state :)

2016-02-21 00:01:02 -0500 asked a question Build Opencv 3.1 + Contrib (face module) for Java

Hi guys,

I'm looking to use in my Java application the face recognition features provided in the contrib modules but I'm facing a blocking issue : I can't manage to build the opencv_java310.dll.

I have read a lot and tried all that I could think about and today I'm requesting your help please.

In brief, the log file (opencv\build\modules\java\opencv_java.dir\Debug\opencv_java.log) after the build process fails show:

[...] face.cpp
1>C:\DEV\C\opencv\build\modules\java\face.cpp(1726): error C2664: 'bool cv::face::TopNPredictCollector::filter(int *,double *,const int)' : cannot convert argument 1 from 'jint *' to 'int *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

1>C:\DEV\C\opencv\build\modules\java\face.cpp(1961): error C2664: 'bool cv::face::PredictCollector::defaultFilter(int *,double *,const int)' : cannot convert argument 1 from 'jint *' to 'int *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

1>C:\DEV\C\opencv\build\modules\java\face.cpp(2032): error C2664: 'bool cv::face::PredictCollector::filter(int *,double *,const int)' : cannot convert argument 1 from 'jint *' to 'int *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

1>C:\DEV\C\opencv\build\modules\java\face.cpp(2504): error C2664: 'bool cv::face::MinDistancePredictCollector::filter(int *,double *,const int)' : cannot convert argument 1 from 'jint *' to 'int *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

1>Done Building Project "C:\DEV\C\opencv\build\modules\java\opencv_java.vcxproj" (Rebuild target(s)) -- FAILED.

My cmake log shows: -Python 3.4.4 64 bits -Ant 1.8.4 -Java jdk 1.7 64 bits

I'm building with Visual Studio 12 (2013)

Below are the changes I made in cmake:

  • BUILD_SHARED_LIBS:BOOL=0
  • BUILD_opencv_line_descriptor:BOOL=0
  • BUILD_opencv_bgsegm:BOOL=0
  • OPENCV_EXTRA_MODULES_PATH:PATH=C:/DEV/C/opencv_contrib-master/modules
  • BUILD_opencv_rgbd:BOOL=0
  • BUILD_opencv_stitching:BOOL=0
  • BUILD_TESTS:BOOL=0
  • BUILD_opencv_surface_matching:BOOL=0
  • BUILD_opencv_videostab:BOOL=0
  • BUILD_opencv_saliency:BOOL=0
  • BUILD_opencv_reg:BOOL=0
  • BUILD_opencv_bioinspired:BOOL=0
  • BUILD_opencv_calib3d:BOOL=0
  • BUILD_PERF_TESTS:BOOL=0
  • BUILD_opencv_datasets:BOOL=0
  • BUILD_opencv_features2d:BOOL=0
  • BUILD_DOCS:BOOL=0
  • BUILD_opencv_ccalib:BOOL=0
  • BUILD_opencv_optflow:BOOL=0

I have also tried to build contrib with the version 2.4.9 and 3.0 in case there was a compatibiliy issue but no luck.

Please let me know if you need any other information. That's my last hope I fear. Thanks.