##khw 25 june 2011
##http://opencv.willowgarage.com/wiki/PythonInterface

import cv

cv.NamedWindow("foo_window", 1)

im = cv.LoadImage("c:\\images\\box.jpg", 1)
cv.ShowImage("foo_window", im)

dst = cv.CreateImage(cv.GetSize(im), cv.IPL_DEPTH_16S, 3);
laplace = cv.Laplace(im, dst)
cv.SaveImage("foo_image.jpg", dst)

print ("hit ESC-key to exit")
while True:
    if cv.WaitKey(10) == 27:
        cv.DestroyWindow("foo_window")
        break
        
