Page 3 of 3

Re: mergeing stips with offset

Posted: 2016-09-03T12:16:43-07:00
by imaggie
OK, I get what it's doing. The linear matrix transformation gives the new coordinates and then the specified interpolation method ( misnamed lookup or filter ) calculates the colour values for each plane. That's great, that's what I was looking to do.

However, it seems to bomb out when I try to do a calculated resize. If I -resize '%[fx:100]'%,100% ( aka NOP )

[EDIT] OK it can't handle the % after the fx escape for some reason. The final one is enough.

Code: Select all

magick  junocam_efb12_roll.png  -crop 1648x128  +repage -delete "$list2,$list3"  -crop 1648x115  -filter Catrom -resize '%[fx:100+s*5]',100%    +repage  -append efb12_collateG.png
This seems to be a 1:1 scaling too, ie "s" is not having any effect. Am I still not using the correct variable for the tile number?

Is there a way to get it to print out how it is interpreting that command?

Re: mergeing stips with offset

Posted: 2016-09-03T12:40:17-07:00
by fmw42
On IM 7 unix try this by escaping the second % and putting the whole expression is quotes.

Code: Select all

magick inputimage.jpg  -resize "%[fx:50]\%x%[fx:50]\%" outputimage.jpg
or

Code: Select all

magick inputimage.jpg  -resize "%[fx:w/2]x%[fx:h/2]" outputimage.jpg
on windows, I believe the escape is ^% rather than \%

Re: mergeing stips with offset

Posted: 2016-09-03T12:50:33-07:00
by imaggie
Thanks Fred.

OK that makes sense since % is an escape char it needs escaping itself. [ oof ] Since it was in context at the end it worked anyway, and only one % is needed to force both ...

I also found I should be using "t" for the tile index. That works a lot better.

Now I'm trying to use a w,h resize as you indicated but it is not getting any wider :

Code: Select all

 -resize '%[fx:w+t*30]'x'%[fx:h]'
Ah, I was missing the "!" to force the dimensions. Getting there slowly.

Re: mergeing stips with offset

Posted: 2016-09-05T00:38:38-07:00
by imaggie
OK, I have managed to stitch all the strips together. There are remaining issues to get a nice full image since there is a time lag between NH and SH sections and the position and viewing angle of the craft has changed. Would require a non linear stretch / compression across x in one or other hemisphere to fudge the two together. This obviously could also be done by a pixel level -fx process.

I also did a manual shift in GIMP to align the upper and lower sections.

The Juno images from Jupiter are pretty under-whelming, so I have rather lost the motivation to spend any more time on this but it was worthwhile for what I've learnt about IM.

Code: Select all

magick  junocam_efb12_roll.png  -crop 1648x128  +repage -delete "$list2,$list3"  -crop 1648x115+'%[fx:t*6]+0'  -filter Lanczos    -resize '%[fx:(t<10)?w*(1+0.0122*(t+1.5)):w*(1+0.0122*t)]'x'%[fx:(t<10)?h*(1+0.0122*(t+1.5)):h*(1+0.0122*t)]!'       +repage  -append efb12_collateG.png
https://climategrog.files.wordpress.com ... atched.png

Many thanks to all for the tips and explanations.