Distort Not Working

Use this forum for comments, suggestions or problems related to the online ImageMagick Studio web interface @ https://imagemagick.org/MagickStudio.
Post Reply
CaliKat

Distort Not Working

Post by CaliKat » 2007-10-01T20:18:22-07:00

Neither bilinear nor the perspective distort is working at the Koya IM. It is not responding properly to any of the command numbers.

For instance, I had an image that was 450x292. I entered these numbers:

0,0,450,0,450,292,0,292,50,50,400,50,400,242,50,242

This should have brought the image inward on all 4 sides. What I got instead was a flopped image, as though I'd gone to Transform and used the flop command.

Then I tried 0,0,450,0,450,292,0,292,0,0,400,50,400,242,0,292
but nothing happened.

I love the new distort feature - thank you for adding it... hopefully it will be working again soon.

User avatar
anthony
Posts: 8882
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Distort Not Working

Post by anthony » 2007-10-01T23:09:09-07:00

What version of IM are you using?

The coordinate system is changing in the very latest IM (v6.3.6-0 beta) to a system of coordinate pairs rather than two sets of coordinates.
Eg: x1,y1,u1,v1 x2,y2,u2,v2 .....
That is x1,y1 maps to u1,v2 in the distorted image space.

The reason is the next release after that will allow more coordinates than the bear minimum with the distortion being fitted using a least squares algorithm. This will make it easier to just add more coordinates on the end of the argument string. It also means a file of the form...

Code: Select all

   x1,y1,u1,v1
   x2,y2,u2,v2
   ...
can be used, allowing the future expandsion to image registration (face finding, panarama composition, movie like image warping etc).

That means your coordinates should be...
'0,0,0,0 450,0,400,50 450,292,400,242 0,292,0,292'
And yes with quotes, spaces can be used instead of commas to make things clearer.

PS: for simple scaling like the affine with three points could be used. (or four points when I get least squares data fitting in place)

Lots more distortions comming including perspective by 3D angle rotations, just as shown by Fred Weinhaus's IM script
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

CaliKat

Re: Distort Not Working

Post by CaliKat » 2007-10-01T23:58:39-07:00

Thanks so much for the update. Seems that exciting things are underfoot. :)

I am using version 6.3.6. The F/X page has changed since my last visit - took me a moment to find distort. I see a bunch of new additions under the optional attributes but since it is midnight here, playing will have to wait until tomorrow.

Thanks again for the explanation.

User avatar
anthony
Posts: 8882
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Distort Not Working

Post by anthony » 2007-10-02T00:20:15-07:00

You are really at a bleading edge then, that version is being released offically in a few days, or so I was told.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

CaliKat

Re: Distort Not Working

Post by CaliKat » 2007-10-03T23:15:25-07:00

Distort is still not working. So far, the image remains completely unchanged by perspective and bilinear operations.... anxiously awaiting its return.

User avatar
anthony
Posts: 8882
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Distort Not Working

Post by anthony » 2007-10-04T00:50:47-07:00

The latest version 6.3.6 should be reported appropriate errors as to why it didn't work. Typically it is some unknown character in the string. I have had trouble for example with cut and paste from emails that have special UTF spaces, rather that normal spaces. It looks correct but IM tells me there is not enough points, untill I replace all the blanks in the string with normal spaces.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

CaliKat

Re: Distort Not Working

Post by CaliKat » 2007-10-04T15:37:22-07:00

It's back!! Wooohooooooo!! Yes, that makes me very happy - now to go play. :)

P.S. Thank you for all the wonderful new features at IM. We are having a blast with them.

User avatar
anthony
Posts: 8882
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Distort Not Working

Post by anthony » 2007-10-04T20:40:33-07:00

Good. Because as soon as I finished adding least squares fitting for more than the minimum number of control coordinates needed for a distort i will be looking to add more distorts.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

Post Reply