Saturday, December 13, 2008

Create images using text

I've always been fascinated with photographs, and being the geek I am I'm even more fascinated with interesting ways to create photographs! Here I'll explain how to create a neat form of geek-art known as ASCII art. What is ASCII art you ask? Let's talk about ASCII first--this is simply a standard that is used to represent text characters on your computer. So when you type on a keyboard, specific codes that correspond to each of the letters, numbers and symbols are used to tell the computer exactly what it is you are entering. This character standard is also used to store text in your documents. At its most basic level, it's the type of characters you see in Notepad--the no-frills, standard Courier font text.

ASCII art is the process of creating computer-generated images using just these text characters! Using freely available software, you can create stunning imagery by putting your favorite photos through these programs, which do all the mathematical calculations and decide what characters to use to simulate shading while creating the image! I know--it's difficult to imagine, so head over to the next section and see for yourself.

I've used several applications that create ASCII art, but have found ASCIIGen to be the best of them. After numerous rounds of trial and error, here's what I believe is the shortest way to get the best results using this program:

1. Download the program from the link above, unzip it to a folder on your hard disk and run the Ascgen.exe file.
Press CTRL+N to start a new project. In the box that opens, navigate to your source photo.
Hint: Click these images for a larger version.
capture_13122008_033651
2. After loading the image, select the area you want to focus on, and set the height dimension to 200 as shown. capture_13122008_031809
3. In the next tab, increase the brightness until the image becomes a little too bright in the image preview. That's right--stop only when the image looks noticeably overexposed. capture_13122008_033245
4. In the Greyscale Method section of the next tab, Choose 'NTSC/PAL Weights 2' from the dropdown list. Next, select the ASCGEN ramp checkbox, and lastly move the Error Tolerance slider bar all the way to the right as indicated.
Click on OK and the text file will be generated. Save this text file.
capture_13122008_031936
5. You'll now need to tweak this text file in MS Word to get your image right. Start by opening the text file you created in MS Word. Select all the text (CTRL+A) and set the font to Courier New. capture_13122008_032220
6. With the text still selected, reduce the font size until the entire picture fits comfortably on a single page without distorting. To quickly reduce the font size, press CRTL+SHIFT+"<" capture_13122008_032251
7. At this stage, you'll notice the image is slightly distorted. To fix this, select all the text, right-click it, and select Paragraph. In the Spacing section, enter a value ranging between 0.75 and 0.95 (see which value delivers the best results) in the 'To:' box and set it to 'Multiple Lines'. Try a few values until you're satisfied with the image.
Finally, save this document as a Word file, and print it using the high text quality setting in your printer.
capture_13122008_032448

The final ASCII image

Surprise your friends--I'll bet they won't be expecting these kinds of renderings of themselves! Give them their very own ASCII art image and stake your claim to being their geekiest friend. Or not.

Friday, December 5, 2008

Adobe Photoshop Lightroom 2: Portrait tricks

Good photos begin with good technique. More than having a capable camera and great equipment, it's all about mastering the nuances of composition, understanding the capabilities of your equipment, and knowing how to capture the situation and subject. But even in the best of cases, it's good to know that you can use tools that'll help you lift the quality of your image just enough to push it into 'exceptional' territory.

The capability of today's digital cameras to resolve the tiniest of details in a scene can actually be detrimental--with their multi-megapixel sensors and high-quality optics, digital SLRs are especially relentless when it comes to capturing the good and the bad in a subject. With portraits, you can capture the colored serrations in your subject's iris as easily as the blemishes on their cheeks or the discoloration in their teeth. So while some schools of thought might deem this to be cheating, I say why not use technology to flatter your subject--be it a beautiful friend, a stunning landscape, or a luscious plate of chocolate cake!

Photoshop Lightroom 2 offers a great set of tools for touching up your photos--you can be as subtle or blatant as you want. Here are some of the tools I use when it comes to portrait photography, so that I can show my subjects in the best possible light (pun intended!).

