Saturday, March 29, 2008

HDR Photography

I just recently treated myself to a new digital camera. I was tired of my little point-and-shoot since I'm used to an SLR. I hesitated to get a digital SLR because they were so expensive and I wanted one that would be compatible with all the Minolta lenses I have for my Maxxum film SLR bodies. The one I chose, and found a good deal on, is the Sony alpha 200.

Sony purchased the digital camera business from KonicaMinolta a few years back, and turned the Maxxum 7D digital SLR into the alpha 100. KonicaMinolta is now concentrating on computer imagery like laser printers.

I've been a big fan of Minolta cameras for a long time, thanks to my Great Uncle Jimmy. He always had Minolta SLR cameras...probably 15 to 20 different ones...over the years. My dream camera for years was the Maxxum 7000. This was the first modern autofocus electronic control camera ever. I did not, however, get one of these $1,000+ cameras until the late 90's...which I bought used for $170. I've run copious amounts of film through this camera for everything from vacation snaps to the occasional wedding.

Minolta was never really the tops in pro cameras for reasons that I could never figure out. Sure Nikon and Canon are great cameras, but I've just always preferred the Minoltas. I like Nikons, they are just really expensive and Canon's (the affordable ones) bodies and lenses have always seemed too lightweight and flimsy. My pal Chris swears by Canons and he's a burnt-out pro...which is why he's in the IT industry now.

Anyhow, HDR is an area that has interested me for a while now. HDR is "High Dynamic Range" photography. It is essentially processing a set of pictures to get to an image that emulates what the human eye would see naturally.

Fig. 1: The original image.

The picture above is an image of the front window of my living room. I took it when the sun was up high around midday. The window is bright and the room dark. The actual image that my eye saw was a relatively bright interior and a bright but distinct exterior...the lighting was "even". To the camera, the bright area overrides the CCD and overexposes the light areas and underexposes the dark areas. This is, unfortunately, unavoidable. Why? The human eye has a high dynamic range and can determine and adjust your perception to even out the lighting of the image. The camera has a limited dynamic range. Basically, the eye is sensitive to a wider range of light than the CCD in a digital camera (or even film). But with HDR, this can be corrected to some extent.

To create an HDR image, you have to have an area that has wide variation of light intensity. You can work with images that don't, but I've not had real good luck with it...but I'm not a pro.

HDR requires three or more images. One, is your normal image...mine was the one above in figure 1. This was taken 28mm, f4 at 1/80 sec. Then you need one or more overexposed images, and one or more underexposed images. The overexposed image will brighten up the dark areas of the original, and the underexposed ones will darken the lighter areas. For the image above I took three under at 1, 2 and 3 stops and three over at 1, 2 and 3 stops. How you do this, however, can be important. Adjust the shutter speed and NOT the aperture. Adjusting the aperture will affect the focal length of the image and can cause areas to sharpen or blur as compared to the original.

The other images I took were at a shutter speed of 1/40, 1/20 and 1/10th of a second for the overexposed images, and 1/160, 1/320 and 1/500th of a second for the underexposed.

To combine the images, I used GIMP 2.4 (an open-source image editor). I opened the original as the background, then the other six images as layers in the same image. To create the HDR image, the idea is to remove the unnecessary parts of the over and underexposed images and include them in the original. To do this, you need to create a mask of the image. GIMP has the facility to create a mask from the layer automatically, and I created a grayscale mask for each layer. On the overexposed image, the grayscale layer needs to be inverted. This is because the mask's dark areas will become transparent, leaving the wanted details of the overexposed image (lighter versions of the dark areas of the image above) intact to be layered upon the original. Likewise, a non-inverted grayscale image is used as a mask for the underexposed areas. This leaves the wanted details of the underexposed areas (the light areas of the original) to be layered on the original.

This all sounds very complicated and can be for the first few times you do it. A great tutorial on how to do HDR with the GIMP can be found here on Instructables.

