Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. webcam implementation in vc++

webcam implementation in vc++

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonhelp
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    ps_diwanji
    wrote on last edited by
    #1

    :sigh:hi, i am trying to provide an interface to a webcam in vc++/sdk please help me........Please help me if anyone knows about the api's used to capture a webcam in vc++..Please reply as soon as possible...

    C 1 Reply Last reply
    0
    • P ps_diwanji

      :sigh:hi, i am trying to provide an interface to a webcam in vc++/sdk please help me........Please help me if anyone knows about the api's used to capture a webcam in vc++..Please reply as soon as possible...

      C Offline
      C Offline
      Cyberizen
      wrote on last edited by
      #2

      Hello There is an SDK available from Microsoft Research called "Vision SDK". With this SDK you can connect to your webcam and capture images in a variety of formats. I have worked on a project using this SDK in my 3rd year project in BS. Tell me if you want any additional help. PS. Oh and i just learned that Microsoft has sold its Vision SDK product to some german company which might make it commercial so it might not be publicly available. Fortunately i found a website for you that allows you to download the microsoft version visit http://www.cs.ualberta.ca/~jiayuan/414/ Regards Ahmed Ajmal

      T 1 Reply Last reply
      0
      • C Cyberizen

        Hello There is an SDK available from Microsoft Research called "Vision SDK". With this SDK you can connect to your webcam and capture images in a variety of formats. I have worked on a project using this SDK in my 3rd year project in BS. Tell me if you want any additional help. PS. Oh and i just learned that Microsoft has sold its Vision SDK product to some german company which might make it commercial so it might not be publicly available. Fortunately i found a website for you that allows you to download the microsoft version visit http://www.cs.ualberta.ca/~jiayuan/414/ Regards Ahmed Ajmal

        T Offline
        T Offline
        tspramod
        wrote on last edited by
        #3

        Ahmed, Thanks for the info, I have a query ? Does the version of DIrectX (9.0c) which i have matter to run the VisSDK application bcoz, when i started compiling am getting errors in files "mmstream.h" and "strmif.h" ? for the SDK to compile - what is the version of Direct X i should use... Thanks, Pramod

        A 1 Reply Last reply
        0
        • T tspramod

          Ahmed, Thanks for the info, I have a query ? Does the version of DIrectX (9.0c) which i have matter to run the VisSDK application bcoz, when i started compiling am getting errors in files "mmstream.h" and "strmif.h" ? for the SDK to compile - what is the version of Direct X i should use... Thanks, Pramod

          A Offline
          A Offline
          Antti Keskinen
          wrote on last edited by
          #4

          The most effective way to use an installed webcam is to use DirectShow, which comes with DirectX 9. The webcam driver, when it was installed and loaded, created a DirectShow filter for the video stream and pictures available from the camera. This filter offers one or more interfaces, depending on what services the camera has. If you build and operate a 'capture chain' (DirectShow term), you can capture live data from the camera into a Windows window, a file or a network stream. To use DirectShow in your programs, you must download and install the latest DirectX SDK available freely from Microsoft. The DirectX Documentation accompaning this SDK has a few examples and code samples on how to create capture chains. The process of creating a chain is similar everytime: the filters that join the chain determine the nature, purpose and features of the chain. For example, to use a webcam to get live data from the camera to a Windows window, create a capture chain with the webcam filter and a Video Rendering Mixer filter. VRM filter can render video data into a window you create and specify with a HWND parameter. Remember that the VRM filter creates an auxilary window which is a child of the HWND you specify. The auxilary window has no title bar, system menu or anything else. It's just a blank square which is constantly redrawn with video data. Thus you need an actual top-level window which allows you to control the video display. You can't create a program and just put a video window over the desktop, as you would then have no way of closing the program without CTRL+ALT+DEL. -Antti Keskinen ---------------------------------------------- "If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?" -- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.

          C 1 Reply Last reply
          0
          • A Antti Keskinen

            The most effective way to use an installed webcam is to use DirectShow, which comes with DirectX 9. The webcam driver, when it was installed and loaded, created a DirectShow filter for the video stream and pictures available from the camera. This filter offers one or more interfaces, depending on what services the camera has. If you build and operate a 'capture chain' (DirectShow term), you can capture live data from the camera into a Windows window, a file or a network stream. To use DirectShow in your programs, you must download and install the latest DirectX SDK available freely from Microsoft. The DirectX Documentation accompaning this SDK has a few examples and code samples on how to create capture chains. The process of creating a chain is similar everytime: the filters that join the chain determine the nature, purpose and features of the chain. For example, to use a webcam to get live data from the camera to a Windows window, create a capture chain with the webcam filter and a Video Rendering Mixer filter. VRM filter can render video data into a window you create and specify with a HWND parameter. Remember that the VRM filter creates an auxilary window which is a child of the HWND you specify. The auxilary window has no title bar, system menu or anything else. It's just a blank square which is constantly redrawn with video data. Thus you need an actual top-level window which allows you to control the video display. You can't create a program and just put a video window over the desktop, as you would then have no way of closing the program without CTRL+ALT+DEL. -Antti Keskinen ---------------------------------------------- "If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?" -- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.

            C Offline
            C Offline
            Cyberizen
            wrote on last edited by
            #5

            Well VisionSDK doesnt have any dependencies that is you do not require a version of DirectX for that. Run the samples that come with the installation and do read in the documentation too This will clarify a lot of things. Basically VisionSDK supports Webcams that support Video for Windows(VFW) which virtually everybody webcam supports. If you are more comfortable with the COM style architecture than I suggest you go for DirectShow as Keskinen has suggested. Any more queries are welcome. I can help with implementation of Webcam interface Regards Ahmed Ajmal

            A 1 Reply Last reply
            0
            • C Cyberizen

              Well VisionSDK doesnt have any dependencies that is you do not require a version of DirectX for that. Run the samples that come with the installation and do read in the documentation too This will clarify a lot of things. Basically VisionSDK supports Webcams that support Video for Windows(VFW) which virtually everybody webcam supports. If you are more comfortable with the COM style architecture than I suggest you go for DirectShow as Keskinen has suggested. Any more queries are welcome. I can help with implementation of Webcam interface Regards Ahmed Ajmal

              A Offline
              A Offline
              Antti Keskinen
              wrote on last edited by
              #6

              It's true that DirectX has it's dependencies, but facing reality, how many Windows machines there are in the world which don't have DirectX (any version) installed ? DirectShow is also a lot easier to program once you grasp the basics. I don't know how flexible or effective the VisionSDK is, though. Both are valid solutions (DirectX and VisionSDK), the choice is up to the designer.. -Antti Keskinen ---------------------------------------------- "If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?" -- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.

              T 1 Reply Last reply
              0
              • A Antti Keskinen

                It's true that DirectX has it's dependencies, but facing reality, how many Windows machines there are in the world which don't have DirectX (any version) installed ? DirectShow is also a lot easier to program once you grasp the basics. I don't know how flexible or effective the VisionSDK is, though. Both are valid solutions (DirectX and VisionSDK), the choice is up to the designer.. -Antti Keskinen ---------------------------------------------- "If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?" -- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.

                T Offline
                T Offline
                tspramod
                wrote on last edited by
                #7

                Thanks all, One more thing, when i tried to execute a sample application ( with Direct X ) am getting the following error especially with "strmif.h" stating at "typedef DWORD_PTR HSEMAPHORE; " as missing ;(semicolon) also, unexpected end of file... I have neither modified this file..nor did create this file..in VC 6 application., Can u guide me the root cause for this problem ? should i change/set any parameters for the same..?? Thanks in advance, Pramod.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups