Page 1 of 1

Distort Not Working

Posted: 2007-10-01T20:18:22-07:00
by CaliKat
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.

Re: Distort Not Working

Posted: 2007-10-01T23:09:09-07:00
by anthony
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

Re: Distort Not Working

Posted: 2007-10-01T23:58:39-07:00
by CaliKat
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.

Re: Distort Not Working

Posted: 2007-10-02T00:20:15-07:00
by anthony
You are really at a bleading edge then, that version is being released offically in a few days, or so I was told.

Re: Distort Not Working

Posted: 2007-10-03T23:15:25-07:00
by CaliKat
Distort is still not working. So far, the image remains completely unchanged by perspective and bilinear operations.... anxiously awaiting its return.

Re: Distort Not Working

Posted: 2007-10-04T00:50:47-07:00
by anthony
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.

Re: Distort Not Working

Posted: 2007-10-04T15:37:22-07:00
by CaliKat
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.

Re: Distort Not Working

Posted: 2007-10-04T20:40:33-07:00
by anthony
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.