Home

User Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Contributor Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Quick Links

Software Manual
AstroDiscuss
GitHub
API Reference

Documentation Versions


ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS Application Documentation


cubediff

Printer Friendly View | TOC | Home

Compare two cubes for differences

Overview Parameters Example 1

Description

This program compares two cube files pixel by pixel, with results written to the log and/or user specified output file.

Output:

Label Description
Compare The files are different if any pair of pixels is different, otherwise the files are identical.
Sample The sample of the first pair of pixels that is different
Line The line of the first pair of pixels that is different
Band The band of the first pair of pixels that is different
AverageDifference The average absolute value of the differences of all pairs of pixels
StandardDeviation The standard deviation of the absolute value of the differences of all pairs of pixels
Variance The variance of the absolute value of the differences of all pairs of pixels
MinimumDifference The smallest absolute value of the differences of all pairs of pixels
MaximumDifference The largest absolute value of the differences of all pairs of pixels
MaxDifferenceSample The sample of the pair of pixels with the largest difference
MaxDifferenceLine The line of the pair of pixels with the largest difference
MaxDifferenceBand The band of the pair of pixels with the largest difference
ValidPixelDifferences The number of pairs of nonspecial pixels that are different
SpecialPixelDifferences The number of pairs of pixels that are different where at least one pixel is special
SigFigAccuracy The minimum value of the approximate number of significant figures of the differences of all pairs of pixels. The approximation is given by floor(log10(in1)) - floor(log10(abs(in1 - in2)) where in1 and in2 are the pair of pixels.
SigFigMaxDifferenceSample The sample of the first pair of pixels where SigFigAccuracy in minimized
SigFigMaxDifferenceLine The line of the first pair of pixels where SigFigAccuracy in minimized
SigFigMaxDifferenceBand The band of the first pair of pixels where SigFigAccuracy in minimized

Categories


History

Tracie Sucharski2002-10-10 Original version
Tracie Sucharski2002-11-12 Add user parameter, IGNORESPECIAL, which indicates whether special pixel values in either file are ignored in the comparison.
K Teal Thompson2002-11-25 Add example.
K Teal Thompson2003-04-11 Make images smaller
Stuart Sides2003-04-29 Added the band number to the logged information
Stuart Sides2003-05-01 Fixed multipal run bug where once the inputs were reported as different any files entered after that would aldo be reported as different.
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology...
Stuart Sides2003-07-29 Modified filename parameters to be cube parameters where necessary
Jeff Anderson2003-08-26 Changed default extension handling mechanism
Stuart Sides2003-11-07 Modified results pvl to not include the results group
Jacob Danton2006-04-07 Changed the IGNORESPECIAL from a string to a bool.
Elizabeth Miller2006-05-19 Modified to output statistical data about the differences
Elizabeth Miller2006-06-15 Added ValidPixelDifferences to output
Brendan George2006-09-28 Documentation fixes
Tracie Sucharski2007-02-26 Documentation correction-Description said program exited at first difference. This is no longer the case, all pixels are compared and statistics are collected.
Brendan George2007-04-25 Added tabular output option. Option allows the program to collect and print out a table of the differences found
Brendan George2007-04-26 Changed name from compare to cubediff
Steven Lambright2007-06-08 Fixed problems with the special pixel comparisons: changed IGNORESPECIAL to only ignore the case where one pixel has a DN value and the other pixel is special, fixed a problem where the special pixel difference would never be the first difference, fixed a comparison of DN value differences before checking if the pixel is special. Added significant figure reports for testing purposes.
Steven Lambright2007-06-11 Removed IGNORESPECIAL
Steven Lambright2007-06-12 Updated example images
Steven Lambright2007-06-18 Fixed bug where sig. fig. accuracy would report "1" when it should report "0"
Brendan George2007-08-09 Integrated WriteTabular and Column (tabular output objects) as application-specific classes
Steven Koechle2009-05-14 Changed output, if no valid pixel differences, output zero instead of NULL8
Sharmila Prasad2010-02-26 Incuded keywords MaxDifference Line, Sample and Band in the output to indicate the line, sample, band where the max cube difference occured
Jeffrey Covington2015-01-09 Added descriptions for each label of the output
Jeffrey Covington2015-01-13 Fixed output when run multiple times in the GUI

Parameter Groups

Files

Name Description
FROM First cube for comparison
FROM2 Second cube for comparison
TOText file

Options

Name Description
TOLERANCETolerance value

Table Parameters

Name Description
OUTPUTDIFFSOutput table of differences
PRECISIONThe decimal precision of the output values
COUNTNumber of differences to be displayed
X

Files: FROM


Description

The file specification for the first input cube. This cube will be compared to the cube given in "FROM2".

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: FROM2


Description

The file specification for the second input cube. This cube will be compared to the cube given in "FROM".

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: TO


Description

A text file in label format which will contain the results of this compare. This file can be used in conjunction with the "getkey" program to pass the results to another program.

Type filename
File Mode output
Internal Default None
Close Window
X

Options: TOLERANCE


Description

This parameter allows a tolerance when comparing values. If the difference between pixel values is less than or equal to TOLERANCE,the values are considered to be equal. The default value, DBL_EPSILON, is machine specific, but a possible value is 2.2204460492503131e-16. It is defined in float.h.

Type double
Internal Default DBL_EPSILON
Close Window
X

Table Parameters: OUTPUTDIFFS


Description

This determines if the differences will be output to a table. If it is checked, the options below will be opened up and used to determine the specifics of the table to which the data will be written. The differences are written out as a table, where the columns represent the sample number, once for each image, and the rows represent the line number, with the data being the DN at that point.

Type boolean
Default false
Inclusions
  • PRECISION
  • COUNT
Close Window
X

Table Parameters: PRECISION


Description

This number determines how many digits past the decimal point will be displayed for the compared values in the output table.

Type integer
Default 3
Inclusions
  • OUTPUTDIFFS
Close Window
X

Table Parameters: COUNT


Description

This indicates the number of differences to be displayed. The count is made from left to right, top to bottom. Differences on the top row are considered first, then the second row, and so on.

Type integer
Default 100
Inclusions
  • OUTPUTDIFFS
Close Window

Example 1

Different

Description

Compare isisTruth.cub band one against band two

Command Line

cubediff cubediff from=isisTruth.cub+1 from2=isisTruth.cub+2
Compare isisTruth.cub band one against band two

GUI Screenshot

compare GUI

Example GUI

Screenshot of GUI with parameters filled in to perform the compare operation

Input Images

Input image

First input image for compare

Parameter Name: FROM

This is the first input image for the compare example.

Input image

Second input image for compare

Parameter Name: FROM2

This is the second input image for the compare example.

Output Image

Display of Output compare log showing results of the compare application.

The output log

This is the default output compare log. Use the TO parameter for a text file output.