天嵌二次封装库使用手册  V2.1.2
tq_uvc2.h
浏览该文件的文档.
1 
7 #ifndef LINUX_LIBV2_SOURCE_USB_CAMERA2_TQ_UVC2_H_
8 #define LINUX_LIBV2_SOURCE_USB_CAMERA2_TQ_UVC2_H_
9 
10 // Copyright 2024 广东省天嵌嵌入式技术股份有限公司
11 
12 #include <libhardware.h>
13 
14 #ifdef __cplusplus
15 #define UVC2_API extern "C"
16 #else
17 #define UVC2_API
18 #endif
19 
24  UVC2_API int tq_uvc2_check(char *dev);
25 
37  UVC2_API int tq_uvc2_init(struct uvc_fd *v, const char *devname, int width, int height);
38 
47 
54 
60  UVC2_API int tq_uvc2_get_buffsize(struct uvc_fd v);
61 
67  UVC2_API void *tq_uvc2_capturing(struct uvc_fd *v);
68 
75 
80  UVC2_API void tq_uvc2_close(struct uvc_fd v);
81 
91  UVC2_API int tq_YUY2ToRGB(unsigned char *src, unsigned char *rgb, int width, int height, int bits);
92 
101  UVC2_API int tq_convert_yuv_to_rgb_buffer(unsigned char *yuv,
102  unsigned char *rgb,
103  unsigned int width,
104  unsigned int height);
105 
106 #endif
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)
停止摄像头采集
#define UVC2_API
Definition: tq_uvc2.h:17
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 摄像头
uvc设备信息结构体
Definition: lib_uvc2.h:39
UVC2_API int tq_uvc2_release_capturing(struct uvc_fd v)
释放采集到的缓存
UVC2_API int tq_uvc2_get_buffsize(struct uvc_fd v)
获取采集数据缓存大小