Remove background in opencv to make text clearer

I am trying to create an application that can read text from an image. But I have problems clearing the background. I need results, for example:

Input Image 1: enter image description here

Output Image 1: enter image description here

This is the code I tried:

cvtColor(org, tmp, CV_BGR2GRAY); 
normalize(tmp, tmp, 0, 255, NORM_MINMAX); 
threshold(tmp, dst, 0, 255, CV_THRESH_OTSU);
+4
source share
1 answer

, , 0, 90 , . . canny , . , , . , , , .

0

All Articles