LiuSamarabanduTextExtractorMultiscale extends TextExtractor<FImage> { @Override public void processImage( FImage image ) { PyramidTextExtractor ped = new PyramidTextExtractor(); GaussianPyramidOptions<FImage> gpo = new GaussianPyramidOptions<FImage>(); gpo.setScales( 1 ); gpo.setExtraScaleSteps( 1 ); gpo.setPyramidProcessor( ped ); gpo.setDoubleInitialImage( false ); GaussianPyramid<FImage> gp = new GaussianPyramid<FImage>( gpo ); image.analyseWith( gp ); FImage msFMap = ped.getFeatureMap(); FImage fmap = this.basicTextExtractor.textRegionDetection( image ); msFMap = fmap.add( msFMap ); if( DEBUG ) DisplayUtilities.display( msFMap.normalise(), "Fused Feature Map" ); this.basicTextExtractor.processFeatureMap( msFMap, image ); this.extractedRegions = this.basicTextExtractor.getTextRegions(); if( DEBUG ) forceWait(); image.internalAssign( fmap ); }  @Override void processImage( FImage image ); @Override Map<Rectangle, FImage> getTextRegions();  }
@Test public void testExtractRegions() { try { FImage testImage = ImageUtilities.readF( getClass().getResource("signtext.jpg") ).normalise(); LiuSamarabanduTextExtractorMultiscale te = new LiuSamarabanduTextExtractorMultiscale(); te.processImage( testImage ); } catch( IOException e ) { e.printStackTrace(); } }