For portraits:
When it comes to touching up portraits, I use the following tools in Lightroom 2 to make a few subtle changes that can make a stunning difference. Note that I first went through the basic image correction procedures as described in my previous blog post.

capture_05122008_012557

We'll first start by analyzing the photo and determining what needs to be fixed. In the picture above, the subject has great features to start with, but there are a few tiny aspects that can be fixed including blemishes, skin oiliness, and a slight discoloration in the teeth. To add a touch of glamour, we can also impart a bit of 'glow' to the skin. Now that we know what to do, let's dive right in!

1. Spot Removal: Go to the the Develop module and hit the [N] key, or click the Spot Removal icon beneath the histogram. Next, change the size of the reticle by using your mouse scroll wheel (if present), or the box bracket keys '[' or ']'. Make this reticle slightly larger then the skin blemish you want to eliminate. Click-hold on the spot, and drag the mouse to a clear patch of skin. You'll see the clearing effect in real time--leave the mouse button when you're satisfied with the effect. Repeat this process for all spots on your subject's face. The circles in the adjoining photo represent the locations where I used spot removal. Press the 'H' key if you can't see these markers. capture_05122008_012807
2. Skin smoothening: This is perhaps one of the most powerful effects you can use for portraits. In Lightroom 2, you can use the Clarity component of the Adjustment Brush in the Develop module. Press the 'K' key to access this tool, then enable the 'Show Effect Sliders' toggle switch. Click the Effect drop-down menu and select Clarity. Now drag the Clarity slider down to about -70, and set the Flow slider to 40. Remember: the lower the Clarity slider, the greater is the effect of the skin smoothening. Flow controls the intensity of the strokes while using the tool. Remember that you can also vary the Clarity later, because it is basically a layer mask whose intensity can be changed--all thanks to the fact that effects in Lightroom 2 are non-destructive.
To use the Clarity tool, click once on the image to enable the tool, then select an appropriate brush size (as described in point 1), and 'paint' across the skin areas only. Avoid using this tool on the eyes, mouth and other facial areas that have detail, because you don't want these areas getting blurred.
capture_05122008_013514
Hold the mouse pointer over the marker to see the areas you've affected (indicated in red). To erase the effect over a particular area, press the [ALT] key and paint those areas. Use this method to bring back clarity into areas you might have mistakenly smoothened. capture_05122008_014806
3. Dental magic: Give your subject a Julia Roberts smile in a jiffy! Once again, we use the Adjustment Brush, but this time we select Saturation from the Effects drop-down list. Drag the Saturation slider down to -100, and select a nice white color from the color patch. Also, check Auto Mask.
To use the tool, click once anywhere on the teeth area to enable the tool, then select an appropriate brush size (as described in point 1), and 'paint' across the teeth areas. After you've finished, hold the mouse pointer over the marker to see the areas you've affected (indicated in red). Use the technique described above to subtract this effect if you need to.
The teeth should now look visibly brighter. Be careful not to overdo this effect--vary the flow and make sure to leave a hint of color in the teeth. Overly white teeth can look unnatural and eerie!
capture_05122008_015641
Glowing complexion: Here's a cool trick to add a hint of glow (and glamour!) to the skin. Scroll down the Develop module panel until you reach the HSL / Color / Greyscale section. Click on Luminance, and increase the Orange component to about +8. You'll see a subtle, yet visible difference!
Once again, resist overdoing it or your subject's skin just might begin to look fluorescent!
capture_05122008_020646

That's it! You should now have a much more glamorous subject. The only downside with these tweaks is the number of people who'll hound you to take their pictures, because 'your camera makes them look good'. If only they knew.

Sunday, November 30, 2008

Adobe Photoshop Lightroom 2: Development workflow

I recently had the opportunity to put this fine photo editing application through its paces--one of my cousins got married a couple of days ago, and I shot about 350 RAW images across the different marriage ceremonies (you'll find some on my Flickr Photostream). Faced with the prospect of churning out high-quality images from these RAW images in record time, I happily dug into the famed Lightroom 2 workflow. After several bouts of trial and error with color configurations and tweaking sequences, I arrived at the following workflow which I believe enabled me to extract the maximum quality from my RAW images in the shortest possible time. Remember that I already used Presets and Default settings to bring my photos to a more natural, higher-quality level before performing editing individual photos using the following steps.

1. Crop the photo: The crop tool can spell the difference between a good photo and a great one. While in the Develop module, hit [R] on the keyboard or click the Crop overlay icon indicated in the adjoining screenshot. Use the mouse to draw a box that defines the crop you need, or simply drag the control points of the crop box and pan the image until you're satisfied with the most interesting frame. Hit [Enter] to apply the crop. Crop overlay
2. Adjust White Balance if necessary: From the Basic settings in the Develop panel, click the dropper icon (indicated), and click on a gray or white portion of your photo. This will fix any color cast that might exist. Alternatively, you can intentionally invoke a color cast by playing around with the Temperature slider (labeled Temp) to impart a warmer or cooler color tone to your photo. White balance

3. Adjust Exposure: Now begins the meat of your editing. For the majority of your images, you can move the exposure slider until the Histogram graph spreads evenly, without clipping in the highlight (right) area.

4. Adjust Blacks: Adjust the Black level until the left side of the graph tapers off without bunching up against the left edge.

5. Adjust Fill Light: Fill light refers to the light in the shadows of your image. Increasing this slider value will bring out some detail in these darker areas of your photo.

6. Adjust Recovery: This refers to highlight recovery, and is used to recover detail from highlight areas that might be blown out. Be careful with this setting--increasing it too much might make your image appear unnaturally flat.

7. Adjust Brightness/Contrast: Play the Brightness slider against the Exposure slider to get the colors and balance your image just right. Remember that the lower the brightness, the better will colors show through.

Basic adjustments

These steps will get you off to a good start with bringing your images to a high-quality level. Next up, I'll focus on some Lightroom 2 tricks that will help enhance specific photos, like those of people, landscapes or food.

Update: Head over here to learn tricks for creating portfolio-quality portraits using Lightroom 2!

Adobe Photoshop Lightroom 2: Initial configuration

Ok, it's official: I'm hooked onto Lightroom 2. The sheer power of this program, its slick interface, and brilliant attention to user interface makes this the best imaging application I've ever used for my photographs. If you haven't read my initial experience with Lightroom 2, you'll find it here.

The groundwork 
Lightroom 2 offers several methods to help you streamline your photo processing workflow. The following steps will help you set up your Lightroom 2 environment with pre-defined settings that will lift the quality of your photographs during the import process, even before you begin tweaking them! This will let you reach your final result faster. You only need to perform the following actions once--they will subsequently invoke automatically each time you import your photos:

1. Define a camera profile: When I first started using Lightroom, I noticed something strange while importing photos--when each photo first flashed on the screen during the import process, it appeared to have nice, vibrant colors. But after getting imported into Lightroom, they appeared rather dull and faded. I needed to do a fair amount of tweaking with the saturation, highlight and black level settings before I was satisfied with the result. I later discovered that I wasn't using my camera's profile. Lightroom lets you define a profile that is specific to your camera model. Using this profile delivers a significant improvement in color rending, resulting in more vibrant and balanced images, so you'll need to do lesser work to bring your photos to the final satisfactory level.

First, head over here to download the camera profiles installation file from the 'Downloads and Installation' section (free registration required), then install this file. You will now be able to see the camera profile in the Camera Calibration section from the Develop module of Lightroom 2. Click the Profile drop-down at the start of this section, and select Camera Standard beta 2 (I found this delivers the most natural colors). capture_29112008_170943

2. Assign default settings to your specific camera and ISO:
In Lightroom 2, click Edit, Preferences..., and select the Presets tab. Ensure the 'Make defaults specific to camera serial number', and 'Make defaults specific to camera ISO setting' are selected. The significance of these settings will become apparent in the following step.

Lightroom settings_Make default

3. Define sharpening presets: Lightroom 2 features powerful sharpening and noise reduction tools to help you bring out image detail and clean up photos shot at higher ISO settings. The cool thing about Lightroom 2 is that you can create setting presets and bind them to specific ISO settings for your particular camera. This means you could define noise reduction presets for each ISO setting (where you would generally apply more noise reduction for photos shot at higher ISOs), and you can automatically invoke these presets while importing new images: the appropriate sharpening levels are automatically applied to photos according to their ISO. Cool, huh? This capability saves you the time you'd otherwise require for applying noise and sharpening tweaks to your newly imported photos. Here's how you create these presets:

Start by opening a photo shot at ISO 400, for example. Apply the sharpening and noise reduction settings until you are satisfied with the reduction in noise in your photo. The adjacent screenshot shows the settings I use to reduce noise at ISO 400 for my D40. View the photo at 1:1 zoom to be able to see the effects of the noise reduction. capture_29112008_171620
To to save this sharpening preset, click the 'plus' symbol from the Presets section on the left panel. In the box that pops up, make sure to check only the relevant sections that you have modified. Note that besides the Sharpening and Noise Reduction settings, I've also selected the Calibration option so that the camera profile will also be saved in this Preset.
Finally, to set this preset as a default camera setting, press the [ALT] key, and click the Set Default... button at the bottom of the Develop panel. A box pops up verifying your camera model number, serial number and ISO setting. Click the Update to Current Settings button.
Now repeat this step for photos shot at different ISOs, each time saving your Sharpening, Noise Reduction and Calibration settings to a new Preset for each ISO setting, and updating the default settings.
Create preset

That's it for the initial Lightroom 2 configuration. From now on, each photo you import will be automatically processed with the selected parameters according to your specific camera, and the photo's ISO setting. When working with tens and hundreds of photos, you will save significant amounts of time with these settings. Note that these are only presets: you are free to modify these settings while working on individual photos later on.

In my next post, I'll be talking about the basic settings and workflow I use while processing individual photos. Stay tuned!

Update: Click here for the Lightroom 2 development workflow I use while processing RAW images.

Thursday, November 27, 2008

Become a human calculator

1097236_business_or_education The one thing I detested about mathematics in school was the way the education system made it so theoretic. Learning trigonometry or Calculus was anything but fun, and it certainly didn't appear to be practical at the time. Even today, how many times do you hear kids say, "What am I ever gonna use this stuff for?" Math is, in fact, the most practical science there is--from calculating the curve of an aircraft wing (Fourier math playing a big role here), to modeling financial forecasts (mathematic extrapolation), math is the very foundation for almost every device and technology we use. But for the majority of us, it really isn't a cause excitement. So wouldn't it be great if there was a way it could actually help our everyday lives: like giving us the power to be the fastest human calculator at dinner with friends? That'd certainly beget admiration points! Well, there is such a field of mathematics that can help you do just that--it's called Trachtenberg Mathematics.

Trachtenberg Mathematics was invented by a brilliant Russian mathematician named Jakow Trachtenberg while he was imprisoned in a Nazi camp during World War II. He devised a simple set of rules that can help perform relatively large calculations quite easily. Sounds too good to be true? Check out this excellent Web site that explains this technique with lucid examples. After you're acquainted with the basics, there's a handy little software you can download here, which will help you get practice on this technique of speed math.

On a related note, you could also check out a similar form of speed math called Vedic math. There a ton of information behind this Wiki link. Also, here's still another really fun way to multiply numbers by simply drawing lines on paper! See the video below:

Finally, check out this excellent online resource devoted to speed math here. Hint: The tricks taught by these techniques are a great way to put an interesting new spin on teaching the subject to kids! Math? Fun? Who could have ever imagined?

Related Posts with Thumbnails