|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object viper.comparison.Comparison
This class represents the differences between two Descriptors.
Field Summary | |
static int |
COMPLETE
Indicates that the match is finished, meaning, it has made it through the matching. |
static int |
DETECTED
Indicates that the frame ranges overlap within the desired tolerances. |
static int |
LOCALIZED
Indicates that the measured attributes are similar enough on enough frames. |
static int |
MATCHED
Indicates that there exists some compatability, if only in frame range, between the descriptors. |
static int |
STARTED
Indicates that the two descriptors are compatable, but that no testing has been performed. |
static int |
STATISTICED
Indicates that the desired distance statistics, when computed on the shared frames, are within requested tolerances. |
static int |
UNCOMPARABLE
Indicates that the two descriptors are of incompatable type. |
Constructor Summary | |
Comparison()
Creates a new empty comparison. |
|
Comparison(Descriptor target,
Descriptor candidate,
Equivalencies map)
This constructor takes in the type of Descriptor to cr DSD - Initial value is -2, if the are not the same category, -1 if they are. |
Method Summary | |
java.lang.Object |
clone()
Creates a copy of the Comparison , but not of the
Descriptors.
|
double |
compareTo(java.lang.Object o)
Sorts comparisons in order of quality. |
boolean |
detect(CanonicalFileDescriptor cfd,
EvaluationParameters.ScopeRules epf)
Compares the framespans of the target and candidate descriptors. |
double |
getDistance()
Returns the distance metric calculated in the match() function during level 0 testing. |
double |
getDistanceFor(java.lang.String name)
Returns the distance measure of the specified attribute name. |
java.lang.String |
getDistances(EvaluationParameters.ScopeRules epf)
Gets a formatted string indicating how far apart the target and candidate are in terms of frame span and each measured attribute. |
int |
getFilterLevel()
Determine if the comparison is still active, or at what level it was removed from the pool of possible matches. |
int |
getLevel()
Get the level of the comparison, e.g. |
static java.lang.String |
levelTitle(int levelType)
Gets a formatted string corresponding to the given comparison level |
boolean |
localize(CanonicalFileDescriptor cfd,
EvaluationParameters.ScopeRules epf)
This performs localization. |
boolean |
match(EvaluationParameters.ScopeRules epf)
Moves the comparison from STARTED
to MATCHED , if possible. |
java.lang.String |
matchingPercentage()
Returns a String containing the percentage. |
void |
printCandidate(java.io.PrintWriter output,
java.lang.String padding,
EvaluationParameters.ScopeRules epf)
Prints, in verbose format, information about the candidate and how close it matches the target. |
void |
reset(Descriptor target,
Descriptor candidate,
Equivalencies map)
Resets the comparison between two descriptors to UNCOMPARABLE or STARTED . |
void |
setFilterLevel(int i)
Sets the level the comparison was marked as invalid. |
protected void |
setLevel(int new_level)
Allows to set the level to whatever is passed in. |
protected void |
setPointers(Descriptor target,
Descriptor candidate)
Sets the Descriptor pointers. |
boolean |
statistical(EvaluationParameters.ScopeRules epf)
Performs Statistical, or Level 3, of the object evaluation type. |
static boolean |
takeComparisonToThisLevel(Comparison C,
int level,
CanonicalFileDescriptor cfd,
EvaluationParameters.ScopeRules epf)
This takes a new comparison to the specified level. |
java.lang.String |
toString()
Returns a String representation of the Descriptor. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNCOMPARABLE
public static final int STARTED
public static final int MATCHED
public static final int DETECTED
public static final int LOCALIZED
public static final int STATISTICED
public static final int COMPLETE
Constructor Detail |
public Comparison(Descriptor target, Descriptor candidate, Equivalencies map)
target
- The target, or ground truth, descriptor.candidate
- The candidate, or results file, descriptor.map
- the name equivalenciespublic Comparison()
reset
to get it going.
Method Detail |
public int getLevel()
LOCALIZED
.
public int getFilterLevel()
public void setFilterLevel(int i)
i
- the new removal levelpublic static java.lang.String levelTitle(int levelType)
levelType
- the comparison level, e.g. MATCHED
public void reset(Descriptor target, Descriptor candidate, Equivalencies map)
UNCOMPARABLE
or STARTED
.
target
- the target descriptorcandidate
- the candidate descriptormap
- the ontology mappingpublic java.lang.Object clone()
Comparison
, but not of the
Descriptors.
If you are going to alter the Descriptors, make certain to copy
them and call setPointers
to change them.
protected void setPointers(Descriptor target, Descriptor candidate)
target
- the target for the comparisoncandidate
- the candidate for the comparisonpublic double compareTo(java.lang.Object o) throws BadDataException
o
- -
the Comparison to compare this with
java.lang.ClassCastException
BadDataException
public static boolean takeComparisonToThisLevel(Comparison C, int level, CanonicalFileDescriptor cfd, EvaluationParameters.ScopeRules epf)
C
- the comparison to promotelevel
- the level to take it to, e.g. LOCALIZED
cfd
- the source media descriptorepf
- the scoping rules
true
if the comparison made it to the levelpublic java.lang.String toString()
public java.lang.String matchingPercentage()
public boolean match(EvaluationParameters.ScopeRules epf)
STARTED
to MATCHED
, if possible.
epf
- the rules and metrics for evaluation
public boolean detect(CanonicalFileDescriptor cfd, EvaluationParameters.ScopeRules epf) throws java.lang.IllegalStateException
cfd
- required information about the enclosing file,
like its frame span or frame rateepf
- rules and metrics for performing the comparison
true
if the comparison counts as a
detection
java.lang.IllegalStateException
- if this comparison isn't
at the level MATCHED
public boolean localize(CanonicalFileDescriptor cfd, EvaluationParameters.ScopeRules epf)
cfd
- the containing mediaepf
- the scoping rules
true
if the comparison is localized
java.lang.IllegalStateException
- if trying to localize a comparison that is not marked as
DETECTEDpublic boolean statistical(EvaluationParameters.ScopeRules epf)
epf
- the scoping rules
true
if the comparison has made it to the level
successfully
java.lang.IllegalStateException
- if the comparison isn't localizedpublic java.lang.String getDistances(EvaluationParameters.ScopeRules epf)
epf
- the rules for evaluation
public void printCandidate(java.io.PrintWriter output, java.lang.String padding, EvaluationParameters.ScopeRules epf)
output
- The stream to accept the text.padding
- A prefix to put before each line (useful for formatting)epf
- the scoping rulespublic double getDistance()
protected void setLevel(int new_level)
new_level
- the int value of the level to which you want to set this level
to.public double getDistanceFor(java.lang.String name)
name
- the Attribute name that you requesting a distance measure for
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |