/** * Update all affine transformations. * */ public void updateAffines() { final Set< AffineModel2D > s = av.keySet(); for ( final AffineModel2D ai : s ) { try { ai.fit( av.get( ai ) ); } catch ( final NotEnoughDataPointsException e ) { e.printStackTrace(); } catch ( final IllDefinedDataPointsException e ) { e.printStackTrace(); } } }
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 1d translation model, at least " + MIN_NUM_MATCHES + " data points required." );
return new ValuePair< String, Double >( e.toString(), Double.NaN );
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 1d translation model, at least " + MIN_NUM_MATCHES + " data points required." );
/** * Update all affine transformations. * */ public void updateAffines() { final Set< AffineModel2D > s = av.keySet(); for ( final AffineModel2D ai : s ) { try { ai.fit( av.get( ai ) ); } catch ( final NotEnoughDataPointsException e ) { e.printStackTrace(); } catch ( final IllDefinedDataPointsException e ) { e.printStackTrace(); } } }
@Override final public <P extends PointMatch> void fit( final Collection< P > matches ) throws NotEnoughDataPointsException, IllDefinedDataPointsException { if ( matches.size() < MIN_NUM_MATCHES ) throw new NotEnoughDataPointsException( matches.size() + " matches given, we need at least " + MIN_NUM_MATCHES + " data point." ); }
/** * Update all affine transformations that would have been affected by a * given {@link PointMatch Vertex}. * * @param p */ public void updateAffine( final PointMatch p ) { for ( final AffineModel2D ai : va.get( p ) ) { try { ai.fit( av.get( ai ) ); } catch ( final NotEnoughDataPointsException e ) { e.printStackTrace(); } catch ( final IllDefinedDataPointsException e ) { e.printStackTrace(); } } }
@Override final public <P extends PointMatch> void fit( final Collection< P > matches ) throws NotEnoughDataPointsException, IllDefinedDataPointsException { if ( matches.size() < MIN_NUM_MATCHES ) throw new NotEnoughDataPointsException( matches.size() + " matches given, we need at least " + MIN_NUM_MATCHES + " data point." ); }
/** * Update all affine transformations that would have been affected by a * given {@link PointMatch Vertex}. * * @param p */ public void updateAffine( final PointMatch p ) { for ( final AffineModel2D ai : va.get( p ) ) { try { ai.fit( av.get( ai ) ); } catch ( final NotEnoughDataPointsException e ) { e.printStackTrace(); } catch ( final IllDefinedDataPointsException e ) { e.printStackTrace(); } } }
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 1d translation model, at least " + MIN_NUM_MATCHES + " data points required." );
/** * Add a triangle defined by 3 PointMatches that defines an * AffineTransform2D. * * @param t * 3 PointMatches (will not be copied, so do not reuse this * list!) */ public void addTriangle( final ArrayList< PointMatch > t ) { final AffineModel2D m = new AffineModel2D(); try { m.fit( t ); } catch ( final NotEnoughDataPointsException e ) { e.printStackTrace(); } catch ( final IllDefinedDataPointsException e ) { e.printStackTrace(); } av.put( m, t ); for ( final PointMatch pm : t ) { if ( !va.containsKey( pm ) ) va.put( pm, new ArrayList< AffineModel2D >() ); va.get( pm ).add( m ); } }
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 1d translation model, at least " + MIN_NUM_MATCHES + " data points required." );
@Override public void run() { while ( !isInterrupted() ) { try { if ( pleaseOptimize ) { mesh.optimize( Double.MAX_VALUE, 10000, 1000 ); pleaseIllustrate = false; apply(); } synchronized ( this ){ wait(); } } catch ( final NotEnoughDataPointsException ex ){ ex.printStackTrace( System.err ); } catch ( final InterruptedException e){ Thread.currentThread().interrupt(); } } } }
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 2d translation model, at least " + MIN_NUM_MATCHES + " data points required." );
@Override public void run() { while ( !isInterrupted() ) { try { if ( pleaseOptimize ) { mesh.optimize( Double.MAX_VALUE, 10000, 1000 ); pleaseIllustrate = false; apply(); } synchronized ( this ){ wait(); } } catch ( final NotEnoughDataPointsException ex ){ ex.printStackTrace( System.err ); } catch ( final InterruptedException e){ Thread.currentThread().interrupt(); } } } }
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 2d translation model, at least " + MIN_NUM_MATCHES + " data points required." );
/** * Add a triangle defined by 3 PointMatches that defines an * AffineTransform2D. * * @param t * 3 PointMatches (will not be copied, so do not reuse this * list!) */ public void addTriangle( final ArrayList< PointMatch > t ) { final AffineModel2D m = new AffineModel2D(); try { m.fit( t ); } catch ( final NotEnoughDataPointsException e ) { e.printStackTrace(); } catch ( final IllDefinedDataPointsException e ) { e.printStackTrace(); } av.put( m, t ); for ( final PointMatch pm : t ) { if ( !va.containsKey( pm ) ) va.put( pm, new ArrayList< AffineModel2D >() ); va.get( pm ).add( m ); } }
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 2d translation model, at least " + MIN_NUM_MATCHES + " data points required." );
10 ); catch( final NotEnoughDataPointsException e ) { e.printStackTrace(); }
throw new NotEnoughDataPointsException( l + " data points are not enough to estimate a 2d translation model, at least " + MIN_NUM_MATCHES + " data points required." );