Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm posting this answer so this looks a bit more tidy for searches since there is a big conversation in the comments but no "answer" to the thread.

What has been said is that some extra modules are broken, for example saliency(which up to this date 06/Jan/2015 still won't compile on windows), and won't compile properly. Fixing needs to be done on this modules, so unless you really need them, just exclude them from the cmake configuring process.

I'm posting this answer so this looks a bit more tidy for searches since there is a big conversation in the comments but no "answer" to the thread.

What has been said is that some extra modules are broken, for example saliency(which up to this date 06/Jan/2015 still won't compile on windows), and won't compile properly. Fixing needs to be done on this modules, so unless you really need them, just exclude them from the cmake configuring process.

EDIT:
As pointed out in the comments, I forgot about the flags to exclude the non-compiling modules.

Add -DBUILD_opencv_saliency=OFF to the CMake command to remove saliency.
I also found trouble with missing headers and a non-portable suffix for a number (used LLU instead of ULL, which Visual Studio doesn't recognize as valid), so if you come into trouble building line_descriptor add -DBUILD_opencv_line_descriptor=OFF to the CMake command.

In case you would like to remove any other extra modules that don't depend on 3rd parties like matlab here is the full list of flag names:

  • BUILD_opencv_adas for adas
  • BUILD_opencv_bgsegm for bgsegm
  • BUILD_opencv_bioinspired for bioinspired
  • BUILD_opencv_ccalib for ccalib
  • BUILD_opencv_datasets for datasets
  • BUILD_opencv_face for face
  • BUILD_opencv_latentsvm for latentsvm
  • BUILD_opencv_line_descriptor for line_descriptor
  • BUILD_opencv_optflow for optflow
  • BUILD_opencv_reg for reg
  • BUILD_opencv_rgbd for rgbd
  • BUILD_opencv_saliency for saliency
  • BUILD_opencv_surface_matching for surface_matching
  • BUILD_opencv_text for text
  • BUILD_opencv_tracking for tracking
  • BUILD_opencv_xfeatures2d for xfeatures2d
  • BUILD_opencv_ximgproc for ximgproc
  • BUILD_opencv_xobjdetect for xobjdetect
  • BUILD_opencv_xphoto for xphoto