Changeset 713
- Timestamp:
- 03/03/10 01:43:17 (2 years ago)
- Location:
- trunk/software/rb/vision
- Files:
-
- 1 added
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/software/rb/vision/_camera.c
r667 r713 359 359 "Save an image using the ``cvSaveImage()`` function. " 360 360 "The file type will be taken from the extension in the " 361 "given filename --- use ``.jpg`` or ``.png``."}, 361 "given filename --- use ``.jpg`` or ``.png``.\n\n" 362 "Arguments: string filename, IplImage."}, 362 363 {"ipl_image_from_rgb_buffer", _camera_ipl_image_from_rgb_buffer, METH_VARARGS, 363 364 "Produce a BGR IplImage from an RGB buffer. Takes two " -
trunk/software/rb/vision/gstcam.py
r667 r713 32 32 self.controller = controller 33 33 self.source = source 34 self.state = 'Initializing' 34 35 self.running = True 35 36 launch_string = ( … … 46 47 bus.add_signal_watch() 47 48 bus.connect('message', self.message_cb) 49 self._start_playback() 48 50 49 self.pipeline.set_state(gst.STATE_PLAYING)50 51 51 if self.controller is not None: 52 52 gobject.timeout_add(100, self._send_image) 53 53 54 def _start_playback(self): 55 self.state = 'Starting' 56 self.pipeline.set_state(gst.STATE_PLAYING) 57 54 58 def _send_image(self): 55 59 image = self.get_last_image() 56 60 if image is not None: 61 self.status = 'Capturing' 57 62 self.controller.send('camera_image', (self.source, image)) 58 63 return True # Call me again … … 70 75 msg, details = message.parse_error() 71 76 logger.error("%s\n%s", msg, details) 77 self.state = 'Error %s' % (msg,) 72 78 self.pipeline.set_state(gst.STATE_NULL) # Stop playback 73 79 -
trunk/software/rb/vision/makefile
r667 r713 1 CFLAGS = -p -pg -g -Wall -Werror -Wno-unused -pedantic -fPIC --std=gnu99 -fgnu89-inline -O3 $(shell pkg-config --cflags opencv gsl glib-2.0 gobject-2.0)2 #CFLAGS = -p -pg -g -Wall -Werror -pedantic -fPIC -O3 $(shell pkg-config --cflags opencv gsl)3 CPPFLAGS = -p -pg -g -Wall -Werror -Wno-unused -pedantic -fPIC -O3 $(shell pkg-config --cflags opencv gsl)4 LDFLAGS = $(shell pkg-config --libs opencv gsl)5 DLFLAGS = -shared -nostartfiles6 PYFLAGS = -pthread -fno-strict-aliasing -fwrapv -I/usr/include/python2.6/ $(shell pkg-config --cflags gtk+-2.0 pygtk-2.0 pygobject-2.0)7 PYLIBS = -lpython2.6 $(shell pkg-config --libs gtk+-2.0 pygtk-2.0 pygobject-2.0)1 CFLAGS := -p -pg -g -Wall -Werror -Wno-unused -pedantic -fPIC --std=gnu99 -fgnu89-inline -O3 $(shell pkg-config --cflags opencv gsl glib-2.0 gobject-2.0) 2 #CFLAGS := -p -pg -g -Wall -Werror -pedantic -fPIC -O3 $(shell pkg-config --cflags opencv gsl) 3 CPPFLAGS := -p -pg -g -Wall -Werror -Wno-unused -pedantic -fPIC -O3 $(shell pkg-config --cflags opencv gsl) 4 LDFLAGS := $(shell pkg-config --libs opencv gsl) 5 DLFLAGS := -shared -nostartfiles 6 PYFLAGS := -pthread -fno-strict-aliasing -fwrapv -I/usr/include/python2.6/ $(shell pkg-config --cflags gtk+-2.0 pygtk-2.0 pygobject-2.0) 7 PYLIBS := -lpython2.6 $(shell pkg-config --libs gtk+-2.0 pygtk-2.0 pygobject-2.0) 8 8 9 PROG =main10 OBJS =vision.o classify.o classify_hard.o classify_dtree.o classify_svm.o pathplan.o11 LIBS =_camera.so _calibrate.so9 PROG := main 10 OBJS := vision.o classify.o classify_hard.o classify_dtree.o classify_svm.o pathplan.o 11 LIBS := _camera.so _calibrate.so _processing.so 12 12 13 13 all: $(LIBS) $(PROG)

