7 #ifndef LINUX_LIBV2_SOURCE_USB_CAMERA2_TQ_UVC2_H_ 8 #define LINUX_LIBV2_SOURCE_USB_CAMERA2_TQ_UVC2_H_ 15 #define UVC2_API extern "C" 91 UVC2_API int tq_YUY2ToRGB(
unsigned char *src,
unsigned char *rgb,
int width,
int height,
int bits);
104 unsigned int height);
UVC2_API int tq_convert_yuv_to_rgb_buffer(unsigned char *yuv, unsigned char *rgb, unsigned int width, unsigned int height)
将YUV格式转RGB格式(YUY2是YUV422格式,排列是(YUYV),是1 plane)
UVC2_API int tq_uvc2_start_capturing(struct uvc_fd *v)
开启摄像头采集
UVC2_API int tq_uvc2_stop_capturing(struct uvc_fd v)
停止摄像头采集
UVC2_API int tq_uvc2_check(char *dev)
检测摄像头是否是 usb 摄像头
UVC2_API void tq_uvc2_close(struct uvc_fd v)
关闭摄像头
UVC2_API void * tq_uvc2_capturing(struct uvc_fd *v)
获取采集到的缓存
UVC2_API int tq_YUY2ToRGB(unsigned char *src, unsigned char *rgb, int width, int height, int bits)
将YUV格式转RGB格式(YUY2是YUV422格式,排列是(YUYV),是1 plane)
UVC2_API int tq_uvc2_init(struct uvc_fd *v, const char *devname, int width, int height)
初始化 usb 摄像头
UVC2_API int tq_uvc2_release_capturing(struct uvc_fd v)
释放采集到的缓存
UVC2_API int tq_uvc2_get_buffsize(struct uvc_fd v)
获取采集数据缓存大小