Home | Bio | My Life | Archive | Writings | Talks | Toons | Photos | Site | About | Contact | Feed

Monday, July 28, 2008

Panorama maker ..

‘ Hail python the goddess of code ‘
Panorama of python’s victory of fast coding continues .. This time its a panorama factory, the art of making wide pictures, got done with python ..As usual necessity brought the idea . This was related to one of my classmate - fasil’s project idea .. Me being interested in python took it for a challenge as usual but stopped just with this code and shot my usual final statement : “hmm ! I think its better than more ..” ;)

What is panorama ?
Unnaturally wide pictures could be made by joining pictures end to end .. This is known as panorama pic ..
Definition royalty goes for me ;)

This is how a panorama looks ..
This is how a panorama looks like..

joining this pictures end to end requires care .. You have to find out the maximum matching position before you join pictures to ensure panoramic view ..Here I am attaching a 60 line code which converts pic1.jpg and pic2.jpg to a single finpic.jpg by normalising the match .. It is just a play with the code I know . But it could be useful ..

Last time when I posted about a project done in few lines python code , some of my friend asked me the code and I need to send it .. So this time I remind myself to start the habit of attaching code here ..

Panorama maker :
(python code to join pictures breadth wise)

File : proj_23.py
converts : pic1.jpg and pic2.jpg to finpic.jpg
(You can make it in a loop for doing a panorama using webcam )
Requirements :

  1. Python interpreter
  2. Python imaging library

Download

No comments: