Tech Spike: How popular video processing libraries/SDK manipulate cameras

来源:互联网 发布:java aspose 乱码 编辑:程序博客网 时间:2024/06/06 03:08

对于图像处理,本人是个新手,从来没接触过。近来项目中既然涉及到这一方面的内容,就需做一些研究。项目中有一个要求,就是要搞清楚目前流行的视频或图像处理的库或SDK是如何识别摄像头的,比如说camera id是int型的数字还是string,具体又是如何得到这些id,以及后续会如何应用这些id来获得进一步的处理。本文尝试分析了几个库和SDK。但因为时间有限,这方面知识又不熟悉,有些地方并不算特别透彻。仅此一记,日后再来改进。

Abstraction

In our project, one user story wants to figure out how popular video processing librariesor software development kits manipulate camera in multiple cameras environment.It means, how they identify the cameras, and how to get these identifiers.Actually, this problem may have something to do with the camera driver and theoperating system. This articlemainly analyzed 3 libraries/SDKs, i.e.DirectShow, MS Media Foundation and OpenCV, and also talked about 6 otherpopular libraries. Due to the limited time, there could be something which canstill be improved. Let's improve it further when needed. 

 

Section 1. DirectShow

1.1 Brief Introduction[1][2]

TheMicrosoft DirectShow application programming interface (API) is amedia-streaming architecture for Microsoft Windows. Using DirectShow, yourapplications can perform high-quality video and audio playback or capture. Forinstance, you can useDirectShow to[3]: select a capture device, preview video, capture video to a file,control a capture graph, etc.. 

1.2 How to get a video capture device[3][4]

Toselect an audio or video capture device, use the SystemDevice Enumerator, described in the topic Usingthe System Device Enumerator. The System Device Enumerator returns acollection of device monikers, selected by device category. Amoniker is a COM objectthat contains information about another object. Monikers enable the applicationto get information about an object without actually creating the object. Later,the application can use the moniker to create the object. For more informationabout monikers, see the documentation for IMoniker.

Thefollowing properties are supported by device monikers.

Property

Description

VARIANT Type

"FriendlyName"

The name of the device.

VT_BSTR

"Description"

A description of the device.

VT_BSTR

"DevicePath"

A unique string that identifies the device. (Video capture devices only.)

VT_BSTR

The"FriendlyName" and "Description" properties are suitablefor displaying in a UI.

  • The "FriendlyName" property is available for every device. It contains a human-readable name for the device.
  • The "Description" property is available only for DV and D-VHS/MPEG camcorder devices. For more information, seeMSDV Driver and MSTape Driver. If available, it contains a description of the device which is more specific than the "FriendlyName" property. Typically it includes the vendor name.
  • The "DevicePath" property is not a human-readable string, but is guaranteed to be unique for each video capture device on the system. You can use this property to distinguish between two or more instances of the same model of device.

1.3 Sample Code [5]

// Create the System Device Enumerator.HRESULT hr;ICreateDevEnum *pSysDevEnum = NULL;hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER,    IID_ICreateDevEnum, (void **)&pSysDevEnum);if (FAILED(hr)){    return hr;}// Obtain a class enumerator for the video compressor category.IEnumMoniker *pEnumCat = NULL;hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoCompressorCategory, &pEnumCat, 0);if (hr == S_OK) {    // Enumerate the monikers.    IMoniker *pMoniker = NULL;    ULONG cFetched;    while(pEnumCat->Next(1, &pMoniker, &cFetched) == S_OK)    {        IPropertyBag *pPropBag;        hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag,             (void **)&pPropBag);        if (SUCCEEDED(hr))        {            // To retrieve the filter's friendly name, do the following:            VARIANT varName;            VariantInit(&varName);            hr = pPropBag->Read(L"FriendlyName", &varName, 0);            if (SUCCEEDED(hr))            {                // Display the name in your UI somehow.            }            VariantClear(&varName);            // To create an instance of the filter, do the following:            IBaseFilter *pFilter;            hr = pMoniker->BindToObject(NULL, NULL, IID_IBaseFilter,                (void**)&pFilter);            // Now add the filter to the graph.             //Remember to release pFilter later.            pPropBag->Release();        }        pMoniker->Release();    }    pEnumCat->Release();}pSysDevEnum->Release();


1.4 Conclusion

  1. DirectShow can get “FriendlyName” and “DevicePath” for all the cameras. 
    FriendlyName” is human-readable, and mainly for UI; “DevicePath” is for identifying cameras. 
  2. For current code base, we already have the codes to fetch “FriendlyName” and “DevicePath” for cameras by DirectShow. 
    The code locates at FindCameraDevicesDS() function of CameraDeviceIdentifier class in Eric.CVP solution. 

3.    After getting "DevicePath", we can use it withDirectShow to: capture video to a file, control a capture graph, etc..

 

Section 2. Microsoft Media Foundation

2.1 Brief Introduction [6][7]

MediaFoundation is the next generation multimedia platform for Windows that enablesdevelopers, consumers, and content providers to embrace the new wave of premiumcontent with enhanced robustness, unparalleled quality, and seamlessinteroperability.It requires Windows Vista or later. It uses the componentobject model (COM) and requires C/C++. Microsoft does not provide a managed APIfor Media Foundation.

TheMedia Foundation APIs are part of the Windows SDK. Todevelop a Media Foundation application, install the latest version of theWindows SDK.

2.1.1 Difference between Media Foundation and DirectShow [8][9]

MicrosoftMedia Foundation was introduced in Windows Vista as thereplacement for DirectShow. Of course, DirectShow is stillsupported in Windows 7, but developers are encouraged to use MediaFoundation in their new digital media applications.

MediaFoundation (MF) is a  COM-based multimedia framework pipelineand infrastructure platform for digital media in Windows Vista and later. It is the intended replacement for Microsoft  DirectShowWindows Media SDKDirectX Media Objects(DMOs) and all other so-called "legacy" multimedia APIs such as Audio CompressionManager (ACM) and Video for Windows (VfW).

2.2 How to get a video capture device [10]

Toenumerate the capture devices on the system, perform the following steps:

  1. Call the MFCreateAttributes function to create an attribute store.
  2. Set the MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE attribute to one of the following values:

Value

Description

MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID

Enumerate audio capture devices.

MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID

Enumerate video capture devices.

  1. Call the MFEnumDeviceSources function. This function allocates an array of IMFActivate pointers. Each pointer represents an activation object for one device on the system.
  2. Call the IMFActivate::ActivateObject method to create an instance of the media source from one of the activation objects.

2.3 Sample Code 

Referto [10]. 

2.4 Conclusion

  1. The same as Direct Show, MS Media Foundation offers “Friendly Name” and “Symbolic Link” a.k.a. “Device Path” of all the cameras.
  2. For current code base of Sprout, we already have the codes to fetch “Friendly Name” and “Symbolic Link” for cameras by Media Foundation.
    The code locates at FindCameraDevicesMF() function of CameraDeviceIdentifier class in Eric.CVP solution. 
  3. As the replacement of DirectShow, Media Foundation can also provide the same functions like capture video to a file, control a capture graph, etc.,after selecting a video capture device. 

 

Section 3. OpenCV

3.1 Brief Introduction [11]

OpenCV (OpenSource Computer Vision) is a library of programmingfunctions mainly aimed at real-time computer vision, originallydeveloped by Intel research center in NizhnyNovgorod (Russia), later supported by Willow Garage and nowmaintained by Itseez. The library is cross-platform and free foruse under the open-source BSD license. 

3.2 How to get a video capture device [12]

OpenCVmainly uses a class called VideoCapturefor video capturing from video files, image sequences or cameras. Thisclass provides C++ API for capturing video from cameras or for reading videofiles and image sequences.

VideoCapturehas several constructors as below.

  • VideoCapture();
  • VideoCapture(const string &filename);
  • VideoCapture(const string &filename, int apiPreference);
  • VideoCapture(int index);

