0

I wants to give effects on image using openCV, I am struggling from last 2 days and do little bit from my side. But not get the good output. Till now I only convert into gray. how to achieve remaining effects?

I use this method for convert in Gray

- (void)blackAndWhite {


cv::Mat  dst;

cv::Mat src=[self cvMatFromUIImage:iv.image];


if( !src.data )
{ std::cout<<"Usage: ./Histogram_Demo <path_to_image>"<<std::endl;
}

/// Convert to grayscale
cvtColor( src, src, CV_BGR2GRAY );

/// Apply Histogram Equalization
//equalizeHist( src, dst );

iv.image =[self UIImageFromCVMat:src];   



}

Thanks

1) After convert in GRAY enter image description here

2) Apply Black and White effect

enter image description here

3) Remove dark black background and change image orientation.

enter image description here

QueueOverFlow
  • 1,336
  • 5
  • 27
  • 48
  • what do want to achieve actually? – Mzk Nov 06 '12 at 10:13
  • I wants read characters from image, I already implement code for that, but due to picture quality not good, result is not accurate, So i wants to give that effects to my images. so I read characters from image. how I can achieve this? – QueueOverFlow Nov 06 '12 at 10:16
  • so, basically you are referring to the pre-processing stage to eliminate other alphabets instead of the numbers? – Mzk Nov 06 '12 at 10:19
  • yes. my question here that how to achieve these effects in openCV, if you have any suggestion regarding OCR, you can provide me – QueueOverFlow Nov 06 '12 at 10:23
  • I didn't down vote. someone else did. Probably you should examine the blobs features. Accept which blobs you want and reject the others. But, it will be tough since all are alpha-numeric. Good luck on that one. – Mzk Nov 06 '12 at 10:40
  • May be for a start !!!! - http://stackoverflow.com/questions/9413216/simple-digit-recognition-ocr-in-opencv-python/9620295#9620295 – Abid Rahman K Nov 06 '12 at 12:34
  • @AbidRahmanK I wants read characters from image, I already implement code for that, but due to picture quality not good, result is not accurate, So i wants to give that effects to my images. so I read characters from image. please suggest, Am I in right track? – QueueOverFlow Nov 06 '12 at 12:48
  • What you mean by "giving effects"? – Abid Rahman K Nov 06 '12 at 13:07
  • @AbidRahmanK I mean, b/w image with good contrast – QueueOverFlow Nov 06 '12 at 13:17
  • @Gryphon http://en.wikipedia.org/wiki/Simple_present – ArtemStorozhuk Nov 06 '12 at 13:43

0 Answers0