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've run into what I'm guessing is a bug,
I'm running a script that deskews a whole dataset of .tif images, and i've encountered some problems with apparently straight images.
this is the original image(s):
this is the ouput from running the following program:
for file in os.listdir(indir):
if file.endswith(".jpg") or file.endswith(".jpeg") or file.endswith(".png") or file.endswith(".tif"):
image = cv2.imread(indir +'/'+ file)
grayscale = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
angle = determine_skew(grayscale)
rotated = rotate(image, angle, (0, 0, 0))
By adding the following argument, you will have a better result: min_angle=-30, max_angle=30, min_deviation=0.1
If the speed performance is important, keep the min_deviation to 1 (default value) :-)
I've run into what I'm guessing is a bug,
I'm running a script that deskews a whole dataset of .tif images, and i've encountered some problems with apparently straight images.
this is the original image(s):
this is the ouput from running the following program:
where rotate is the open cv example here.
The output angle is -45 for both images.
The text was updated successfully, but these errors were encountered: