How to show UIImage in processImage:(Mat&)image method
Hi all, I want to show a UIImage in processImage:(Mat&)image method, but it does not work. I used this code:
UIImage *imgSegnale = [UIImage imageNamed:@"testImage.png"];
self.imgViewSegnale.image = imgSegnale;
If I add this code in viewDidLod method, it works. Also work if I add this code in a (IBAction) method (using a button). But it don't work if I add this code in processImage:(Mat&)image method.
Any suggestion?
Best regards Costantino
Is this C++ or Java or Python code? Havent seen these structures yet, so it looks kind of weird in the openCV context.
This is Objective-C code. I followed this tutorial http://docs.opencv.org/doc/tutorials/ios/video_processing/video_processing.html#opencviosvideoprocessing and in "processImage:(Mat&)image" method I used grabCut() function. So, I converted cv::Mat resulting image in UIImage structure to display it in UIImageView (imgViewSegnale in the code that I wrote before ). Well, the captured image is not displayed. So I tried to display a "static" image (testImage.png) instead of the captured image, but nothing.
(I'm sorry but I do not know English very well and I find it hard to express myself)