I am using openCV in objective C. I want to convert image into Black and White, I already done it, but my output Black and White image is not clear, there is black shade on image.
Any one can help?
- (IBAction)blackAndWhite:(id)sender {
imageView.image=orignalImage;
cv::Mat dst;
cv::Mat src=[self cvMatFromUIImage:imageView.image];
if( !src.data )
{ cout<<"Usage: ./Histogram_Demo <path_to_image>"<<endl;
}
/// Convert to grayscale
cvtColor( src, src, CV_BGR2GRAY );
/// Apply Histogram Equalization
equalizeHist( src, dst );
imageView.image =[self UIImageFromCVMat:dst];
}
Thanks
orignal image :
Black and White image :