Page 1 of 2

Composite Transformation question

Posted: March 31st, 2011, 11:08 pm
by Marpel
Good Day,

I am trying to do something with the Composite Transformation, but am having no luck figuring it out. Hopefully someone can help me.

I have an Input image that I wish to use as a background for three Overlay images, which are each quite a bit smaller than the Input image . I, initially, tried placing each Overlay image on the Input image by eye, using the Blend Transform (so the Overlay image was visible against the background) but I found it too imprecise. For my present project, using the 1 point alignment, I am trying to place each of the three Overlay images in three of the corners. However, I find that, except for the first image which starts in the bottom left corner, it is too difficult placing the other two in their respective corners because for accurate alignment I need to zoom in considerably to check the edge of the Overlay with the edge of the Input. By zooming in, I then find the screen too small to see the alignment point to click on it to move the image around, without moving across the image, which then makes the edge disappear.

When one uses this Transformation for the first time each PWP session, the first Overlay image automatically aligns in the bottom left corner so I suppose I could redo this Transform for each image and rotate the Input and Overlay so each corner eventually ends up in the bottom left corner but this is too cumbersome.

Having said all that, I also place Overlay images well within the boundary of the Input image so I am not always working with the edge of the Input image either.

I could probably use the Layout Transformation (haven't studied up on this so not sure), but I often like to use the Filter, Soft Light and Hard Light blend modes when I use the Composite Transformation, so I expect Layout would be useless in this respect.

My question, does anyone know how to move Overlay images around with exacting precision on a larger Input image in the Composite Transformation? I tried the arrow keys with negative results and am unfamiliar with any other options.

Thanks in advance
Marv

Re: Composite Transformation question

Posted: April 1st, 2011, 1:04 am
by Charles2
You have two windows to work with, the window for the base image when you open the Composite Transformation, and the Preview window, presumably on auto preview. You can change the size of the preview window and its zoom ratio. So you can leave the base image zoomed out with the alignment point visible in a large context, while the preview image is zoomed to 1:1 or even closer and looking at your corner of interest.

Here is a silly example putting a crop of a yellow flower in the corner of a scene.

Image

Re: Composite Transformation question

Posted: April 1st, 2011, 8:38 am
by MarkT
To your question about positioning and scaling overlay images, I think you need to start by choosing an "Alignment" option, probably "2 Point (shift/rotate/scale), then grab one of the 2 lower corner control points and scale the overlay to the size and orientation you want. To move the location of the overlay, hold the Ctrl and Shift keys down, and click-and-drag the overlay outline around with the mouse.

Of course, for different projects, one of the other "Alignment" options may be more suitable.

If I have misunderstood your question, please let me try again.

Cheerio

Mark

Re: Composite Transformation question

Posted: April 1st, 2011, 9:25 am
by jsachs
You reposition the alignment point(s) in both the base and overlay images, so to align an overlay image in the upper right corner of the base image you just position the alignment points in both images to the upper right corner (same for other corners). You can zoom each image window in as much as you want. Press the "1" key to zoom all the images to 1:1. For the alignment points to display you need to make the Composite dialog box the current window.

Re: Composite Transformation question

Posted: April 1st, 2011, 11:19 am
by Marpel
Thanks to Mark and Charles for your replies. Funny enough, they helped me figure something out that I was having issues with on a completely different project. For this one though, I think Jonathan's suggestion hits the mark for what I am currently trying to do (and thanks for the added "1" tip about 1:1 zoom for all the images).

As an aside, I also just figured out how to use the second mask box in the Composite Dialogue to place a single object from a smaller Overlay image into a larger Input image.

I am continually amazed at how good this program is.

Marv

Re: Composite Transformation question

Posted: April 2nd, 2011, 11:26 pm
by Marpel
OK, I'm about to tear my hair out (what little I have left). I thought, with the advice from some forum members, that I had this thing figured out. However, I am finding a problem when trying the Composite Transformation with one point alignment, especially when placing a smaller Overlay image into one of the corners other than bottom left, of a larger Input image. As I noted earlier, I prefer the Composite Transform (over the Layout tool) as I often like to use the various blend modes. Here's the problem:

I am trying to precisely place a small image (say 500 pixels square) into the top left corner of a larger image (say 2000 pixels square). I started to see some issues so tried an experiment with the larger image being solid dark gray and the smaller image a crop of any photographic image. To better determine what I was seeing, I used straight Blend mode. When first opening this Transform in one point alignment, the Overlay image starts (snaps to) the lower left corner and is perfectly aligned with that corner. However, when trying for the opposite or other corner, even at 15 X enlargement, I think I have the images perfectly lined up (at least visually). When I press OK, then view the resultant image enlarged so individual pixels of the Overlaid image can be easily viewed, there appears to be a single pixel size shaded edge (bottom and left edge of the Overlaid image, not the edge of the larger image) and the smaller image is blurred as if it is blended over itself and moved one pixel out of alignment (like 2 slides of the same content laid over each other but not perfectly aligned). I tried this with moving the Overlay away from the bottom left into the middle of the Input image and the resultant image is sharp, but it appears when the Overlay image is extremely close to the edge of the Input image, something happens. Incidentally, it also appears the Overlay image can extend well outside the Input images boundary and it remains sharp. Although I find, even when zoomed in to great detail as suggested by Jonathan, it difficult to exactly line up the two edges in the corners of both images, I think I am getting them bang on, however, it could be my poor alignment techniques.

I wonder if someone would help me out by trying this same experiment and advise if I'm out to lunch (and if so, perhaps provide some better alignment techniques) or if there is an issue inherent in the program.

I hope my explanation is sufficient, if not let me know.

Thanks in advance

Marv

Re: Composite Transformation question

Posted: April 3rd, 2011, 7:07 am
by jsachs
The Composite transformation resamples the overlay image which can blur it slightly if alignment is off by a fraction of a pixel, so this is expected behavior. Note that when placing alignment points at zoom factors above 1:1 the alignment point is placed in the center of the pixel, not in one of its corners. For your particular application, it would probably be better to use Mirror/Rotate to rotate the images 90 degrees at a time and composite only the lower left corner which automatically aligns the images so that no resampling occurs.

Re: Composite Transformation question

Posted: April 3rd, 2011, 11:37 am
by den
jsachs/Marpel...

If I remember correctly, 'Rotate' in PWP is not a lossless transformation and if done twice, once for the Composite and once again to re-orient... these losses may become apparent and some form of sharpening needed.

Perhaps... ...one could use the 'Crop/Add Border' transform and obtain the desired placement precision where the 500x500 pixel image is the Input Image; the 2000x2000 pixel image is the Border; Softness=0.00%; the Right Border is set to 2000-500=1500 pixels; and the Bottom Border is set to 2000-500=1500 pixels... ...to put the 500x500 pixel image in the upper left corner of the 2000x2000 pixel image.

---Edit1---
The above would be the same as a 100% Amount Composite-Blend. To use other Composite Operations, one could in a like manner, generate an 8-bit BW image with 'Crop/Add Border' where there is a white 500x500 image area in the upper left corner of a 2000x2000 black image... [or inverted] for use as an Input Mask for the Composite transform where the original 2000x2000 image is the Input and the 'Crop/Add Border' image from above is the Overlay. Then set the Composite transform to the desired Operation.... adjust Input Mask white/black and Overlay Amounts to preferences while perhaps monitoring Preview.

Re: Composite Transformation question

Posted: April 3rd, 2011, 12:49 pm
by Marpel
Jonathan,

Thanks, your response explains what I am seeing. I may have to stick to the multiple rotate method for now.

However, a couple observations:

I notice that when zoomed in a significant degree on an image (I'm talking 15:1 or higher so individual pixels are clearly visible) then scrolling over to the top left corner, the image does not always end in a whole pixel. Depending on the zoom factor, it may end in a whole, half or even smaller portion as if the border cuts the edge off. I thought this may be due to the border width so I tried varying same down to "0" but it still cut off part of a pixel (or more I guess as it is hard to tell, without counting the total pixel width or height, exactly how many pixels are visible). This may have something to do with my problem of accurate placement?
Second, when zooming into the Input image and Overlay image (and I'm talking over 15:1) to get more accurate alignment, and the top left corner of each image is visible (this is after a rough placement of the alignment point into that corner), I notice that, when moving the alignment point in the Overlay image, while watching the point in the Input image, the point does not correspond to the same location relative to the lined outline of the Overlay image on the Input image. Even when the point is within the boundary of the Overlay image, its corresponding point on the Input image may be outside the boundary of the outline. Makes it a bit difficult to ensure accurate placement. Both minor points, I admit, and I know it may seem like I am being too anal, however thought you might like to know.

To end with a question:
Not knowing how difficult programming is, wouldn't this problem be solved if you could have an option to "snap to" an Overlay image to an edge or corner of the Input image when the Overlay image came within a certain number of pixels to that edge or corner? If able to toggle that option on or off, one could place the Overlay within the tolerance without the "snap to" option if desired.

Den,

Thanks for your comments. If your memory serves well, I may have a bit more of an issue from the lossy consequence as, for the image I am working on, I wish to place an Overlay image in three of the corners. This means multiple rotations or mirror movements.

As to your "Crop/Add Border", I'll have to test it (read it three times but as my Internet computer is in another room than my image editing computer, I'm going to have to write down the instructions and relocate before I can try this). Having said that, as I often use the various blend modes in the Composite Transform, would this method be of any benefit in that respect or is it more/only useful when doing a straight blend?

Completely off topic, any idea what the Ipad2 situation is in Northern Washington?? My wife is frantic to blow her money on one of those devices and it's a long wait time here in Vancouver.

Thanks,
Marv

Re: Composite Transformation question

Posted: April 3rd, 2011, 1:29 pm
by den
Marpel...

Please see ---Edit1--- to my posting above for added info.

Don't know about Ipad2 availability locally... perhaps some phone calls after an internet search.