Shrinking the middle

Moderator: jsachs

Post Reply
Marpel
Posts: 692
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Shrinking the middle

Post by Marpel »

I have an image which is a crop from another. The crop was full width, but reduced vertically, so now long and narrow.

I now find the proportions awkward and the middle area (from top to bottom) less important than either end, so my wish was to shrink that middle section, horizontally, while keeping both ends as they were in the original. I did not want either end area to be disturbed.

To accomplish this, I resized the image so the height was the same but the width was reduced (that number was arbitrary). I then, over a few comps, blended the resized middle to the (unresized) left end, using a gradient mask, then did the same with the right side, which ultimately resulted in a less wider image, with only the middle section "squeezed", while the two ends remained in proportion. This image is/was of a waterfall where the middle, horizontally, was just blurred water, while the two ends contained rocks of substance, so the squeezing and blending was easier than had there been something more detailed in that area.

I wish to duplicate this for a few other images, but the process I used was fairly involved, so is there a better method to shrink the area in the middle of an image, while keeping the two ends unaffected?

Marv
MarkT
Posts: 367
Joined: April 24th, 2009, 2:07 pm

Re: Shrinking the middle

Post by MarkT »

Maybe this thread will help:

viewtopic.php?t=3497
jsachs
Posts: 4214
Joined: January 22nd, 2009, 11:03 pm

Re: Shrinking the middle

Post by jsachs »

While it should be possible, I was unable to find an easy way to use the Displace transformation to accomplish this. On the other hand I can see how it could make a useful transformation.
Jonathan Sachs
Digital Light & Color
Marpel
Posts: 692
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: Shrinking the middle

Post by Marpel »

MarkT,

Thanks for the reminder. When that thread showed up, I actually read it but gave it no further thought.

Now that I have visited it again, I wonder if one could first cut the image in half (crop the right half, then crop the left half), then use the method shown by Jonathan on each half to compress each side of the centre line (rather than compressing the bottom as he did), using a gradient mask to control the severity. Then re-attach the two sides? That would in theory compress just the middle and make the final result less wide.

Of course, the issue with this method, if doable, is it would take as many, if not more, steps to accomplish than what it took me.

I was hoping for a process which could be accomplished in as few steps as possible.

Marv
tomczak
Posts: 1367
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Shrinking the middle

Post by tomczak »

While I may misunderstand what Marv is doing, perhaps Distort could do a better job than Displace? Placing the control vectors and choosing the method/parameters could be a bit tricky from what I've tried but it seems to allow for rubber-sheeting the image locally and also shrinking its overall dimensions with the boundary control points. For Marv's project, I imagine 'control lines' would be even better than control points.

p.s. Kind of related to another question about aligning images: it seems that if the target points in the Distort could be somehow allowed to be placed in another image, that could be quite useful in registering one image to another - I was thinking about e.g. rectifying a drone picture to a map or the like.
Maciej Tomczak
Phototramp.com
Post Reply