Exemple #1
0
        // Read the parameters of the camera from the settings.
        public void read_parameters(Settings.Section section)
        {
            ArrayList values = section.get_entry("CameraParameters");

            if (values != null)
            {
                String param = (String)values[0];
                m_camera.ReadASCII(param);
            }
            else
            {
                String error;
                error = "No CameraParameters entry found in initialisation file section [" +
                        section.Label() + "].";
                Debug.WriteLine(error);
            }
        }
Exemple #2
0
        /// <summary>
        /// Initialise a known feature, in this case by loading an image file. The name of
        /// the file is read from the Settings Section passed to this function, with the
        /// entry Identifier.
        /// </summary>
        /// <param name="fmm"></param>
        /// <param name="v"></param>
        /// <param name="section"></param>
        /// <returns></returns>
        public override classimage_mono initialise_known_feature(Feature_Measurement_Model fmm,
                                                                 Vector v, Settings.Section section,
                                                                 String path)
        {
            ArrayList values = section.get_entry("Identifier");
            String    name   = (String)values[0];

            //cout << "Reading patch " << name << endl;

            classimage_mono patch = new classimage_mono();

            if (!(patch.loadFromBitmapMono(path + name, (int)Camera_Constants.BOXSIZE, (int)Camera_Constants.BOXSIZE)))
            {
                patch = null;
            }

            return(patch);
        }
Exemple #3
0
        // Redefined virtual functions
        public override void read_parameters(Settings settings)
        {
            // Initialise any base class parameters
            base.read_parameters(settings);

            // Initialise my camera model
            Settings.Section section = settings.get_section(feature_type);
            if (section == null)
            {
                Debug.WriteLine("Warning: no [" + feature_type +
                                "] section in the intialisation data. " +
                                "The feature measurement model will be initialised with the default " +
                                "camera parameters.");
            }
            else
            {
                // Read the camera model. This will be the name of another section
                ArrayList values = section.get_entry("Camera");
                if (values == null)
                {
                    Debug.WriteLine("Warning: no Camera entry in the [" + feature_type +
                                    "] section in the intialisation data. " +
                                    "The feature measurement model will be initialised with the " +
                                    "default camera parameters.");
                }
                else
                {
                    String camera = (String)values[0];
                    section = settings.get_section(camera);
                    if (section == null)
                    {
                        Debug.WriteLine("Warning: no [" + camera +
                                        "] section in the intialisation data. " +
                                        "The feature measurement model will be initialised with the " +
                                        " default camera parameters.");
                    }
                    else
                    {
                        ((Wide_Camera_Point_Feature_Measurement_Model)wide_model).read_parameters(section);
                    }
                }
            }
        }