예제 #1
0
        //
        // C++:  Ptr_Layer cv::dnn::Net::getLayer(LayerId layerId)
        //

        /**
         * Returns pointer to layer with specified id or name which the network use.
         * param layerId automatically generated
         * return automatically generated
         */
        public Layer getLayer(DictValue layerId)
        {
            ThrowIfDisposed();
            if (layerId != null)
            {
                layerId.ThrowIfDisposed();
            }

            return(Layer.__fromPtr__(dnn_Net_getLayer_10(nativeObj, layerId.getNativeObjAddr())));
        }
예제 #2
0
        /**
         * Returns parameter blob of the layer.
         * param layer name or id of the layer.
         * SEE: Layer::blobs
         * return automatically generated
         */
        public Mat getParam(DictValue layer)
        {
            ThrowIfDisposed();
            if (layer != null)
            {
                layer.ThrowIfDisposed();
            }

            return(new Mat(dnn_Net_getParam_11(nativeObj, layer.getNativeObjAddr())));
        }
예제 #3
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DictValue))
            {
                LogError("owner is not initialized. Add Action \"newDictValue\".");
                return;
            }
            OpenCVForUnity.DnnModule.DictValue wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DictValue, OpenCVForUnity.DnnModule.DictValue>(owner);

            storeResult.Value = wrapped_owner.getStringValue(idx.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DictValue))
            {
                LogError("owner is not initialized. Add Action \"newDictValue\".");
                return;
            }
            OpenCVForUnity.DnnModule.DictValue wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DictValue, OpenCVForUnity.DnnModule.DictValue>(owner);

            storeResult.Value = wrapped_owner.isInt();

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
예제 #5
0
        //
        // C++:  void cv::dnn::Net::setParam(LayerId layer, int numParam, Mat blob)
        //

        /**
         * Sets the new value for the learned param of the layer.
         * param layer name or id of the layer.
         * param numParam index of the layer parameter in the Layer::blobs array.
         * param blob the new value.
         * SEE: Layer::blobs
         * <b>Note:</b> If shape of the new blob differs from the previous shape,
         * then the following forward pass may fail.
         */
        public void setParam(DictValue layer, int numParam, Mat blob)
        {
            ThrowIfDisposed();
            if (layer != null)
            {
                layer.ThrowIfDisposed();
            }
            if (blob != null)
            {
                blob.ThrowIfDisposed();
            }

            dnn_Net_setParam_10(nativeObj, layer.getNativeObjAddr(), numParam, blob.nativeObj);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DictValue))
            {
                LogError("owner is not initialized. Add Action \"newDictValue\".");
                return;
            }
            OpenCVForUnity.DnnModule.DictValue wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DictValue, OpenCVForUnity.DnnModule.DictValue>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Double))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Double();
            }
            ((OpenCVForUnityPlayMakerActions.Double)storeResult.Value).wrappedObject = wrapped_owner.getRealValue();
        }
예제 #7
0
        //
        // C++:  Ptr_Layer cv::dnn::Net::getLayer(LayerId layerId)
        //

        //javadoc: Net::getLayer(layerId)
        public Layer getLayer(DictValue layerId)
        {
            ThrowIfDisposed();
            if (layerId != null)
            {
                layerId.ThrowIfDisposed();
            }
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            Layer retVal = Layer.__fromPtr__(dnn_Net_getLayer_10(nativeObj, layerId.getNativeObjAddr()));

            return(retVal);
#else
            return(null);
#endif
        }
예제 #8
0
        //javadoc: Net::getParam(layer)
        public Mat getParam(DictValue layer)
        {
            ThrowIfDisposed();
            if (layer != null)
            {
                layer.ThrowIfDisposed();
            }
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            Mat retVal = new Mat(dnn_Net_getParam_11(nativeObj, layer.getNativeObjAddr()));

            return(retVal);
#else
            return(null);
#endif
        }
예제 #9
0
        //
        // C++:  void cv::dnn::Net::setParam(LayerId layer, int numParam, Mat blob)
        //

        //javadoc: Net::setParam(layer, numParam, blob)
        public void setParam(DictValue layer, int numParam, Mat blob)
        {
            ThrowIfDisposed();
            if (layer != null)
            {
                layer.ThrowIfDisposed();
            }
            if (blob != null)
            {
                blob.ThrowIfDisposed();
            }
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            dnn_Net_setParam_10(nativeObj, layer.getNativeObjAddr(), numParam, blob.nativeObj);

            return;
#else
            return;
#endif
        }
 public DictValue(OpenCVForUnity.DnnModule.DictValue nativeObj) : base(nativeObj)
 {
 }