Skip to content

Instantly share code, notes, and snippets.

@remmel
Last active July 22, 2022 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remmel/cca79c3b1cef6944f83b78a9bbcb17e2 to your computer and use it in GitHub Desktop.
Save remmel/cca79c3b1cef6944f83b78a9bbcb17e2 to your computer and use it in GitHub Desktop.
Extract lifecast top left images to improve them using for example topaz; and then recreate with the improved image the lifecast rgbd frame
#!/bin/bash
# Extract north west of image / top left. Lifecast output jpgs must be in 0_out
# sudo apt install imagemagick
mkdir -p 1_nw
for f in 0_out/*.jpg
do
echo $f
convert $f -crop 1920x1920+0+0 1_nw/$(basename ${f})
done
#!/bin/bash
# Merge 0_out images with 1_nw
mkdir -p 2_composite
for f in 0_out/*.jpg
do
echo $f
composite 1_nw/$(basename ${f}) ${f} 2_composite/$(basename ${f})
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment