Spoiled your photo?

Not all spoiled photos are bad!

As I was preparing a post for another blog, I was looking for photos of cafe doors. Searching my archives I came across one that was a nice enough image but for some reason or another I took it with the camera way cockeyed. No idea what I was thinking at the time. The other photos in the series were perfectly alright, but this one was the only one that really fit my story.

Here is the original.

45 South Cafe

45 South Cafe

Just not the way I want it. OK, let’s go to Microsoft Image Composite Editor. Nothing to “composite” here, just one frame. ICE won’t accept a single file. So I duplicated it. Loaded it into ICE, told it I was using “Rotating Motion” and had it “Stitch”. It will do that with two copies of the same photo. Then it lets you manipulate it as you like. For “Projection” I used “Perspective”. This let me do some perspective correction as well as rotating the image freely. Now I had a picture I liked. Saved it without cropping.

Since the image was rotated rather strongly the exported image showed a lot of black around the useful picture. That didn’t look so good. Paint to the rescue! Just drop in “white” in each of the black triangles and here we are. What do you think, will this work?

Evening at 45 South Cafe

Evening at 45 South Cafe

 


.:.

© 2016 Ludwig Keck

 

The Unplanned Pano

Panoramas are fun, even unplanned ones

This old, long “retired”, gasoline station intrigued me. We were driving along in the rural part of Georgia, up in the northern part, when we came upon this sight. We stopped and I took a number of photos. Only when I was doing my post-processing back home did I realize that I had not taken a overall photo that showed the whole place.

Well, that what the “Create” tab in Photo Gallery is for. The first photo showed the building nicely, the third one included the fuel island, there were a number of other views as I walked around the place, and by the tenth photo I had gotten back close to the starting point and showed the pumps, including the ancient one.

Here are the two shots that together cover the whole place.

You can clearly see that I had not taken these photos from the same spot. Making a pano from these would be asking a great deal from Photo Gallery. And indeed it was asking too much. Here is what it could do. Amazing as it is, but the top left of the marque sign just didn’t match.

Old Gas Station - Pano

Old Gas Station – Pano

So on to the nest better tool, in fact the best there is, Microsoft Image Composite Editor. It too had problems, I tried the different planar motion settings and rotating motion. There were still disturbing stitching artifacts. So I did some perspective correction on each image and tried again. That was better.

Old Gas Station - ICE pano

Old Gas Station – ICE pano

A fairly good stitch but the building was way too distorted. Some more fiddling and this was more acceptable. There is a bend in the fuel island base, but I thinks it is not too bad.

Old Gas Station

Old Gas Station

Now with some cropping we have a pretty good photo of the whole place. It still amazes me what Image Composite Editor can do, even with images that clearly were not taken with stitching in mind.

Old Gas Station

Old Gas Station

 

Also see my post at Two Cameras – Two ViewsArtifacts: Fuel Pump


.:.

© 2016 Ludwig Keck

ICE-2 Distortion and Correction

This is my second look at ICE 2.o, the Microsoft Research Image Composite Editor version 2.0. In this article we will take a look at distorting and correcting images and more.

ICE-2-D C-11

If you just open ICE you get mostly advertising. This front page is the only one soliciting. Microsoft Research has fallen on hard times, but at least they are still there and turning out superb tools.

The way I operate, I never get to see this opening screen, but I am getting ahead of my story. ICE-2-D C-05First some very good news. ICE 2.0 work perfectly in Windows 10, that is in the Technical Preview, but tit should work just as well in the final version. It does require a C++ Runtime Library. It tells you that and the installation is just a matter of clicking along.

Once installed, it can be called right from Photo Gallery. Yes, Photo Gallery, although now three years since the last update, works quite well in Windows 10. Not perfectly and not as smoothly as in Windows 7, but I have hope.

ICE-2-D C-07In this article I want to touch on how a composite image can be distorted, or more importantly, corrected in various ways. For perspective correction, straightening “falling” buildings, I have always preferred ICE. No ICE does not work on a single image, it requires at least two to generate a composite. It can easily be tricked by supplying it with two copies of the same image. When ICE is installed you can find it and pass images to it right from inside Photo Gallery. Click the Create tab, then More tools and it is right there.

ICE-2-D C-09

When ICE opens the images selected in Photo Gallery will be right there. Under Camera motion, select Rotating motion in order for ICE to provide the various projection options.

ICE-2-D C-12

The new version has a richer collection of projection tools: Cylindrical, Transverse Cylindrical, Mercator, Transverse Mercator, Spherical, Transverse Spherical, Orthographic, Fisheye, Stereographic, and Perspective.

It is real fun playing with these projection tools. For this article, with just the single image, I will just mention perspective correction. The image is manipulated by dragging it up or down, right or left, or dragging a corner to rotate it.  It is much easier to demonstrate than to explain, take a look at this short video (just a couple of minutes).

Click on the image or the link, whichever shows in your browser.

//player.vimeo.com/video/120834937

ICE-2-D+C-V

In the video you noticed that after I settled on the correction I also employed the new Auto complete option. This feature is called “content aware fill” in some other editing tools. In ICE it works to fill in the “dark” corners in a composite.

The screen shots here and the video are from ICE working in Windows 10 Technical Preview Build 9926. The video is shown unedited (except for the addition of titles front and back).

You can get an idea what a smooth working tool ICE is.

Here is the perspective corrected photo with some additional post processing done. Note how nicely the trees on either side were filled in. And of course, there is also a “café art” art version as well.

