imgproc_fitLine_Point

[32/64bit] 2Dまたは3Dのポイントセットに直線をフィットさせます。

imgproc_fitLine_Point p1,p2,p3,p4,p5,p6,p7

p1 = var : Point[] points
p2 = int : int pointsLength
p3 = var : [In, Out] float[] line
p4 = int : int distType
p5 = double : double param
p6 = double : double reps
p7 = double : double aeps

(プラグイン / モジュール : OpenCvSharpExtern.dll)

解説

関数 fitLine は、2D または 3D の点群に直線をフィットさせるために、\(r_i\)を最小化します。 ここで、\(r_i\)は、点と直線との距離であり、\(rho(r)\)は、距離関数であり、次のいずれかです。


\rho (r) = r^2/2 \\{(the simplest and the fast least-squares method)}\]である。








DIST_L1


\rho (r) = r\








DIST_L12


\Rho (r) = 2 ????? ( ????? )








DIST_FAIR


\DIST_FAIR] DIST_FAIR- (1 + ???д???)\♪♪♪♪♪♪♪)\Here's nothing!\C=1.3998\]の








DIST_WELSCH


\♪♪♪♪♪♪~\♪♪♪♪♪♪♪~\♪♪~C=2.9846\\]








DIST_HUBER


\Rho (r) = R^2/2}{if uriosity(r < C\)}{C cdot (r-C/2)}{otherwise}\\\\\このアルゴリズムは、M-estimator( http://en.wikipedia.org/wiki/M-estimator )という手法に基づいており、重み付き最小二乗法を用いて繰り返し直線をフィットさせます。反復後の重みは、反比例するように調整されています(w_i\)。

元関数名(C#): imgproc_fitLine_Point
元DLLエクスポート名: imgproc_fitLine_Point
参照元CSファイル: Internal\PInvoke\NativeMethods\imgproc\NativeMethods_imgproc.cs
▼ C言語側関数定義
CVAPI(ExceptionStatus) imgproc_fitLine_Point(cv::Point *points, int pointsLength, float *line, int distType,
                                  double param, double reps, double aeps)
{
    BEGIN_WRAP
    const cv::Mat_<cv::Point> pointsVec(pointsLength, 1, points);
    cv::Mat_<float> lineVec(4, 1, line);
    cv::fitLine(pointsVec, lineVec, distType, param, reps, aeps);
    END_WRAP
}

情報

プラグイン / モジュールOpenCvSharpExtern.dll
バージョン1.00
作成日2021/11/30
著作者inovia
URLhttps://hsp.moe/
備考#include "OpenCvSharpExtern32.as"
#include "OpenCvSharpExtern64.as"
使用するHSPランタイムのビット数に合わせたインクルードファイルを使用すること
タイプOpenCVSharpラッパーDLL
グループNativeMethods_imgproc
対応環境
  • Windows 版 HSP
hs ファイルhsphelp\OpenCvSharpExtern.hs