Fixing Photo Color Casts and Contrast

November 4, 2014

Before and after restoration of a faded old photo. Notice in the top histogram, the peaks of the red, green, and blue channels aren’t lined up and don’t reach to the left and right edges. That results in a color cast and reduced contrast. If you have software that has individual R,G,B levels or curves controls, it’s pretty simple to fix, and followed by fine-tuning of exposure looks like the bottom picture. I’ve used both Lightroom and Photoshop Elements to fix hundreds of old photos like this. In Lightroom, it’s “Edit Point Curve” in the Tone Curve section. In Photoshop Elements, a Levels Adjustment Layer. Photoshop has a Curves Adjustment Layer as well, which is more flexible but can be harder to use.

I start by moving the endpoints of all three channels to the edges, maximizing the contrast and luminosity range. If the results still have a color cast (often not the original one), I move midpoints until it looks the way I want. Sometimes I fine-tune it afterward with conventional white-balance controls (color temperature and tint).

Histogram+levels demo

From Novice to Master, and Back Again

January 14, 2013

In 1985, I was a freshman at St. Olaf College in Minnesota. The college had a VAX 11/780 running 4.2BSD and a PDP-11/70 running v7 with some Berkeley and local code hacked in. It was my first experience with multi-user systems other than dialing into an MS-DOS BBS or two.

The college’s Academic Computing Center had printouts of the 4.2BSD manuals, plus some home-grown documentation, available for sale so students could learn how to use UNIX. One week I sat in the Science Center terminal room and started going through the alphabetical list of the commands available on the VAX, trying each one and reading its man page to learn what it did.

Eventually I got to “su”. “Become the super-user”? What’s that? Does it involve wearing a cape? Sounds interesting, so I tried it. To my disappointment, it just asked for a password, and wouldn’t do anything.

Shortly thereafter, someone came running into the room and asked, “Are you David MacKenzie? Did you just run ‘su’?” “Yeah… what does it do?” “Uh, don’t do that.” My failed “su” attempt had been logged on the system console and one of the sysadmins was worried about an attempted breakin.

Within a year, I did have root access on the VAX, as I learned enough to be hired as a student system programmer. I contributed to upgrading the machine to 4.3BSD when that was released.

Recently I was working on a CentOS Linux virtual machine and needed to look up the command-line options to “su”. I had worked for the past several years mostly on Macs where “sudo” is preferred, so my “su” skills were rusty. I ran “man su” and got the information I needed. Then at the bottom of the screen I sheepishly read “Written by David MacKenzie.”

In the 1990s, while filling in gaps in the GNU toolset, I wrote the GNU “su”, and I had forgotten about it. It’s still what Red Hat and other distributions are shipping.

At least I know what it does now.

Protecting Cable Service from Surges

February 9, 2012

I found out a few months ago that cable TV/Internet service is supposed to be grounded at the entrance to the building. I learned the hard way, when during two storms, the Comcast Business cable at my office was hit by surges (I suppose from lightning strikes somewhere exposed upstream). The surges killed our cable modem, which Comcast had to send a technician out to replace and reconfigure each time. That part cost us a day or so of downtime in each storm. Worse, the surges traveled down the Ethernet cable from the modem and destroyed other equipment. The first storm fried one Ethernet port in our firewall appliance, and the second strike killed all the Ethernet ports in our firewall appliance and a packet shaper rate limiter attached to it, equipment worth around $8,000 which we had to replace and make an insurance claim for.

After that, I did some research about what could be done. It appears that the National Electrical Code requires communications cable lines to be grounded at the building service entrance, as referenced in this Q&A from the New York State government and this Q&A from the Electrical Contractor Network. I am not an expert in the topic.

I came up with a two-pronged defense. The first was, we had Comcast send another technician out to ground the cable to an electrical panel where it enters our server room. He affirmed what I had read on the net, that the cable is supposed to be grounded at the building service entrance. He said that Comcast used to do it by driving a rod in the earth, but that now grounding to an electrical panel is preferred. He demonstrated the constant voltage differential between the two by touching the grounding wire against the splitter lug while the other end was screwed to the breaker panel; we saw little sparks arc.

The second prong of defense was to install an Ethernet surge protector on the CAT5 run between the cable modem and the new firewall, so even if a surge did hit the cable modem, it wouldn’t continue up the line to damage other equipment. We got the APC PNET1GB ProtectNet Standalone Surge Protector for 10/100/1000 Base – T Ethernet Lines for around $24 from Amazon. It uses a grounding wire run to an electrical outlet’s screw.

After getting the office taken care of, I implemented the same measures at home. We happen to have a Comcast-provided splitter where the cable enters our house, with a grounding lug on it, and a corner clamp for grounding already installed on the electrical meter box just above it. So all I needed to do was run a copper wire between them. I also got the Ethernet surge protector noted above to run between our cable modem and firewall/router.

So far, so good; no damage during storms at either place. It’s sad that Comcast doesn’t consistently protect customer lines when they do an install, though. If you have a cable line that isn’t grounded, consider calling your cable provider and asking them to send someone out to do it, and/or install an Ethernet surge protector yourself.

Here are some pictures of the installation at home.

 

 

 


Design a site like this with WordPress.com
Get started