Wednesday, March 9, 2011

Convert Color Images to Gray Images Using Programming

How to convert Color Images to Gray Images

There are some techniques to do this, and below is the one of them:

To convert color image to gray image convert all pixels like this pseudo code:


PIXEL clr;
COLOR old,new;

FOR ALL clr in image DO
BEGIN
old = clr.color;
new.red = 0.5 * old.red + 0.3 * old.green + 0.2 * old.blue;
new.green = 0.5 * old.red + 0.3 * old.green + 0.2 * old.blue;
new.blue = 0.5 * old.red + 0.3 * old.green + 0.2 * old.blue;
clr.color = new;
END

Monday, March 7, 2011

How to Create Mirror Reflection with Adobe Photoshop

This tutorial will show you how to make a reflection with your Photoshop. I used Adobe Photoshop CS2 when creating this tutorial, but I guess it does not make any difference even if you do it with Photoshop.

Thank You very much http://www.dphotojournal.com/ for this tutorial.

Picture used on this tutorial is Australian Parliament House in Canberra, by Free-StockPhotos.com

Photoshop CS Tutorial

Step1: Open your image, copy your background layer, and fill your background layer with white

Photoshop CS Tutorial

Step2: After you open your image, go to image>canvas size and lock the anchor at top centre, type in a new figure for height. Mine is 600 pixels.

Photoshop CS Tutorial

Step3. Right click on image layer in your layer palette, and duplicate your image layer

Photoshop CS Tutorial

Step4. Click on your new layer then edit>transform>flip vertical

Photoshop CS Tutorial

Step5. Position it very carefully so it looks most like a reflection of the building as shown on this image below. You can shunt it up and down with the arrow keys to get its position pixels-perfect.


Photoshop CS Tutorial

Step6. Go to Filter>Blur>Motion Blur. We’re looking to create the softening, stretching effect characteristic of reflections in large, slightly rippling bodies of water.

Photoshop CS Tutorial

Step7. Go to Filter>Blur>Motion Blur. No we need direction of the blur to be at right-angles to the Horizon, so set Angle to 90 degrees and move the Distance bar, experimenting with various values until you like what you see in the previews.

Photoshop CS Tutorial

Step8. Go to Filter>Distort>Ripple. By moving the slider we can select the degree of wave movement on the surface of our lake. Aim to create the effect of a light breeze, so keep the waves Medium sized and don’t go overboard on the amount of ripple.

Photoshop CS Tutorial

Step9. Change the perspective a bit by edit>transform>perspective

Photoshop CS Tutorial

The reason of doing this is that Real water has an effect on an object’s perspective. Reflections tend to spread slightly when they hit the water, so we’ll try and recreate this in our Parliament image.

Photoshop CS Tutorial

Step10. Let’s apply some more motion blur to make that water look even more realistic, but this time, we’ll make it parallel to the horizon. Again, be subtle to make it as effective as possible.

Photoshop CS Tutorial

Step11. Now we’re going to boost the blues by adjusting the appropriate slider in the color balance window (image>adjustments>color balance)

Photoshop CS Tutorial

You’re done!

Here’s my final image:

Photoshop CS Tutorial