I am trying to apply adaptive thresholding to an image of an A4 paper as shown below:
I use the c
Try this:
+ (UIImage *)processImageWithOpenCV:(UIImage*)inputImage { cv::Mat cvImage = [inputImage CVMat]; threshold(cvImage, cvImage, 128, 255, cv::THRESH_BINARY); return [UIImage imageWithCVMat:cvImage]; }
Result image: