stitching_FeaturesMatcher_apply2

[32/64bit] stitching_FeaturesMatcher_apply2

stitching_FeaturesMatcher_apply2 p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11

p1 = sptr : IntPtr obj
p2 = var : WImageFeatures[] features
p3 = int : int featuresSize
p4 = sptr : IntPtr mask
p5 = sptr : IntPtr outSrcImgIdx
p6 = sptr : IntPtr outDstImgIdx
p7 = sptr : IntPtr outMatches
p8 = sptr : IntPtr outInliersMask
p9 = sptr : IntPtr outNumInliers
p10 = sptr : IntPtr outH
p11 = sptr : IntPtr outConfidence

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

解説

元関数名(C#): stitching_FeaturesMatcher_apply2
元DLLエクスポート名: stitching_FeaturesMatcher_apply2
参照元CSファイル: Internal\PInvoke\NativeMethods\stitching\NativeMethods_stitching_Matchers.cs
▼ C言語側関数定義
CVAPI(ExceptionStatus) stitching_FeaturesMatcher_apply2(
    cv::detail::FeaturesMatcher* obj,
    detail_ImageFeatures* features, int featuresSize,
    cv::Mat *mask,
    std::vector<int> *out_src_img_idx,
    std::vector<int> *out_dst_img_idx,
    std::vector< std::vector<cv::DMatch> > *out_matches,
    std::vector< std::vector<uchar> > *out_inliers_mask,
    std::vector<int> *out_num_inliers,
    std::vector<cv::Mat> *out_H,
    std::vector<double> *out_confidence)
{
    BEGIN_WRAP
    std::vector<cv::detail::ImageFeatures> featuresVec(featuresSize);
    for (int i = 0; i < featuresSize; i++)
    {
        cv::detail::ImageFeatures featuresCpp {
            features[i].img_idx,
            cpp(features[i].img_size),
            *features[i].keypoints,
            cv::UMat() };
        features[i].descriptors->copyTo(featuresCpp.descriptors);
        featuresVec.push_back(featuresCpp);
    }

    cv::UMat maskU;
    if (mask != nullptr)
    {
        mask->copyTo(maskU);
    }

    std::vector<cv::detail::MatchesInfo> pairwise_matches;
    (*obj)(featuresVec, pairwise_matches, maskU);

    out_src_img_idx->reserve(pairwise_matches.size());
    out_dst_img_idx->reserve(pairwise_matches.size());
    out_matches->reserve(pairwise_matches.size());
    out_inliers_mask->reserve(pairwise_matches.size());
    out_num_inliers->reserve(pairwise_matches.size());
    out_H->reserve(pairwise_matches.size());
    out_confidence->reserve(pairwise_matches.size());
    for (const auto &m : pairwise_matches)
    {
        out_src_img_idx->push_back(m.src_img_idx);
        out_dst_img_idx->push_back(m.dst_img_idx);
        out_num_inliers->push_back(m.num_inliers);
        out_matches->push_back(m.matches);
        out_inliers_mask->push_back(m.inliers_mask);
        out_H->push_back(m.H);
        out_confidence->push_back(m.confidence);
    }

    END_WRAP
}

情報

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