Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCV compiler error when using Stitcher under iOS

Whenever I try to use the OpenCV Stitcher class in iOS and I include the stitcher-header ( #include ) I end up with a compile error "Expected '{'" in exposure_compensate.hpp. Apparently the line enum { NO, GAIN, GAIN_BLOCKS }; is causing some sort of error.

I am very new to openCV but using other functions like filter2d() work as expected. How can I resolve this?

like image 976
Chris Avatar asked Nov 04 '12 20:11

Chris


1 Answers

Try

#import <opencv2/opencv.hpp>

then

#import <UIKit/UIKit.h>

Update: this answer only highlights the bare minimum fix of the problem, and perhaps the root cause: order of dependencies. Please refer to other answers for better code / setup that you put in your project.

like image 89
superarts.org Avatar answered Nov 15 '22 19:11

superarts.org