opencv2/core/ultility.hpp not found

asked 2014-03-20 06:25:53 -0600

jossyy gravatar image

updated 2014-03-20 08:37:15 -0600

berak gravatar image

Hello,

I have a problem. My compiler says that "fatal error: opencv2/core/utility.hpp: No such file or directory compilation terminated". There isnot the file in my opencv2 folder. What should I do?

I read this title ,but I dont understand the solution. http://answers.opencv.org/question/14755/opencv2coreultilityhpp-not-found/

edit retag flag offensive close merge delete

Comments

opencv version is 2.3.1

jossyy gravatar imagejossyy ( 2014-03-20 06:54:23 -0600 )edit

opencv2/core/utility.hpp is probably from 3.0 code (master). getTickCount(), format() and such were moved there.

on 2.3.1 just include opencv2/core/core.hpp

if that's from one of the samples, you want to select the proper 2.4 branch, not 3.0

berak gravatar imageberak ( 2014-03-20 08:29:54 -0600 )edit

first try to comment it out simply

berak gravatar imageberak ( 2014-03-20 08:35:54 -0600 )edit

I tried it but there are many error on compile.

jossyy gravatar imagejossyy ( 2014-03-20 09:08:56 -0600 )edit

ok. leave it. it expects 3.0, you got 2.3.1.

is it one of the opencv samples ? maybe we can help you find one fitting to your version

berak gravatar imageberak ( 2014-03-20 09:40:46 -0600 )edit

yes , it is opencv samples. the name is opencv_source_code/samples/ocl/surf_matcher.cpp

jossyy gravatar imagejossyy ( 2014-03-20 19:25:00 -0600 )edit

there you go ;)

berak gravatar imageberak ( 2014-03-21 02:00:44 -0600 )edit