Solved

How do I programmatically interact with a camera (photo/video) in an MS Windows environment?

Posted on 2014-11-15
6
339 Views
Last Modified: 2014-12-03
Hi:

I'm new to the use of a Camera in the Windows operating system.
I've been tasked with writing a library to interact with a windows based camera.

What is the best api/library/pattern/solution for interacting with a camera in a windows environment?

Ideally, we'd like something that is common across Windows 7, Windows 8, Windows Surface, and Windows based
phones (tablets?).

Is there something that is consistent across all the windows flavours mentioned above?

I've seen some mention of "Media Foundation" in several posts.
Is that the current standard for camera/video interaction?

Thanks,
JohnB
0
Comment
Question by:jxbma
  • 3
  • 3
6 Comments
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40445720
using direct-x with the windows sdk is the most common method using the amcap library.
http://msdn.microsoft.com/en-us/library/dd373424%28VS.85%29.aspx

it is not included with the latest versions of the sdk but available from http://amcap.en.softonic.com/download (watch out for additional installers and decline them)
0
 
LVL 1

Author Comment

by:jxbma
ID: 40446275
::> David Johnson ::>

Will this approach work across all windows devices including windows mobile devices?

JB
0
 
LVL 1

Author Comment

by:jxbma
ID: 40446342
::> David Johnson ::>

I'm new to this and a little confused. Please be patient with my questions.
I'm assuming that in one form another, I'll be coding against the Windows SDK
either directly or using some other 3rd party library.

1) In your comment, are you referring to "Direct-X" or "DirectShow"?

2) I've downloaded AMCap (which is that actual capture application).
    Is there an AMCap library which I can program against to control/access the camera
    and images (still & streaming)?

3) Is your suggestion to download/examine the AMCap sample and then use that as
    as the basis for accessing the camera?

Thanks,
JohnB
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40446449
directshow is part of direct-x .. use the sample as a base for creating your application to access the camera
0
 
LVL 1

Author Comment

by:jxbma
ID: 40453765
I've been doing some additional digging around and there seem to be 2 camps as how to best to proceed.
I looked @ openCV, which looks like it uses Media Foundation under the covers.

The choices seem to be to go with either Media Foundation or DirectX.
Media Foundation being the newer of the two and being supported on Windows 7 and forward.
DirectX  is the older technology/approach (was MF intended to replace DirectX?).

Can anyone shed some light on the pros/cons of using DirectX vs Media Foundation?

All we really want to do is to capture video frames from a USB/Device Camera feed.
In turn we perform analysis on each frame received (so we're not just piping the frame to
a windows control)

Is one better to use than the other in terms of performance/ease of use (api)/support moving forward?

As an aside, what would be the best strategy for capturing Camera output from a web page?
(Microsoft stack or other)

Thanks in advance,
JohnB
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40479769
capturing camera output from a webpage .. depends on the methodology used i.e. flash, media streaming.. you could use vlc
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
This video teaches viewers how to process images for a time-lapse video. Programs required: Adobe Lightroom, Adobe After Effects, Video Editing Program. In Adobe Lightroom: Import sequence image files into Adobe Lightroom: Develop settings of an I…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now