.:.

© 2015 Ludwig Keck

Perspective correction using Microsoft Image Composite Editor

A prior post here showed how to use Microsoft Image Composite Editor, “ICE”, to make perspective corrections to panoramas (Perspective correction for panoramas). How do you make a perspective correction in a single photo? ICE, after all, is a compositing, stitching program and will give an error message when you try to load just one photo.Perspective distortion

If you do not have access to a full-fledged photo editing program, you can still use the free Microsoft Image Composite Editor to do that job.

ICE requires a minimum of two photos to operate. For stitching photos together, it’s primary purpose, the images must overlap so it can find the matching areas and combine the photos into a large composite.

Can it handle photos that overlap completely? Yes, it can. So a photo plus a copy of that photo fulfill the requirement of two images. It just so happens that there is 100% overlap. ICE can handle that.

loading photos into ICE

So, starting in Live Photo Gallery, make a copy of the photo you wish to correct. Select both the original and the copy. On the Create tab click More tools, then click Create Image Composite.

(If you do not have ICE installed this will not work, of course. Download ICE from the Microsoft Research Image Composite Editor download page.)

Live Photo Gallery starts ICE and loads the selected photos.set camera motion

In ICE the two photos will be recognized as “Planar Motion 1” for camera motion in the Stitch box (lower left). Set this option to Rotating Motion, see the illustration here.

Once this option is set, the menu bar above the image will show a little cube. Click that cube. An additional control will be added, “Projection”. In this control you can select how the image is to be translated. It will already show “Perspective”. The other projection options, cylindrical and spherical, are not applicable to this use. We want to make a perspective correction.

set projection

When a photo is taken of a building, or other subject, with the camera titled up or down to get the whole object into the frame, the resulting photo will show strong converging lines. The building, see photo higher up in this article, looks like it is falling in on itself. We call it perspective distortion, but it is how the camera sees the world.

This is a natural consequence of how optics works. Things farther away look smaller, hence the result. This also happens in our eyes. But we humans have a powerful built-in computer – our brain. We know the flagpole stands up vertically and that the walls of the building are vertical. When we stand in front of the building we do not perceive the converging lines, although we see them exactly the same as the camera.

In a photo, however, these converging lines look all wrong. Hence the need for perspective correction. The Image Composite Editor makes this correction easy. Just drag the image up or down, even side to side.

Microsoft Image Composite Editor

As you drag the image, ICE “distorts” it to modify the perspective. Moving the image up stretches the top out. You can move it sideways and the image area will be stretched appropriately. You can see this in real time so this process is very easy.

When you are happy with the result, click Apply.  You can then select the output file format and other parameters in the Export block. The Export to disk button initiates the file save procedure.

One bit of caution: You can make the perspective correction “perfect” so that all vertical lines will be truly vertical. When you look at that picture, however, it may not look perfect at all. It may, in fact, appear that the building is now out of proportion and “growing” outward at the top. Here are a couple of images of the building shown at the top. One is completely corrected, the other still has some converging lines. You will likely agree with me that a bit of under correction produces the better result.

Full perspective correction some perspective under-correction

Click on the photos for larger views.

.:.

© 2012 Ludwig Keck

Perspective correction for panoramas

Sometimes you want more in a photo than the widest zoom setting can provide and there is no way to back up to get more of the scene into the frame. Taking several overlapping shots and combining them as a panorama is an often used answer to that problem. But this procedure introduces problems of its own. Let me illustrate: I have three photos of the front of a restaurant and I want to combine them into a single picture.

Café Café Café

The photos were taken from the same spot – that is important. I hand-held the camera and the pictures don’t match very well. Yes, even the exposures don’t seem to match – that, dear reader, is to illustrate the power of Live Photo Gallery and more, but let us not get ahead of the story.

Live Photo Gallery offers a panorama tool on the Create tab. This quickly produces a well-stitched combined picture. It even matches the exposures properly.

LJK_5353-5-Stitch

Alas, the result looks way to much like a “fish-eye” picture. The curved roof line and sidewalk just don’t seem natural and right.image

Microsoft Image Composite Editor, “ICE”, to the rescue.

If you do not have ICE installed, you can obtain ICE from the Microsoft Image Composite Editor download site.

With ICE installed, it will show up in Live Photo Gallery, in the Create tab under More tools.

Select the thumbnails of the images to be combined and click Create > More tools > Create Image Composite. ICE will open and show a composite pretty much as you would get in Photo Gallery.

Click the little cube in the menu bar. An additional control will come up “Projections”. Click that and click Perspective in the drop-down menu. The illustration here shows that.

ICE-02

You can adjust the image by dragging it up and down or right and left. For buildings the primary objective should be to get vertical features to be vertical and not sloped in or out. I usually like a little bit of under-correction – it seems more real to me.

You will not be able to make a complete correction of all features, but the image will be much improved.

Click Apply. After the image is updated you can drag the crop lines to fit the picture.

ICE-03

In the “Export” area you can select the image file type. For most uses that is “JPEG Image”. You can adjust the JPG image quality (default is 80%). There is a “Scale” box that permits scaling the image down. The the final image size is also shown in that area.

The last step is to click Export to disk (lower right) and to step through the file location selection.

LJK_5353-5-ICE-stitch-1024

There you are, a nicely stitched picture, even the uneven exposures were automatically corrected. Is this not a much more satisfying picture?

.:.

© 2012 Ludwig Keck