Solved

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

Posted on 2014-11-15
6
378 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 82

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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 82

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 82

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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

628 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