I write some code to run on the iPad, I use cvLoadImage() to read image from Bundle Resources, but it always return NULL, I don’t know why?
I write some code to run on the iPad , I use cvLoadImage() to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t load an image from your app bundle directly into OpenCV … Getting a proper cv::Mat involves two steps:
1.) Load your image using UIImage
2.) Convert the UIImage to a cv::Mat
Which looks like this:
Grab the UIImageCVMatConverter class from this thread: OpenCV install in xcode
Hope that helps!