void DoProcess() { List <OpenCVForUnity.CoreModule.Mat> wrapped_objPoints = new List <OpenCVForUnity.CoreModule.Mat>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(objPoints, wrapped_objPoints); if (!(dictionary.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("dictionary is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_dictionary = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(dictionary); if (!(ids.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("ids is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_ids = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(ids); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Board)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.Board(); } ((OpenCVForUnityPlayMakerActions.Board)storeResult.Value).wrappedObject = OpenCVForUnity.ArucoModule.Board.create(wrapped_objPoints, wrapped_dictionary, wrapped_ids); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_objPoints, objPoints); }
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 (!(dictionary.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("dictionary is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_dictionary = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(dictionary); List <OpenCVForUnity.CoreModule.Mat> wrapped_corners = new List <OpenCVForUnity.CoreModule.Mat>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(corners, wrapped_corners); if (!(ids.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("ids is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_ids = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(ids); OpenCVForUnity.ArucoModule.Aruco.detectMarkers(wrapped_image, wrapped_dictionary, wrapped_corners, wrapped_ids); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_corners, corners); }
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); List <OpenCVForUnity.CoreModule.Mat> wrapped_markerCorners = new List <OpenCVForUnity.CoreModule.Mat>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(markerCorners, wrapped_markerCorners); if (!(markerIds.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("markerIds is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_markerIds = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(markerIds); List <OpenCVForUnity.CoreModule.Mat> wrapped_diamondCorners = new List <OpenCVForUnity.CoreModule.Mat>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(diamondCorners, wrapped_diamondCorners); if (!(diamondIds.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("diamondIds is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_diamondIds = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(diamondIds); if (!(cameraMatrix.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("cameraMatrix is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_cameraMatrix = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(cameraMatrix); if (!(distCoeffs.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("distCoeffs is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_distCoeffs = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(distCoeffs); if (!(dictionary.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("dictionary is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_dictionary = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(dictionary); OpenCVForUnity.ArucoModule.Aruco.detectCharucoDiamond(wrapped_image, wrapped_markerCorners, wrapped_markerIds, squareMarkerLengthRate.Value, wrapped_diamondCorners, wrapped_diamondIds, wrapped_cameraMatrix, wrapped_distCoeffs, wrapped_dictionary); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_markerCorners, markerCorners); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_diamondCorners, diamondCorners); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("owner is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(owner); storeResult.Value = wrapped_owner.get_maxCorrectionBits(); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("owner is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(owner); wrapped_owner.set_markerSize(markerSize.Value); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("owner is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(owner); if (!(onlyBits.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("onlyBits is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_onlyBits = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(onlyBits); int[] int_idx = idx.intValues; int[] casted_idx = new int[int_idx.Length]; for (int i = 0; i < casted_idx.Length; i++) { casted_idx[i] = (int)int_idx[i]; } int[] int_rotation = rotation.intValues; int[] casted_rotation = new int[int_rotation.Length]; for (int i = 0; i < casted_rotation.Length; i++) { casted_rotation[i] = (int)int_rotation[i]; } if (!(maxCorrectionRate.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("maxCorrectionRate is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_maxCorrectionRate = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(maxCorrectionRate); storeResult.Value = wrapped_owner.identify(wrapped_onlyBits, casted_idx, casted_rotation, wrapped_maxCorrectionRate); for (int i = 0; i < casted_idx.Length; i++) { idx.Set(i, (int)casted_idx[i]); } idx.SaveChanges(); for (int i = 0; i < casted_rotation.Length; i++) { rotation.Set(i, (int)casted_rotation[i]); } rotation.SaveChanges(); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("owner is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(owner); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Mat)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.Mat(); } ((OpenCVForUnityPlayMakerActions.Mat)storeResult.Value).wrappedObject = wrapped_owner.get_bytesList(); }
void DoProcess() { if (!(dictionary.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("dictionary is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_dictionary = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(dictionary); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.CharucoBoard)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.CharucoBoard(); } ((OpenCVForUnityPlayMakerActions.CharucoBoard)storeResult.Value).wrappedObject = OpenCVForUnity.ArucoModule.CharucoBoard.create(squaresX.Value, squaresY.Value, squareLength.Value, markerLength.Value, wrapped_dictionary); }
void DoProcess() { if (!(baseDictionary.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("baseDictionary is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_baseDictionary = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(baseDictionary); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.Dictionary(); } ((OpenCVForUnityPlayMakerActions.Dictionary)storeResult.Value).wrappedObject = OpenCVForUnity.ArucoModule.Aruco.custom_dictionary_from(nMarkers.Value, markerSize.Value, wrapped_baseDictionary); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("owner is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(owner); if (!(bits.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("bits is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_bits = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(bits); storeResult.Value = wrapped_owner.getDistanceToId(wrapped_bits, id.Value, allRotations.Value); }
void DoProcess() { if (!(dictionary.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("dictionary is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_dictionary = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(dictionary); 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); OpenCVForUnity.ArucoModule.Aruco.drawMarker(wrapped_dictionary, id.Value, sidePixels.Value, wrapped_img); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("owner is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(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); wrapped_owner.drawMarker(id.Value, sidePixels.Value, wrapped__img, borderBits.Value); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Dictionary)) { LogError("owner is not initialized. Add Action \"newDictionary\"."); return; } OpenCVForUnity.ArucoModule.Dictionary wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Dictionary, OpenCVForUnity.ArucoModule.Dictionary>(owner); if (!(bytesList.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("bytesList is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_bytesList = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(bytesList); wrapped_owner.set_bytesList(wrapped_bytesList); }
public Dictionary(OpenCVForUnity.ArucoModule.Dictionary nativeObj) : base(nativeObj) { }