Page 2 of 5
Re: get live film from a camera by ported usb or other
Posted: Mon Oct 22, 2012 3:45 am
by chris319
Another minor optimization: the line
reduces the amount of calculation needed when moving through horizontal rows of pixels (note that the addressing works from bottom to top).
Re: get live film from a camera by ported usb or other
Posted: Sun Sep 08, 2013 3:48 pm
by r7mk4
Anyone has done the update of the escapi files to Purebasic 5.1 and higher...
I get the error: Native types can't be used with pointers
BTW: Has anyone recorded a movie file (not only pictures) with escapi?
Cheers
Re: get live film from a camera by ported usb or other
Posted: Fri Oct 25, 2013 8:31 am
by technopol
I guess it doesn't work on 64-bit purebasic (V5.20 LTS); all I get is "Unable to initialize ESCAPI."
Lib is copied to UserLibraries, DLL installed in Windows\system32 but not sure is well registered as regsvr32 didn't recognize it as 32 or 64 bit.
Or is there anything I've done wrong?
Any 64-bit version around?
Re: get live film from a camera by ported usb or other
Posted: Fri Oct 25, 2013 8:35 am
by technopol
r7mk4 wrote:Anyone has done the update of the escapi files to Purebasic 5.1 and higher...
I get the error: Native types can't be used with pointers
BTW: Has anyone recorded a movie file (not only pictures) with escapi?
Cheers
Just remove the .l after "*mTargetBuf" (line 4 of escapi.pbi). pointers are now all set to integer.
Re: get live film from a camera by ported usb or other
Posted: Tue Oct 29, 2013 2:34 am
by JHPJHP
OpenCV
- alternative to the Escapi solution
-- everything is located in the zip file
--- 32 / 64 bit (works for
most webcams)
Includes
- opencv.pbi
-- show.pb (window resize, window move, mouse callback)
-- capture.pb (saves nframes / nTime)
-- captureall.pb (saves all frames)
-- video.pb (saves video)
Note:
- Esc key to close examples
- fps currently set for 7 (captureall.pb, video.pb)
- CV_FOURCC("M", "S", "V", "C")
-- hundreds of codecs to choose from:
http://www.fourcc.org/codecs.php
This is an updated version from work started here:
http://www.purebasic.fr/english/viewtop ... 13&t=57128
Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 1:19 am
by JHPJHP
Updated
- New Functions (opencv.pbi)
-- cvLoadImage
-- cvConvertImage
-- cvGetWindowHandle
-- cvGetWindowName
- New Example
-- convert.pb (cvLoadImage, cvConvertImage)
- Updated show.pb
-- added WindowCallback to capture #WM_DESTROY Window Msg
Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 2:24 am
by Mythros
@JHP: OMG! THIS IS AWESOME! However, I have one small request. Can you add compatibility for Carmine 1.09 (OpenNI) & Kinect (XBox360 / PC)?
Thanks alot, buddy!
Keep up the WONDERFUL work!

Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 2:37 am
by JHPJHP
Hi Mythros,
That's something I wanted to do when we were working from the previous thread, but I think the only way for me add that compatibility, would be to have either of those webcams to test with - but I don't. I'll do some more research, but I'm not optimistic - Sorry!
Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 2:42 am
by IdeasVacuum
Mythros, as you know, neither the Carmine or the Kinect are standard webcam devices. Why not take a look at their APIs?
Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 3:23 am
by Mythros
@JHP, I can test it for you! That wouldn't be a problem at all!

Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 4:24 am
by JHPJHP
Hi Mythros,
You were right with your original assessment concerning the steps required to get OpenNI working with OpenCV.
- minimum requirements for 3D sensing Webcam's to work with OpenCV is installing OpenNI, and creating your own binaries
--
http://seevisionc.blogspot.ca/2012/07/c ... i-for.html
But I may have found some precompiled binaries - I'm interested to know if they will work for you?
- binaries, help, and website included in the download (OpenNI required)
Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 2:55 pm
by Mythros
Idk because I'm not a C++ coder. Even with instructions, I have no idea how to compile it. HOWEVER. If you can compile it and upload it to dropbox, I will be more than willing to test it!
Thanks alot, JHP!

Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 3:46 pm
by JHPJHP
The second part of my previous post included compiled binaries, the first part was only to confirm your initial apprehension.
- I don't currently have the means to compile my own binaries, that's why I'm hoping the following will work for you
But I may have found some precompiled binaries - I'm interested to know if they will work for you?
- binaries, help, and website included in the download (OpenNI required)
Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 3:57 pm
by Mythros
Is there supposed to be an EXE in there? Cuz' there's not.
If not, then tell me what you want me to do.
Thanks JHP!

Re: get live film from a camera by ported usb or other
Posted: Wed Oct 30, 2013 4:17 pm
by JHPJHP
Refer to the included README.txt. The binaries I'm referring to are the included DLL's, from what I read you need OpenNI installed, and by placing the DLL's into the correct OpenNI folder, OpenCV may be able to recognize your Webcam?
- link includes the URL to the original website: website.txt (also found in README.txt)