[ros-users] opencv and wxpython

James Bowman jamesb at willowgarage.com
Wed Jun 23 18:45:11 UTC 2010


Yes, try:

self.bmp = wx.BitmapFromBuffer(frame.width, frame.height, *frame.tostring()*)

This method is documented here:

http://opencv.willowgarage.com/documentation/python/basic_structures.html#iplimage

Hope this helps...
J.

On Wed, Jun 23, 2010 at 11:38 AM, Floris van Breugel <florisvb at gmail.com>wrote:

> Hi all,
>
> I hope it's ok to ask this question here - seems like some of you would
> likely know the answer. I have a little gui application that currently runs
> perfectly in opencv, but I would like to move it to wxpython to take
> advantage of the richer callback functionality (specifically, keyboard
> inputs). I just can't figure out how to display my opencv (ipl) images
> (image stream from a pt grey firefly camera) in wxpython.
>
> I tried following the example here:
> http://opencv.willowgarage.com/wiki/wxpython, but it seems like more than
> just the syntax has changed with opencv2? Specifically, this line doesn't
> work:
>
> self.bmp = wx.BitmapFromBuffer(frame.width, frame.height, frame.imageData)
>
> Since my opencv image doesn't appear to have a field 'imageData'. I'm
> hoping there's just a simple thing I'm missing... thanks for any help!
>
> - Floris
>
>
>
>
>
> --
> Floris van Breugel
> Caltech Graduate Student
> Control and Dynamical Systems
> (925) 963 8280
>
> Wildlife and Landscape Photographer
> Galleries: http://www.ArtInNaturePhotography.com/
> Blog: http://www.ArtInNaturePhotography.com/wordpress/
> 2010 CALENDARS! Now available on my website!
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100623/3367eb70/attachment-0003.html>


More information about the ros-users mailing list