I am going to make a whiteboard maker script.
I use this code from Imagick to make a clean white space:
convert "test.jpg" -morphology Convolve DoG:15,100,0 -negate "result.jpg"
Source :
Imagick Output :
But when I am using the open cv code to access that, it will show empty spaces between numbers text:
// read image normilzedimage= cv2.imread("test.jpg");
// DOG g1 = cv2.getGaussianKernel(3,10) g2 = cv2.getGaussianKernel(3,0) DoGkernel = (g1 - g2) normilzedimage = cv2.filter2D(normilzedimage, -1 , DoGkernel , (-1 ,1 ) )
// INVERT COLOR normilzedimage = cv2.bitwise_not(normilzedimage)
Open CV Output :
as you can see there are some empty spaces in the texts, how can I solve the problem?
thanks