![]() |
|
#1
|
|||
|
|||
Thank you
![]() Now I, like the original poster, just need to sort a method for converting frame buffer images to IPLImage!! Came across this - http://www.depthfirstsearch.net/blog...cv-and-python/ - which seems to address this prob however I am unable to utilize this at the moment due to my severe lack of C or C++ know-how. Any windows/C++ wizards out there who could help? |
#2
|
|||
|
|||
Quote:
I used the viztask schedule capability and basically saved each image to a bitmap and then loaded the bitmaps into the squares example. It is slow, only average 2 -3 frames per second which doesn't work for me, but might work for your application. I am attaching the code I used in squares for you to look at. Maybe it'll help you. Like, you I found that same link that might address the problem but I couldn't figure out how to do anything with it. I do know C++, but only as a language. Getting all the plugins, modules, and runtime environments setup is beyond my capability. I'd kill for some sort of class to attend that would cover all the setup stuff that people assume you know just because you know a language. Code:
def SquareIt(): global img, storage while True: name = 'C:/DK Files/OpenCV Learn/test1.bmp' yield viz.window.screenCapture(name) # # create memory storage that will contain all the dynamic data storage = cvCreateMemStorage(0); img0 = cvLoadImage( name, 1 ); if not img0: print "Couldn't load %s" % name img = cvCloneImage( img0 ); # force the image processing on_trackbar(0); # Also the function cvWaitKey takes care of event processing cvWaitKey(5); # clear memory storage - reset free space position cvClearMemStorage( storage ); t = viztask.schedule( SquareIt() ) vizact.onkeyup('s',t.kill) |
#3
|
|||
|
|||
Yes, figuring out how to build complex C/C++ projects is a hideous nightmare, particularly on Windows with its plethora of compilers. That's why sane people prefer Python.
![]() You might have a look at ctypes_opencv. It's not intended for Python 2.4, but as it's pure python code it might be made to work. Requires the ctypes module, and there are quite a few lines of the form: Code:
min_val_p = c_double() if min_val is True else min_val Code:
if min_val is True: min_val_p = c_double() else: min_val_p = min_val ![]() |
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
![]()
OK, I got interested and got it to work (at least, I got capture-cam and a couple others to run). Download. The src/ctypes_opencv folder goes in Vizard's site-packages directory, there's also a folder of modified demos (I assume the syntax is a bit different). Let me know if the PIL conversion works...
|
#6
|
|||
|
|||
![]()
Wow, you really are the man
![]() |
#7
|
|||
|
|||
I wrote to the author of ctypes-opencv and ended up applying the fixes to the bleeding-edge version and mailing that to him. Interestingly, it looked like there might be some code added to the bleeding-edge version relevant to exactly the problem you've been writing about, so you might want to look at that. It's here.
|
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Native WorldViz support for character animation | luakt | Vizard | 10 | 09-15-2008 11:39 PM |
Incampatible CAL3D files | luakt | Vizard | 4 | 09-14-2008 11:28 PM |
WorldViz support of callada | luakt | Vizard | 2 | 09-14-2008 10:59 PM |