![]() |
OpenCV 4.12.0
開源計算機視覺
|
列舉 | |
| 列舉 | cv::cuda::MomentsOrder { cv::cuda::FIRST_ORDER_MOMENTS = 1 , cv::cuda::SECOND_ORDER_MOMENTS = 2 , cv::cuda::THIRD_ORDER_MOMENTS = 3 } |
| 影像矩的階數。 更多... | |
函式 | |
| Moments | cv::cuda::convertSpatialMoments (Mat spatialMoments, const MomentsOrder order, const int momentsType) |
| 將從 cuda::spatialMoments 返回的空間影像矩轉換為 cv::Moments。 | |
| Moments | cv::cuda::moments (InputArray src, const bool binaryImage=false, const MomentsOrder order=MomentsOrder::THIRD_ORDER_MOMENTS, const int momentsType=CV_64F) |
| 計算柵格化形狀的最高三階矩。 | |
| int | cv::cuda::numMoments (const MomentsOrder order) |
| 返回小於或等於最大影像矩 order 的影像矩數量。 | |
| void | cv::cuda::spatialMoments (InputArray src, OutputArray moments, const bool binaryImage=false, const MomentsOrder order=MomentsOrder::THIRD_ORDER_MOMENTS, const int momentsType=CV_64F, Stream &stream=Stream::Null()) |
| 計算柵格化形狀的最高三階空間矩。 | |
#include <opencv2/cudaimgproc.hpp>
影像矩的階數。
| FIRST_ORDER_MOMENTS | 一階矩 |
| SECOND_ORDER_MOMENTS | 二階矩。 |
| THIRD_ORDER_MOMENTS | 三階矩。 |
| 列舉器 | |
|---|---|
| FIRST_ORDER_MOMENTS | |
| SECOND_ORDER_MOMENTS | |
| THIRD_ORDER_MOMENTS | |
| Moments cv::cuda::convertSpatialMoments | ( | Mat | spatialMoments, |
| const MomentsOrder | order, | ||
| const int | momentsType ) |
#include <opencv2/cudaimgproc.hpp>
將從 cuda::spatialMoments 返回的空間影像矩轉換為 cv::Moments。
| spatialMoments | 從 cuda::spatialMoments 返回的空間矩。 |
| order | 使用 cuda::spatialMoments 計算影像矩時使用的階數。 |
| momentsType | 使用 cuda::spatialMoments 計算影像矩時使用的精度。 |
| Moments cv::cuda::moments | ( | InputArray | src, |
| const bool | binaryImage = false, | ||
| const MomentsOrder | order = MomentsOrder::THIRD_ORDER_MOMENTS, | ||
| const int | momentsType = CV_64F ) |
#include <opencv2/cudaimgproc.hpp>
計算柵格化形狀的最高三階矩。
此函式計算柵格化形狀的最高三階矩。結果在結構體 cv::Moments 中返回。
| src | 柵格影像(單通道2D陣列)。 |
| binaryImage | 如果為真,所有非零影像畫素都視為1。 |
| order | 要計算的最大矩的階數,較低階矩需要較少計算量。 |
| momentsType | 計算矩時使用的精度。可用型別為 CV_32F 和 CV_64F,其中 CV_32F 的效能比 CV_64F 高一個數量級。如果影像較小,CV_32F 的精度可以與 CV_64F 相當或非常接近。 |
| int cv::cuda::numMoments | ( | const MomentsOrder | order | ) |
#include <opencv2/cudaimgproc.hpp>
返回小於或等於最大影像矩 order 的影像矩數量。
| order | 要計算的最大矩的階數,較低階矩需要較少計算量。 |
| void cv::cuda::spatialMoments | ( | InputArray | src, |
| OutputArray | moments, | ||
| const bool | binaryImage = false, | ||
| const MomentsOrder | order = MomentsOrder::THIRD_ORDER_MOMENTS, | ||
| const int | momentsType = CV_64F, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaimgproc.hpp>
計算柵格化形狀的最高三階空間矩。
這是 cuda::moments() 的非同步版本,僅計算柵格化形狀的最高三階空間矩(非中心或歸一化矩)。每個矩都作為 1D moments 陣列中的一個列條目返回。
| src | 柵格影像(單通道2D陣列)。 | |
| [輸出] | moments | 一個1D陣列,每個列條目包含一個空間影像矩。 |
| binaryImage | 如果為真,所有非零影像畫素都視為1。 | |
| order | 要計算的最大矩的階數,較低階矩需要較少計算量。 | |
| momentsType | 計算矩時使用的精度。可用型別為 CV_32F 和 CV_64F,其中 CV_32F 的效能比 CV_64F 高一個數量級。如果影像較小,CV_32F 的精度可以與 CV_64F 相當或非常接近。 | |
| 流 | 非同步版本的 Stream。 |
有關示例,請參見 opencv_contrib_source_code/modules/cudaimgproc/test/test_moments.cpp 中的 CUDA_TEST_P(Moments, Async) 測試。