コード例 #1
0
        // ConfigurableController methods

        /// <summary>
        /// Checks if <see cref="DetectorParameters"/> is set.
        /// </summary>
        protected override void Configuring()
        {
            base.Configuring();

            DetectorParameters = detectorParametersController.DetectorParameters;
            if (DetectorParameters == null)
            {
                throw new ArgumentNullException("DetectorParameters", "This property needs to be set for the configuration.");
            }
        }
コード例 #2
0
        // MonoBehaviour methods

        /// <summary>
        /// Initializes <see cref="DetectorParameters"/> from editor fields.
        /// </summary>
        protected virtual void Awake()
        {
            DetectorParameters = new Aruco.DetectorParameters();
            DetectorParameters.AdaptiveThreshWinSizeMin      = adaptiveThreshWinSizeMin;
            DetectorParameters.AdaptiveThreshWinSizeMax      = adaptiveThreshWinSizeMax;
            DetectorParameters.AdaptiveThreshWinSizeStep     = adaptiveThreshWinSizeStep;
            DetectorParameters.AdaptiveThreshConstant        = adaptiveThreshConstant;
            DetectorParameters.MinMarkerPerimeterRate        = minMarkerPerimeterRate;
            DetectorParameters.MaxMarkerPerimeterRate        = maxMarkerPerimeterRate;
            DetectorParameters.PolygonalApproxAccuracyRate   = polygonalApproxAccuracyRate;
            DetectorParameters.MinCornerDistanceRate         = minCornerDistanceRate;
            DetectorParameters.MinDistanceToBorder           = minDistanceToBorder;
            DetectorParameters.MinMarkerDistanceRate         = minMarkerDistanceRate;
            DetectorParameters.CornerRefinementMethod        = cornerRefinementMethod;
            DetectorParameters.CornerRefinementWinSize       = cornerRefinementWinSize;
            DetectorParameters.CornerRefinementMaxIterations = cornerRefinementMaxIterations;
            DetectorParameters.CornerRefinementMinAccuracy   = cornerRefinementMinAccuracy;
            DetectorParameters.MarkerBorderBits = markerBorderBits;
            DetectorParameters.PerspectiveRemovePixelPerCell         = perspectiveRemovePixelPerCell;
            DetectorParameters.PerspectiveRemoveIgnoredMarginPerCell = perspectiveRemoveIgnoredMarginPerCell;
            DetectorParameters.MaxErroneousBitsInBorderRate          = maxErroneousBitsInBorderRate;
            DetectorParameters.MinOtsuStdDev       = minOtsuStdDev;
            DetectorParameters.ErrorCorrectionRate = errorCorrectionRate;
        }