Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of undeclared identifier 'CV_BGR2GRAY' in RNOpenCvLibrary.mm #32

Open
hayr-hotoca opened this issue Mar 19, 2021 · 4 comments
Open

Comments

@hayr-hotoca
Copy link

hayr-hotoca commented Mar 19, 2021

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/

@hayr-hotoca hayr-hotoca changed the title Use of undeclared identifier 'CV_BGR2GRAY' Use of undeclared identifier 'CV_BGR2GRAY' in RNOpenCvLibrary.mm Mar 19, 2021
@aidenmurphy89
Copy link

I think OpenCV have deprecated the constant names,

Change “CV_BGR2GRAY” to “cv::COLOR_BGRA2GRAY”

@hayr-hotoca
Copy link
Author

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!

@aidenmurphy89
Copy link

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.

@mostasim
Copy link

I think OpenCV have deprecated the constant names,

Change “CV_BGR2GRAY” to “cv::COLOR_BGRA2GRAY”

awesome that's work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants