OpenCV imgcodecs.hpp error

I am trying to compile a program in C ++ that uses OpenCV to evaluate the similarity of two images:

Image Histogram Comparison

When I g ++ compile the file:

'opencv2/imgcodecs.hpp' file not found #include "opencv2/imgcodecs.hpp" 

I updated the opencv formula on Mac OS X. I restarted brew install, but I still get this error.

 mdfind imgcodecs.hpp -name 

returns nothing - the file is missing on my system.

Does anyone know that my imgcodecs are not included and how to enable it? I am really new to C and OpenCV and really appreciate any help.

+6
source share
1 answer

I notice that you are watching the tutorial code on the main branch (aka 3.0.0). It uses the imgcodecs module, which is not available in earlier versions of OpenCV (e.g. 2.4.9).

Check which version of OpenCV you have (it seems, not 3.0.0) and use the appropriate version of the training code (for example, OpenCV 2.4.9 Histograms_Matching / EqualizeHist_Demo.cpp )

+8
source

Source: https://habr.com/ru/post/973521/


All Articles