usb3.0
kobosp@NUC8i5:~/SLMAC/ORB3_Vd1$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 2: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 14, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 4: Dev 14, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 10: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 10: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
kobosp@NUC8i5:~/SLMAC/ORB3_Vd1$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
|__ Port 4: Dev 6, If 0, Class=Video, Driver=uvcvideo, 5000M
|__ Port 4: Dev 6, If 1, Class=Video, Driver=uvcvideo, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 2: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 10: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 10: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
How to set camera format in OpenCV
VideoCapture cap(0); // open the default camera
if(!cap.isOpened()) // check if we succeeded
return -1;
// set frame size to 320x240 pix
cap.set(CV_CAP_PROP_FRAME_WIDTH,320);
cap.set(CV_CAP_PROP_FRAME_HEIGHT,240);
double grabMode,frameFormat,settings;
bool ok = false;
// Backed-specific value indicating the current capture mode.
grabMode = cap.get(CV_CAP_PROP_MODE);
// Format of the Mat objects returned by retrieve()
frameFormat = cap.get(CV_CAP_PROP_FORMAT);
// Some available settings
settings = cap.get(CV_CAP_PROP_SETTINGS);
// Playing around GRAB_MODE
// Boolean flags indicating whether images should be converted to RGB.
cap.set(CV_CAP_PROP_CONVERT_RGB, 0);
int i = -100;
while(ok == false && i<10)
{
if (i != 0)
ok = cap.set(CV_CAP_PROP_MODE, grabMode + i);
i++;
}
if(ok)
{
grabMode = cap.get(CV_CAP_PROP_MODE);
cout << "Grab Mode=" << grabMode << " is supported" << endl;
}
VideoCapture::get
Returns the specified VideoCapture property
C++: double VideoCapture::get(int propId)
Python: cv2.VideoCapture.get(propId) → retval
C: double cvGetCaptureProperty(CvCapture* capture, int property_id)
Python: cv.GetCaptureProperty(capture, property_id) → float
Parameters: propId –
Property identifier. It can be one of the following:
CV_CAP_PROP_POS_MSEC Current position of the video file in milliseconds or video capture timestamp.
CV_CAP_PROP_POS_FRAMES 0-based index of the frame to be decoded/captured next.
CV_CAP_PROP_POS_AVI_RATIO Relative position of the video file: 0 - start of the film, 1 - end of the film.
CV_CAP_PROP_FRAME_WIDTH Width of the frames in the video stream.
CV_CAP_PROP_FRAME_HEIGHT Height of the frames in the video stream.
CV_CAP_PROP_FPS Frame rate.
CV_CAP_PROP_FOURCC 4-character code of codec.
CV_CAP_PROP_FRAME_COUNT Number of frames in the video file.
CV_CAP_PROP_FORMAT Format of the Mat objects returned by retrieve() .
CV_CAP_PROP_MODE Backend-specific value indicating the current capture mode.
CV_CAP_PROP_BRIGHTNESS Brightness of the image (only for cameras).
CV_CAP_PROP_CONTRAST Contrast of the image (only for cameras).
CV_CAP_PROP_SATURATION Saturation of the image (only for cameras).
CV_CAP_PROP_HUE Hue of the image (only for cameras).
CV_CAP_PROP_GAIN Gain of the image (only for cameras).
CV_CAP_PROP_EXPOSURE Exposure (only for cameras).
CV_CAP_PROP_CONVERT_RGB Boolean flags indicating whether images should be converted to RGB.
CV_CAP_PROP_WHITE_BALANCE_U The U value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_WHITE_BALANCE_V The V value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_RECTIFICATION Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_ISO_SPEED The ISO speed of the camera (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_BUFFERSIZE Amount of frames stored in internal buffer memory (note: only supported by DC1394 v 2.x backend currently)
Note: When querying a property that is not supported by the backend used by the VideoCapture class, value 0 is returned.
VideoCapture::set
Sets a property in the VideoCapture.
C++: bool VideoCapture::set(int propId, double value)
Python: cv2.VideoCapture.set(propId, value) → retval
C: int cvSetCaptureProperty(CvCapture* capture, int property_id, double value)
Python: cv.SetCaptureProperty(capture, property_id, value) → retval
Parameters:
propId –
Property identifier. It can be one of the following:
CV_CAP_PROP_POS_MSEC Current position of the video file in milliseconds.
CV_CAP_PROP_POS_FRAMES 0-based index of the frame to be decoded/captured next.
CV_CAP_PROP_POS_AVI_RATIO Relative position of the video file: 0 - start of the film, 1 - end of the film.
CV_CAP_PROP_FRAME_WIDTH Width of the frames in the video stream.
CV_CAP_PROP_FRAME_HEIGHT Height of the frames in the video stream.
CV_CAP_PROP_FPS Frame rate.
CV_CAP_PROP_FOURCC 4-character code of codec.
CV_CAP_PROP_FRAME_COUNT Number of frames in the video file.
CV_CAP_PROP_FORMAT Format of the Mat objects returned by retrieve() .
CV_CAP_PROP_MODE Backend-specific value indicating the current capture mode.
CV_CAP_PROP_BRIGHTNESS Brightness of the image (only for cameras).
CV_CAP_PROP_CONTRAST Contrast of the image (only for cameras).
CV_CAP_PROP_SATURATION Saturation of the image (only for cameras).
CV_CAP_PROP_HUE Hue of the image (only for cameras).
CV_CAP_PROP_GAIN Gain of the image (only for cameras).
CV_CAP_PROP_EXPOSURE Exposure (only for cameras).
CV_CAP_PROP_CONVERT_RGB Boolean flags indicating whether images should be converted to RGB.
CV_CAP_PROP_WHITE_BALANCE_U The U value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_WHITE_BALANCE_V The V value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_RECTIFICATION Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_ISO_SPEED The ISO speed of the camera (note: only supported by DC1394 v 2.x backend currently)
CV_CAP_PROP_BUFFERSIZE Amount of frames stored in internal buffer memory (note: only supported by DC1394 v 2.x backend currently)
value – Value of the property.
Definition
Namespace:
Iot.Device.Media
Assembly:
Iot.Device.Bindings.dll
Package:
Iot.Device.Bindings v2.1.0
The pixel format of a video device.
C#
Copy
public enum PixelFormat
Inheritance
Enum
PixelFormat
Fields
ABGR32 875713089
ABGR32
ABGR444 842089025
ABGR444
ABGR555 892420673
ABGR555
ARGB32 875708738
ARGB32
ARGB444 842093121
ARGB444
ARGB555 892424769
ARGB555
ARGB555X 3039908417
ARGB555X
AYUV32 1448433985
AYUV32
BGR24 861030210
BGR24
BGR32 877807426
BGR32
BGR666 1213351746
BGR666
BGRA32 875708754
BGRA32
BGRA444 842088775
BGRA444
BGRA555 892420418
BGRA555
BGRX32 875714642
BGRX32
BGRX444 842094658
BGRX444
BGRX555 892426306
BGRX555
CIT_YYVYUY 1448364355
CIT_YYVYUY
CNF4 877022787
CNF4
CPIA1 1095323715
CPIA1
CS14LE 875647811
CS14LE
CS8 942691139
CS8
CU16LE 909202755
CU16LE
CU8 942691651
CU8
D4XX 1482175556
D4XX
DELTA_TD08 942687316
DELTA_TD08
DELTA_TD16 909198420
DELTA_TD16
DV 1685288548
DV
ET61X251 892483141
ET61X251
FWHT 1414027078
FWHT
FWHT_STATELESS 1213679187
FWHT_STATELESS
GREY 1497715271
GREY
H263 859189832
H263
H264 875967048
H264
H264_MVC 875967053
H264_MVC
H264_NO_SC 826496577
H264_NO_SC
HEVC 1129727304
HEVC
HI240 875710792
HI240
HM12 842091848
HM12
HSV24 861295432
HSV24
HSV32 878072648
HSV32
INZI 1230655049
INZI
IPU3_SBGGR10 1647538281
IPU3_SBGGR10
IPU3_SGBRG10 1731424361
IPU3_SGBRG10
IPU3_SGRBG10 1194553449
IPU3_SGRBG10
IPU3_SRGGB10 1915973737
IPU3_SRGGB10
JL2005BCD 808602698
JL2005BCD
JPEG 1195724874
JPEG
JPGL 1279742026
JPGL
KONICA420 1229868875
KONICA420
M420 808596557
M420
MJPEG 1196444237
MJPEG
MPEG 1195724877
MPEG
MPEG1 826757197
MPEG1
MPEG2 843534413
MPEG2
MPEG2_SLICE 1395803981
MPEG2_SLICE
MPEG4 877088845
MPEG4
MR97310A 808530765
MR97310A
MT21C 825381965
MT21C
NV12 842094158
NV12
NV12M 842091854
NV12M
NV12MT 842091860
NV12MT
NV12MT_16X16 842091862
NV12MT_16X16
NV16 909203022
NV16
NV16M 909200718
NV16M
NV21 825382478
NV21
NV21M 825380174
NV21M
NV24 875714126
NV24
NV42 842290766
NV42
NV61 825644622
NV61
NV61M 825642318
NV61M
OV511 825308495
OV511
OV518 942749007
OV518
PAC207 925905488
PAC207
PAL8 944521552
PAL8
PCU16BE 909198160
PCU16BE
PCU18BE 942752592
PCU18BE
PCU20BE 808600400
PCU20BE
PJPG 1196444240
PJPG
PWC1 826496848
PWC1
PWC2 843274064
PWC2
RGB24 859981650
RGB24
RGB32 876758866
RGB32
RGB332 826427218
RGB332
RGB444 875836498
RGB444
RGB555 1329743698
RGB555
RGB555X 1363298130
RGB555X
RGB565 1346520914
RGB565
RGB565X 1380075346
RGB565X
RGBA32 875708993
RGBA32
RGBA444 842088786
RGBA444
RGBA555 892420434
RGBA555
RGBX32 875709016
RGBX32
RGBX444 842094674
RGBX444
RGBX555 892426322
RGBX555
RU12LE 842093906
RU12LE
S5C_UYVY_JPG 1229141331
S5C_UYVY_JPG
SBGGR10 808535874
SBGGR10
SBGGR10ALAW8 943800929
SBGGR10ALAW8
SBGGR10DPCM8 943800930
SBGGR10DPCM8
SBGGR10P 1094795888
SBGGR10P
SBGGR12 842090306
SBGGR12
SBGGR12P 1128481392
SBGGR12P
SBGGR14P 1162166896
SBGGR14P
SBGGR16 844257602
SBGGR16
SBGGR8 825770306
SBGGR8
SE401 825242707
SE401
SGBRG10 808534599
SGBRG10
SGBRG10ALAW8 943802209
SGBRG10ALAW8
SGBRG10DPCM8 943802210
SGBRG10DPCM8
SGBRG10P 1094797168
SGBRG10P
SGBRG12 842089031
SGBRG12
SGBRG12P 1128482672
SGBRG12P
SGBRG14P 1162168176
SGBRG14P
SGBRG16 909197895
SGBRG16
SGBRG8 1196573255
SGBRG8
SGRBG10 808534338
SGRBG10
SGRBG10ALAW8 943810401
SGRBG10ALAW8
SGRBG10DPCM8 808535106
SGRBG10DPCM8
SGRBG10P 1094805360
SGRBG10P
SGRBG12 842088770
SGRBG12
SGRBG12P 1128490864
SGRBG12P
SGRBG14P 1162176368
SGRBG14P
SGRBG16 909201991
SGRBG16
SGRBG8 1195528775
SGRBG8
SN9C10X 808532307
SN9C10X
SN9C2028 1481527123
SN9C2028
SN9C20X_I420 808597843
SN9C20X_I420
SPCA501 825242963
SPCA501
SPCA505 892351827
SPCA505
SPCA508 942683475
SPCA508
SPCA561 825636179
SPCA561
SQ905C 1127559225
SQ905C
SRGGB10 808535890
SRGGB10
SRGGB10ALAW8 943805025
SRGGB10ALAW8
SRGGB10DPCM8 943805026
SRGGB10DPCM8
SRGGB10P 1094799984
SRGGB10P
SRGGB12 842090322
SRGGB12
SRGGB12P 1128485488
SRGGB12P
SRGGB14P 1162170992
SRGGB14P
SRGGB16 909199186
SRGGB16
SRGGB8 1111967570
SRGGB8
STV0680 808990291
STV0680
SUNXI_TILED_NV12 842093651
SUNXI_TILED_NV12
TM6000 808865108
TM6000
TU08 942691668
TU08
TU16 909202772
TU16
UV8 540563029
UV8
UVC 1212372565
UVC
UYVY 1498831189
UYVY
VC1_ANNEX_G 1194410838
VC1_ANNEX_G
VC1_ANNEX_L 1278296918
VC1_ANNEX_L
VP8 808996950
VP8
VP9 809062486
VP9
VSP1_HGO 1213223766
VSP1_HGO
VSP1_HGT 1414550358
VSP1_HGT
VUYA32 1096373590
VUYA32
VUYX32 1482249558
VUYX32
VYUY 1498765654
VYUY
WNVA 1096175191
WNVA
XBGR32 875713112
XBGR32
XBGR444 842089048
XBGR444
XBGR555 892420696
XBGR555
XRGB32 875714626
XRGB32
XRGB444 842093144
XRGB444
XRGB555 892424792
XRGB555
XRGB555X 3039908440
XRGB555X
XVID 1145656920
XVID
XYUV32 1448434008
XYUV32
Y10 540029273
Y10
Y10BPACK 1110454617
Y10BPACK
Y10P 1345335641
Y10P
Y12 540160345
Y12
Y12I 1228026201
Y12I
Y16 540422489
Y16
Y16_BE 2687906137
Y16_BE
Y4 540291161
Y4
Y41P 1345401945
Y41P
Y6 540422233
Y6
Y8I 541669465
Y8I
YUV32 878073177
YUV32
YUV410 961959257
YUV410
YUV411P 1345401140
YUV411P
YUV420 842093913
YUV420
YUV420M 842091865
YUV420M
YUV422M 909200729
YUV422M
YUV422P 1345466932
YUV422P
YUV444 875836505
YUV444
YUV444M 875711833
YUV444M
YUV555 1331058009
YUV555
YUV565 1347835225
YUV565
YUYV 1448695129
YUYV
YVU410 961893977
YVU410
YVU420 842094169
YVU420
YVU420M 825380185
YVU420M
YVU422M 825642329
YVU422M
YVU444M 842288473
YVU444M
YVYU 1431918169
YVYU
YYUV 1448434009
YYUV
Z16 540422490
Z16