OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
傅立葉描述子

詳細描述

類  cv::ximgproc::ContourFitting
 ContourFitting 演算法類。 ContourFitting 匹配兩個輪廓 \( z_a \) 和 \( z_b \) ,最小化距離。 更多...
 

函式

void cv::ximgproc::contourSampling (InputArray src, OutputArray out, int nbElt)
 輪廓取樣。
 
Ptr< ContourFittingcv::ximgproc::createContourFitting (int ctr=1024, int fd=16)
 建立 ContourFitting 演算法物件
 
void cv::ximgproc::fourierDescriptor (InputArray src, OutputArray dst, int nbElt=-1, int nbFD=-1)
 平面閉合曲線的傅立葉描述子。
 
void cv::ximgproc::transformFD (InputArray src, InputArray t, OutputArray dst, bool fdContour=true)
 變換輪廓
 

函式文件

◆ contourSampling()

void cv::ximgproc::contourSampling ( InputArray src,
OutputArray 輸出3D仿射變換矩陣,尺寸為\(3 \times 4\),形式如下,
int nbElt )
Python
cv.ximgproc.contourSampling(src, nbElt[, out]) -> 輸出3D仿射變換矩陣,尺寸為\(3 \times 4\),形式如下

#include <opencv2/ximgproc/fourier_descriptors.hpp>

輪廓取樣。

引數
src輪廓型別 vector<Point> , vector<Point2f> 或 vector<Point2d>
輸出3D仿射變換矩陣,尺寸為\(3 \times 4\),形式如下CV_64FC2 型別的 Mat,具有 nbElt 行
nbEltout 輪廓中的點數

◆ createContourFitting()

Ptr< ContourFitting > cv::ximgproc::createContourFitting ( int ctr = 1024,
int fd = 16 )
Python
cv.ximgproc.createContourFitting([, ctr[, fd]]) -> retval

#include <opencv2/ximgproc/fourier_descriptors.hpp>

建立 ContourFitting 演算法物件

引數
ctr傅立葉描述子的數量等於重取樣後輪廓點的數量。
fd定義第二個形狀(目標)的輪廓。

◆ fourierDescriptor()

void cv::ximgproc::fourierDescriptor ( InputArray src,
OutputArray dst,
int nbElt = -1,
int nbFD = -1 )
Python
cv.ximgproc.fourierDescriptor(src[, dst[, nbElt[, nbFD]]]) -> dst

#include <opencv2/ximgproc/fourier_descriptors.hpp>

平面閉合曲線的傅立葉描述子。

有關此實現的更多詳細資訊,請參閱 [223]

引數
src輪廓型別 vector<Point> , vector<Point2f> 或 vector<Point2d>
dstCV_64FC2 型別的 Mat,具有 nbElt 行,待驗證
nbEltdst 中的行數,如果 nbElt=-1,則為 getOptimalDFTSize 行
nbFD在 dst 中返回的 FD 數量 dst = [FD(1...nbFD/2) FD(nbFD/2-nbElt+1...:nbElt)]

◆ transformFD()

void cv::ximgproc::transformFD ( InputArray src,
InputArray t,
OutputArray dst,
bool fdContour = true )
Python
cv.ximgproc.transformFD(src, t[, dst[, fdContour]]) -> dst

#include <opencv2/ximgproc/fourier_descriptors.hpp>

變換輪廓

引數
src如果 fd 為 true,則為輪廓或傅立葉描述子
t由 estimateTransformation 給出的變換 Mat
dstCV_64FC2 型別的 Mat,具有 nbElt 行
fdContourtrue src 是傅立葉描述子。fdContour false src 是輪廓