list3.txt 文字画像の左側の辺を抽出する import java.awt.image.BufferedImage; import java.awt.Graphics; import java.awt.Color; // // 文字画像の左辺の直線度を特徴量として計算するクラス // class FeatureLeftLinerity implements FeatureEvaluater { // 左辺の長さと文字の高さ protected float left_length; protected float char_height; // 左側の辺(画像の各行の最も左側にあるドットのX座標、行にひとつもドットがなければ -1) protected int left_x[]; // 最後に特徴量計算を行った画像(描画用) protected BufferedImage last_image; // 特徴量の名前を返す public String getFeatureName() { return "左辺の直線度(文字の高さ / 左側の辺の長さ)"; } // 文字画像から1次元の特徴量を計算する public float evaluate( BufferedImage image ) { int height = image.getHeight(); int width = image.getWidth(); // 左側の辺を取り出す(各行の最も左側のドットのX座標を調べる) left_x = new int[ height ]; for ( int y=0; y