![]() |
OpenCV 4.12.0
開源計算機視覺
|
列舉 | |
| 列舉 | cv::cann::InterpolationFlags { cv::cann::INTER_NEAREST = 0 , cv::cann::INTER_LINEAR = 1 , cv::cann::INTER_CUBIC = 2 , cv::cann::INTER_AREA = 3 , cv::cann::INTER_MAX = 7 } |
| 插值演算法 更多... | |
函式 | |
| void | cv::cann::copyMakeBorder (const AscendMat &src, AscendMat &dst, int top, int bottom, int left, int right, int borderType, const Scalar &value=Scalar()) |
| void | cv::cann::copyMakeBorder (const InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, const Scalar &value=Scalar()) |
| 在輸入影像的副本週圍形成一個指定邊框型別的邊框並填充它。 | |
| AscendMat | cv::cann::crop (const AscendMat &src, const Rect &rect, AscendStream &stream=AscendStream::Null()) |
| AscendMat | cv::cann::crop (InputArray src, const Rect &rect, AscendStream &stream=AscendStream::Null()) |
| 裁剪一個二維陣列。該函式根據給定的 cv::Rect 裁剪矩陣。輸出矩陣的深度必須與輸入矩陣相同,大小由給定的矩形大小指定。 | |
| void | cv::cann::cropResize (const AscendMat &src, AscendMat &dst, const Rect &rect, Size dsize, double fx, double fy, int interpolation) |
| void | cv::cann::cropResize (const InputArray src, OutputArray dst, const Rect &rect, Size dsize, double fx, double fy, int interpolation) |
| 從大影像中裁剪子影像,並將其調整到特定大小。 | |
| void | cv::cann::cropResizeMakeBorder (const AscendMat &src, AscendMat &dst, const Rect &rect, Size dsize, double fx, double fy, int interpolation, int top, int left, const int borderType, Scalar value=Scalar()) |
| void | cv::cann::cropResizeMakeBorder (const InputArray src, OutputArray dst, const Rect &rect, Size dsize, double fx, double fy, int interpolation, int top, int left, const int borderType, Scalar value=Scalar()) |
| 從大影像中裁剪子影像,將其調整到特定大小,並形成頂部/左側邊框,然後用指定的邊框型別填充。 | |
| void | cv::cann::flip (const AscendMat &src, AscendMat &dst, int flipCode, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::flip (InputArray src, OutputArray dst, int flipCode, AscendStream &stream=AscendStream::Null()) |
| 圍繞垂直、水平或兩個軸翻轉二維矩陣。 | |
| void | cv::cann::merge (const AscendMat *src, size_t n, AscendMat &dst, AscendStream &stream=AscendStream::Null()) |
| 將多個單通道矩陣合併為一個多通道矩陣。 | |
| void | cv::cann::merge (const AscendMat *src, size_t n, OutputArray &dst, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::merge (const std::vector< AscendMat > &src, AscendMat &dst, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::merge (const std::vector< AscendMat > &src, OutputArray &dst, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::resize (const AscendMat &src, AscendMat &dst, Size dsize, double fx, double fy, int interpolation, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::resize (InputArray src, OutputArray dst, Size dsize, double fx, double fy, int interpolation, AscendStream &stream=AscendStream::Null()) |
| 將影像 src 調整到指定大小。 | |
| void | cv::cann::rotate (const AscendMat &src, AscendMat &dst, int rotateMode, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::rotate (InputArray src, OutputArray dst, int rotateCode, AscendStream &stream=AscendStream::Null()) |
| 以90度為倍數旋轉二維陣列。函式 cv::rotate 以三種不同的方式旋轉陣列:順時針旋轉90度 (rotateCode = ROTATE_90_CLOCKWISE)。順時針旋轉180度 (rotateCode = ROTATE_180)。順時針旋轉270度 (rotateCode = ROTATE_90_COUNTERCLOCKWISE)。 | |
| void | cv::cann::split (const AscendMat &src, AscendMat *dst, AscendStream &stream=AscendStream::Null()) |
| 將多通道矩陣的每個平面複製到一個數組中。 | |
| void | cv::cann::split (const AscendMat &src, std::vector< AscendMat > &dst, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::split (const InputArray src, AscendMat *dst, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::split (const InputArray src, std::vector< AscendMat > &dst, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::transpose (const AscendMat &src, AscendMat &dst, AscendStream &stream=AscendStream::Null()) |
| void | cv::cann::transpose (InputArray src, OutputArray dst, AscendStream &stream=AscendStream::Null()) |
| 轉置矩陣。 | |
#include <opencv2/cann_interface.hpp>
插值演算法
| 列舉器 | |
|---|---|
| INTER_NEAREST | 最近鄰插值 |
| INTER_LINEAR | 雙線性插值 |
| INTER_CUBIC | 雙三次插值 |
| INTER_AREA | 使用畫素區域關係進行重取樣。對於影像縮減(decimation),它可能是一種首選方法,因為它能產生無摩爾紋的結果。但當影像放大時,它與 INTER_NEAREST 方法相似。 |
| INTER_MAX | 插值程式碼掩碼 |
| void cv::cann::copyMakeBorder | ( | const AscendMat & | src, |
| AscendMat & | dst, | ||
| int | top, | ||
| int | bottom, | ||
| int | 左, | ||
| int | 右, | ||
| int | borderType, | ||
| const Scalar & | value = Scalar() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::copyMakeBorder | ( | const InputArray | src, |
| OutputArray | dst, | ||
| int | top, | ||
| int | bottom, | ||
| int | 左, | ||
| int | 右, | ||
| int | borderType, | ||
| const Scalar & | value = Scalar() ) |
#include <opencv2/cann_interface.hpp>
在輸入影像的副本週圍形成一個指定邊框型別的邊框並填充它。
| src | 源影像。 |
| dst | 與 src 型別相同、大小為 Size(src.cols+left+right, src.rows+top+bottom) 的目標影像。 |
| top | 頂部填充的畫素數 |
| bottom | 底部填充的畫素數 |
| 左 | 左側填充的畫素數 |
| 右 | 右側填充的畫素數。引數,指定從源影像矩形向每個方向外推的畫素數。例如,top=1, bottom=1, left=1, right=1 意味著需要構建1畫素寬的邊框。 |
| borderType | 邊框型別。僅支援 cv::BorderTypes::BORDER_CONSTANT 和 cv::BorderTypes::BORDER_REPLICATE。 |
| 值 | 如果 borderType==BORDER_CONSTANT,則為邊框的 BGR 或 YUV 值。 |
| AscendMat cv::cann::crop | ( | const AscendMat & | src, |
| const Rect & | rect, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| AscendMat cv::cann::crop | ( | InputArray | src, |
| const Rect & | rect, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
裁剪一個二維陣列。該函式根據給定的 cv::Rect 裁剪矩陣。輸出矩陣的深度必須與輸入矩陣相同,大小由給定的矩形大小指定。
| src | 輸入陣列。 |
| rect | 用於裁剪陣列的矩形 |
| 流 | AscendStream 用於非同步版本。 |
| void cv::cann::cropResize | ( | const AscendMat & | src, |
| AscendMat & | dst, | ||
| const Rect & | rect, | ||
| Size | dsize, | ||
| double | fx, | ||
| double | fy, | ||
| int | interpolation ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::cropResize | ( | const InputArray | src, |
| OutputArray | dst, | ||
| const Rect & | rect, | ||
| Size | dsize, | ||
| double | fx, | ||
| double | fy, | ||
| int | interpolation ) |
#include <opencv2/cann_interface.hpp>
從大影像中裁剪子影像,並將其調整到特定大小。
| src | 輸入陣列。 |
| dst | 輸出陣列。其大小為 dsize(非零時)或由 src.size()、fx 和 fy 計算得出;dst 的型別與 src 相同。 |
| rect | 用於裁剪陣列的矩形 |
| dsize | 輸出影像大小;如果為零,則按 cv::resize 的方式計算。 |
| fx | 水平軸上的縮放因子;當其為 0 時,按如下方式計算 \[(𝚍𝚘𝚞𝚋𝚕𝚎)𝚍𝚜𝚒𝚣𝚎.𝚠𝚒𝚍𝚝𝚑/𝚜𝚛𝚌.𝚌𝚘𝚕𝚜\] |
| fy | 垂直軸上的縮放因子;當其為 0 時,按如下方式計算 \[(𝚍𝚘𝚞𝚋𝚕𝚎)𝚍𝚜𝚒𝚣𝚎.𝚑𝚎𝚒𝚐𝚑𝚝/𝚜𝚛𝚌.𝚛𝚘𝚠𝚜\] |
| interpolation | 插值方法,此處僅支援 INTER_NEAREST 和 INTER_LINEAR。(參見 cv.cann.InterpolationFlags) |
| void cv::cann::cropResizeMakeBorder | ( | const AscendMat & | src, |
| AscendMat & | dst, | ||
| const Rect & | rect, | ||
| Size | dsize, | ||
| double | fx, | ||
| double | fy, | ||
| int | interpolation, | ||
| int | top, | ||
| int | 左, | ||
| const int | borderType, | ||
| Scalar | value = Scalar() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::cropResizeMakeBorder | ( | const InputArray | src, |
| OutputArray | dst, | ||
| const Rect & | rect, | ||
| Size | dsize, | ||
| double | fx, | ||
| double | fy, | ||
| int | interpolation, | ||
| int | top, | ||
| int | 左, | ||
| const int | borderType, | ||
| Scalar | value = Scalar() ) |
#include <opencv2/cann_interface.hpp>
從大影像中裁剪子影像,將其調整到特定大小,並形成頂部/左側邊框,然後用指定的邊框型別填充。
| src | 輸入陣列。 |
| dst | 輸出陣列;其大小為 Size(dsize.height + top, dsize.width + left)。 |
| rect | 用於裁剪陣列的矩形 |
| dsize | 調整大小後的尺寸; |
| fx | 水平軸上的縮放因子; |
| fy | 垂直軸上的縮放因子; |
| interpolation | 插值方法,僅支援 INTER_NEAREST 和 INTER_LINEAR。(參見 cv.cann.InterpolationFlags) |
| borderType | 邊框外推方法,僅支援 cv::BorderTypes::BORDER_CONSTANT 和 cv::BorderTypes::BORDER_REPLICATE。 |
| 值 | 如果 borderType==BORDER_CONSTANT,則為邊框的 BGR 或 YUV 值。 |
| top | 頂部填充的畫素數 |
| 左 | 左側填充的畫素數 |
| void cv::cann::flip | ( | const AscendMat & | src, |
| AscendMat & | dst, | ||
| int | flipCode, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::flip | ( | InputArray | src, |
| OutputArray | dst, | ||
| int | flipCode, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
圍繞垂直、水平或兩個軸翻轉二維矩陣。
| src | 源矩陣。 |
| dst | 目標矩陣。 |
| flipCode | 源的翻轉模式
|
| 流 | AscendStream 用於非同步版本。 |
| void cv::cann::merge | ( | const AscendMat * | src, |
| size_t | n, | ||
| AscendMat & | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
將多個單通道矩陣合併為一個多通道矩陣。
| src | 源矩陣的陣列/向量。 |
| n | 源矩陣的數量。 |
| dst | 目標矩陣。 |
| 流 | AscendStream 用於非同步版本。 |
| void cv::cann::merge | ( | const AscendMat * | src, |
| size_t | n, | ||
| OutputArray & | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::merge | ( | const std::vector< AscendMat > & | src, |
| AscendMat & | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::merge | ( | const std::vector< AscendMat > & | src, |
| OutputArray & | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::resize | ( | const AscendMat & | src, |
| AscendMat & | dst, | ||
| Size | dsize, | ||
| double | fx, | ||
| double | fy, | ||
| int | interpolation, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::resize | ( | InputArray | src, |
| OutputArray | dst, | ||
| Size | dsize, | ||
| double | fx, | ||
| double | fy, | ||
| int | interpolation, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
將影像 src 調整到指定大小。
| src | 輸入影像 |
| dst | 輸出影像;其大小為 dsize(非零時)或由 src.size()、fx 和 fy 計算得出;dst 的型別與 src 相同。 |
| dsize | 輸出影像大小;如果它等於零,則計算為 \[𝚍𝚜𝚒𝚣𝚎 = 𝚂𝚒𝚣𝚎(𝚛𝚘𝚞𝚗𝚍(𝚏𝚡*𝚜𝚛𝚌.𝚌𝚘𝚕𝚜), 𝚛𝚘𝚞𝚗𝚍(𝚏𝚢*𝚜𝚛𝚌.𝚛𝚘𝚠𝚜))\] dsize 或 fx 和 fy 必須都非零。 |
| fx | 水平軸上的縮放因子;當其為 0 時,按如下方式計算 \[(𝚍𝚘𝚞𝚋𝚕𝚎)𝚍𝚜𝚒𝚣𝚎.𝚠𝚒𝚍𝚝𝚑/𝚜𝚛𝚌.𝚌𝚘𝚕𝚜\] |
| fy | 垂直軸上的縮放因子;當其為 0 時,按如下方式計算 \[(𝚍𝚘𝚞𝚋𝚕𝚎)𝚍𝚜𝚒𝚣𝚎.𝚑𝚎𝚒𝚐𝚑𝚝/𝚜𝚛𝚌.𝚛𝚘𝚠𝚜\] |
| interpolation | 插值方法(參見 cv.cann.InterpolationFlags) |
| 流 | AscendStream 用於非同步版本。 |
| void cv::cann::rotate | ( | const AscendMat & | src, |
| AscendMat & | dst, | ||
| int | rotateMode, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::rotate | ( | InputArray | src, |
| OutputArray | dst, | ||
| int | rotateCode, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
以90度為倍數旋轉二維陣列。函式 cv::rotate 以三種不同的方式旋轉陣列:順時針旋轉90度 (rotateCode = ROTATE_90_CLOCKWISE)。順時針旋轉180度 (rotateCode = ROTATE_180)。順時針旋轉270度 (rotateCode = ROTATE_90_COUNTERCLOCKWISE)。
| src | 輸入陣列。 |
| dst | 與 src 型別相同的輸出陣列。對於 ROTATE_180,大小不變;對於 ROTATE_90_CLOCKWISE 和 ROTATE_90_COUNTERCLOCKWISE,行和列會互換。 |
| rotateCode | 一個列舉,用於指定如何旋轉陣列;參見列舉 RotateFlags |
| 流 | AscendStream 用於非同步版本。 |
| void cv::cann::split | ( | const AscendMat & | src, |
| AscendMat * | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
將多通道矩陣的每個平面複製到一個數組中。
| src | 源矩陣。 |
| dst | 單通道矩陣的目標陣列/向量。 |
| 流 | AscendStream 用於非同步版本。 |
| void cv::cann::split | ( | const AscendMat & | src, |
| std::vector< AscendMat > & | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::split | ( | const InputArray | src, |
| AscendMat * | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::split | ( | const InputArray | src, |
| std::vector< AscendMat > & | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::transpose | ( | const AscendMat & | src, |
| AscendMat & | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
這是一個過載的成員函式,為方便起見提供。它與上述函式的區別僅在於其接受的引數不同。
| void cv::cann::transpose | ( | InputArray | src, |
| OutputArray | dst, | ||
| AscendStream & | stream = AscendStream::Null() ) |
#include <opencv2/cann_interface.hpp>
轉置矩陣。
| src | 源矩陣。 |
| dst | 目標矩陣。 |
| 流 | AscendStream 用於非同步版本。 |