throws NotEnoughDataPointsException, IllDefinedDataPointsException final ErrorStatistic observer = new ErrorStatistic( maxPlateauwidth + 1 ); observer.add( error ); Math.abs( observer.getWideSlope( maxPlateauwidth ) ) <= 0.00001 && Math.abs( observer.getWideSlope( maxPlateauwidth / 2 ) ) <= 0.00001 ) break; System.out.println( "Exiting at iteration " + i + " with error " + decimalFormat.format( observer.mean ) + " and slope " + observer.getWideSlope( maxPlateauwidth ) ); System.out.println( "Successfully optimized configuration of " + pt.size() + " tiles:" ); System.out.println( " average displacement: " + decimalFormat.format( observer.mean ) + "px" );
final ErrorStatistic observer = new ErrorStatistic( temp.size() ); for ( final PointMatch m : temp ) observer.add( m.getDistance() ); final double t = observer.getMedian() * maxTrust; for ( final P m : temp )
println( new StringBuffer( "Successfully optimized configuration of " ).append( tiles.size() ).append( " tiles after " ).append( observer.n() ).append( " iterations:" ).toString() ); println( new StringBuffer( " average displacement: " ).append( decimalFormat.format( error ) ).append( "px" ).toString() ); println( new StringBuffer( " minimal displacement: " ).append( decimalFormat.format( minError ) ).append( "px" ).toString() );
final int maxPlateauwidth ) throws NotEnoughDataPointsException final ErrorStatistic observer = new ErrorStatistic( maxPlateauwidth + 1 ); proceed |= Math.abs( observer.getWideSlope( d ) ) > 0.0;
observer.add( error ); proceed |= Math.abs( observer.getWideSlope( d ) ) > 0.0001;
/** * Minimize the displacement of all {@link PointMatch Correspondence pairs} * of all {@link Tile Tiles} and tell about it. * * @param maxAllowedError * @param maxIterations * @param maxPlateauwidth * @throws NotEnoughDataPointsException * @throws IllDefinedDataPointsException */ public void optimize( final double maxAllowedError, final int maxIterations, final int maxPlateauwidth, final double damp ) throws NotEnoughDataPointsException, IllDefinedDataPointsException { final ErrorStatistic observer = new ErrorStatistic( maxPlateauwidth + 1 ); optimize( observer, maxAllowedError, maxIterations, maxPlateauwidth, damp ); }
final Collection< Point > sourcePoints = new ArrayList< Point >(); final ErrorStatistic observer = new ErrorStatistic( 1 ); final int searchRadius = observer.n() < mlst.getModel().getMinNumMatches() ? ( int )Math.ceil( maxEpsilon ) : ( int )Math.ceil( observer.max ); observer.clear(); BlockMatching.matchByMaximalPMCC( source,
final ErrorStatistic e = new ErrorStatistic( tiles.size() + 1 ); e.add( p.getDistance() );
/** * Update force vectors for all vertices. * * @param observer */ protected void updateForce( final ErrorStatistic observer ) { minForce = Double.MAX_VALUE; maxForce = 0.0; force = 0; synchronized ( this ) { /* active vertices */ for ( final Vertex vertex : vertices ) { vertex.updateForce(); final double vertexForce = vertex.getForce(); force += vertexForce; if ( vertexForce < minForce ) minForce = vertexForce; if ( vertexForce > maxForce ) maxForce = vertexForce; } force /= vertices.size(); } observer.add( force ); }
/** * Minimize the displacement of all {@link PointMatch Correspondence pairs} * of all {@link Tile Tiles} and tell about it. * * @param maxAllowedError * @param maxIterations * @param maxPlateauwidth * @throws NotEnoughDataPointsException * @throws IllDefinedDataPointsException */ public void optimize( final double maxAllowedError, final int maxIterations, final int maxPlateauwidth, final double damp ) throws NotEnoughDataPointsException, IllDefinedDataPointsException { final ErrorStatistic observer = new ErrorStatistic( maxPlateauwidth + 1 ); optimize( observer, maxAllowedError, maxIterations, maxPlateauwidth, damp ); }
final Collection< Point > sourcePoints = new ArrayList< Point >(); final ErrorStatistic observer = new ErrorStatistic( 1 ); final int searchRadius = observer.n() < mlst.getModel().getMinNumMatches() ? ( int )Math.ceil( maxEpsilon ) : ( int )Math.ceil( observer.max ); observer.clear(); BlockMatching.matchByMaximalPMCC( source,
final int maxPlateauwidth ) throws NotEnoughDataPointsException final ErrorStatistic observer = new ErrorStatistic( maxPlateauwidth + 1 ); proceed |= Math.abs( observer.getWideSlope( d ) ) > 0.0;
/** * Update force vectors for all vertices. * * @param observer */ protected void updateForce( final ErrorStatistic observer ) { minForce = Double.MAX_VALUE; maxForce = 0.0; force = 0; synchronized ( this ) { /* active vertices */ for ( final Vertex vertex : vertices ) { vertex.updateForce(); final double vertexForce = vertex.getForce(); force += vertexForce; if ( vertexForce < minForce ) minForce = vertexForce; if ( vertexForce > maxForce ) maxForce = vertexForce; } force /= vertices.size(); } observer.add( force ); }
observer.add( error ); proceed |= Math.abs( observer.getWideSlope( d ) ) > 0.0001;
throws NotEnoughDataPointsException, IllDefinedDataPointsException final ErrorStatistic observer = new ErrorStatistic( maxPlateauwidth + 1 ); observer.add( error ); Math.abs( observer.getWideSlope( maxPlateauwidth ) ) <= 0.00001 && Math.abs( observer.getWideSlope( maxPlateauwidth / 2 ) ) <= 0.00001 ) break; System.out.println( "Exiting at iteration " + i + " with error " + decimalFormat.format( observer.mean ) + " and slope " + observer.getWideSlope( maxPlateauwidth ) ); System.out.println( "Successfully optimized configuration of " + pt.size() + " tiles:" ); System.out.println( " average displacement: " + decimalFormat.format( observer.mean ) + "px" );
new ErrorStatistic( ics.getMaxPlateauWidth() + 1 ), ics.getMaxError(), ics.getMaxIterations(), ics.getMaxPlateauWidth(), 1.0f, tc, tc.getTiles(), tc.getFixedTiles(), Runtime.getRuntime().availableProcessors());
final ErrorStatistic observer = new ErrorStatistic( temp.size() ); for ( final PointMatch m : temp ) observer.add( m.getDistance() ); final double t = observer.getMedian() * maxTrust; for ( final P m : temp )
observer.add( force );
observer.add( tc.getError() ); proceed |= Math.abs( observer.getWideSlope( d ) ) > 0.0001;
println( new StringBuffer( "Successfully optimized configuration of " ).append( tiles.size() ).append( " tiles after " ).append( observer.n() ).append( " iterations:" ).toString() ); println( new StringBuffer( " average displacement: " ).append( decimalFormat.format( error ) ).append( "px" ).toString() ); println( new StringBuffer( " minimal displacement: " ).append( decimalFormat.format( minError ) ).append( "px" ).toString() );