void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.HOGDescriptor)) { LogError("owner is not initialized. Add Action \"newHOGDescriptor\"."); return; } OpenCVForUnity.ObjdetectModule.HOGDescriptor wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.HOGDescriptor, OpenCVForUnity.ObjdetectModule.HOGDescriptor>(owner); if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); if (!(foundLocations.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("foundLocations is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_foundLocations = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(foundLocations); if (!(weights.Value is OpenCVForUnityPlayMakerActions.MatOfDouble)) { LogError("weights is not initialized. Add Action \"newMatOfDouble\"."); return; } OpenCVForUnity.CoreModule.MatOfDouble wrapped_weights = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDouble, OpenCVForUnity.CoreModule.MatOfDouble>(weights); if (!(hitThreshold.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("hitThreshold is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_hitThreshold = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(hitThreshold); if (!(winStride.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("winStride is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_winStride = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(winStride); if (!(padding.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("padding is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_padding = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(padding); if (!(searchLocations.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("searchLocations is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_searchLocations = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(searchLocations); wrapped_owner.detect(wrapped_img, wrapped_foundLocations, wrapped_weights, wrapped_hitThreshold, wrapped_winStride, wrapped_padding, wrapped_searchLocations); }
void DoProcess() { if (!(contour.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("contour is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_contour = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(contour); if (!(convexhull.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("convexhull is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_convexhull = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(convexhull); if (!(convexityDefects.Value is OpenCVForUnityPlayMakerActions.MatOfInt4)) { LogError("convexityDefects is not initialized. Add Action \"newMatOfInt4\"."); return; } OpenCVForUnity.CoreModule.MatOfInt4 wrapped_convexityDefects = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt4, OpenCVForUnity.CoreModule.MatOfInt4>(convexityDefects); OpenCVForUnity.ImgprocModule.Imgproc.convexityDefects(wrapped_contour, wrapped_convexhull, wrapped_convexityDefects); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.HOGDescriptor)) { LogError("owner is not initialized. Add Action \"newHOGDescriptor\"."); return; } OpenCVForUnity.ObjdetectModule.HOGDescriptor wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.HOGDescriptor, OpenCVForUnity.ObjdetectModule.HOGDescriptor>(owner); if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); if (!(descriptors.Value is OpenCVForUnityPlayMakerActions.MatOfFloat)) { LogError("descriptors is not initialized. Add Action \"newMatOfFloat\"."); return; } OpenCVForUnity.CoreModule.MatOfFloat wrapped_descriptors = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(descriptors); if (!(locations.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("locations is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_locations = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(locations); wrapped_owner.compute(wrapped_img, wrapped_descriptors, new OpenCVForUnity.CoreModule.Size((double)winStride_width.Value, (double)winStride_height.Value), new OpenCVForUnity.CoreModule.Size((double)padding_width.Value, (double)padding_height.Value), wrapped_locations); }
void DoProcess() { if (!(center.Value is OpenCVForUnityPlayMakerActions.Point)) { LogError("center is not initialized. Add Action \"newPoint\"."); return; } OpenCVForUnity.CoreModule.Point wrapped_center = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(center); if (!(axes.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("axes is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_axes = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(axes); if (!(pts.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("pts is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_pts = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(pts); OpenCVForUnity.ImgprocModule.Imgproc.ellipse2Poly(wrapped_center, wrapped_axes, angle.Value, arcStart.Value, arcEnd.Value, delta.Value, wrapped_pts); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.HOGDescriptor)) { LogError("owner is not initialized. Add Action \"newHOGDescriptor\"."); return; } OpenCVForUnity.ObjdetectModule.HOGDescriptor wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.HOGDescriptor, OpenCVForUnity.ObjdetectModule.HOGDescriptor>(owner); if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); if (!(foundLocations.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("foundLocations is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_foundLocations = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(foundLocations); if (!(weights.Value is OpenCVForUnityPlayMakerActions.MatOfDouble)) { LogError("weights is not initialized. Add Action \"newMatOfDouble\"."); return; } OpenCVForUnity.CoreModule.MatOfDouble wrapped_weights = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDouble, OpenCVForUnity.CoreModule.MatOfDouble>(weights); wrapped_owner.detect(wrapped_img, wrapped_foundLocations, wrapped_weights); }
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 (!(corners.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("corners is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_corners = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(corners); if (!(mask.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("mask is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_mask = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(mask); OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack(wrapped_image, wrapped_corners, maxCorners.Value, (float)qualityLevel.Value, (float)minDistance.Value, wrapped_mask); }
void DoProcess() { if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); if (!(points.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("points is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_points = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(points); 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.ImgprocModule.Imgproc.fillConvexPoly(wrapped_img, wrapped_points, wrapped_color, lineType.Value); }
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 (!(corners.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("corners is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_corners = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(corners); if (!(qualityLevel.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("qualityLevel is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_qualityLevel = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(qualityLevel); if (!(minDistance.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("minDistance is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_minDistance = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(minDistance); OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack(wrapped_image, wrapped_corners, maxCorners.Value, wrapped_qualityLevel, wrapped_minDistance); }
void DoProcess() { if (!(pts.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("pts is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_pts = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(pts); OpenCVForUnity.ImgprocModule.Imgproc.ellipse2Poly(new OpenCVForUnity.CoreModule.Point((double)center_x.Value, (double)center_y.Value), new OpenCVForUnity.CoreModule.Size((double)axes_width.Value, (double)axes_height.Value), angle.Value, arcStart.Value, arcEnd.Value, delta.Value, wrapped_pts); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("owner is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(owner); wrapped_owner.alloc(elemNumber.Value); }
void DoProcess() { if (!(contour.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("contour is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_contour = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(contour); storeResult.Value = OpenCVForUnity.ImgprocModule.Imgproc.isContourConvex(wrapped_contour); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("owner is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(owner); List <OpenCVForUnity.CoreModule.Point> wrapped_storeResult = wrapped_owner.toList(); if (!storeResult.IsNone) { OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Point, OpenCVForUnityPlayMakerActions.Point>(wrapped_storeResult, storeResult); } }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("owner is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(owner); OpenCVForUnity.CoreModule.Point[] wrapped_a = new OpenCVForUnity.CoreModule.Point[a.Length]; OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToArray <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(a, wrapped_a); wrapped_owner.fromArray(wrapped_a); OpenCVForUnityPlayMakerActionsUtils.ConvertArrayToFsmArray <OpenCVForUnity.CoreModule.Point, OpenCVForUnityPlayMakerActions.Point>(wrapped_a, a); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("owner is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(owner); List <OpenCVForUnity.CoreModule.Point> wrapped_lp = new List <OpenCVForUnity.CoreModule.Point>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(lp, wrapped_lp); wrapped_owner.fromList(wrapped_lp); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Point, OpenCVForUnityPlayMakerActions.Point>(wrapped_lp, lp); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.HOGDescriptor)) { LogError("owner is not initialized. Add Action \"newHOGDescriptor\"."); return; } OpenCVForUnity.ObjdetectModule.HOGDescriptor wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.HOGDescriptor, OpenCVForUnity.ObjdetectModule.HOGDescriptor>(owner); if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); if (!(descriptors.Value is OpenCVForUnityPlayMakerActions.MatOfFloat)) { LogError("descriptors is not initialized. Add Action \"newMatOfFloat\"."); return; } OpenCVForUnity.CoreModule.MatOfFloat wrapped_descriptors = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(descriptors); if (!(winStride.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("winStride is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_winStride = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(winStride); if (!(padding.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("padding is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_padding = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(padding); if (!(locations.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("locations is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_locations = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(locations); wrapped_owner.compute(wrapped_img, wrapped_descriptors, wrapped_winStride, wrapped_padding, wrapped_locations); }
void DoProcess() { if (!(points.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("points is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_points = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(points); if (!(hull.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("hull is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_hull = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(hull); OpenCVForUnity.ImgprocModule.Imgproc.convexHull(wrapped_points, wrapped_hull, clockwise.Value); }
void DoProcess() { if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); if (!(points.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("points is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_points = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(points); OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly(wrapped_img, wrapped_points, new OpenCVForUnity.CoreModule.Scalar((double)color_v0.Value, (double)color_v1.Value, (double)color_v2.Value, (double)color_v3.Value)); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.HOGDescriptor)) { LogError("owner is not initialized. Add Action \"newHOGDescriptor\"."); return; } OpenCVForUnity.ObjdetectModule.HOGDescriptor wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.HOGDescriptor, OpenCVForUnity.ObjdetectModule.HOGDescriptor>(owner); if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); if (!(foundLocations.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("foundLocations is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_foundLocations = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(foundLocations); if (!(weights.Value is OpenCVForUnityPlayMakerActions.MatOfDouble)) { LogError("weights is not initialized. Add Action \"newMatOfDouble\"."); return; } OpenCVForUnity.CoreModule.MatOfDouble wrapped_weights = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDouble, OpenCVForUnity.CoreModule.MatOfDouble>(weights); if (!(searchLocations.Value is OpenCVForUnityPlayMakerActions.MatOfPoint)) { LogError("searchLocations is not initialized. Add Action \"newMatOfPoint\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint wrapped_searchLocations = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint, OpenCVForUnity.CoreModule.MatOfPoint>(searchLocations); wrapped_owner.detect(wrapped_img, wrapped_foundLocations, wrapped_weights, (float)hitThreshold.Value, new OpenCVForUnity.CoreModule.Size((double)winStride_width.Value, (double)winStride_height.Value), new OpenCVForUnity.CoreModule.Size((double)padding_width.Value, (double)padding_height.Value), wrapped_searchLocations); }
public MatOfPoint(OpenCVForUnity.CoreModule.MatOfPoint nativeObj) : base(nativeObj) { }