Solved

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

Posted on 2014-11-15
6
350 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
Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

 
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

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

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

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 is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

14 Experts available now in Live!

Get 1:1 Help Now