Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-11-15
6
Medium Priority
?
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 83

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
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 
LVL 83

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 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 83

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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…

715 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