I think your image has too much noise to get good results. Note also that you must work with a square (subsection) image for that script. So I took a 512x512 subsection, tmp1.png
Then I used my ceptstrum script to generate the cepstrum image to use to find the type of blur (motion in this case) and its arguments.
Code: Select all
im6926hdri cepstrum -c 10000 -G tmp1.png tmp1_cep10000.png
Then I took the cepstrum image to the tool ImageJ and measured the line between the two central dots to get the (half)length and angle.
Then I converted the image to grayscale:
convert tmp1.png -colorspace gray tmp2.png
Then I ran 3 tests with those arguments and with different noise arguments. The angle directions must be reversed between the two applications.
Code: Select all
im6926hdri cameradeblur -t motion -a 14.715 -r -9.78 -n 0.05 tmp2.png tmp2_deblur_n0p05.png
Code: Select all
im6926hdri cameradeblur -t motion -a 14.715 -r -9.78 -n 0.005 tmp2.png tmp2_deblur_n0p005.png
Code: Select all
im6926hdri cameradeblur -t motion -a 14.715 -r -9.78 -n 0.001 tmp2.png tmp2_deblur_n0p001.png
As you can see none really recover the deblurred image well due to amplification of the noise.
You might try denoising the image first. See my scripts denoise and noise cleaner. If that works, then use the IM function -deskew 40% to deskew the text so that the text is more horizontal. Then try my script, textcleaner to remove the gray background.