Sunday, July 26, 2009

Photo to vector art

After a long time... another tutorial!
Converting a photo into vector art. Using this method you can quickly and easily change a photo into vector art. Following is the final result of this tutorial:



1] Open the image in GIMP. I wanted to have just myself in the final result, so used scissor select tool to crop myself out from the photograph





2] Use Filter | Blur | Gaussian Blur tool 2-3 times to smoothen the image.

3] Now use Colors | Posterize tool to reduce the number of colors. I used 5 colors, you can use less or more. After you apply the changes, the image looks very much like the final result, but its still not a vector image!



4] Next thing we'll do is creating paths from these different colors. Use the 'Select by color' tool to select all regions with black color in the image.



5] If you see closely, at many places there are very thin selections made which we probably don't want in the final image. We need to clear those selections before we proceed. Click on the 'Quick mask' button in the bottom-left of the image window. Use the Filter | Blur | Gaussian blur tool, to blur the quick mask. Blurring would cause very thin transparent regions in the quick mask to be filled.



6] The blurring causes very thin transparent regions to be filled, but they are still not completely filled. Use Colors | threshold tool. Apply a threshold value such that the small regions are now filled.



7] Click again on the quick mask button to get back to normal mode. You should see that most of the thin selections are removed. If there still are some regions that you want to deselect, you can do it manually. Because of the previous step, the size of selection is slightly reduced. Use Select | Grow tool to grow the selection by few pixels so that the selection is slightly bigger than the original black color region.



8] Select | To path tool will create a path using the selection, i.e. a path representing whole black region. Rename the path to '1'.



9] Do the same steps to create paths for all five colors, and rename the paths to 1,2,3,4,5.

10] The paths created are very complex and have a many nymber of nodes. We need to simplify these paths. Open the paths dialog, right click on each of the path and export them as .svg files.

11] Now open one of these .svg files in Inkscape and double click on the path [an object in inkscape] and press ctrl+L, this would simplify the path and reduce the number of nodes. Save the .svg file.



12] Do the same thing for other .svg files.

13] Rename the existing paths in GIMP or delete them and import the modified paths from the .svg files. To import right click in the paths window and click import.



14] Double click on a path, this would show the path and select the paths tool in the toolbox. Click the select from path button to get a selection, create a new layer and fill the selection with some color. Similarly create a layer for all paths and fill them with different colors. I used the same 5 colors that the posterize tool used.



[15] Done! You can play around with other things, like I added a gray background and a shadow.

Sunday, July 12, 2009

Death

"Death smiles at us all, all a man can do is smile back"

I am not sure if you are a movie freak(neither am I as much as it sounds) but what I realized is, every time I watch a good movie again, I see new things or I'd rather say I feel a new things. Last night I watched Gladiator 'again'. This time what caught my attention was death. I am not really afraid of dying because I know for sure one day I 'will' die, but what bothers me is will I be able to smile back at my death. I know that I am not ready right now. Recently I had two road accidents (believe or not but both of them were not my mistake, I am not a reckless driver :) ). Truly speaking, I felt nothing 'during' the accident, but the moment I picked myself up, I was thinking what if this was more severe and I was killed, and I wasn't smiling at the whole incident. Lucky guy I am, nothing happened to me except some minor scratches(touchwood), but what I am thinking now is will I be able to smile at my death when (whenever and however it comes) I'll face it?