void DoProcess() { if (!(image.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("image is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_image = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(image); if (!(keypoints.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints); if (!(outImage.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("outImage is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_outImage = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(outImage); if (!(color.Value is OpenCVForUnityPlayMakerActions.Scalar)) { LogError("color is not initialized. Add Action \"newScalar\"."); return; } OpenCVForUnity.CoreModule.Scalar wrapped_color = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Scalar, OpenCVForUnity.CoreModule.Scalar>(color); OpenCVForUnity.Features2dModule.Features2d.drawKeypoints(wrapped_image, wrapped_keypoints, wrapped_outImage, wrapped_color, flags.Value); }
void DoProcess() { if (!(keypoints1.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints1 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints1); if (!(keypoints2.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints2 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints2); if (!(matches1to2.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch)) { LogError("matches1to2 is not initialized. Add Action \"newMatOfDMatch\"."); return; } OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matches1to2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches1to2); if (!(matchesGMS.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch)) { LogError("matchesGMS is not initialized. Add Action \"newMatOfDMatch\"."); return; } OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matchesGMS = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matchesGMS); OpenCVForUnity.Xfeatures2dModule.Xfeatures2d.matchGMS(new OpenCVForUnity.CoreModule.Size((double)size1_width.Value, (double)size1_height.Value), new OpenCVForUnity.CoreModule.Size((double)size2_width.Value, (double)size2_height.Value), wrapped_keypoints1, wrapped_keypoints2, wrapped_matches1to2, wrapped_matchesGMS, withRotation.Value, withScale.Value, (float)thresholdFactor.Value); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Feature2D)) { LogError("owner is not initialized. Add Action \"newFeature2D\"."); return; } OpenCVForUnity.Features2dModule.Feature2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Feature2D, OpenCVForUnity.Features2dModule.Feature2D>(owner); if (!(image.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("image is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_image = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(image); if (!(keypoints.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints); if (!(descriptors.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("descriptors is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_descriptors = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(descriptors); wrapped_owner.compute(wrapped_image, wrapped_keypoints, wrapped_descriptors); }
void DoProcess() { if (!(image.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("image is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_image = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(image); if (!(keypoints.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints); if (!(outImage.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("outImage is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_outImage = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(outImage); OpenCVForUnity.Features2dModule.Features2d.drawKeypoints(wrapped_image, wrapped_keypoints, wrapped_outImage, new OpenCVForUnity.CoreModule.Scalar((double)color_v0.Value, (double)color_v1.Value, (double)color_v2.Value, (double)color_v3.Value)); }
void DoProcess() { if (!(img1.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img1 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img1); if (!(keypoints1.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints1 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints1); if (!(img2.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img2 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img2); if (!(keypoints2.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints2 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints2); if (!(matches1to2.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch)) { LogError("matches1to2 is not initialized. Add Action \"newMatOfDMatch\"."); return; } OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matches1to2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches1to2); if (!(outImg.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("outImg is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_outImg = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(outImg); if (!(matchColor.Value is OpenCVForUnityPlayMakerActions.Scalar)) { LogError("matchColor is not initialized. Add Action \"newScalar\"."); return; } OpenCVForUnity.CoreModule.Scalar wrapped_matchColor = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Scalar, OpenCVForUnity.CoreModule.Scalar>(matchColor); if (!(singlePointColor.Value is OpenCVForUnityPlayMakerActions.Scalar)) { LogError("singlePointColor is not initialized. Add Action \"newScalar\"."); return; } OpenCVForUnity.CoreModule.Scalar wrapped_singlePointColor = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Scalar, OpenCVForUnity.CoreModule.Scalar>(singlePointColor); OpenCVForUnity.Features2dModule.Features2d.drawMatches(wrapped_img1, wrapped_keypoints1, wrapped_img2, wrapped_keypoints2, wrapped_matches1to2, wrapped_outImg, wrapped_matchColor, wrapped_singlePointColor); }
void DoProcess() { if (!(img1.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img1 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img1); if (!(keypoints1.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints1 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints1); if (!(img2.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img2 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img2); if (!(keypoints2.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints2 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints2); if (!(matches1to2.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch)) { LogError("matches1to2 is not initialized. Add Action \"newMatOfDMatch\"."); return; } OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matches1to2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches1to2); if (!(outImg.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("outImg is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_outImg = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(outImg); if (!(matchesMask.Value is OpenCVForUnityPlayMakerActions.MatOfByte)) { LogError("matchesMask is not initialized. Add Action \"newMatOfByte\"."); return; } OpenCVForUnity.CoreModule.MatOfByte wrapped_matchesMask = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.MatOfByte, OpenCVForUnity.CoreModule.MatOfByte>(matchesMask); OpenCVForUnity.Features2dModule.Features2d.drawMatches(wrapped_img1, wrapped_keypoints1, wrapped_img2, wrapped_keypoints2, wrapped_matches1to2, wrapped_outImg, new OpenCVForUnity.CoreModule.Scalar((double)matchColor_v0.Value, (double)matchColor_v1.Value, (double)matchColor_v2.Value, (double)matchColor_v3.Value), new OpenCVForUnity.CoreModule.Scalar((double)singlePointColor_v0.Value, (double)singlePointColor_v1.Value, (double)singlePointColor_v2.Value, (double)singlePointColor_v3.Value), wrapped_matchesMask, flags.Value); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("owner is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(owner); wrapped_owner.alloc(elemNumber.Value); }
void DoProcess() { if (!(size1.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("size1 is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_size1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(size1); if (!(size2.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("size2 is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_size2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(size2); if (!(keypoints1.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints1 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints1); if (!(keypoints2.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints2 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints2); if (!(matches1to2.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch)) { LogError("matches1to2 is not initialized. Add Action \"newMatOfDMatch\"."); return; } OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matches1to2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches1to2); if (!(matchesGMS.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch)) { LogError("matchesGMS is not initialized. Add Action \"newMatOfDMatch\"."); return; } OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matchesGMS = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matchesGMS); if (!(thresholdFactor.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("thresholdFactor is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_thresholdFactor = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(thresholdFactor); OpenCVForUnity.Xfeatures2dModule.Xfeatures2d.matchGMS(wrapped_size1, wrapped_size2, wrapped_keypoints1, wrapped_keypoints2, wrapped_matches1to2, wrapped_matchesGMS, withRotation.Value, withScale.Value, wrapped_thresholdFactor); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("owner is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(owner); OpenCVForUnity.CoreModule.KeyPoint[] wrapped_a = new OpenCVForUnity.CoreModule.KeyPoint[a.Length]; OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToArray <OpenCVForUnityPlayMakerActions.KeyPoint, OpenCVForUnity.CoreModule.KeyPoint>(a, wrapped_a); wrapped_owner.fromArray(wrapped_a); OpenCVForUnityPlayMakerActionsUtils.ConvertArrayToFsmArray <OpenCVForUnity.CoreModule.KeyPoint, OpenCVForUnityPlayMakerActions.KeyPoint>(wrapped_a, a); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("owner is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(owner); OpenCVForUnity.CoreModule.KeyPoint[] wrapped_storeResult = wrapped_owner.toArray(); if (!storeResult.IsNone) { OpenCVForUnityPlayMakerActionsUtils.ConvertArrayToFsmArray <OpenCVForUnity.CoreModule.KeyPoint, OpenCVForUnityPlayMakerActions.KeyPoint>(wrapped_storeResult, storeResult); } }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("owner is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(owner); List <OpenCVForUnity.CoreModule.KeyPoint> wrapped_lkp = new List <OpenCVForUnity.CoreModule.KeyPoint>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.KeyPoint, OpenCVForUnity.CoreModule.KeyPoint>(lkp, wrapped_lkp); wrapped_owner.fromList(wrapped_lkp); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.KeyPoint, OpenCVForUnityPlayMakerActions.KeyPoint>(wrapped_lkp, lkp); }
void DoProcess() { if (!(img1.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img1 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img1); if (!(keypoints1.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints1 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints1); if (!(img2.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img2 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img2); if (!(keypoints2.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints2 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints2); List <OpenCVForUnity.CoreModule.MatOfDMatch> wrapped_matches1to2 = new List <OpenCVForUnity.CoreModule.MatOfDMatch>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches1to2, wrapped_matches1to2); if (!(outImg.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("outImg is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_outImg = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(outImg); OpenCVForUnity.Features2dModule.Features2d.drawMatchesKnn(wrapped_img1, wrapped_keypoints1, wrapped_img2, wrapped_keypoints2, wrapped_matches1to2, wrapped_outImg, new OpenCVForUnity.CoreModule.Scalar((double)matchColor_v0.Value, (double)matchColor_v1.Value, (double)matchColor_v2.Value, (double)matchColor_v3.Value), new OpenCVForUnity.CoreModule.Scalar((double)singlePointColor_v0.Value, (double)singlePointColor_v1.Value, (double)singlePointColor_v2.Value, (double)singlePointColor_v3.Value)); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.MatOfDMatch, OpenCVForUnityPlayMakerActions.MatOfDMatch>(wrapped_matches1to2, matches1to2); }
void DoProcess() { if (!(keypoints1.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints1 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints1); if (!(keypoints2.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint)) { LogError("keypoints2 is not initialized. Add Action \"newMatOfKeyPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints2); if (!(nn1.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("nn1 is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_nn1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(nn1); if (!(nn2.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("nn2 is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_nn2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(nn2); if (!(matches1to2.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch)) { LogError("matches1to2 is not initialized. Add Action \"newMatOfDMatch\"."); return; } OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matches1to2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches1to2); OpenCVForUnity.Xfeatures2dModule.Xfeatures2d.matchLOGOS(wrapped_keypoints1, wrapped_keypoints2, wrapped_nn1, wrapped_nn2, wrapped_matches1to2); }
public MatOfKeyPoint(OpenCVForUnity.CoreModule.MatOfKeyPoint nativeObj) : base(nativeObj) { }