I'm working on a Win32 application in C++ and would like to add the ability to output the default web cam onto the screen. I was wondering if there was a Win32 API for this, or a way to do this without coding the whole thing.
Thanks
Yes, it is really simple with capCreateCaptureWindow. That googles really well, you'll have no trouble finding code samples.
I'd recommend DirectShow. capXXX API is really old and obsolete. OpenCV is based on Win32 API.
Using OpenCV you can access webcam.
Related
I have been working on a project where I am interacting with a 3D camera(on a single machine) through its SDK written in C++. The extent of my knowledge in that language is just as good as what a basic crash course could teach. I need to provide an interface(web) which shows the camera preview from the SDK and when the capture image is clicked, I need to capture an Image using the SDK with a specified filename and path.
The approaches I thought of are:
Using NodeJS exec to capture images the compiled version(exe) of my program in C++. I am communicating the filepath and using json.
I could learn and use C++ CGI to simply control C++ SDK stuff.
Any help/suggestions would be greatly appreciated. Thanks in advance.
You can use one of the C++ CGI libraries out there but, as easy as they are to use, just calling an executable seems easier and cleaner. I think the scanner should come with a bundled tool to drive it, doesn’t it?
can somebody provide a short example on how to snap camera frames with NDK, C++ Camera 2 api?
I couldn't find any meaningful resources out there as it's sort of brand new API, however would be thankful for any help.
Thanks!
I found a good example of using camera2 from within C++ here: https://github.com/justinjoy/native-camera2
It's easy to follow and I got it running in a few minutes.
There aren't sample apps available yet, but you can take a look at the basic compliance test for the camera2 NDK API:
https://android.googlesource.com/platform/cts/+/master/tests/camera/libctscamera2jni/native-camera-jni.cpp
I'm currently building an OpenFrameworks project and need to use Google Analytics to track user interactions. I have yet to find any existing C++ libraries for doing so, and am considering writing my own. Is the API open enough to allow a custom library to be created? If one doesn't exist, any ideas on where to begin coding my own?
Yes it is possible and easy to extend openframeworks!
You can look here if there is an addon which fits your need. Maybe ofxCurl or ofxHttpUtils are the right ones to create an request like the one mentioned in the comment by yahelc.
If you don't find a solution there, you can look here to find first informations about creating addons for openFrameworks. If you have any further questions, please ask in the official openframeworks forums which you can find here.
Looks like you'll have to build your own solution... I'd use ofxHttpUtils to ping Google's Analytics API. You should also consider wrapping your work as an OF addon and sharing in openframewors.cc
I've built an OpenFrameworks add-on to do just that:
http://github.com/armadillu/ofxGoogleAnalytics
I'm playing around with C++ for the first time in years. Making an app using Qt, with the Qt IDE. I want to make an app to integrate with the Flickr API. I've got to the point where i need to make a call to a URL.
Flickr API:
http://flickr.com/services/rest/?method=flickr.people.getInfo&api_key=987654321&auth_token=9765984&api_sig=8f3870be274f6c49b3e31a0c6728957f
Right then ..... I'm used to .NET so this would normally be easy. Is there something built into Qt to allow me to do this or do i need a C++ web API. If I do need an API can you recommend one that would do the job.
Kind Regards
Use QNetworkAccessManager. The page has an example.
we do use Qt but ended up using the cURLpp C++ wrapper for libCURL (http://curlpp.org/) for a similar project.
I have been searching for a way to create a windows media center plugin with C++, does anyone know if this is possible (with current available tools)? I have the SDK for C#, but would really rather stick to C++ if it all possible.
Thanks for your help!
You could always use C++/CLI, either for the whole thing or just to create a thin shim between Media Center and your unmanaged C++.
C++/CLI is rarely used but it is fantastic for creating a bridge between the managed and unmanaged worlds. It's much better than the old Managed C++, if the thought of that has put you off checking it out.