Skip to main content

TensorOpenCV.h File

OpenCV helpers for Tensor. More...

Included Headers

Description

OpenCV helpers for Tensor.

Provides a cv::Mat to Tensor adapter, available only when the framework is built with OpenCV support (SIMA_WITH_OPENCV). Returned tensors can either reference the Mat's data (zero-copy, read-only) or take ownership of the bytes; see the function-level docs for which mode is selected.

See Also

TensorAdapters.h for the GStreamer-side adapter.

File Listing

The file content with the documentation metadata removed is:

1
13#pragma once
14
16
17#if defined(SIMA_WITH_OPENCV)
18namespace simaai::neat {
19
32[[deprecated("Use from_cv_mat(mat, fmt, TensorMemory::EV74/CPU/MLA); "
33 "from_cv_mat(mat, fmt) defaults to EV74 placement.")]] Tensor
34from_cv_mat(const cv::Mat& mat, ImageSpec::PixelFormat fmt, bool read_only);
35
44Tensor from_cv_mat_view(const cv::Mat& mat,
46 bool read_only = true);
47
48Tensor from_cv_mat(const cv::Mat& mat, ImageSpec::PixelFormat fmt = ImageSpec::PixelFormat::BGR,
50Tensor from_cv_mat(const cv::Mat& mat, TensorMemory memory);
51
52} // namespace simaai::neat
53#endif

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.