Question

I am trying to write a simple application in Python which uses SimpleCV for computer vision and is controlled by some very simple GUI.

My problem is that while pure OpenCV has it's own HighGUI, SimpleCV uses pygame, thus I don't know how can I extend it to make use of OpenCV's HighGUI or any other kind of minimalistic GUI.

All I would need is a very simple slider or possibly some buttons.

For just sliders I think we can just use OpenCV's HighGUI. But how do I get HighGUI to work with SimpleCV?

For buttons, did anyone try anything to combine SimpleCV with GTK+ or wxPython or anything else?

Can you share some simple code which uses SimpleCV and a very basic control interface? (say one slider or a button)

Note: It doesn't have to be in the same window, it's perfect in separate windows (say SimpleCV video loop running in it's own window while there is a control panel in a separate window).

Was it helpful?

Solution

have been able to combine Gtk and SimpleCV successfully.

https://github.com/jayrambhia/image-gtk

http://jayrambhia.wordpress.com/2012/04/18/opencv-with-pygtk/

Example:

from SimpleCV import *
from imagegtk import DisplayImage

im = Image("Lenna")
image = im.toRGB.getBitmap()

d = DisplayImage(title="iamgegtk")

label = gtk.Label("Lenna")
d.box.pack_start(label,False,False,0)

but1 = gtk.Button("Quit")
but1.connect("clicked",d.leave_app)
d.box.pack_end(but1,False,False,2)

d.show(image)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top