crop and deskew based on coordinates only?
Posted: 2019-08-09T01:54:05-07:00
hi all!
i have to preface as a first time poster, that in the last years I have only used imagemagick to convert, resize, annotate images. quite a lot, but never to do anything more sophisticated with it. and now i'm failing to comprehend what to do completely.
i'm trying to get an image deskewed, but based on coordinates. and I don't know if i use the wrong keywords to search in google or if I need a whole different approach, but this is what I have:
step 1: detect books on images
step 2: identify the corners of the book
step 3: create a new image that is only the book, but deskewed, meaning as a rectangle
I've made my way up to step 2, but utterly fail on step 3.
is it multiple commands in a row, is it one?
is it possible with ImageMagick at all?
can somepoint point me in the right direction?
example image annotated: https://imgur.com/a/DhrwErL
edit: desired target output: https://imgur.com/a/4Njw3rU
much appreciated, thank you!
Dan
i have to preface as a first time poster, that in the last years I have only used imagemagick to convert, resize, annotate images. quite a lot, but never to do anything more sophisticated with it. and now i'm failing to comprehend what to do completely.
i'm trying to get an image deskewed, but based on coordinates. and I don't know if i use the wrong keywords to search in google or if I need a whole different approach, but this is what I have:
step 1: detect books on images
step 2: identify the corners of the book
step 3: create a new image that is only the book, but deskewed, meaning as a rectangle
I've made my way up to step 2, but utterly fail on step 3.
is it multiple commands in a row, is it one?
is it possible with ImageMagick at all?
can somepoint point me in the right direction?
example image annotated: https://imgur.com/a/DhrwErL
edit: desired target output: https://imgur.com/a/4Njw3rU
much appreciated, thank you!
Dan