多媒体开发参考手册
目录
- 1. 声明
- 2. Release note
- 3. 声明
- 4. 多媒体开发参考手册
- 4.1. SOPHGO多媒体框架介绍
- 4.2. SOPHGO OpenCV使用指南
- 4.2.1. OpenCV简介
- 4.2.2. 数据结构扩展说明
- 4.2.3. API扩展说明
- 4.2.3.1. bool VideoCapture::get_resampler(int *den, int *num)
- 4.2.3.2. bool VideoCapture::set_resampler(int den, int num)
- 4.2.3.3. double VideoCapture::get(CAP_PROP_TIMESTAMP)
- 4.2.3.4. double VideoCapture::get(CAP_PROP_STATUS)
- 4.2.3.5. bool VideoCapture::set(CAP_PROP_OUTPUT_SRC, double resampler)
- 4.2.3.6. double VideoCapture::get(CAP_PROP_OUTPUT_SRC)
- 4.2.3.7. bool VideoCapture::set(CAP_PROP_OUTPUT_YUV, double enable)
- 4.2.3.8. double VideoCapture::get(CAP_PROP_OUTPUT_YUV)
- 4.2.3.9. bm_handle_t bmcv::getCard(int id = 0)
- 4.2.3.10. int bmcv::getId(bm_handle_t handle)
- 4.2.3.11. bm_status_t bmcv::toBMI(Mat &m, bm_image *image, bool update = true)
- 4.2.3.12. bm_status_t bmcv::toBMI(Mat &m, Mat &m1, Mat &m2, Mat &m3, bm_image *image, bool update = true)
- 4.2.3.13. bm_status_t bmcv::toMAT(Mat &in, Mat &m0, bool update=true)
- 4.2.3.14. bm_status_t toMAT(bm_image *image, Mat &m, int color_space, int color_range, void* vaddr = NULL, int fd0 = -1, bool update = true, bool nocopy = true)
- 4.2.3.15. bm_status_t bmcv::toMAT(bm_image *image, Mat &m0, bool update = true, csc_type_t csc = CSC_MAX_ENUM)
- 4.2.3.16. bm_status_t bmcv::toMAT(bm_image *image, Mat &m0, Mat &m1, Mat &m2, Mat &m3, bool update=true, csc_type_t csc=CSC_MAX_ENUM)
- 4.2.3.17. bm_status_t bmcv::resize(Mat &m, Mat &out, bool update = true, int interpolation= BMCV_INTER_NEAREST)
- 4.2.3.18. bm_status_t bmcv::convert(Mat &m, Mat &out, bool update=true)
- 4.2.3.19. bm_status_t bmcv::convert(Mat &m, std::vector<Rect> &vrt, std::vector<Size> &vsz, std::vector<Mat> &out, bool update= true, csc_type_t csc=CSC_YCbCr2RGB_BT601, csc_matrix_t *matrix = nullptr, bmcv_resize_algorithm algorithm= BMCV_INTER_LINEAR)
- 4.2.3.20. bm_status_t bmcv::convert(Mat &m, std::vector<Rect> &vrt, bm_image *out, bool update= true)
- 4.2.3.21. void bmcv::uploadMat(Mat &mat)
- 4.2.3.22. void bmcv::downloadMat(Mat &mat)
- 4.2.3.23. bm_status_t bmcv::stitch(std::vector<Mat> &in, std::vector<Rect>& srt, std::vector<Rect>& drt, Mat &out, bool update = true, bmcv_resize_algorithm algorithm = BMCV_INTER_LINEAR)
- 4.2.3.24. void bmcv::print(Mat &m, bool dump = false)
- 4.2.3.25. void bmcv::print(bm_image *image, bool dump)
- 4.2.3.26. void bmcv::dumpMat(Mat &image, const String &fname)
- 4.2.3.27. void bmcv::dumpBMImage(bm_image *image, const String &fname)
- 4.2.3.28. bool Mat::avOK()
- 4.2.3.29. int Mat::avCols()
- 4.2.3.30. int Mat::avRows()
- 4.2.3.31. int Mat::avFormat()
- 4.2.3.32. int Mat::avAddr(int idx)
- 4.2.3.33. int Mat::avStep(int idx)
- 4.2.3.34. AVFrame* av::create(int height, int width, int color_format, void *data, long addr, int fd, int* plane_stride, int* plane_size, int color_space = AVCOL_SPC_BT709, int color_range = AVCOL_RANGE_MPEG, int id = 0)
- 4.2.3.35. AVFrame* av::create(int height, int width, int id = 0)
- 4.2.3.36. int av::copy(AVFrame *src, AVFrame *dst, int id)
- 4.2.3.37. int av::get_scale_and_plane(int color_format, int wscale[], int hscale[])
- 4.2.3.38. cv::Mat(AVFrame *frame, int id)
- 4.2.3.39. cv::Mat(int height, int width, int total, int _type, const size_t* _steps, void* _data, unsigned long addr, int fd, SophonDevice device=SophonDevice())
- 4.2.3.40. Mat::Mat(SophonDevice device)
- 4.2.3.41. void Mat::create(AVFrame *frame, int id)
- 4.2.3.42. void Mat::create(int height, int width, int total, int _type, const size_t* _steps, void* _data, unsigned long addr, int fd, int id = 0)
- 4.2.3.43. void VideoWriter::write(InputArray image, char *data, int *len)
- 4.2.3.44. virtual bool VideoCapture::grab(char *buf, unsigned int len_in, unsigned int *len_out);
- 4.2.3.45. virtual bool VideoCapture::read_record(OutputArray image, char *buf, unsigned int len_in, unsigned int *len_out);
- 4.2.4. 硬件JPEG解码器的OpenCV 扩展
- 4.2.5. 指定PCIE设备运行硬件加速
- 4.2.6. OpenCV与BMCV API的调用原则
- 4.2.7. OpenCV中GB28181国标接口介绍
- 4.2.8. PCIE模式下BMCPU OPENCV加速
- 4.2.9. 代码实例
- 4.3. SOPHGO FFMPEG使用指南
- 4.4. SOPHGO LIBYUV使用指南