void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(netInputShape.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("netInputShape is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_netInputShape = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(netInputShape); if (!(weights.Value is OpenCVForUnityPlayMakerActions.LongArray)) { LogError("weights is not initialized. Add Action \"newLongArray\"."); return; } System.Int64[] wrapped_weights = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LongArray, System.Int64[]>(weights); if (!(blobs.Value is OpenCVForUnityPlayMakerActions.LongArray)) { LogError("blobs is not initialized. Add Action \"newLongArray\"."); return; } System.Int64[] wrapped_blobs = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LongArray, System.Int64[]>(blobs); wrapped_owner.getMemoryConsumption(layerId.Value, wrapped_netInputShape, wrapped_weights, wrapped_blobs); }
void DoProcess() { if (!(bboxes.Value is OpenCVForUnityPlayMakerActions.MatOfRect2d)) { LogError("bboxes is not initialized. Add Action \"newMatOfRect2d\"."); return; } OpenCVForUnity.CoreModule.MatOfRect2d wrapped_bboxes = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect2d, OpenCVForUnity.CoreModule.MatOfRect2d>(bboxes); if (!(scores.Value is OpenCVForUnityPlayMakerActions.MatOfFloat)) { LogError("scores is not initialized. Add Action \"newMatOfFloat\"."); return; } OpenCVForUnity.CoreModule.MatOfFloat wrapped_scores = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(scores); if (!(indices.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("indices is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_indices = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(indices); OpenCVForUnity.DnnModule.Dnn.NMSBoxes(wrapped_bboxes, wrapped_scores, score_threshold.Value, nms_threshold.Value, wrapped_indices, eta.Value); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.VideoWriter)) { LogError("owner is not initialized. Add Action \"newVideoWriter\"."); return; } OpenCVForUnity.VideoioModule.VideoWriter wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.VideoWriter, OpenCVForUnity.VideoioModule.VideoWriter>(owner); if (!(frameSize.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("frameSize is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_frameSize = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(frameSize); if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); storeResult.Value = wrapped_owner.open(filename.Value, apiPreference.Value, fourcc.Value, (float)fps.Value, wrapped_frameSize, wrapped__params); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.CascadeClassifier)) { LogError("owner is not initialized. Add Action \"newCascadeClassifier\"."); return; } OpenCVForUnity.ObjdetectModule.CascadeClassifier wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.CascadeClassifier, OpenCVForUnity.ObjdetectModule.CascadeClassifier>(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 (!(objects.Value is OpenCVForUnityPlayMakerActions.MatOfRect)) { LogError("objects is not initialized. Add Action \"newMatOfRect\"."); return; } OpenCVForUnity.CoreModule.MatOfRect wrapped_objects = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect, OpenCVForUnity.CoreModule.MatOfRect>(objects); if (!(numDetections.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("numDetections is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_numDetections = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(numDetections); wrapped_owner.detectMultiScale2(wrapped_image, wrapped_objects, wrapped_numDetections); }
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.VideoWriter)) { LogError("owner is not initialized. Add Action \"newVideoWriter\"."); return; } OpenCVForUnity.VideoioModule.VideoWriter wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.VideoWriter, OpenCVForUnity.VideoioModule.VideoWriter>(owner); if (!(fps.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("fps is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_fps = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(fps); if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); storeResult.Value = wrapped_owner.open(filename.Value, fourcc.Value, wrapped_fps, new OpenCVForUnity.CoreModule.Size((double)frameSize_width.Value, (double)frameSize_height.Value), wrapped__params); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }
void DoProcess() { if (!(src.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("src is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_src = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(src); if (!(order.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("order is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_order = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(order); if (!(dst.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("dst is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_dst = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(dst); OpenCVForUnity.CoreModule.Core.transposeND(wrapped_src, wrapped_order, wrapped_dst); }
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 (!(buf.Value is OpenCVForUnityPlayMakerActions.MatOfByte)) { LogError("buf is not initialized. Add Action \"newMatOfByte\"."); return; } OpenCVForUnity.CoreModule.MatOfByte wrapped_buf = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfByte, OpenCVForUnity.CoreModule.MatOfByte>(buf); if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); storeResult.Value = OpenCVForUnity.ImgcodecsModule.Imgcodecs.imencode(ext.Value, wrapped_img, wrapped_buf, wrapped__params); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.CascadeClassifier)) { LogError("owner is not initialized. Add Action \"newCascadeClassifier\"."); return; } OpenCVForUnity.ObjdetectModule.CascadeClassifier wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.CascadeClassifier, OpenCVForUnity.ObjdetectModule.CascadeClassifier>(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 (!(objects.Value is OpenCVForUnityPlayMakerActions.MatOfRect)) { LogError("objects is not initialized. Add Action \"newMatOfRect\"."); return; } OpenCVForUnity.CoreModule.MatOfRect wrapped_objects = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect, OpenCVForUnity.CoreModule.MatOfRect>(objects); if (!(rejectLevels.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("rejectLevels is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_rejectLevels = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(rejectLevels); if (!(levelWeights.Value is OpenCVForUnityPlayMakerActions.MatOfDouble)) { LogError("levelWeights is not initialized. Add Action \"newMatOfDouble\"."); return; } OpenCVForUnity.CoreModule.MatOfDouble wrapped_levelWeights = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDouble, OpenCVForUnity.CoreModule.MatOfDouble>(levelWeights); if (!(scaleFactor.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("scaleFactor is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_scaleFactor = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(scaleFactor); if (!(minSize.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("minSize is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_minSize = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(minSize); if (!(maxSize.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("maxSize is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_maxSize = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(maxSize); wrapped_owner.detectMultiScale3(wrapped_image, wrapped_objects, wrapped_rejectLevels, wrapped_levelWeights, wrapped_scaleFactor, minNeighbors.Value, flags.Value, wrapped_minSize, wrapped_maxSize); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(scales.Value is OpenCVForUnityPlayMakerActions.MatOfFloat)) { LogError("scales is not initialized. Add Action \"newMatOfFloat\"."); return; } OpenCVForUnity.CoreModule.MatOfFloat wrapped_scales = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(scales); if (!(zeropoints.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("zeropoints is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_zeropoints = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(zeropoints); wrapped_owner.getInputDetails(wrapped_scales, wrapped_zeropoints); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D)) { LogError("owner is not initialized. Add Action \"newSubdiv2D\"."); return; } OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner); if (!(idx.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("idx is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_idx = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(idx); List <OpenCVForUnity.CoreModule.MatOfPoint2f> wrapped_facetList = new List <OpenCVForUnity.CoreModule.MatOfPoint2f>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.MatOfPoint2f, OpenCVForUnity.CoreModule.MatOfPoint2f>(facetList, wrapped_facetList); if (!(facetCenters.Value is OpenCVForUnityPlayMakerActions.MatOfPoint2f)) { LogError("facetCenters is not initialized. Add Action \"newMatOfPoint2f\"."); return; } OpenCVForUnity.CoreModule.MatOfPoint2f wrapped_facetCenters = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint2f, OpenCVForUnity.CoreModule.MatOfPoint2f>(facetCenters); wrapped_owner.getVoronoiFacetList(wrapped_idx, wrapped_facetList, wrapped_facetCenters); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.MatOfPoint2f, OpenCVForUnityPlayMakerActions.MatOfPoint2f>(wrapped_facetList, facetList); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.CascadeClassifier)) { LogError("owner is not initialized. Add Action \"newCascadeClassifier\"."); return; } OpenCVForUnity.ObjdetectModule.CascadeClassifier wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.CascadeClassifier, OpenCVForUnity.ObjdetectModule.CascadeClassifier>(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 (!(objects.Value is OpenCVForUnityPlayMakerActions.MatOfRect)) { LogError("objects is not initialized. Add Action \"newMatOfRect\"."); return; } OpenCVForUnity.CoreModule.MatOfRect wrapped_objects = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect, OpenCVForUnity.CoreModule.MatOfRect>(objects); if (!(numDetections.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("numDetections is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_numDetections = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(numDetections); wrapped_owner.detectMultiScale2(wrapped_image, wrapped_objects, wrapped_numDetections, (float)scaleFactor.Value, minNeighbors.Value, flags.Value, new OpenCVForUnity.CoreModule.Size((double)minSize_width.Value, (double)minSize_height.Value), new OpenCVForUnity.CoreModule.Size((double)maxSize_width.Value, (double)maxSize_height.Value)); }
void DoProcess() { if (!(radiusList.Value is OpenCVForUnityPlayMakerActions.MatOfFloat)) { LogError("radiusList is not initialized. Add Action \"newMatOfFloat\"."); return; } OpenCVForUnity.CoreModule.MatOfFloat wrapped_radiusList = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(radiusList); if (!(numberList.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("numberList is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_numberList = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(numberList); if (!(indexChange.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("indexChange is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_indexChange = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(indexChange); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.BRISK)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.BRISK(); } ((OpenCVForUnityPlayMakerActions.BRISK)storeResult.Value).wrappedObject = OpenCVForUnity.Features2dModule.BRISK.create(thresh.Value, octaves.Value, wrapped_radiusList, wrapped_numberList, dMax.Value, dMin.Value, wrapped_indexChange); }
void DoProcess() { if (!(fps.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("fps is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_fps = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(fps); if (!(frameSize.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("frameSize is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_frameSize = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(frameSize); if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.VideoWriter)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.VideoWriter(); } ((OpenCVForUnityPlayMakerActions.VideoWriter)storeResult.Value).wrappedObject = new OpenCVForUnity.VideoioModule.VideoWriter(filename.Value, apiPreference.Value, fourcc.Value, wrapped_fps, wrapped_frameSize, wrapped__params); }
void DoProcess() { if (!(rectList.Value is OpenCVForUnityPlayMakerActions.MatOfRect)) { LogError("rectList is not initialized. Add Action \"newMatOfRect\"."); return; } OpenCVForUnity.CoreModule.MatOfRect wrapped_rectList = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect, OpenCVForUnity.CoreModule.MatOfRect>(rectList); if (!(weights.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("weights is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_weights = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(weights); if (!(eps.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("eps is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_eps = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(eps); OpenCVForUnity.ObjdetectModule.Objdetect.groupRectangles(wrapped_rectList, wrapped_weights, groupThreshold.Value, wrapped_eps); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("owner is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(owner); wrapped_owner.alloc(elemNumber.Value); }
void DoProcess() { if (!(selectedPairs.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("selectedPairs is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_selectedPairs = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(selectedPairs); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.FREAK)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.FREAK(); } ((OpenCVForUnityPlayMakerActions.FREAK)storeResult.Value).wrappedObject = OpenCVForUnity.Xfeatures2dModule.FREAK.create(orientationNormalized.Value, scaleNormalized.Value, patternScale.Value, nOctaves.Value, wrapped_selectedPairs); }
void DoProcess() { if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.VideoCapture)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.VideoCapture(); } ((OpenCVForUnityPlayMakerActions.VideoCapture)storeResult.Value).wrappedObject = new OpenCVForUnity.VideoioModule.VideoCapture(index.Value, apiPreference.Value, wrapped__params); }
void DoProcess() { if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.VideoWriter)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.VideoWriter(); } ((OpenCVForUnityPlayMakerActions.VideoWriter)storeResult.Value).wrappedObject = new OpenCVForUnity.VideoioModule.VideoWriter(filename.Value, apiPreference.Value, fourcc.Value, (float)fps.Value, new OpenCVForUnity.CoreModule.Size((double)frameSize_width.Value, (double)frameSize_height.Value), wrapped__params); }
void DoProcess() { List <OpenCVForUnity.CoreModule.Mat> wrapped_images = new List <OpenCVForUnity.CoreModule.Mat>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(images, wrapped_images); if (!(channels.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("channels is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_channels = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(channels); 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); if (!(hist.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("hist is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_hist = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(hist); if (!(histSize.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("histSize is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_histSize = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(histSize); if (!(ranges.Value is OpenCVForUnityPlayMakerActions.MatOfFloat)) { LogError("ranges is not initialized. Add Action \"newMatOfFloat\"."); return; } OpenCVForUnity.CoreModule.MatOfFloat wrapped_ranges = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(ranges); OpenCVForUnity.ImgprocModule.Imgproc.calcHist(wrapped_images, wrapped_channels, wrapped_mask, wrapped_hist, wrapped_histSize, wrapped_ranges, accumulate.Value); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_images, images); }
void DoProcess() { List <OpenCVForUnity.CoreModule.Mat> wrapped_images = new List <OpenCVForUnity.CoreModule.Mat>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(images, wrapped_images); if (!(channels.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("channels is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_channels = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(channels); if (!(hist.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("hist is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_hist = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(hist); if (!(dst.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("dst is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_dst = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(dst); if (!(ranges.Value is OpenCVForUnityPlayMakerActions.MatOfFloat)) { LogError("ranges is not initialized. Add Action \"newMatOfFloat\"."); return; } OpenCVForUnity.CoreModule.MatOfFloat wrapped_ranges = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(ranges); if (!(scale.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("scale is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_scale = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(scale); OpenCVForUnity.ImgprocModule.Imgproc.calcBackProject(wrapped_images, wrapped_channels, wrapped_hist, wrapped_dst, wrapped_ranges, wrapped_scale); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_images, images); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(shape.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("shape is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_shape = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(shape); wrapped_owner.setInputShape(inputName.Value, wrapped_shape); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.PCTSignatures)) { LogError("owner is not initialized. Add Action \"newPCTSignatures\"."); return; } OpenCVForUnity.Xfeatures2dModule.PCTSignatures wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.PCTSignatures, OpenCVForUnity.Xfeatures2dModule.PCTSignatures>(owner); if (!(initSeedIndexes.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("initSeedIndexes is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_initSeedIndexes = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(initSeedIndexes); wrapped_owner.setInitSeedIndexes(wrapped_initSeedIndexes); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D)) { LogError("owner is not initialized. Add Action \"newSubdiv2D\"."); return; } OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner); if (!(leadingEdgeList.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("leadingEdgeList is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_leadingEdgeList = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(leadingEdgeList); wrapped_owner.getLeadingEdgeList(wrapped_leadingEdgeList); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Board)) { LogError("owner is not initialized. Add Action \"newBoard\"."); return; } OpenCVForUnity.ArucoModule.Board wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Board, OpenCVForUnity.ArucoModule.Board>(owner); if (!(ids.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("ids is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_ids = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(ids); wrapped_owner.set_ids(wrapped_ids); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(netInputShape.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("netInputShape is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_netInputShape = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(netInputShape); storeResult.Value = (int)wrapped_owner.getFLOPS(wrapped_netInputShape); }
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() { List <OpenCVForUnity.CoreModule.Mat> wrapped_img = new List <OpenCVForUnity.CoreModule.Mat>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img, wrapped_img); if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); storeResult.Value = OpenCVForUnity.ImgcodecsModule.Imgcodecs.imwritemulti(filename.Value, wrapped_img, wrapped__params); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_img, img); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("owner is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(owner); int[] int_lb = lb.intValues; List <int> wrapped_lb = new List <int>(int_lb); wrapped_owner.fromList(wrapped_lb); for (int i = 0; i < wrapped_lb.Count; i++) { lb.Set(i, (int)wrapped_lb[i]); } lb.SaveChanges(); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.VideoCapture)) { LogError("owner is not initialized. Add Action \"newVideoCapture\"."); return; } OpenCVForUnity.VideoioModule.VideoCapture wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.VideoCapture, OpenCVForUnity.VideoioModule.VideoCapture>(owner); if (!(_params.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("_params is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped__params = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(_params); storeResult.Value = wrapped_owner.open(index.Value, apiPreference.Value, wrapped__params); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }