You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a cmd option that can be used to specify the angle that is being calculated before but i was not able to find it in the given set of options. I am applying some preprocessing on same image but has different preprocessed version. But when I run deskew on both of these images I get different skew angles. I want to use same angle for both versions of same image.
The text was updated successfully, but these errors were encountered:
hamxahbhatti
changed the title
Options for Specifyuing Skew Angle
Options for Specifying Skew Angle
May 25, 2021
@echo off
deskew -g d file1.png|find "[deg]" > out1.txt
deskew -g d file2.png|find "[deg]" >> out1.txt
type NUL > out2.txt
FOR /F "tokens=1,2* delims=:" %%A in (out1.txt) do echo %%B >> out2.txt
gives me in the out2.txt file
-0.310
-0.390
Note I have not tidied up the leading space nor added any other averaging to get perhaps a common value of -0.350
Since cmd has exceptionally poor integer math you need to move decimal points three digits right, do addition and divide by 1000
so in this case roughly we strip the decimal points and any leading zeros and using variables would attempt
setlocal ENABLEDELAYEDEXPANSION
set /A "V1=-310"
set /A "V2=-390"
set /A "Avg=(V1 V2)/2"
echo !Avg!
result is -350 as expected so needs to be returned as -0.350
I am looking for a cmd option that can be used to specify the angle that is being calculated before but i was not able to find it in the given set of options. I am applying some preprocessing on same image but has different preprocessed version. But when I run deskew on both of these images I get different skew angles. I want to use same angle for both versions of same image.
The text was updated successfully, but these errors were encountered: