Archive for February, 2011

Select by Color or Foreground Select Tools in GIMP (Part 4 of 14)

Sunday, February 27th, 2011

These less frequently used selection tools can be real time-savers if you know when they are the most suitable tools for the job.

The Fuzzy Select Tool works wonders for selecting large contiguous areas of a photo with relatively uniform colour even if the outline is complicated.

In yesterday’s case, clicking on the blue sky around the temple in the photo selected all the blue pixels “connected” to the clicked pixel by other selected pixels.

Select by Color Tool

If, say there is a window in the temple showing a bit of blue sky through it, those blue pixels won’t be selected when the Fuzzy Select Tool is clicked outside the outline of the temple.

Similarly, if the cursor is clicked inside the window showing the blue, the blue sky around the temple won’t be selected.

To add such segregated areas to the main selection, hold down the Shift key on the keyboard and click on those areas with the Fuzzy Select Tool.

For more control, I tend to prefer using the Fuzzy Select Tool together with the Shift key.

Select by Color Tool in the GIMP Toolbox

But if there are many isolated areas to be selected, a more suitable tool is the Select by Color Tool.

The Select by Color Tool works exactly like the Fuzzy Select Tool except that pixels from the ENTIRE photo that are similar in colour to the clicked pixel are selected – whether contiguous or segregated.

Foreground Select Tool in the GIMP Toolbox

Foreground Select Tool in the GIMP Toolbox

Again, the Threshold value determines how similar a pixel should be in order to be selected.

So if the temple had many windows showing blue skies, clicking a blue pixel in any one of the windows would select all the blues pixels in the sky.

Unfortunately, any of the tourists wearing blue will also have their blue clothes selected. That’s why I tend to prefer the Fuzzy Select Tool because it allows me to control exactly what I want to select.

Foreground Select Tool

Another selection tool that can occasionally work wonders is the Foreground Select Tool. It is used to select an object in a photo against a background, preferably with contrasting colours (see above Picture).

Wild pink flower in Magome, Japan

This wild flower looks a tad pale and dull on an overcast day.

Pink flower made more vivid

The pink flower now stands out against the pale background.

In the photo of a wild flower I snapped in Magome, Japan, Iet’s select the flower in order to make the pink more vivid against the surrounding grass. Download the Before photo to follow along.

Activate the Foreground Select Tool from the Toolbox.

The cursor turns into a lasso. Use the cursor to drag an outline outside but around the flower. For selecting the outline, the tool behaves like the Free Select Tool. Select close to the outline of the flower but do not stray inside the flower.

The initial mask when the flower is first outlined

Paint inside the flower to define what colours to keep

GIMP adjusts the mask to the flower's borders

Pressing Enter converts the mask into a selectionVarious stages of using the Foreground Select Tool. Click each thumbnail to open enlarged photo.

Once the outline is complete, GIMP overlays the area outside the outline with a dark blue translucent mask, while the appearance of the flower and its immediate surrounding inside the outline remains unchanged.

The cursor now changes into a paintbrush. Paint inside the flower.

There is no need to paint the entire flower. If the flower contains different colours, try to paint over the different colours to tell GIMP they are part of the flower. Avoid painting outside the flower.

After the initial painting, the dark blue mask closes in so that only the flower remains visible. The clearly visible areas indicate the areas that will be selected. In this case, GIMP did a perfect job.

You can still modify the mask if the flower had not been perfectly masked.

In the Tool Options are two radio buttons that determines the effect of painting on the photo.

By default, the “Mark foreground” option is selected. If there are parts of the flower that are covered by the blue mask, paint on those areas to unmask them.

If there are areas outside the flower that are not masked in dark blue, select the “Mark background” option in the Tool Options and paint on those areas to mask them.

To work the details, zoom in and vary the brush size by dragging the slider in the Tool Options.

Once the mask has been finetuned so that only the flower is clear and the surroundings are masked by the translucent dark blue, press Enter on the keyboard to convert the mask into a selection.

You can now make the flower stand out by dialing up the vividness using Colors > Hue/Saturation command from the main menu.

Caution: While outlining the flower or painting to define the area to be included or excluded, Ctrl-Z or the Edit > Undo command does not work. To restart the selection process, select some other tool in the Toolbox and then select the Foreground Select Tool again.

Do magic with Fuzzy Select in GIMP (Part 3 of 14)

Saturday, February 26th, 2011

Select objects with uniformly coloured backgrounds easily even if the objects have complicated outlines.

Previously, we have made simple rectangular and elliptical selections in photos using GIMP’s Rectangle and Ellipse Select tool. We’ve also used the Free Select Tool to select objects with irregular outlines.

Todaiji Temple in Nara, Japan - a UNESCO World Heritage Site

Pict 1: The Todaiji temple as seen against a clear blue sky.

These selections allow us to do local adjustments – whatever adjustments we make are confined to only the pixels within the selection boundaries.

Sometimes, the object we want to select in the photo is against a background with uniform colour, such as the sky, where the colour comprises a narrow range of tones of the same colour (see Picture 1).

In these cases, it is easier to select the uniform background using the Fuzzy Select Tool and then invert the selection rather than try to select the object itself – especially if the object has a complicated outline.

Temple after brightness and contrast increased

Pict 2: The temple has been lightened up and contrast increased.

The tool works best when the background colour is markedly different from the object to be selected.

In the photo of Todaiji in Nara, the temple is slightly underexposed and flat against the bright sky. I want to lighten up the temple without whitening out the nice blue sky. So I need to select the temple and the foreground scene before applying the lightening (see Pict 2).

Fuzzy Select Tool

Activate the Fuzzy Select Tool from the Toolbox.

Activating the Fuzzy Select Tool from the Toolbox

It is known more commonly in other photo-editing programs as the Magic Wand tool because of its ability to make a complex selection seem so easy – where large welts of relatively uniform colour are involved. In fact, the symbol and cursor for the tool in GIMP comes in the form of a magic wand.

Click on any part of the blue sky. Large parts of the blue sky are selected as indicated by the marching ants showing the complex boundary of the areas selected. What has happened is that the Fuzzy Select Tool has selected all pixels of similar colour to the pixel that was clicked by the tool.

How similar must a pixel be to the clicked pixel for it to be selected? This is determined by the Threshold slider in the Tool Options.

Changing the default value from 15 to zero means that only pixels whose colour is exactly the same as the clicked pixel is selected. Using the maximum value of 255 means all pixels in the photo will be selected.

The selection process

There is a shortcut to varying the Threshold value while using the Fuzzy Select Tool. When you first click in the area to be selected, don’t release the button just yet.

Drag the mouse to the right or downwards and the Threshold value will be increased. You can see the selected areas grow as you drag the mouse cursor. You can also see the Threshold slider in the Tool Options moving to the right.

Conversely, drag the mouse to the left or upwards to decrease the Threshold value. You will see the selected areas shrink as you drag the mouse cursor. The Threshold slider also moves to the left.

Fuzzy Select Tool in action

Pict 3: The bright blue sky is selected by the Fuzzy Select Tool.

Stop or drag the mouse cursor in the opposite direction when you see the selection spilling into the temple itself. Release the mouse button to confirm the selection (see Picture 3).

If there are areas in the sky, that are not selected, hold down the Shift key on the keyboard and click in those areas to add them to the existing selection.

If the photo includes many isolated areas of the colour to be selected, use the Select by Color Tool instead.

Lighten up the temple

The Brightness and Contrast sliders were increased to 40 to liven up the temple.

For the moment, the blue sky is selected while the temple and the foreground are not.

To invert the selection, press Ctrl-I or Select > Invert from the main menu. The temple and the foreground are now selected while the blue sky is unselected.

The temple and the foreground can now be lightened (for instance, with the Colors > Brightness-Contrast command) without blowing out the sky.

Apple updates MacBook Pro line of notebooks

Friday, February 25th, 2011
Ten months after its last revamp in Apr 2010, Apple updates its premium line of notebooks with groundbreaking Thunderbolt technology and more powerful graphics engine, and doubles processor speed across the board.

Apple's revamped MacBook Pro family of products

MacBook Pro is the first computer on the market to implement the new Thunderbolt I/O technology which promises blistering data transfer speeds of up to 10 Gbits/s with high performance external devices. This is 20 times faster than the ubiquitous USB2.0.

Ports for the MacBook Pro notebook

Note the single Thunderbolt port (fourth from the left) labeled with the symbol of the lightning bolt.

Developed by Intel with collaboration from Apple, and previously code-named “Light Peak”, Thunderbolt allows multiple devices to be daisy-chained together, without bandwidth and power attenuation concerns.

This enhances the expandability of the notebooks as the daisy-chained devices can be connected to the single Thunderbolt port, without having to build multiple USB ports on the notebook, where space comes at a premium.

A FaceTime HD camera is now built into the MacBook Pro.

Oblique view showing the ports at the side
The 13-in MacBook Pro comes standard with a dual-core i5 processor and Intel’s integrated graphics chipset

The larger 15- and 17-in models runs on a quad-core i7 and comes with AMD’s Radeon HD 6490M or 6750M discrete graphics. Apple claims that these were three times faster than the Nvidia graphics chips in the older models.

It also claims that all MacBook Pros are “up to twice as fast as their predecessors.”

Pricing & Availability for Singapore

The new 13-inch MacBook Pro, 15-inch MacBook Pro and 17-inch MacBook Pro will be available in the week of March 6 through the Apple Store and Apple Authorized Resellers.

Front view of the MacBook ProThe 13-inch MacBook Pro is available in two configurations: one with a 2.3 GHz Dual-Core Intel Core i5 and 320GB hard drive starting at S$1,648 ; and one with a 2.7 GHz Dual-Core Intel Core i5 and 500GB hard drive starting at S$2,048.

The new 15-inch MacBook Pro is available in two models: one with a 2.0 GHz Quad-Core Intel Core i7, AMD Radeon HD 6490M and 500GB hard drive starting at S$2,488 and one with a 2.2 GHz Quad-Core Intel Core i7, AMD Radeon HD 6750M and 750GB hard drive starting at S$2,988.

The new 17-inch MacBook Pro features a 2.2 GHz Quad-Core Intel Core i7, AMD Radeon HD 6750M and 750GB hard drive and is priced at S$3,398.

Configure-to-order options include faster quad-core processors up to 2.3 GHz, additional hard drive capacity up to 750GB, solid state storage up to 512GB, more memory up to 8GB DDR3, antiglare and high-resolution display options and AppleCare® Protection Plan. Additional technical specifications and configure-to-order options and accessories are available online at its website.

93% of 4.5 million tablets sold in 2010Q3 were iPads

Friday, February 25th, 2011

This is hardly surprising since the iPad has been the only tablet around for most of last year, until Samsung’s Galaxy Tab.

ABI ResearchAccording to data from ABI Research, of the approximately 4.5 million tablets sold in the third quarter of 2010, about 93 percent were Apple iPads.

The original iPad went on sale on 3 April 2010. Reports anticipate the announcement of the iPad 2 next week on 2 Mar 2011.

Samsung’s well-received Android-based Galaxy Tab was launched late last year, while Motorola’s Xoom Android-based tablet became available yesterday. Research In Motion plans to release four versions of its Playbook this year.

iPad 2 launch on 2 Mar?

Thursday, February 24th, 2011

Have you received the invitation from Apple?

Apple's invitation for the 2 March event

Apple emailed the invitation to a media event in San Francisco that showed a calendar page with the date 2 March and the top right corner of the page peeling back to reveal an iPad underneath. The peek-a-boo iPad suggests that Apple may unveil its new version of the iPad during the event.

Earlier reports from Taiwan-based Yuanta Securities had surmised that the iPad launch might be delayed to June this year because of production bottlenecks at the China production line of Hon Hai – Apple’s Taipei-based contract manufacturer.

Will the iPad 2 be announced on 2 Mar?Indulging in my own bit of speculation, both schools of thought may not be untrue. We might actuallly see an iPad announcement on March 2 followed by the taking of orders, with deliveries only materialising in June, probably staged out based on country.

What with the legion of Android tablets being unveiled by the day, with specs that trounce the year old iPad, any delay in unveiling the upgraded specs of iPad 2 could create a negative impression in people that the iPad is inferior to Android tablets.

The announcement of iPad2 with all the specs that has been rumoured to ship with it should maintain its aura of invincibility that over challengers.

Apple certainly won’t want to announce the iPad 2 in June only to have people yawn at its specs, since by then it may already have been featured on the Android tablets out there.

Samsung’s Android-based Galaxy Tab was launched last year and was well-received. Motorola’s Xoom Android-based tablet goes on sale today, while Research In Motion plans to release four versions of its Playbook this year.

The original iPad went on sale on April 3. Announcing the iPad 2 on March would mean that it will follow an annual cycle of updates like the iPhone and iPod.

Sony aims for 15% market share for interchangeable lens cameras

Wednesday, February 23rd, 2011
Sony wants to increase its market share from 11% of global SLR camera sales in 2009, to at least 15% market share by March 2011.

Sony aims to increase its market share for Interchangeable Lens Cameras

Sony may control about 15 percent of the global market for single-lens-reflex cameras by the end of March, Masashi Imamura, president of the Personal Imaging & Sound Business Group told Bloomberg in an interview in Tokyo yesterday.

Interchangeable lens cameras is the fastest growing segment of digital imaging devices last year. Sales of SLR cameras increased 30% in the past year, more than twice the 13% growth by compact cameras, according to the Camera & Imaging Products Association, a Tokyo-based industry group.

In a report from research company IDC in April last year, leading the race was Canon which sold 45% of the world’s SLR cameras, followed by Nikon which sold 34%. Sony was in third place, accounting for 11% of the 9.77 million units sold in 2009. In the previous four years that it has been in the segment, Sony has garnered about 10% of the market share.

It bought the high-end camera business of Konica Minolta Holdings in 2006 when Konica ended its 130-year-old camera business to focus on printers.

Sony, which also manufactures the Cyber-shot compact cameras, has been aggressively introducing new models in its pursuit to grab market share from the two leaders.

The maker of alpha-series DSLR cameras introduced its NEX cameras (NEX-3 and NEX-5) in June 2010. These cameras feature the large sensors of traditional DSLRs, do away with the use of the reflex mirror and optical viewfinder, while allowing the camera lens to be changeable.

Like the Micro Four Thirds mirrorless cameras from Olympus and Panasonic, the NEX cameras offer the image quality of traditional DSLRs, the flexibility of using different lens for different shooting situations, yet enjoy a reduced bulk.

Sony also launched a slew of new models in its existing Alpha line in September. These include the SLT A55 and A33, which replace the traditional reflex mirror between the lens and the sensor with a stationary translucent mirror. This also makes the camera smaller and improves the auto-focus performance of the camera.

Solution to maths problem on number series

Wednesday, February 23rd, 2011

Yesterday, I posted the first three numbers of a number series and left the next three numbers blank. Here’s the answer to yesterday’s teaser.

The completed sequence is:

3, 7, -4, -30, -71, -127

Do the numbers seem unrelated to each other? The formula linking these numbers is:
“ y = -15x2 + 53x – 32 ”

Try it, substitute x=1, 2 and 3 in the above equation and you should get the first three numbers (3, 7, -4) provided in the original question. Put x=4, 5 and 6 to get the next three numbers (-30, -71, -127) in the “sequence”.

Graph of the number sequenceIf you plot the numbers on a graph, you’ll get a standard U-shaped curve (upside down in this instance) governed by the above quardratic equation.

How does one derive the equation from the first three numbers?

Here are the details for those maths geeks out there:
(more…)

A little maths problem for tea?

Tuesday, February 22nd, 2011

Can’t figure out the next few numbers to fill in to continue a number sequence? Here’s how to continue a number sequence given any numbers in the sequence.

Fill in the blanks in the following sequence:

“3, 7, 11, _ , _ , _”

My 10-year-old came back from school one day and proclaimed that one could use an Excel spreadsheet to complete an arithmetic progression like the one above. That’s an interesting application for a spreadsheet program, I thought.

Maths number sequenceBut it also reminded me of my own school days when we were wrestling with our own number progressions.

There was among our group of secondary school boys this fellow by the name of “The Maths Genius” who devoured complex maths problems for tea.

I recall one day we were poring over some maths test papers that we’d just gotten back from the teacher and were screaming bloody murder over how many of our answers for the completion of number sequences were marked wrong. You see, the relationship between consecutive numbers in those sequences weren’t as straightforward as adding the same number to the previous number.

Along came Mr Maths Genius, calmly pointing out that we should’ve gotten full marks for those questions, since theoretically, one could make a number sequence from a list of ANY numbers! Hrrmmph!

He proceeded to throw us a starting sequence of 2, -5 and 7, from which to extrapolate the next three numbers.

No way could that be part of a number sequence, we howled. But he assured us that there was a maths formula for which if you plug in 1, 2, 3 (X-values representing the position of the number in the sequence), you will get the values 2, -5 and 7 as the numbers occupying positions 1, 2 and 3 of the sequence.

That formula could then be used to continue the sequence by plugging in 4, 5, 6 etc as X-values into the formula.

A simple sequence “2, 4, 6, 8, …” would have a formula “y=2x”.
The earlier sequence “3, 7, 11, …” would have a formula “y=4x-1”.
A more complex sequence “1, 4, 9, …” would have a formula “y=x2“.

When he saw our look of disbelief, he told us the formula for this sequence happened to be “y=19x2-71x+56″. So we plugged 1, 2 and 3 into the formula and guess what? We got ourselves the starting sequence of 2, -5 and 7! It was a matter of plugging 4, 5 and 6 into that same formula to get 38, 88 and 157 as the next three numbers in that sequence.

Maths Genius then informed us that starting from any 3 or more numbers, one could derive a formula similar to the above that allowed the sequence to be continued by plugging in the subsequent X-values.

Here’s the cheeky bit, it also means that given any three starting numbers, we can throw in any three arbitrary numbers for the next three blanks and then justify our answers by using all six numbers to derive the corresponding formula. So much for those IQ tests.

Let’s try one for tea.

Fill in the blanks in the following sequence:

“3, 7, -4, _ , _ , _” (no, that’s not a typo)

Answers will be provided tomorrow.

Print sizes and resolutions for photographs

Monday, February 21st, 2011
One of the most frequent questions I get asked is what resolutions to use when printing out photos. Here are some suggestions that I usually provide as a guide.

First decide what size the photos are to be printed out and crop them based on the corresponding aspect ratio.There are a number of standard sizes that photo shops print in. I have tabulated below some of the traditional sizes together with their physical dimensions in millimetres and inches.

For each of the standard sizes, some shops print variants of the standard dimensions to cater to varying aspect ratios. For example, although traditional 4R has an aspect ratio of 3:2, some shops give the option of printing similarly sized prints at 4:3 aspect ratio.

The resolution of a photo is the number of pixels per inch (ppi). To work out the number of pixels a photo should have, multiply the physical dimension in inches by the desired image resolution.

For example, a 5R print is 5 x 7 inches. Multiply by 300 ppi and your image should, therefore, be 1,500 x 2,100 pixels.

For optimal quality, use an image resolution of 300 ppi. For printing on a personal printer, 150 ppi is usually good enough, although some studios accept resolutions down to 100 ppi. Since all my prints are 4R in size, all my images are at 300ppi. This way, they are optimal for 4R and still good enough if I want to print up to A4 size.

Note that studios usually crop a small margin of up to 3%  around the photo. The cropped margin could be bigger on one side compared to the other. This is usually unnoticeable for most photos. Unless the subject is really tightly framed, in which case part of the anatomy, say a ear or finger-tip could be cut off the edge.

However, if your photo has a decorative frame or border that you’d added using a photo-editor, it will turn out uneven. Choose a studio that can crop the photo evenly all round. I find it easier to show the studio a sketch to illustrate when explaining.

Likewise, when using your own printer, it pays to do a few test prints to determine the right settings for even borders.

Standard print sizes, aspect ratios and optimum/minimum image resolution for printing.
Print Size Size

(inches)

Size

(mm)

Aspect ratio Optimum Resolution

(300 ppi)

Minimum Resolution

(150 ppi)

3R 3.5 x 5 89 x 127 7:10 1050 x 1500 525 x 750
4R 4×6 102 x 152 2:3 1200 x 1800 600 x 900
5R 5×7 127 x 178 5:7 1500 x 2100 750 x 1050
6R 6×8 152 x 203 3:4 1800 x 2400 900 x 1200
8R 8 x 10 203 x 254 4:5 2400 x 3000 1200 x 1500
S8R 8 x 12 203 x 305 2:3 2400 x 3600 1200 x 1800
10R 10 x 12 254 x 305 5:6 3000 x 3600 1500 x 1800
S10R 10 x 15 254 x 381 2:3 3000 x 4500 1500 x 2250
11R 11 x 14 279 x 356 11:14 3300 x 4200 1650 x 2100
S11R 11 x 17 279 x 432 11:17 3300 x 5100 1650 x 2550
12R 12 x 15 305 x 381 4:5 3600 x 4500 1800 x 2250
S12R 12 x 18 305 x 465 2:3 3600 x 5400 1800 x 2700

Freehand selection in GIMP (Part 2 of 14)

Sunday, February 20th, 2011
Select irregularly shaped objects in photos using the Free Select Tool in GIMP.

In the Basic GIMP series, we used the rudimentary Rectangle and Ellipse Select tools to create simple selections in a photo.

What if we want to select an object in a photo that has an irregular outline? Check out the Free Select Tool.

As with the other selection tools in GIMP, the Free Select Tool can be found at the top of the Toolbox.

Little red Japanese postbox

The red traffic cones and receding pedestrian are a tad distracting behind the postbox.

Arty interpretation of a postbox in Japan

Toning down the background focuses the viewer's attention on the main subject.

In the photo I snapped in Nara – Japan on a cool evening last autumn, I made the red postbox stand out by removing colour from its distracting surroundings and tinted the surroundings with a light reddish shade.

This is usually done to bring put the emphasis on a main subject by toning down the background, especially if the background is brightly coloured or distracting.

It is also a popular technique to turn a mundane snapshot into something arty.

Download the Before photo and follow along.

GIMP's Toolbox

Activate the Free Select Tool at the top of the Toolbox

Using the Free Select Tool

In the Toolbox, activate the Free Select Tool. Click (and let go of the mouse button) anywhere on the edge of the postbox. Move the cursor to the next point on the edge of the postbox and click again.

GIMP joins the two mouse clicks with a straight line to indicate the edge of the selection you are making. An anchor point is also created at each end of the edge to indicate where the mouse was clicked.

Around the corners of the postbox, the edges are rounded. Zoom in (press “+” on the keyboard) to get a better view to make a more precise selection.

Where the curved edge begins, click but hold down the mouse button and drag the cursor along the curved edge. You can see selection boundary trace around the curved edge.

At the end of of the curved edge, release the mouse button. To continue selecting straight edges, simply click at the next point.

Repeat the above techniques around the edge of the postbox until you are back to the starting point. This completes the selection process.

Along the way, if you click at the wrong place or make a botched tracing around a curved edge, press the Backspace key on the keyboard. GIMP will remove the previous anchor point and line segment. Press the Backspace key once to remove each previous anchor point and segment.

Decolourizing and adding the tint

Once the postbox has been selected, press Ctrl-I to invert the selection. Drain the colour from the selected surroundings and tint it a pale red by using the Colors > Colorize command from the main menu.

In the Colorize dialog box, set Hue to zero and Saturation to 15 by dragging the corresponding sliders.