In the end, I think it came out pretty well, considering that it was not a very good selection of a subject. But, here is the final result.

Fig. 2: The resulting HDR of the image in Figure 1.

You can now see the detail of the furniture and plants in the living room, as well as the detail of that which is outside the window. No adjustments were made to the images, other than the application of the layer masks. I did not use the image taken at 1/40th of a second since it made the interior much to dark. Using GIMP, you can turn layers on and off indiscriminately to see how the image will look.

This is something that I am sure I will play with more in the future.

Friday, March 14, 2008

Random Stuff...

The snow from my last post is almost completely gone. There are a few piles of filthy, black snow lying around in the shadows of buildings. However, with the warmer was 63° yesterday...they won't last long. It is supposed to be in the 50's today with rain, which will further beat down the remaining slush.

What is the deal with this daylight savings crap? Now when I get up in the morning, it is dark! At 7 am! I don't know why we even bother changing the clocks. It seems to me that it would be better just to shift all our zones forward from standard time by 30 minutes and be done with it for good. You know, split the difference. But, who am I?

On two of the coldest days last week I awoke to my car not able to start. You want to talk about being ticked off! I've never had a problem with my car ever, so I thought this quite unusual. I got new tires weekend before last and it figures that would be the first day this all started. They checked out the alternator and battery and said both were good, but that there could be a flaw in the battery that only showed up when cold. After the last time I had to jump driving my mother's car around my house through my backyard to get to the front of my car...I went and bought a new battery. Haven't had any problems since...knock on wood.

Water Heater
OK, I spent some of my tax refund on a new water heater. The happiness was short lived as I discovered in my research that I have to have a special flue dedicated just to the tankless heater! I was intending to vent it up through the existing chimney with some of the special stainless-steel "type III" vent tubing, but you can't do that. The county would not approve a permit for a new heater installed in that manner. So much for lower gas bills.

I sent it back and should get the refund soon. Then I will go out and buy a regular gas water heater. They are quite a bit more efficient these days than my existing 25 year old heater, so the gas bills should still be lower. And I intend on getting a fitted insulating blanket to make it even more energy efficient. I tell you, it is always something!

Cancer Update
I am holding steady around 200 lbs., which is very nice. I actually had to move my seat in my car up a little bit because I was so far away from the wheel. I have long legs anyhow, so I can't be too close to begin with, but I feel so small in such a large car. That's OK by me!

I am now on passive monitoring, which means I will have a CAT scan and checkups every three months for about a year. Then I will be looked at every six months for about five years. And I will have a PET scan about once every year, too. So, things are looking up!

I don't usually recommend films to people because I have such an eclectic taste, but my friend Chris turned me on to one lately that is one of the best I've ever seen. It is called Hot Fuzz. I initially thought it was a porno, but it isn't. It is about a British cop in London that is so good at his job his colleagues decide to have rid of him an promote him to sergeant and ship him out into the countryside. It gets better from there, with lots of twists and turns, conspiracies and a good bit of comedy. It is pretty gory on occasion, but I have to say it is one of the best cop movies of all time. You must see it!

British entertainment is so much better than our American crap.

Saturday, March 8, 2008

Snowstorm 2008

It's snowing.
Fig. 1: My house.

It has been snowing since about 12 noon on Friday, 7 March. The weather people were calling for about 10 inches of snow to fall.

Fig. 2: From my porch, looking north (church across the street)

Fig. 3: Looking east up my street.

The snow has been coming down so quickly that the city has not been able to keep up with the plowing. My street is a major thoroughfare and usually gets priority attention, since there is a fire station to the east. The car in the picture was going about 10 mph, which is wise.

Fig. 4: Looking west, from my porch.

Fig. 5: The backyard.

For comparison sake, the bottom edge of the satellite dish you see in figure 5 is exactly 6' off the ground.

Fig. 6: Snowdrift directly in front of my porch.

