Warp Problem

Moderator: jsachs

Post Reply
jfoster
Posts: 169
Joined: December 1st, 2011, 1:39 pm
What is the make/model of your primary camera?: Canon/5DMIII

Warp Problem

Post by jfoster »

There seems to be a slight error showing up in the warp transformation. Attached is a workspace that illustrates the problem.

The result of the steps shown here were always spot-on in PWP7.

Briefly, using warp (in bilinear mode) to stretch a portion of an image (with the Shift-key held down to constrain the movement to 1-dimension) causes the right edge to not line up with the original image. See here:

warp prob.jpg
warp prob.jpg (26.21 KiB) Viewed 2487 times
Also of note is that the problem seemed to increase after saving the workspace and then reopening it - the misalignment seemed to be about double what it was originally.

Jeff
Attachments
pwp80167_warp_issue.zip
(1.04 KiB) Downloaded 134 times
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Warp Problem

Post by jsachs »

The problem appears to be related to the output image height being greater than the input image height (800 pixels in this case). You can enter the height manually to correct the problem. The output image dimensions are by default computed so as to preserve the area and proportions of the selected quadrilateral, but there can be a little roundoff error in some cases.

If you reset the Warp transformation and carefully just move the left side of the overlay rectangle, the size does seem to stay pinned at 800. If you ever move the rectangle in some random direction without the shift key down, the Scale Factor can change and the output image dimensions drift away from their original values.
Jonathan Sachs
Digital Light & Color
jfoster
Posts: 169
Joined: December 1st, 2011, 1:39 pm
What is the make/model of your primary camera?: Canon/5DMIII

Re: Warp Problem

Post by jfoster »

I've been away from this for a bit. Yeh, it looks like cockpit error on my part in coming up with the steps to reproduce the problem I saw. I will look back at the original workspace where I saw the issue when I get a chance. Thanks.

Jeff
jfoster
Posts: 169
Joined: December 1st, 2011, 1:39 pm
What is the make/model of your primary camera?: Canon/5DMIII

Re: Warp Problem

Post by jfoster »

I spent a little more time on this and what I found is that upon editing an existing Warp Transformation, the Transformation changes on its own with no user input. To reproduce:

1. Open PWP 8 (currently on rev 167).
2. Use the Test Pattern Transformation to create a Checkerboard (800 x 800 pixels).
3. Apply the Warp transformation to the Checkerboard. Using the Shift Key to constrain the Warp to only horizontal axis, drag the right edge of the Checkerboard in a bit.
4. Confirm that the resulting image maintains an 800 pixel height.
5. Click OK on the Warp transformation.
6. Right-Click on the Warp Transformation image and select Edit Transformation.
7. Without making any changes, click OK on Warp Transformation dialog box.
8. Note that now the resulting image size has changed to 801 pixels.

Also,
Perform steps 1 – 6 as above, and then change the Warp method to Bilinear and then cancel the Transformation edit. Note that the result of the Canceled Transformation is different than before the Edit was Canceled with the changes abandoned.

Jeff
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Warp Problem

Post by jsachs »

I fixed the off-by-one problem for the next release.
Jonathan Sachs
Digital Light & Color
jfoster
Posts: 169
Joined: December 1st, 2011, 1:39 pm
What is the make/model of your primary camera?: Canon/5DMIII

Re: Warp Problem

Post by jfoster »

Seems to still be a problem - the Warp transformation, with no user input or after a transformation reset, changes the output image size.
I checked rev 172 and 174.

Jeff
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Warp Problem

Post by jsachs »

OK, I think I got it this time for the next release. It is possible that in some more obscure situations there might be a small roundoff error, but it seems to be working OK now in all the test cases I checked.
Jonathan Sachs
Digital Light & Color
Post Reply