Reputation: 333
I want to use Caffe's tool, compute_image_mean
to compute the mean image, but the command line tells me that:
This tool requires OpenCV; compile with USE_OPENCV.
I've searched the Internet, and one guy said:
Well, this message suggests that you have compiled caffe without OpenCV, i.e; with USE_OPENCV set to 0 in your Makefile.config. Recompile with that settings commented out (as is the default) and try again. And of course you need to have OpenCV installed for this to work.
But I have already set USE_OPENCV := 0
when I compiled my Caffe.
Could someone help me to solve this problem?
Upvotes: 1
Views: 1534
Reputation: 41
I met the same error when I tried to make lmdb.
At first I uncomment "USE_OPENCV:=0" in the Makefile.config and recompile for many times, but it does not help.
So I try to comment "USE_OPENCV:=0" with # and recompile the caffe, it success.
Upvotes: 0
Reputation: 1
I met the same error information when I used caffe to do my work. I solved this problem by modifying something in the "Makefile.config" file.
The same as the lastest answer, I commented this line "USE_OPENCV := 0" with "#", so after compiling I can use OpenCV's function. I can use this way to deal with it, but you said that when you did this action and got another error. I think you didn't install your OpenCV correctly. Maybe it's your version problem or environment variable error. You can try to install OpneCV again.
Upvotes: 0
Reputation: 56347
I think you have misread the statement you found, it says you are compiling without OpenCV, which means WITH_OPENCV := 0 , to compile Caffe with OpenCV you have to set WITH_OPENCV := 1 , or just comment it out.
Upvotes: 1