There are steps in figure 6. Somewhere.

Fig. 7: Another view of the drift.

Fig. 8: Another drift actually on the porch!

Fig. 9: The drift in front of the porch being measured.

The drift in front of my porch is 16.5" deep.

Fig. 10: Me, standing nearly calf-deep in snow on my driveway.

And it is still snowing! To add insult to injury, the wind is blowing quite mightily, thus causing all the drifts. But, as you can see from mine and other cars, the snow is quite powdery and is not really sticking that well, so cleanup should be pretty easy.

Father has already been out with his snowblower and cleaned off their drive and walkway. He said he would do mine after it stopped snowing. He and mother are on their way to clean off my great aunt's driveway right now.

As for me, I'm hibernating and watching TV!

It finally stopped snowing today, Saturday, 8 March, at 4:30 pm.

Wednesday, March 5, 2008

Phantom Pager Syndrome

I have a syndrome. I call it "Phantom Pager Syndrome". This is going to sound weird, but stay with me.

You see, I have had a pager, cell phone or both...sometimes even more than one each...since I have started working. That's about 17 years now.

I wear my pagers/cell phones on my belt, on the right side, just above my right leg. For the last few years, I have felt strange vibrations in this a pager set on vibrate. I feel it all the time. Even now as I type this, it seems like someone is trying desperately to get hold of me.

I generally set any communications devices I have to ring and vibrate, because I can't always hear the ringing due to ambient noise or the speaker location versus the case muting the sound. When I feel a distinct vibration, I check and listen for the ring. I leave the ring turned all the way up because I don't hear very well anyhow.

Well, since I have the phantom vibrations, I'm checking my phone ALL THE TIME!

I have the most annoying ring that I could imagine. It is a ring that I like because it is loud and I keep the ringer volume all the way up. That way I have an incentive to answer shut it up. It is called "Vintage Phone" and sounds like an old bell phone ringer. It is great! This way when my phone rings I can always tell it is mine. Plus, it is a unique ringing sound that is quite well done that I bought from a company that specializes in ambient sound effects called SoundRangers. I thought a unique solution such as this would a) annoy people, b) ensure that I know my phone is ringing and c) not be stupid like some other ringers I've heard like whatever the current popular top 40 hip-hop song is.

That is not to say that I don't have other ringers, for example...
- For my friend Chris, I have the theme to "Benny Hill", since he is always horny.
- For my boss, I have the "Imperial March" from Star Wars, since he's like Lord Vader sometimes.
- For my friend KL, I have the theme to "Dynasty" (an '80s prime-time soap) since everything she gets involved with has some kind of extreme drama.
- And for my co-worker APK from Sri Lanka I have the "Monkey" sound from the classic's been around since System 6. (Not very PC, I know!)

But these "Phantom Pages" are getting quite annoying. I started having problems back when I was working for the contract computer service company. At that time I was carrying two pagers and two cell phones! Thankfully, I have only one cell phone own. If I didn't have to have it, I wouldn't!

In another related issue is the Nextel walkie-talkie feature. Not only is it annoying to see and hear people using this feature rather than holding a proper phone conversation (since we can now hear BOTH sides of the conversation) the chirp that it makes really bothers me. This is because I had a Nextel when I worked for the contract service company...every time that thing would chirp, I would cringe. It got so bad that at one point I thought I was going to go completely mad. All day long it would chirp with my boss or co-workers wanting something. Even to this day, hearing the Nextel chirp makes me shudder.

I suppose this is enough rambling for today...

Monday, March 3, 2008


It is, right at this very second, 64° in Dayton. It is a beautiful sunny day. I didn't think springtime would ever come. For the first time this year I did not have to warm up my car before leaving for work...I just got in and went.

Alas, this is a cruel joke by good ol' mother is about 15 minutes away from pouring down rain. Then it is supposed to turn cold and snow on Tuesday.

Typical Ohio weather...hang around a second, it'll change.