Wiggle animation from single photo. For GMIC CLI using -fx_tk_autodepth and -fx_WarpTest

fredi_macka_GIF_anim

I want to know more about GMIC CLI commands
-fx_tk_autodepth
-fx_WarpTest

examples

gmic -i[0] input_image.png -fx_tk_autodepth -blur[-1] 2,2,1 -normalize 0,255 -o Out/Output_Depth_image_from_AutoDepth_blur.png -display

gmic -i[0] input_image.png -i[1] Out/Output_Depth_image_from_AutoDepth_blur.png -fx_WarpTest 90,128,60,2,0 -normalize 0,255 -o out/Out_wraped_image.png -display

For some pictures AutoDepth make one line biger image.
How can I obtain the same dimension for input and output picture?
From autodepth filter?

@ComoTempera Welcome to the forum!

What is the dimensional difference? Are you saying it has an additional row or column? Is the row at the bottom or the column on the right? Is everything else aligned? If so, all you need to do is crop it. See: G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing - Reference Documentation - crop.

I made the batch file.
It takes a photo, and make AutoDepth map of that image.
And I have 6 WrapTest comands, that makes 6 wraped images.
After that ffmpeg make the wiggle gif animation from that 6 photos.

That works fine for images with standard dimensions (HD is O.K). I have a lot of fun.

But for some smaler images AutoDepth make the bigger image and I have an error.

The command -fx_WarpTest needs first argument original image and the second argument the DepthMap image for WrapTest to be the same dimension.

The command AutoDepth works fine for HD images,
standard image dimensions make the same size DepthMap image as original.

But for some images make Y size of image biger for 1 row.
And becaouse of this the WarpTest shows an error.
I need the command that will the size of AutoDepth image make the same size of the original image.
pseudo command example
gmic RESIZE AutoDepthImage to original_image

I know about CROP but I do not know the dimensions of original image to set the CROP.
Thanks for the answer.

Here is an example

I made batch file
zz_make_wiggle.bat

gmic %1 -o bs.png
gmic -i bs.png -display

gmic -i[0] bs.png -fx_tk_autodepth -blur[-1] 2,2,1 -normalize 0,255 -o 00_astero_AutoDepth_blur_negate.png -display

gmic -i[0] bs.png -i[1] 00_astero_AutoDepth_blur_negate.png -fx_WarpTest 90,128,60,2,0 -normalize 0,255 -o astro_anim0001.png -display
gmic -i[0] bs.png -i[1] 00_astero_AutoDepth_blur_negate.png -fx_WarpTest 135,85,60,2,0 -normalize 0,255 -o astro_anim0002.png
gmic -i[0] bs.png -i[1] 00_astero_AutoDepth_blur_negate.png -fx_WarpTest 155,45,60,2,0 -normalize 0,255 -o astro_anim0003.png
gmic -i[0] bs.png -i[1] 00_astero_AutoDepth_blur_negate.png -fx_WarpTest 180,01,60,2,0 -normalize 0,255 -o astro_anim0004.png
gmic -i[0] bs.png -i[1] 00_astero_AutoDepth_blur_negate.png -fx_WarpTest 225,-45,60,2,0 -normalize 0,255 -o astro_anim0005.png
gmic -i[0] bs.png -i[1] 00_astero_AutoDepth_blur_negate.png -fx_WarpTest 270,-90,60,2,0 -normalize 0,255 -o astro_anim0006.png
gmic -i[0] bs.png -i[1] 00_astero_AutoDepth_blur_negate.png -fx_WarpTest 90,-128,60,2,0 -normalize 0,255 -o astro_anim0007.png -display
ffmpeg -f image2 -framerate 6 -i astro_anim%%04d.png -loop -0 Wiggle_GIF_anim.gif

Wiggle_GIF_anim

But for image with dimesions 690x460
-fx_tk_autodepth
makes DepthMap image with dimensions 690x461
that produces error

Here is explanation.
Thanks for the answer!