Class TruthData

java.lang.Object
  |
  +--StoriesSegment
        |
        +--TruthData

public class TruthData
extends StoriesSegment


Field Summary
 
Fields inherited from class StoriesSegment
clippedRef, clippedSub, clippingPoints, deletion, insertion, lengthVideo, match, matchType, missingType, nomatchType, offsetAnalogMinusDigital, segmentation, segmentationBeforeClipping, treated
 
Constructor Summary
TruthData()
          Basic constructor of the Class, call the constructor of the super Class StroriesSegment
TruthData(java.io.File src)
          Constructor of the Class, call the constructor of the super Class StroriesSegment and load the Reference file in parameter
 
Method Summary
 void addEndTime()
          this method add the end Time of the last Story ofthe segmentation Vector.
 java.util.Vector applyClippingPoints()
          This method apply the clipping points to the current Video.
 java.lang.Object clone()
          Implementation of the method clone from Object class
 TimeBase getAlign()
          In order to compare the submission(Digital) and the reference (Analog) we have to use the same time scale.
 java.lang.String getFileName(java.lang.String line)
          Returns the name of the video associated to the current truth from the src_sgm file
 TimeBase getOffset()
          Each Reference file has a begin recording time like 18:30:00.00.
 TimeBase getTime(java.lang.String line)
          Returns the time of line of a src_sgm file
 java.lang.String getType(java.lang.String line)
          Returns the type of the story from a line of a src_sgm file
 java.lang.String getVideoFileName()
          Returns the name of the video associated to the current truth
 void load()
          Load the Reference file.
 
Methods inherited from class StoriesSegment
addOneStory, displaySegment, getBeginStoryForTime, getBeginTimeStory, getEndTimeStory, getMPEG1Length, getNumberOfBoundaries, getNumberOfEvaluatedBoundaries, getNumberOfStories, getTimeOfBoundary, getTotalTimeOneStory, getType, getType, getVideoLength, invertStoriesSegment, returnResultBoundaryDistribution, returnResultStoryDistribution, searchClippingPoints
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TruthData

public TruthData()
Basic constructor of the Class, call the constructor of the super Class StroriesSegment


TruthData

public TruthData(java.io.File src)
Constructor of the Class, call the constructor of the super Class StroriesSegment and load the Reference file in parameter

Parameters:
src - Reference file to load, this file must have the extension src_sgm
Method Detail

getOffset

public TimeBase getOffset()
Each Reference file has a begin recording time like 18:30:00.00. this begin recording Time is set as an offset and will be applied to all the time of the Reference. This functtion returns this offset for this Reference file

Returns:
offset retruned as a TimeBase object

load

public void load()
Load the Reference file. The reference file having the extension src_sgm. This method workds only for the file which has the same structure as the src_sgm ones


getAlign

public TimeBase getAlign()
In order to compare the submission(Digital) and the reference (Analog) we have to use the same time scale. We decided to use the Analog time scale. That's why the offset for the Reference must be 0

Specified by:
getAlign in class StoriesSegment
Returns:
offset retruned as a TimeBase object : offset=AnalogTime - DigitalTime

clone

public java.lang.Object clone()
Implementation of the method clone from Object class

Overrides:
clone in class java.lang.Object

applyClippingPoints

public java.util.Vector applyClippingPoints()
This method apply the clipping points to the current Video. But it doesn't use the clipping points of the txt file

Specified by:
applyClippingPoints in class StoriesSegment
Returns:
Vector of Story clipped

 if ($offset >0)
  #MPEG starts later the ground truth, we have to remove initial stories from the ground Truth
  # remove story in interval [0.0 -- offset]

   GGGGGGGG
       MMMMMMMMM
   DDDD
  (G is ground truth, M is mpeg, D is delete)

 if ($length + $offset < 1800) 
   # MPEG ends before the gound truth, we have to remove some
   final stories from the grounf Truth 
   # remove story in interval [ (1800 -$offset) -- $length]

  GGGGGGGGGGGGG
  MMMMMMMM
          DDDDD
 

getFileName

public java.lang.String getFileName(java.lang.String line)
Returns the name of the video associated to the current truth from the src_sgm file

Parameters:
line - line in the src_sgm file this method analyse
Returns:
String name of the file ex : 19980405_ABC.mpg

addEndTime

public void addEndTime()
Description copied from class: StoriesSegment
this method add the end Time of the last Story ofthe segmentation Vector. Indeed the eTime of a story is always the beginning of the next story except for the last one.

Specified by:
addEndTime in class StoriesSegment

getVideoFileName

public java.lang.String getVideoFileName()
Returns the name of the video associated to the current truth

Specified by:
getVideoFileName in class StoriesSegment
Returns:
String name of the file ex : 19980405_ABC.mpg

getType

public java.lang.String getType(java.lang.String line)
Returns the type of the story from a line of a src_sgm file

Parameters:
line - String line in the src_sgm file this method analyse
Returns:
String type of the stories ex : news or misc for TRECVID2003

getTime

public TimeBase getTime(java.lang.String line)
Returns the time of line of a src_sgm file

Returns:
TimeBase object