LifeCam

Information

今後はこちらをご利用下さいませ。

UVC対応のWebカメラで撮影します。 alpha versionですので撮影によく失敗します。

USBメモリーとハブに対応しました。

動作を確認したカメラ

  • 045e:074a Microsoft LifeCam VX-500
  • 0c45:62c0 Sonix USB 2.0 Camera
  • 046d:0994 Qcam Orbit AF

/media/uploads/va009039/lifecam.jpg /media/uploads/va009039/uvc.jpg

Import programLifeCam

UVC(USB Video Class) host test program

intervalcamera.cpp

#include "mbed.h"
#include "uvc.h"
#include "msc.h"

#define INTERVAL 15

Timer t;
int main()
{
    msc* usb = new msc("usb");
    if (usb->setup() < 0) exit(1);

    uvc* lifecam = new uvc;
    lifecam->SetImageSize(160, 120);
    lifecam->SetFrameInterval(2000000);
    if (lifecam->setup() < 0) exit(1);
    t.start();
    int n = 0;
    while(++n < 20) {
        t.reset();
        char path[32];
        snprintf(path, sizeof(path), "/usb/usbcam%02d.jpg", n%100);
        int len = lifecam->get_jpeg(path);
        printf("%d %s %d\n", n, path, len);
        while(t.read() < INTERVAL) {
            lifecam->poll();
        }
    }
    exit(1);
}
Hub: 0 Port: 1
DeviceClass: 09
Vender: 05E3
Product: 0608
Product: USB2.0 Hub
NbrPorts: 4
PwrOn2PwrGood: 50 100 ms
HubContrCurrent: 100
Hub: 1 Port: 1
DeviceClass: 00
Vender: 0EA0
Product: 6828
Manufacture: USB
Product: Flash Disk
InterfaceClass: 08
Hub: 1 Port: 2
DeviceClass: EF
Vender: 045E
Product: 074A
Manufacture: Microsoft
Product: Microsoft LifeCam
InterfaceClass: 0E
Hub: 1 Port: 3
DeviceClass: EF
Vender: 0C45
Product: 62C0
Manufacture: Sonix Technology Co., Ltd.
Product: USB 2.0 Camera
InterfaceClass: 0E
Hub: 1 Port: 4
DeviceClass: 00
Vender: 05E3
Product: 070E
Product: USB Storage
InterfaceClass: 08


Report

10 comments on LifeCam:

20 May 2012

Hi from Ecuador, Congratulations!!! you project is so crazy! i hope can probe too... but, i tried connect to my mbed my WebCam but no can work, i think can be the VIP and PID incopatibility and want question to you how can configured this items. thank you so much for reply...

21 May 2012

InterfaceClass of your WebCam is 0E? VIP and PID is not important. please look uvcini.cpp uvc::_init() of source code.

Angel David Yaguana Hernandez wrote:

Hi from Ecuador, Congratulations!!! you project is so crazy! i hope can probe too... but, i tried connect to my mbed my WebCam but no can work, i think can be the VIP and PID incopatibility and want question to you how can configured this items. thank you so much for reply...

22 May 2012

Hello dear friend Norimasa, thanks so much for you reply, i will look the source code now, what more can be the problem?, i am trying with this camera: http://www.omega.com.tw/webcam-3629K3.asp

22 May 2012

Dear Norimasa, i belive can be this:

void uvc::SetImageSize(int width, int height) { DBG_ASSERT(width >= 160); DBG_ASSERT(width <= 640); DBG_ASSERT(height >= 120); DBG_ASSERT(height <= 480); m_width = width; m_height = height; }

/************ A 5 megapixel image is approximately 2560x1920 pixels, 24 bits (8 bits per channel, 3 channel RGB and uncompressed) should have a "size" of 15 megabytes. It would be the same size (15 megabytes) image and "unzipped" with jpeg compression can "measure" a megabyte. If you are either uncompressed BMP or TIFF, you could fit 67 images in 1Gb, but if you have jpeg compression (most common) can fit you up to about 1000 images in 1Gb. ************/

Your code is for webcam with this size but my camera have a resolution of 5 Megapixeles, can you help me please for can work with this resolution? your code is so awesome but too is very big! and i dont know where can change something to can work good! help me please, and i hope can help you with some code in a near future.

Att. Sophy Alava

23 May 2012

Hello Dear Norimasa, i tryed with a camera logitech and here send tue results in a RTF file, and too i send to you 2 files more, each one is the technical information of the USB Device Camera in my PC, first the camera Omega of 5Mpx and in second place the 1.3Mpx. Please help me...

Report: /media/uploads/apm_litoral/reg.rtf

Dev. Class 5Mpx:/media/uploads/apm_litoral/usb_device_details.rtf

Dev. Class 1.3Mpx:/media/uploads/apm_litoral/usb_device_details_2.rtf

Soft: USB Monitor: http://www.freedownloadmanager.org/es/downloads/Monitor_de_Puerta_de_USB_anticipado_35195_p/free.htm

Att. Sophy Alava

26 May 2012

your C500(046d:0807) request setting formatIndex=2 and frameIndex=2 when MotionJPEG and 160x140. new program can be setting.

Angel David Yaguana Hernandez wrote:

Hello Dear Norimasa, i tryed with a camera logitech and here send tue results in a RTF file, and too i send to you 2 files more, each one is the technical information of the USB Device Camera in my PC, first the camera Omega of 5Mpx and in second place the 1.3Mpx. Please help me...

Report: /media/uploads/apm_litoral/reg.rtf

Dev. Class 5Mpx:/media/uploads/apm_litoral/usb_device_details.rtf

Dev. Class 1.3Mpx:/media/uploads/apm_litoral/usb_device_details_2.rtf

Soft: USB Monitor: http://www.freedownloadmanager.org/es/downloads/Monitor_de_Puerta_de_USB_anticipado_35195_p/free.htm

Att. Sophy Alava

12 Jul 2012

046d:0819 Logitech WebCam C210 でも動きました。 046d:0994 Qcam Orbit AF の設定をコピーして Product ID を変更しただけです。

ご報告まで。

masato / @n24bass

追伸。

  • 2084:0009 BUFFALO BSW20K06H USB PC Camera - NG: GET_CUR Commit から戻らず。調査中。
  • 0c45:62e0 BUFFALO BSW13K07H Webcam (Sonix) - OK
  • 046d:0991 Logicool USB Camera (Pro for Notebooks) - OK
09 Aug 2012

動作報告ありがとうございます。

  • 046d:0825 Logitech C270 MJPG,YUY2 動きます。
  • 1e4e:0103 BUFFALO BSW13K08H Etron Technology, Inc. USB2.0 Camera 動かない。GET_CUR Commitで失敗します。フォーマットはYUY2だけです。
19 Feb 2014

what a nice project!!

i want to follow your project. i was curious with usb camera+mbed. may i know the schematic between camera, board, and mbed that you used?

thank you

edu

09 Feb 2015

/media/uploads/vinitkej/untitledddddddd.jpg My usb camera is "INTEX IT-305WC". It is not responding to and also not providing device descriptor. Any solutions ??

Please log in to post comments.