Reputation: 2873
Is there a way to convert images loaded using image_analysis.load_images() to the cv::mat format?
I am using the OpenCV HOG detector and am stuck bridging the gap between Turi Images and OpenCV.
Thanks!
Upvotes: 0
Views: 106
Reputation: 2873
By looking at the source code for Image, I see there is a property called pixel_data that returns the pixel data of the image object as a numpy array. I am then able to use that numpy array where a cv::mat object is asked for.
I am not a python expert, so there may be some conversion magic going on behind the scenes. If there is better way to accomplish this, please add your own answer.
Upvotes: 1