Linux: Crop and alignment of a set of images with reference to anything?

My daughter decided to make a cartoon :)
it is https://youtu.be/wlarSqp2rSE

The input is a set of photos.
Now the question is: is it Possible to do the cropping and alignment (rotation) of the images (a batch), so that the figure did not move in the process. Is there a console tool for this ? itself free.

Source system: Linux (ubuntu), use ffmpeg.

Thank you.
July 2nd 19 at 17:23
3 answers
July 2nd 19 at 17:25
Solution
Spread his solution to the problem:
https://gist.github.com/loguntsov/92f07b6c8303f92e...

Run:
pyhton stab.py

The script will read all *.jpg files and the results put in ./result directory. Of course it needs to be created in advance.
July 2nd 19 at 17:27
Experience tells me that with imagemagick you can do anything, but auto-rotate and cropping are not yet in Google.
Here is a very good scripts www.fmwconcepts.com/imagemagick
Try to play with unperspective. www.fmwconcepts.com/imagemagick/unperspective/index.php
I don't want to correctly identify the corners of the sheet, with the original photo will be easier.
But when the perspective is fixed, and cropnet generally not working. - Lucas commented on July 2nd 19 at 17:30
Play with the settings for this script, and not found optimal. My pictures noisy a camera flash, in short this script is not destiny. - Damion.Upt commented on July 2nd 19 at 17:33
Laid out the script. - Damion.Upt commented on July 2nd 19 at 17:36
July 2nd 19 at 17:29
it seems to me that on a subject you need to show an unhealthy mazahizm and patience that all this would be correct... I think it is easier to redraw the picture:) but to avoid this happening in the future, you can at least:
secure the camera on a tripod to mark the place for the picture labels to the picture itself "wasn't moving"
> it seems to me that on a subject you need to show an unhealthy mazahizm and patience that all this would be correct.

you are not right.
today we sat in Python using opencv made this result:
https://youtu.be/dOZM958HSmo

Because I'm not an expert in Python and opencv, it took enough time (purely to necessary methods and skills to practice).

the color rendering does not look all the same can be done with the original drawings.

So there is nothing complicated in this. - Lucas commented on July 2nd 19 at 17:32
Congratulations.
well, as I said "seems" ... glad I was wrong :)
PS: if you do not mind, you can get links to the mana You used ? maybe in the future it will be useful - Damion.Upt commented on July 2nd 19 at 17:35
In the near future will publish scripcaru, nothing outstanding there. - Damion.Upt commented on July 2nd 19 at 17:38
Posted. Cm. below. - Damion.Upt commented on July 2nd 19 at 17:41
:
today we sat in Python using opencv made this result:

Yes the same thing happened. It is necessary for the animation to look something. As professional animators do, and it should be done. - nikita.Stracke commented on July 2nd 19 at 17:44

Find more questions by tags FFmpegVideoOpenCVLinuximage processing