How to warp two images together when compositing them.
Posted: 2019-01-31T07:27:58-07:00
So, what I want to do is use composite to compose two stereoscopic images together so the top row of pixels display the left side image and the bottom row of pixels display the right side image. Here's what I did.
1.I have 2 720x720 stereoscopic images where one is the left camera and the other is the right camera.
2.I generate a 720x720 gradient using this command:
3.I composite the images as so:
The problem here is that while the top row does display the left side image and the bottom row displays the right side image, everything in between is faded together, which isn't typical for my usage. What I want it to do for the pixels in between is morph the images together so it looks seamless rather then fade/blend the images together. The reason for this is because I'm using Blender to generate stereoscopic 3D videos and am using a cubemap method in another program to export the videos in 3D in Blender, but apparently the top and bottom images don't line up with the back unless I switch the left/right images on the top and bottom or back image, and switching them on the back would cause the 3D effect to be lost.
Another thing that would be greatly appreciated is if there was a way to render stereoscopic 3D images directly from within ImageMagick itself without having to use Blender, if each of the 6 sides of the cube had a left and right image for it, the images were widescreen, and I wanted ImageMagick to blend them together in a smart way in order to make it look "seamless". Note that for these images the top and bottom image line up correctly with the front in both left and right, but they almost line up correctly with the back if I switch the left/right images on either the top/bottom or back.
1.I have 2 720x720 stereoscopic images where one is the left camera and the other is the right camera.
2.I generate a 720x720 gradient using this command:
Code: Select all
convert -size 720x720 gradient: grad0000.png
Code: Select all
convert "../left/%name%" "../right/%name%" grad0000.png -composite morp0000.png
Another thing that would be greatly appreciated is if there was a way to render stereoscopic 3D images directly from within ImageMagick itself without having to use Blender, if each of the 6 sides of the cube had a left and right image for it, the images were widescreen, and I wanted ImageMagick to blend them together in a smart way in order to make it look "seamless". Note that for these images the top and bottom image line up correctly with the front in both left and right, but they almost line up correctly with the back if I switch the left/right images on either the top/bottom or back.