public void initialize ( T image , RectangleLength2D_I32 initial ) { if ( ! image . isInBounds ( initial . x0 , initial . y0 ) ) throw new IllegalArgumentException ( "Initial rectangle is out of bounds!" ) ; if ( ! image . isInBounds ( initial . x0 + initial . width , initial . y0 + initial . height ) ) throw new IllegalArgumentException ( "Initial rectangle is out of bounds!" ) ; pdf . reshape ( image . width , image . height ) ; ImageMiscOps . fill ( pdf , - 1 ) ; setTrackLocation ( initial ) ; failed = false ; // compute the initial sum of the likelihood so that it can detect when the target is no longer visible minimumSum = 0 ; targetModel . setImage ( image ) ; for ( int y = 0 ; y < initial . height ; y ++ ) { for ( int x = 0 ; x < initial . width ; x ++ ) { minimumSum += targetModel . compute ( x + initial . x0 , y + initial . y0 ) ; } } minimumSum *= minFractionDrop ; }
Specifies the initial target location so that it can learn its description