Archive for October, 2007

More image processing with python and opencv

Friday, October 26th, 2007

Continuing with the image processing with python I have done some experiments with the opencv wrappers for python.

Its easy to configure this wrappers in windows. What I did was:

>cd C:\Program Files\OpenCV\interfaces\swig\python
>c:\Python25\python.exe setup-for-win.py build
>c:\Python25\python.exe setup-for-win.py install

from opencv import highgui
from opencv import cv
win = ’showtime’
highgui.cvNamedWindow(win)
im = highgui.cvLoadImage(‘c:\image_file.jpg’)
highgui.cvShowImage(win,im)
highgui.cvWaitKey(10)

hope this works for you

python for image processing

Thursday, October 25th, 2007

I am learning a bit about python programming. This programming language is becoming a popular scripting program inside oder programs such us arcgis. The most surprising thing for me is it increasing use in windows machines.

So I have decided to learn python. I have started with some easy functions from the python image library.

First I will read a pixel.

import Image

im= Image.open(“mytif.ti”);

pixel= im.getPixel((44,33));

print “And the pixel is!!: “, pixel

you can find mor info about de Python Image Library at

Home Page

Documents