The“index” in the last constructor represents the camera id-s. By default, it’szero if there is only one camera. For different SDK-s/drivers which are used to get the cameras, the range of the camera id-s are different. (See the table below or the sample code section.)


Enum nameValueCommentCV_CAP_MIL100MIL proprietary driversCV_CAP_VFW200platform nativeCV_CAP_FIREWARE300IEEE 1394 driversCV_CAP_STEREO400TYZX proprietary driversCV_CAP_QT500QuickTimeCV_CAP_UNICAP600Unicap driversCV_CAP_DSHOW700DirectShow (via videoInput)CV_CAP_PVAPI800PvAPI, Prosilica GigE SDKCV_CAP_OPENNI900OpenNI (for Kinect)CV_CAP_OPENNI_ASUS910OpenNI (for Asus Xtion)CV_CAP_ANDROID1000AndroidCV_CAP_ANDROID_FRONT1098Android front cameraCV_CAP_ANDROID_BACK1099Android back cameraCV_CAP_XIAPI1100XIMEA Camera APICV_CAP_AVFOUNDATION1200AVFoundation framework for iOSCV_CAP_GIGANETIX1300Smartek Giganetix GigEVisionSDKCV_CAP_MSMF1400Microsoft Media Foundation (via videoInput)CV_CAP_INTELPERC1500Intel Perceptual Computing SDK


3.3 Sample Code 

#include <opencv2/core.hpp>#include <opencv2/imgcodecs.hpp>#include <opencv2/highgui.hpp>#include <iostream>using namespace cv;using namespace std;bool EnumerateCameras(vector<int> &camIdx){    camIdx.clear();    struct CapDriver{        int enumValue; string enumName; string comment;    };    // list of all CAP drivers (see highgui_c.h)    vector<CapDriver> drivers;    drivers.push_back({ CV_CAP_MIL, "CV_CAP_MIL", "MIL proprietary drivers" });    drivers.push_back({ CV_CAP_VFW, "CV_CAP_VFW", "platform native" });    drivers.push_back({ CV_CAP_FIREWARE, "CV_CAP_FIREWARE", "IEEE 1394 drivers" });    drivers.push_back({ CV_CAP_STEREO, "CV_CAP_STEREO", "TYZX proprietary drivers" });    drivers.push_back({ CV_CAP_QT, "CV_CAP_QT", "QuickTime" });    drivers.push_back({ CV_CAP_UNICAP, "CV_CAP_UNICAP", "Unicap drivers" });    drivers.push_back({ CV_CAP_DSHOW, "CV_CAP_DSHOW", "DirectShow (via videoInput)" });    drivers.push_back({ CV_CAP_MSMF, "CV_CAP_MSMF", "Microsoft Media Foundation (via videoInput)" });    drivers.push_back({ CV_CAP_PVAPI, "CV_CAP_PVAPI", "PvAPI, Prosilica GigE SDK" });    drivers.push_back({ CV_CAP_OPENNI, "CV_CAP_OPENNI", "OpenNI (for Kinect)" });    drivers.push_back({ CV_CAP_OPENNI_ASUS, "CV_CAP_OPENNI_ASUS", "OpenNI (for Asus Xtion)" });    drivers.push_back({ CV_CAP_ANDROID, "CV_CAP_ANDROID", "Android" });    drivers.push_back({ CV_CAP_ANDROID_BACK, "CV_CAP_ANDROID_BACK", "Android back camera" }),    drivers.push_back({ CV_CAP_ANDROID_FRONT, "CV_CAP_ANDROID_FRONT", "Android front camera" }),    drivers.push_back({ CV_CAP_XIAPI, "CV_CAP_XIAPI", "XIMEA Camera API" });    drivers.push_back({ CV_CAP_AVFOUNDATION, "CV_CAP_AVFOUNDATION", "AVFoundation framework for iOS" });    drivers.push_back({ CV_CAP_GIGANETIX, "CV_CAP_GIGANETIX", "Smartek Giganetix GigEVisionSDK" });    drivers.push_back({ CV_CAP_INTELPERC, "CV_CAP_INTELPERC", "Intel Perceptual Computing SDK" });    std::string winName, driverName, driverComment;    int driverEnum;    Mat frame;    bool found;    std::cout << "Searching for cameras IDs..." << endl << endl;    for (int drv = 0; drv < drivers.size(); drv++)    {        driverName = drivers[drv].enumName;        driverEnum = drivers[drv].enumValue;        driverComment = drivers[drv].comment;        std::cout << "Testing driver " << driverName << "...";        found = false;        int maxID = 100; //100 IDs between drivers        if (driverEnum == CV_CAP_VFW)            maxID = 10; //VWF opens same camera after 10 ?!?        else if (driverEnum == CV_CAP_ANDROID)            maxID = 98; //98 and 99 are front and back cam        else if ((driverEnum == CV_CAP_ANDROID_FRONT) || (driverEnum == CV_CAP_ANDROID_BACK))            maxID = 1;        for (int idx = 0; idx <maxID; idx++)        {            VideoCapture cap(driverEnum + idx);  // open the camera            if (cap.isOpened())                  // check if we succeeded            {                found = true;                camIdx.push_back(driverEnum + idx);  // vector of all available cameras                cap >> frame;                if (frame.empty())                    std::cout << endl << driverName << "+" << idx << "\t opens: OK \t grabs: FAIL";                else                    std::cout << endl << driverName << "+" << idx << "\t opens: OK \t grabs: OK";                // display the frame                // imshow(driverName + "+" + to_string(idx), frame); waitKey(1);            }            cap.release();        }        if (!found) cout << "Nothing !" << endl;        cout << endl;    }    cout << camIdx.size() << " camera IDs has been found ";    cout << "Press a key..." << endl; cin.get();    return (camIdx.size()>0); // returns success}int main(){    vector<int> cam_vec;    EnumerateCameras(cam_vec);    return 0;}

The output of above code is as below. (My machine has several cameras)

***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****Searching for cameras IDs...Testing driver CV_CAP_MIL...Nothing !Testing driver CV_CAP_VFW...Nothing !Testing driver CV_CAP_FIREWARE...Nothing !Testing driver CV_CAP_STEREO...Nothing !Testing driver CV_CAP_QT...Nothing !Testing driver CV_CAP_UNICAP...Nothing !Testing driver CV_CAP_DSHOW...SETUP: Setting up device 0SETUP: USB Camera-OV580SETUP: Couldn't find preview pin using SmartTeeSETUP: Default Format is set to 1104x828SETUP: trying specified format RGB24 @ 640x480SETUP: trying format RGB24 @ 640x480SETUP: trying format RGB32 @ 640x480SETUP: trying format RGB555 @ 640x480SETUP: trying format RGB565 @ 640x480SETUP: trying format YUY2 @ 640x480SETUP: trying format YVYU @ 640x480SETUP: trying format YUYV @ 640x480SETUP: trying format IYUV @ 640x480SETUP: trying format UYVY @ 640x480SETUP: trying format YV12 @ 640x480SETUP: trying format YVU9 @ 640x480SETUP: trying format Y411 @ 640x480SETUP: trying format Y41P @ 640x480SETUP: trying format Y211 @ 640x480SETUP: trying format AYUV @ 640x480SETUP: trying format MJPG @ 640x480SETUP: trying format Y800 @ 640x480SETUP: trying format Y800 @ 640x480SETUP: trying format Y800 @ 640x480SETUP: trying format I420 @ 640x480SETUP: couldn't find requested size - searching for closest matching sizeSETUP: closest supported size is YUY2 @ 1104 828SETUP: Capture callback setSETUP: Device is setup and ready to capture.CV_CAP_DSHOW+0   opens: OK       grabs: OKSETUP: Disconnecting device 0SETUP: freeing Grabber CallbackSETUP: freeing GrabberSETUP: freeing ControlSETUP: freeing Media TypeSETUP: removing filter NullRenderer...SETUP: filter removed NullRendererSETUP: removing filter Sample Grabber...SETUP: filter removed Sample GrabberSETUP: removing filter AVI Decompressor...SETUP: filter removed AVI DecompressorSETUP: removing filter Smart Tee...SETUP: filter removed Smart TeeSETUP: removing filter USB Camera-OV580...SETUP: filter removed USB Camera-OV580SETUP: freeing Capture GraphSETUP: freeing Main GraphSETUP: Device 0 disconnected and freedSETUP: Setting up device 1SETUP: Forward Facing cameraSETUP: Couldn't find preview pin using SmartTeeSETUP: Default Format is set to 320x240SETUP: trying specified format RGB24 @ 640x480SETUP: Capture callback setSETUP: Device is setup and ready to capture.CV_CAP_DSHOW+1   opens: OK       grabs: OKSETUP: Disconnecting device 1SETUP: freeing Grabber CallbackSETUP: freeing GrabberSETUP: freeing ControlSETUP: freeing Media TypeSETUP: removing filter NullRenderer...SETUP: filter removed NullRendererSETUP: removing filter Sample Grabber...SETUP: filter removed Sample GrabberSETUP: removing filter Smart Tee...SETUP: filter removed Smart TeeSETUP: removing filter Forward Facing camera...SETUP: filter removed Forward Facing cameraSETUP: freeing Capture GraphSETUP: freeing Main GraphSETUP: Device 1 disconnected and freedSETUP: Setting up device 2SETUP: Downward Facing cameraSETUP: Couldn't find preview pin using SmartTeeSETUP: Default Format is set to 320x240SETUP: trying specified format RGB24 @ 640x480SETUP: Capture callback setSETUP: Device is setup and ready to capture.CV_CAP_DSHOW+2   opens: OK       grabs: OKSETUP: Disconnecting device 2SETUP: freeing Grabber CallbackSETUP: freeing GrabberSETUP: freeing ControlSETUP: freeing Media TypeSETUP: removing filter NullRenderer...SETUP: filter removed NullRendererSETUP: removing filter Sample Grabber...SETUP: filter removed Sample GrabberSETUP: removing filter Smart Tee...SETUP: filter removed Smart TeeSETUP: removing filter Downward Facing camera...SETUP: filter removed Downward Facing cameraSETUP: freeing Capture GraphSETUP: freeing Main GraphSETUP: Device 2 disconnected and freedSETUP: Setting up device 3SETUP: Intel(R) RealSense(TM) 3D Camera (Front F200) RGBSETUP: Couldn't find preview pin using SmartTeeSETUP: Default Format is set to 320x180SETUP: trying specified format RGB24 @ 640x480SETUP: trying format RGB24 @ 640x480SETUP: trying format RGB32 @ 640x480SETUP: trying format RGB555 @ 640x480SETUP: trying format RGB565 @ 640x480SETUP: trying format YUY2 @ 640x480SETUP: Capture callback setSETUP: Device is setup and ready to capture.CV_CAP_DSHOW+3   opens: OK       grabs: OKSETUP: Disconnecting device 3SETUP: freeing Grabber CallbackSETUP: freeing GrabberSETUP: freeing ControlSETUP: freeing Media TypeSETUP: removing filter NullRenderer...SETUP: filter removed NullRendererSETUP: removing filter Sample Grabber...SETUP: filter removed Sample GrabberSETUP: removing filter AVI Decompressor...SETUP: filter removed AVI DecompressorSETUP: removing filter Smart Tee...SETUP: filter removed Smart TeeSETUP: removing filter Intel(R) RealSense(TM) 3D Camera (Front F200) RGB...SETUP: filter removed Intel(R) RealSense(TM) 3D Camera (Front F200) RGBSETUP: freeing Capture GraphSETUP: freeing Main GraphSETUP: Device 3 disconnected and freedSETUP: Setting up device 4SETUP: HP High Definition 1MP WebcamSETUP: Couldn't find preview pin using SmartTeeSETUP: Default Format is set to 640x480SETUP: trying specified format RGB24 @ 640x480SETUP: trying format RGB24 @ 640x480SETUP: trying format RGB32 @ 640x480SETUP: trying format RGB555 @ 640x480SETUP: trying format RGB565 @ 640x480SETUP: trying format YUY2 @ 640x480SETUP: Capture callback setSETUP: Device is setup and ready to capture.CV_CAP_DSHOW+4   opens: OK       grabs: OKSETUP: Disconnecting device 4SETUP: freeing Grabber CallbackSETUP: freeing GrabberSETUP: freeing ControlSETUP: freeing Media TypeSETUP: removing filter NullRenderer...SETUP: filter removed NullRendererSETUP: removing filter Sample Grabber...SETUP: filter removed Sample GrabberSETUP: removing filter AVI Decompressor...SETUP: filter removed AVI DecompressorSETUP: removing filter Smart Tee...SETUP: filter removed Smart TeeSETUP: removing filter HP High Definition 1MP Webcam...SETUP: filter removed HP High Definition 1MP WebcamSETUP: freeing Capture GraphSETUP: freeing Main GraphSETUP: Device 4 disconnected and freedSETUP: Setting up device 5SETUP: Intel(R) RealSense(TM) 3D Camera (Front F200) DepthSETUP: Couldn't find preview pin using SmartTeeSETUP: Default Format is set to 640x480SETUP: trying specified format RGB24 @ 640x480SETUP: trying format RGB24 @ 640x480SETUP: trying format RGB32 @ 640x480SETUP: trying format RGB555 @ 640x480SETUP: trying format RGB565 @ 640x480SETUP: trying format YUY2 @ 640x480SETUP: Capture callback setSETUP: Device is setup and ready to capture.CV_CAP_DSHOW+5   opens: OK       grabs: OKSETUP: Disconnecting device 5SETUP: freeing Grabber CallbackSETUP: freeing GrabberSETUP: freeing ControlSETUP: freeing Media TypeSETUP: removing filter NullRenderer...SETUP: filter removed NullRendererSETUP: removing filter Sample Grabber...SETUP: filter removed Sample GrabberSETUP: removing filter AVI Decompressor...SETUP: filter removed AVI DecompressorSETUP: removing filter Smart Tee...SETUP: filter removed Smart TeeSETUP: removing filter Intel(R) RealSense(TM) 3D Camera (Front F200) Depth...SETUP: filter removed Intel(R) RealSense(TM) 3D Camera (Front F200) DepthSETUP: freeing Capture GraphSETUP: freeing Main GraphSETUP: Device 5 disconnected and freedTesting driver CV_CAP_MSMF...Nothing !Testing driver CV_CAP_PVAPI...Nothing !Testing driver CV_CAP_OPENNI...Nothing !Testing driver CV_CAP_OPENNI_ASUS...Nothing !Testing driver CV_CAP_ANDROID...Nothing !Testing driver CV_CAP_ANDROID_BACK...Nothing !Testing driver CV_CAP_ANDROID_FRONT...Nothing !Testing driver CV_CAP_XIAPI...Nothing !Testing driver CV_CAP_AVFOUNDATION...Nothing !Testing driver CV_CAP_GIGANETIX...Nothing !Testing driver CV_CAP_INTELPERC...Nothing !6 camera IDs has been found Press a key...



3.4 Conslution

  1. OpenCV is mainly responsible for video processing but not on camera controlling, e.g. not on getting/setting properties/names of cameras.
  2. OpenCV uses integer numbers as camera id-s for the multiple camera case. 
    For different SDK-s/drivers which are used to get the cameras, the range of the camera id-s are different. (See the table above or the sample code section.)

 

Section 4. FFmpeg

4.1 Brief Introduction [14] [15]

FFmpegis a complete, cross-platform solution to record, convert and stream audio andvideo. FFmpeg is the leading multimedia framework, able to decodeencodetranscodemuxdemuxstreamfilter and play pretty muchanything that humans and machines have created. It supports the most obscureancient formats up to the cutting edge. 

4.2 How to get a video capture device: 

  • Way 1. FFmpeg can take input from "directshow" devices on your Windows computer[16][17].
  • Way 2. VFW[18]. 

Sinceway 1 is based on DirectShow which has been described in section 1, and way 2is based on VFW, which has been mentioned that it should be replaced by MSMedia Foundation in section 2, there will be no more description about the 2ways. 

 

Section 5. GStreamer

5.1 Brief Introduction [19][20]

GStreameris a library for constructing graphs of media-handling components. Theapplications it supports range from simple Ogg/Vorbis playback, audio/videostreaming to complex audio (mixing) and video (non-linear editing) processing.

Applicationscan take advantage of advances in codec and filter technology transparently.Developers can add new codecs and filters by writing a simple plugin with aclean, generic interface. 

GStreameris released under the LGPL. The 1.x series is API and ABI stable and supersedesthe previous stable 0.10 series. Both can be installed in parallel.

GStreamerworks on all major operating systems such as Linux, Android, Windows, Max OS X,iOS, as well as most BSDs, commercial Unixes, Solaris, and Symbian. It has beenported to a wide range of operating systems, processors and compilers. It runson all major hardware architectures including x86, ARM, MIPS, SPARC andPowerPC, on 32-bit as well as 64-bit, and little endian or big endian.

5.2 Conclusion

  1. It supports v4l cameras, e.g. /dev/video0, /dev/video1, etc.
  2. Have not figured out how GStreamer get video capture device on Windows due to time limitation. If needed, we can do more investigation in the future. 

 

Section 6. Other Libraries

6.1 SimpleCV [21]

SimpleCV is a python library. So, no moreeffort of investigation on it.

6.2 Camera2 [22]

Camera2is an Android related library. Thus no more effort of investigation on it.

6.3 OpenCL [23]

OpenCLis related to let GPUcalculating. So, basically it has nothing to do with camera.

6.4 OpenGL [24]

OpenGL is a library for drawing. So, it hasnothing to do with camera. 

 

References

  1. DS Brief Introduction: 
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd375454(v=vs.85).aspx
  2. DS Programming:
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd390352(v=vs.85).aspx
  3. DS – Video Capture:
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd407331(v=vs.85).aspx
  4. DS – Select a capture device:
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd377566(v=vs.85).aspx
  5. DS – Use the system enumerator:
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd407292(v=vs.85).aspx
  6. MF Brief Introduction – 1:
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms694197(v=vs.85).aspx
  7. MF Brief Introduction – 2:
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms696274(v=vs.85).aspx
  8. MF V.S. DS – 1:
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb970511(v=vs.85).aspx
  9. MF V.S. DS – 2:
    https://en.wikipedia.org/wiki/Media_Foundation
  10. MF – Audio/Video Capture:
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd317912(v=vs.85).aspx
  11. OpenCV Brief Introduction:
    https://en.wikipedia.org/wiki/OpenCV
  12. OpenCV - VideoCapture
    http://docs.opencv.org/master/d8/dfe/classcv_1_1VideoCapture.html#gsc.tab=0
  13. OpenCV – sample code for getting camera id-s
    http://answers.opencv.org/question/77871/i-get-no-video-from-the-camera-that-is-connected-with-firewire/?answer=77900#post-id-77900
  14. FFmpeg – Brief Introduction 1:
    http://ffmpeg.org/
  15. FFmPeg – Brief Introduction 2:
    http://ffmpeg.org/about.html
  16. FFmpeg – DirectShow 1:
    https://trac.ffmpeg.org/wiki/DirectShow
  17. FFmpeg – DirectShow 2:
    https://ffmpeg.org/ffmpeg-devices.html#dshow
  18. FFmpeg – vfw
    http://ffmpeg.org/ffmpeg-devices.html#vfwcap
  19. GStreamer Brief Introduction
    http://gstreamer.freedesktop.org/
  20. GStreamer Brief Introduction
    http://gstreamer.freedesktop.org/features/index.html
  21. SimpleCV
    http://simplecv.org/
  22. Camera2
    http://developer.android.com/reference/android/hardware/camera2/package-summary.html
  23. OpenCL
    https://en.wikipedia.org/wiki/OpenCL
  24. OpenGL
    https://www.opengl.org/

0 0
原创粉丝点击