I am trying to create an application to capture a snapshot using a webcam.
I have been able to accomplish this using WIA, but this solution becomes unstable when ran on Windows 7 with a camera that has a resolution of more than 1.3 megapixels. We are coding for a tablet computer that has a built in webcam with 2.0 megapixels.
I am not opposed to using direct show, but I would like to stay away from .net.
I have searched high and low for a solution and I can not get the directshow examples from the windows platform sdk or directx 9.0 to even compile on Visual Studio 6.0. I have also had no luck OpenCV.
Is there anyone that could point me in the direction of a tutorial that might get me started down the right path?
Thanks
The simplest way is videoinput lib that wraps directshow, it's the same lib used by openCV.
If that isn't good enough then the AMCAP sample in the multimedia/directshow dir of the Microsoft SDK shows how to run a camera in directshow
ps. as Hans said you should update the compiler,VC++6 is little old. There is a free version of their latest vs2010.
I found this tutorial excellent and it is so simple. I found it worked on XP and win7 with an old webcam and a new one.
I used the second example which is a semi-directshow one, but bypasses most of directshow.
You do need to add error handling though.
http://www.codeproject.com/KB/audio-video/VideoImageGrabber.aspx
Related
I was using OpenCV 4.2.0 on Microsoft Studio which I downloaded the pre compiled version from the official repository, it was working fine. Then I decided to move to MinGW and compiled the source code of the same version. Everything seemed to work but when I tested the video capture on MinGW, I am getting this weird effect which don't happen with my Microsoft Studio. Look at the difference, the picture on the left is from MinGW and the right one is MSCV2019, with the same camera parameters and taken at the same time.
Anything I can rid of this undesired effect? I tested the input image on other webcam softwares and it doesn't seen to happen.
I'm working on a game engine in C++ and am using Visual Stdio 17 for the project. And for the Music and SFX, I want to use FMOD
I'm having trouble finding the correct tutorial to set it up though. I have installed the FMOD Studio API, but now need to know where do I put in the FMOD libraries.
If someone could help me or point me to the correct tutorial, it'd be nice.
FMOD setup in XCODE and Visual Studio
Also, here's a tutorial I found helpful for setting up a basic Audio Engine using FMOD.
I just noticed that streams.h is missing, while I was compiling DSVideoLib on my machine.
A quick research pointed me to the Windows SDK.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd407279(v=vs.85).aspx
Well after installing the windows sdk again, I still cannot find those files and folders in my windows sdk folder.
Does anybody have an idea where to get the DirectShow library on windows 10?
Streams.h and and other BaseClasses directory files can be found in Windows SDK 7.1, in \Samples\multimedia\directshow\baseclasses. This also looks like a good snapshot to grab.
See also (actually proves that taken out from Windows SDK 8.0, the code in question was never put back later):
Where are the DirectShow samples in the Windows 8 SDK?
Getting DirectShow Samples on Windows 8
DirectShow samples and base classes relocated
https://stackoverflow.com/questions/31657925/locations-of-windows-sdk-samples-in-windows-8-1
There is nothing bad in taking "old" DirectShow sample/base code because there has been so little changes over last 10+ years...
I'm trying to go through the DirectShow documentation provided on MSDN. I'm a relative beginner to C++, as well. I was on the first example code in the DirectShow documentation here:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd389098(v=vs.85).aspx
I followed along, modified the file string to point to a video on my own computer, included and added the strmiids.lib library as a reference. My code builds successfully, and the Console Window appears. But that's it. No video renders.
I'm using VS2015, on a Windows 8.1 laptop, and I have the Windows SDK installed as well. That's where i got the strmiids.lib file.
Any help would be awesome, as this has been a frustrating obstacle in the way of learning DirectShow programming.
Thanks!
I want to write code in OpenGL using Visual Studio 2010 . Now on opening opengl.org , I am redirected to http://user.xmission.com/~nate/glut.html ; which presumes I am using WindowsXP and Visual Studio 6 . The instructions in this page http://user.xmission.com/~nate/glut/README-win32.txt dates back to 2001 , and not in current context .
Long story short, is there any tutorial which will help me to program with OpenGL in Windows 7 using Visual Studio 2010 .
Thanks in advance for taking the time to answer my question . I am new to this , so please bear with me.
OpenGL development under Window-7 is the very same as it has been for Windows-NT 4, Windows 2k and Windows XP. All the tutorials remain valid.
You do not require a OpenGL SDK. Everything you need ships with your compiler. OpenGL is not a library, but an API implemented by the drivers. So make sure you download and install the most recent drivers directly from your GPU's vendor's homepage (don't use the drivers shipping with Windows, because those have only very limited support for OpenGL).
Since you surely want to use recent OpenGL functionality you should however get the GLEW library, which eases up the loading process for the so called "extensions" by several orders of magnitude; highly recommended. Then instead of the regular OpenGL header you include GL/glew.h and call glewInit() right after an OpenGL context has been made active.
Instead of the old, outdated, no longer maintained GLUT, you should use FreeGLUT or OpenGLUT; if using GLUT at all, because you'll hit its limitations very soon. I recommend using GLFW instead.
First of all, configure your project to link with opengl32.lib etc.:
OpenGL config in Visual Studio 2010.
Look at some NeHe tutorials http://nehe.gamedev.net/.
What about Visual Studio 2010 and Windows 7 - I don't think there is some significant differences in API with previous versions of Visual Studio and Windows (at least for simple examples).
Also look at: OpenGL API Documentation Overview