react-native-opencv-tutorial
react-native-opencv-tutorial copied to clipboard
Use of undeclared identifier 'CV_BGR2GRAY' in RNOpenCvLibrary.mm
I just grab the code and run but this issue appears.
Any help is really appreciated.
Xcode Version 10.3 (10G8) opencv2.framework 4.5.1 downloaded form https://opencv.org/releases/
I think OpenCV have deprecated the constant names,
Change “CV_BGR2GRAY” to “cv::COLOR_BGRA2GRAY”
That works.
Another thing i want to ask is could I use other opencv features in react native with this code base or do i need to make more code in Xcode to bridge those features?
Thanks alot!
Hi, I am not fully sure what you mean. I was trying to use extra features such as the qr code scanner and the wraps for images. However, I was unsuccessful as i was not familiar with Objective C and found the process very difficult. I have since moved to try to complete my project in Swift and have had more success, using the a bridging file in Objective C, to a pure C++ file where i can write the openCV code.
I think OpenCV have deprecated the constant names,
Change “CV_BGR2GRAY” to “cv::COLOR_BGRA2GRAY”
awesome that's work