I have been having the same problem for a long time and I have just now discovered a workaround. As you stated correctly it is a problem with definition of the NO-makro in UIKit. What you need to do is go to your .pch-file and replace
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#endif
with
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#import <opencv2/stitching/detail/blenders.hpp>
#import <opencv2/stitching/detail/exposure_compensate.hpp>
#endif
So your resulting .pch should look something like this:
//
// Prefix header for all source files of the 'Project' target in the 'Project' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#import <opencv2/stitching/detail/blenders.hpp>
#import <opencv2/stitching/detail/exposure_compensate.hpp>
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
This way the NO-enums in blenders.hpp and exposure_compensate.hpp are defined before the NO-makro in UIKit.