1
0
Fork 0
mirror of https://github.com/Rouji/2dstitch.git synced 2025-12-11 09:00:53 +00:00
opencv script for stitching 2d images
Find a file
2024-02-11 17:33:16 +01:00
2dstitch init 2024-02-11 17:31:26 +01:00
README.md readme: add example screencap + output 2024-02-11 17:33:16 +01:00
setup.py init 2024-02-11 17:31:26 +01:00

2D Stitch

Stitches multiple 2D images into one large one. And does so somewhat quickly. Mainly because of the following constraints:

  • Consecutive input images have to overlap
  • This does only translation. No scaling or rotation or anything else.

My usecase for this is stitching together screenshots. Like scrolling a webpage that doesn't fit on screen at once.
Also works fine with screen recordings! (as long as you convert all the frames to images)

Example

wf-recorder -g "$(slurp)" -r 5 -F format=rgb24 -x rgb24 -p preset=slow -p tune=animation -c libx264rgb -f example.mp4

mkdir img
ffmpeg -i example.mp4 img/%06d.png

find img/ -type f | sort | xargs python3 -m 2dstitch example.png

https://github.com/Rouji/2dstitch/assets/17692001/817fc101-eb5f-4ba9-af05-da49b677265c

example