LifeCam
Page last updated
01 Sep 2014, by
Norimasa Okamoto.
10
replies
msc,
USB,
UVC,
WEBCAM
Information
今後はこちらをご利用下さいませ。
- LPC4088とLPC1768
Simple USBHost WebCam for EA LPC4088 QSB/LPC1768 test program
- FRDM-K64FとFRDM-KL46ZとFRDM-KL25Z
Simple USBHost C270 example
- Nucleo F401RE
Simple USBHost WebCam test program
- Nucleo F411RE
Simple USBHost WebCam for Nucleo F411RE
UVC対応のWebカメラで撮影します。 alpha versionですので撮影によく失敗します。
USBメモリーとハブに対応しました。
動作を確認したカメラ
- 045e:074a Microsoft LifeCam VX-500
- 0c45:62c0 Sonix USB 2.0 Camera
- 046d:0994 Qcam Orbit AF
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
10 comments on LifeCam:
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...
InterfaceClass of your WebCam is 0E? VIP and PID is not important. please look uvcini.cpp uvc::_init() of source code.
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...
apm_litoral
#
22 May 2012
apm_litoral
#
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
apm_litoral
#
23 May 2012
your C500(046d:0807) request setting formatIndex=2 and frameIndex=2 when MotionJPEG and 160x140. new program can be setting.
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
動作報告ありがとうございます。
- 046d:0825 Logitech C270 MJPG,YUY2 動きます。
- 1e4e:0103 BUFFALO BSW13K08H Etron Technology, Inc. USB2.0 Camera 動かない。GET_CUR Commitで失敗します。フォーマットはYUY2だけです。
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
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.
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...