The application cnetref finds the best reference for a Control
Point based on user specified Criteria.
Application takes in as input the Control Net CNET and its
corresponding images list FROMLIST. FROMLIST contains the filenames of all
the images that are part of the input Control Net.
The resulting output Control Net is placed in the user specified file
ONET. The Id and Description for the output Control Net can be specified in
NETWORKID and DESCRIPTION parameters respectively. If the values are not
entered then the information is taken from the input Control
Net.
Best Reference for the Control Point can be chosen based on the
following four CRITERIAs. For all the criterias, picking the best Reference
is skipped if the Control Point is not Free or if either the Control
Point or the Reference is EditLocked.
1. EMISSION : Of all the valid Control Measures in a Control
Point, the Control Measure with the least Emission Angle will be chosen as
the Reference.
2. INCIDENCE: Of all the valid Control Measures in a Control
Point, the Control Measure with the least Incidence Angle will be chosen as
the Reference.
3. RESOLUTION: Of all the valid Control Measures in a Control
Point, the Control Measure with the best Resolution TYPE will be
chosen as the Reference. All the images in the Control Net must have the
resolution in the same units.
The best Resolution can be chosen from the following TYPEs:
a. HIGH - The Control Measure with the Highest Resolution will be
chosen as the Reference.
b. LOW - The Control Measure with the Least Resolution will be
chosen as the Reference.
c. MEAN - The Mean Resolution is calculated from the Resolution
all the images within each Control Point. The Control Measure closest to
the Mean Resolution will be chosen as the Reference.
d. NEAREST - The Control Measure with the Resolution closest to
this user specified value in RESVALUE will be chosen as the
Reference.
e. RANGE - The first Control Measure in the MINRES - MAXRES
Range will be chosen as the Reference.
4. INTEREST: Of all the valid Control Measures in a Control
Point, the Control Measure with the best Interest will be chosen as the
Reference. This option uses an interest operator to find the most
interesting point in the area near each Control Point of a Control Net. The
area is defined by the keywords DeltaLine and DeltaSample. The application
starts by finding the best Interest for each valid Control Measure in a
Control Point. Then the Control Measure with the best Interest among all the
valid Control Measures in the Control Point is chosen as the Reference.
After the new Reference is chosen, all the Control Measures are aligned to
the new Reference's location. The movement of the Control Point can be
limited to the Overlaps by enabling LIMIT and entering the list in
OVERLAPLIST. The Overlaplist contains the Serial Number and their
intersections. The intersections information can be got from the application
findimageoverlaps. If an exact match of the Control
Measure's Serial Number in the overlaplist fails then this option finds
image overlaps by getting intersection of the individual image footprints.
If the overlapslist is not specified, then the Point can be moved in the
area defined by DeltaLine and DeltaSample.
The Interest operator reads in a chip of size Delta Samples and Lines from
each Control Measure(Cube) in a point. If the Overlap list is
included then the overlap polygon is taken into consideration when the chip
reads the cube. For each pixel in the chip, it extracts a sub chip of box
size (Samples, Lines) around the pixel. It first checks the pixel for
validity as specified in the DEFFILE. If the pixel passes the above tests,
then the Interest is calculated for the box around the pixel using the
chosen algorithm. This way it calculates the interest for all the pixels in
the chosen area (chip) around the Control Measure and the best Interest
(highest value) is chosen among them. The best Interest is calculated for
all the Control Measures in a Control Point.
The application then selects the best Interest of all the valid
Control Measures in the Control Point and chooses it as the Reference. It
then moves all the other valid Control Measures to the chosen Reference by
mapping the Reference Lat/Lon to a sample, line in the Control Measure. It
then creates a new Control Net using these new "more interesting" Control
Points. If the BestReferenceIndex is not calculated because no Interest was
calculated for all the Control Measures or if the BestReferenceIndex's
Interest is invalid(less than the threshold Interest) then the Control Point
is set to be ignored.
Interest Algorithm could be:
1. Standard Deviation
2. Gradient
The options for the Interest Operator is defined in PVL group in the
DEFFILE. The DEFFILE should have the Operator Group relevant for the
Interest Operator plugin. It defines the algorithm(Name) to be used to calculate
the interest, the box size (Samples, Lines) and the distance (DeltaSamp,
DeltaLine) the algorithm is allowed to move the point from the current
position. It defines the minimum interest (MinimumInterest) value for the
interest to be considered a best interest. If the point must be static
then set the DeltaSamp and DeltaLine to zero.
All the keywords in the Operator Group are required for this
Criteria.
Example:
Group = Operator |
| Name |
= StandardDeviation |
| Samples |
= Positive Integer |
| Lines |
= Positive Integer |
| DeltaLine |
= Positive Integer |
| DeltaSample |
= Positive Integer |
| MinimumInterest |
= Double |
EndGroup | |
Note:
1.If Control Measures with no camera is encountered,
then the application is halted and no ouput Control Net is generated.
2. The values Samples, Lines, DeltaLine, DeltaSamp, MinimumInterest
for the Operator are entirely dependent on the images in the Control Net.
Recommended preprocessing would be to run "gradient" filter or "svfilter"
and run "hist" to get the image stats and set the values for the Operator
accordingly.
For all the criterias except Interest, the application first validates each
measure for the properties specified in the "ValidMeasure" PvlGroup in
DEFFILE. The Validity test is optional for all the Criterias.
Validation is little different if using the Interest Critera. The
Interest Operator while finding Interest for a Valid Control Measure, first
Validates each Sample, Line location in the DeltaSample, DeltaLine area
of the Control Measure and then calculates the Interest for that location.
This way the expensive Interest calculation is bypassed for an invalid
Sample, Line location. Validity test is also performed after moving the
Control Measure to the new location of the BestReference chosen after the
Interest operation for all the Control Measures in the Control Point. If
the moved Control Measure fails the Validity test, then it is set to be
Ignored.
Following is the format for the Pvl DEFFILE file with the
defaults for Control Measure validation:
|
Group=ValidMeasure |
| MinDN
|
= Default is Min DN value (depends on the pixel size of the
image)
|
| MaxDN |
= Default is Max DN value (depends on the pixel size of the
image) |
| MinEmission |
= 0 (Default) |
| MaxEmission |
= 135 (Default) |
| MinIncidence |
= 0 (Default) |
| MaxIncidence |
= 135 (Default) |
| MinResolution |
= 0 (Default) |
| MaxResolution |
= Max Double |
| PixelsFromEdge |
= 0 (Default) OR |
| MetersFromEdge |
= 0 (Default) |
EndGroup | |
|
If the Control Measure does not pass the validity test, then it will be
be Ignored. If the number of Valid Control Measures in a Control Point is
less than 2, then the Control Point is Ignored.
If the "Required" parameters are not entered or misspelled, then the
application will throw an error. If "Optional" parameters are not entered
then the Control Measure will not be validated against that option.
The entire Control Net processing can be logged in an output LOG
file. Log information such as Control Point and Control Measure details
and change statistics are placed in LOG file if specified in PVL. Following
is the format of the Log File:
|
Object = PointDetails |
|
PointId = |
|
|
Group = MeasureDetails |
|
|
SerialNum | = |
|
EmissionAngle | = |
|
IncidenceAngle | = |
|
Resolution | = |
|
DNValue | = |
|
SampleResidual | = |
|
LineResidual | = |
|
ResidualMagnitude | = |
|
SampleShift | = |
|
LineShift | = |
|
PixelShift | = |
|
Reference | = |
|
| EndGroup |
|
|
Group = MeasureDetails |
|
|
SerialNum | = |
|
OriginalLocation | = |
|
EmissionAngle | = |
|
IncidenceAngle | = |
|
Resolution | = |
|
DNValue | = |
|
SampleResidual | = |
|
LineResidual | = |
|
ResidualMagnitude | = |
|
SampleShift | = |
|
LineShift | = |
|
PixelShift | = |
|
|
EndGroup |
|
|
Group =
ReferenceChangeDetails |
|
|
PrevSerialNumber | = |
|
PrevIncAngle | = |
|
PrevLocation | = |
|
NewSerialNumber | = |
|
NewLeastIncAngle | = |
|
NewLocation | = |
|
|
EndGroup |
|
EndObject |
|
Stuart Sides | 2005-08-20 |
Original version
|
Steven Koechle | 2008-09-25 |
Tweaked to compile and run with current version of Isis
|
Steven Lambright | 2008-11-04 |
Added support for image overlap files, new optional parameter "OVERLAPLIST"
|
Steven Lambright | 2008-11-14 |
"OVERLAPLIST" is now a required parameter.
|
Steven Koechle | 2009-01-20 |
Fixed Memory Leaks, Changed Deletion of cubes to use an iterator
|
Steven Koechle | 2009-04-24 |
If a control measure fails SetUniversalGround it is now ignored.
|
Travis Addair | 2009-08-11 |
Interest operator parameters are now placed into the print file.
|
Sharmila Prasad | 2010-03-30 |
Added Emission Angle criteria in the interest operator plugin for the
best interest point to be considered. Also Check that the best interest
point has DN value in the Valid Min and Max DN range.
|
Sharmila Prasad | 2010-04-20 |
Logging and documentation-specify output log file for the results to be
sent to else printed to print.prt. If images with no camera is
encountered, the application is closed.
|
Sharmila Prasad | 2010-05-04 |
Make the overlap list optional incase a control network has no overlap
list. Added a checkbox to indicate whether the overlap list is available or
not and modified the app accordingly
|
Sharmila Prasad | 2010-05-10 |
Renamed to cnetref
|
Sharmila Prasad | 2010-05-11 |
Calculate interest for Control Points with no Reference point and Control
Points with Measures less than 2. Include Min and Max Incidence Angle
filter and make parameters NETWORKID and DESCRIPTION optional..
|
Steven Lambright | 2010-05-27 |
Using an overlap list should be much more accurate and restrictive now.
Added MINRES and MAXRES parameters. Fixed potential segmentation fault.
Restored program's history.
|
Sharmila Prasad | 2010-06-10 |
Find reference based on Emission, Incidence angles or interest or
Resolution. Added new parameters to accomodate the new options
|
Sharmila Prasad | 2010-06-11 |
Added documentation and tests
|
Sharmila Prasad | 2010-06-18 |
Added documentation, display error for Interest option with no DefFile.
|
Sharmila Prasad | 2010-06-18 |
Use Standard Options Pixels/Meters from Edge
|
Sharmila Prasad | 2010-10-06 |
Made changes for binary control net
|
Sharmila Prasad | 2010-10-15 |
Use single copy of Control Net
|
Sharmila Prasad | 2010-10-18 |
Input DefFile Validation before any processing
|
Sharmila Prasad | 2010-10-22 |
Reset apriori for source==Reference
|
Sharmila Prasad | 2010-10-27 |
Log, if Reference changed and apriorisource==Reference
|
Sharmila Prasad | 2010-11-09 |
Update documentation regarding Template DefFile
|
Sharmila Prasad | 2010-12-29 |
Updated for binary control net and fixed the app tests accordingly
|
Christopher Austin | 2011-01-19 |
Altered to compile with the new Control redesign.
|
Sharmila Prasad | 2011-02-24 |
Fixed the app tests
|
Sharmila Prasad | 2011-05-14 |
Added ability to validate Measure by Sample/Line Residuals and Residual
Magnitude
|
Sharmila Prasad | 2011-05-24 |
Helper function to edit DefFile
|
Debbie A. Cook and Tracie Sucharski | 2011-06-07 |
Changed point types "Ground" to "Fixed" and "Tie" to "Free"
|
Sharmila Prasad | 2011-07-29 |
Improved the Log messages
|
Sharmila Prasad | 2011-08-03 |
Fixed the statistics
|
Sharmila Prasad, Bonnie Redding, Mark Rosiek | 2011-10-06 |
Updated the documentation and added missing tests for criteria resolution
|
Sharmila Prasad | 2011-11-23 |
Updated the documentation. Edited to work for control nets with Reference
not set. Fixes #589 and #584
|
Debbie A. Cook | 2013-02-11 |
Changed selection of reference by mean resolution to use the first measure for points
with only 2 measures. References #775.
|
Kimberly Oyama and Steven Lambright | 2013-02-25 |
Changed error handling such that, when an error occurs, this program will not choose that
measure as reference instead of throwing an error and stopping. References #825.
|