Ejemplo n.º 1
0
void rspfSFIMFusion::initAdjustableParameters()
{
   resizeAdjustableParameterArray(NUMBER_OF_ADJUSTABLE_PARAMETERS);

   setAdjustableParameter(HIGH_PASS_GAIN_OFFSET,
                          -1.0);
   setParameterDescription(HIGH_PASS_GAIN_OFFSET,
                           "High pass gain");
   setParameterSigma(HIGH_PASS_GAIN_OFFSET,
                     1);
   setParameterCenter(HIGH_PASS_GAIN_OFFSET,
                      1.0);

   setAdjustableParameter(LOW_PASS_WIDTH_OFFSET,
                          -1);
   setParameterDescription(LOW_PASS_WIDTH_OFFSET,
                           "Low pass kernel width");
   setParameterSigma(LOW_PASS_WIDTH_OFFSET,
                     40);
   setParameterCenter(LOW_PASS_WIDTH_OFFSET,
                      40.5);
   

   setParameterOffset(LOW_PASS_WIDTH_OFFSET,
                      1.5);
}
Ejemplo n.º 2
0
void ossimRpcModel::initAdjustableParameters()
{
    resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
    int numParams = getNumberOfAdjustableParameters();
    for (int i=0; i<numParams; i++)
    {
        setAdjustableParameter(i, 0.0);
        setParameterDescription(i, PARAM_NAMES[i]);
        setParameterUnit(i,PARAM_UNITS[i]);
    }
    setParameterSigma(INTRACK_OFFSET, 50.0);
    setParameterSigma(CRTRACK_OFFSET, 50.0);
    setParameterSigma(INTRACK_SCALE, 50.0);
    setParameterSigma(CRTRACK_SCALE, 50.0);
    setParameterSigma(MAP_ROTATION, 0.1);
//   setParameterSigma(YAW_OFFSET, 0.001);
}
Ejemplo n.º 3
0
void ossimPpjFrameSensor::initAdjustableParameters()
{
   if (traceExec())
      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimPpjFrameSensor::initAdjustableParameters: returning..." << std::endl;
   resizeAdjustableParameterArray(PARAM_ADJ_COUNT);
   
   setAdjustableParameter(PARAM_ADJ_LON_OFFSET, 0.0);
   setParameterDescription(PARAM_ADJ_LON_OFFSET, "lon_offset");
   setParameterUnit(PARAM_ADJ_LON_OFFSET, "meters");
   setParameterSigma(PARAM_ADJ_LON_OFFSET, 10);
   
   setAdjustableParameter(PARAM_ADJ_LAT_OFFSET, 0.0);
   setParameterDescription(PARAM_ADJ_LAT_OFFSET, "lat_offset");
   setParameterUnit(PARAM_ADJ_LAT_OFFSET, "meters");
   setParameterSigma(PARAM_ADJ_LAT_OFFSET, 10);
   
   setAdjustableParameter(PARAM_ADJ_ALTITUDE_OFFSET, 0.0);
   setParameterDescription(PARAM_ADJ_ALTITUDE_OFFSET, "altitude_offset");
   setParameterUnit(PARAM_ADJ_ALTITUDE_OFFSET, "meters");
   setParameterSigma(PARAM_ADJ_ALTITUDE_OFFSET, 10);
   
   // TODO  Add these back in when orientation angle offsets are fixed.
   // setAdjustableParameter(PARAM_ADJ_ROLL_OFFSET, 0.0);
   // setParameterDescription(PARAM_ADJ_ROLL_OFFSET, "roll_offset");
   // setParameterUnit(PARAM_ADJ_ROLL_OFFSET, "degrees");
   // setParameterSigma(PARAM_ADJ_ROLL_OFFSET, 10);
   
   // setAdjustableParameter(PARAM_ADJ_PITCH_OFFSET, 0.0);
   // setParameterDescription(PARAM_ADJ_PITCH_OFFSET, "pitch_offset");
   // setParameterUnit(PARAM_ADJ_PITCH_OFFSET, "degrees");
   // setParameterSigma(PARAM_ADJ_PITCH_OFFSET, 10);
   
   // setAdjustableParameter(PARAM_ADJ_YAW_OFFSET, 0.0);
   // setParameterDescription(PARAM_ADJ_YAW_OFFSET, "yaw_offset");
   // setParameterUnit(PARAM_ADJ_YAW_OFFSET, "degrees");
   // setParameterSigma(PARAM_ADJ_YAW_OFFSET, .04);
   
   setAdjustableParameter(PARAM_ADJ_FOCAL_LENGTH_OFFSET, 0.0);
   setParameterDescription(PARAM_ADJ_FOCAL_LENGTH_OFFSET, "focal_length_offset");
   setParameterUnit(PARAM_ADJ_FOCAL_LENGTH_OFFSET, "pixels");
   setParameterSigma(PARAM_ADJ_FOCAL_LENGTH_OFFSET, 20.0);   
}
Ejemplo n.º 4
0
void rspfLandSatModel::initAdjustableParameters()
{
   if (traceExec())  rspfNotify(rspfNotifyLevel_DEBUG) << "DEBUG rspfLandSatModel::initAdjustableParameters: entering..." << std::endl;
   resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
   int numParams = getNumberOfAdjustableParameters();
   for (int i=0; i<numParams; i++)
   {
      setAdjustableParameter(i, 0.0);
      setParameterDescription(i, PARAM_NAMES[i]);
      setParameterUnit(i,PARAM_UNITS[i]);
   }
   setParameterSigma(INTRACK_OFFSET, 500.0); //change for Landsat 5
   setParameterSigma(CRTRACK_OFFSET, 500.0); //change for Landsat 5
   setParameterSigma(LINE_GSD_CORR, 0.005);  
   setParameterSigma(SAMP_GSD_CORR, 0.005);  
   setParameterSigma(ROLL_OFFSET, 0.01);  
   setParameterSigma(YAW_OFFSET, 0.01);  
   setParameterSigma(YAW_RATE, 0.05);  
   setParameterSigma(MAP_ROTATION, 0.1);
   if (traceExec())  rspfNotify(rspfNotifyLevel_DEBUG) << "DEBUG rspfLandSatModel::initAdjustableParameters: returning..." << std::endl;
}
Ejemplo n.º 5
0
void rspfBuckeyeSensor::initAdjustableParameters()
{
   resizeAdjustableParameterArray(7);
   
   setAdjustableParameter(0, 0.0);
   setParameterDescription(0, "x_offset");
   setParameterUnit(0, "meters");
   
   setAdjustableParameter(1, 0.0);
   setParameterDescription(1, "y_offset");
   setParameterUnit(1, "meters");
   
   setAdjustableParameter(2, 0.0);
   setParameterDescription(2, "roll");
   setParameterUnit(2, "degrees");
   
   setAdjustableParameter(3, 0.0);
   setParameterDescription(3, "pitch");
   setParameterUnit(3, "degrees");
   
   setAdjustableParameter(4, 0.0);
   setParameterDescription(4, "yaw");
   setParameterUnit(4, "degrees");
   
   setAdjustableParameter(5, 0.0);
   setParameterDescription(5, "Altitude delta");
   setParameterUnit(5, "meters");
   
   setAdjustableParameter(6, 0.0);
   setParameterDescription(6, "focal length delta");
   setParameterUnit(6, "millimeters");
   
   setParameterSigma(0, 10);
   setParameterSigma(1, 10);
   setParameterSigma(2, 1);
   setParameterSigma(3, 1);
   setParameterSigma(4, 5);
   setParameterSigma(5, 100);
   setParameterSigma(6, 50);
}
Ejemplo n.º 6
0
void ossimBuckeyeSensor::initAdjustableParameters()
{
	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::initAdjustableParameters: entering..." << std::endl;
	resizeAdjustableParameterArray(6);

	setAdjustableParameter(0, 0.0);
	setParameterDescription(0, "x_offset");
	setParameterUnit(0, "pixels");

	setAdjustableParameter(1, 0.0);
	setParameterDescription(1, "y_offset");
	setParameterUnit(1, "pixels");

	setAdjustableParameter(2, 0.0);
	setParameterDescription(2, "roll");
	setParameterUnit(2, "degrees");

	setAdjustableParameter(3, 0.0);
	setParameterDescription(3, "pitch");
	setParameterUnit(3, "degrees");

	setAdjustableParameter(4, 0.0);
	setParameterDescription(4, "heading");
	setParameterUnit(4, "degrees");

	setAdjustableParameter(5, 0.0);
	setParameterDescription(5, "altitude");
	setParameterUnit(5, "meters");

	// TODO: default to correct default values, or just leave it up to the input file, since we have different offsets for the B100, 182, and Metroliner, also need a z offset
	setParameterSigma(0, 1.0);
	setParameterSigma(1, 1.0);
	setParameterSigma(2, 0);
	setParameterSigma(3, 0);
	setParameterSigma(4, 0);
	setParameterSigma(5, 1000);
	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::initAdjustableParameters: returning..." << std::endl;
}
void ossimSpectraboticsRedEdgeModel::initAdjustableParameters()
{
   
   resizeAdjustableParameterArray(6);
   
   setAdjustableParameter(0, 0.0);
   setParameterDescription(0, "x_offset");
   setParameterUnit(0, "pixels");

   setAdjustableParameter(1, 0.0);
   setParameterDescription(1, "y_offset");
   setParameterUnit(1, "pixels");

   setAdjustableParameter(2, 0.0);
   setParameterDescription(2, "roll");
   setParameterUnit(2, "degrees");

   setAdjustableParameter(3, 0.0);
   setParameterDescription(3, "pitch");
   setParameterUnit(3, "degrees");

   setAdjustableParameter(4, 0.0);
   setParameterDescription(4, "heading");
   setParameterUnit(4, "degrees");

   setAdjustableParameter(5, 0.0);
   setParameterDescription(5, "altitude");
   setParameterUnit(5, "meters");
   
   
   setParameterSigma(0, 50.0);
   setParameterSigma(1, 50.0);
   setParameterSigma(2, 1);
   setParameterSigma(3, 1);
   setParameterSigma(4, 10);
   setParameterSigma(5, 50);
}
Ejemplo n.º 8
0
void ossimApplanixUtmModel::initAdjustableParameters()
{
   resizeAdjustableParameterArray(6);
   
   setAdjustableParameter(0, 0.0);
   setParameterDescription(0, "x_offset");
   setParameterUnit(0, "pixels");

   setAdjustableParameter(1, 0.0);
   setParameterDescription(1, "y_offset");
   setParameterUnit(1, "pixels");

   setAdjustableParameter(2, 0.0);
   setParameterDescription(2, "orientation x");
   setParameterUnit(2, "degrees");

   setAdjustableParameter(3, 0.0);
   setParameterDescription(3, "orientation y");
   setParameterUnit(3, "degrees");

   setAdjustableParameter(4, 0.0);
   setParameterDescription(4, "orientation z");
   setParameterUnit(4, "degrees");

   setAdjustableParameter(5, 0.0);
   setParameterDescription(5, "Altitude delta");
   setParameterUnit(5, "meters");

   
   
   setParameterSigma(0, 20.0);
   setParameterSigma(1, 20.0);
   setParameterSigma(2, .1);
   setParameterSigma(3, .1);
   setParameterSigma(4, .1);
   setParameterSigma(5, 50);
}
Ejemplo n.º 9
0
void rspfApplanixEcefModel::initAdjustableParameters()
{
   
   resizeAdjustableParameterArray(6);
   
   setAdjustableParameter(0, 0.0);
   setParameterDescription(0, "x_offset");
   setParameterUnit(0, "pixels");

   setAdjustableParameter(1, 0.0);
   setParameterDescription(1, "y_offset");
   setParameterUnit(1, "pixels");

   setAdjustableParameter(2, 0.0);
   setParameterDescription(2, "roll");
   setParameterUnit(2, "degrees");

   setAdjustableParameter(3, 0.0);
   setParameterDescription(3, "pitch");
   setParameterUnit(3, "degrees");

   setAdjustableParameter(4, 0.0);
   setParameterDescription(4, "heading");
   setParameterUnit(4, "degrees");

   setAdjustableParameter(5, 0.0);
   setParameterDescription(5, "altitude");
   setParameterUnit(5, "meters");
   
   
   setParameterSigma(0, 20.0);
   setParameterSigma(1, 20.0);
   setParameterSigma(2, .1);
   setParameterSigma(3, .1);
   setParameterSigma(4, .1);
   setParameterSigma(5, 50);
}
bool ossimCsmSensorModel::setSensorModel(const ossimFilename& imageFile, 
                                         const ossimFilename& pluginDir, 
                                         const ossimString& pluginName,
                                         const ossimString& sensorName)
{
   if(m_model)
   {
      delete m_model; m_model = 0;
   }
   ossimString error;
   m_pluginDir  = pluginDir;
   m_pluginName = pluginName;
   m_sensorName = sensorName;
   m_imageFile  = imageFile;
   if(!m_pluginDir.exists()||!m_imageFile.exists()) return false;
   if(!m_sensorName.empty()&&!m_pluginName.empty())
   {
      m_model = CSMSensorModelLoader::newSensorModel(m_pluginDir.c_str(), 
                                                     m_pluginName, 
                                                     m_sensorName.c_str(), 
                                                     m_imageFile.c_str(), error, false);
      if(!error.empty()&&m_model)
      {
         delete m_model;
         m_model = 0;
      }
   }
   else
   {
      std::vector<string> pluginNames = CSMSensorModelLoader::getAvailablePluginNames(m_pluginDir, error );    
      ossim_uint32 idx = 0;
      
      for(idx = 0; ((idx < pluginNames.size())&&(!m_model)); ++idx)
      {
         std::vector<string> sensorModelNames = CSMSensorModelLoader::getAvailableSensorModelNames( pluginDir, 
                                                                                                   pluginNames[idx].c_str(),  error );    
         ossim_uint32 idx2=0;
         for(idx2 = 0; ((idx2 < sensorModelNames.size())&&(!m_model)); ++idx2)
         { 
            error = "";
            TSMSensorModel* model = CSMSensorModelLoader::newSensorModel(pluginDir, 
                                                                         pluginNames[idx].c_str(), 
                                                                         sensorModelNames[idx2].c_str(), 
                                                                         m_imageFile.c_str(), error, false);
            if(model&&error.empty())
            {
               m_sensorName = sensorModelNames[idx2].c_str();
               m_pluginName = pluginNames[idx];
               m_model = model;
            }
            else if(model)
            {
               delete model;
               model = 0;
            }
         }
      }
   }
   if(m_model)
   {
      int nLines, nSamples;
      m_model->getImageSize(nLines, nSamples);	
      
      theImageClipRect = ossimIrect(-nLines, -nSamples, 2*nLines, 2*nSamples);
      theRefImgPt = theImageClipRect.midPoint();
      int nParams = 0;
      m_model->getNumParameters(nParams);
      int idx = 0;
      ossimString name;
      resizeAdjustableParameterArray(nParams);
      double paramValue = 0.0;
      TSMMisc::Param_CharType paramType;
      for(idx = 0; idx < nParams; ++idx)
      {
         m_model->getParameterName(idx, name);
         m_model->getCurrentParameterValue(idx, paramValue);
         setParameterCenter(idx, paramValue);
         setAdjustableParameter(idx, 0.0, 1.0);
         setParameterDescription(idx, name.c_str());
         m_model->getParameterType(idx, paramType); 
         setParameterUnit(idx, "");
      }
      try
      {
         computeGsd();
      }
      catch (...) 
      {
      }
      
   }
   
   return (m_model != 0);
}