Anil Franklin

– my thoughts

Panorama factory in 59 lines

‘ 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

July 24, 2008 - Posted by | projects | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: