X-Git-Url: http://git.osdn.net/view?p=nyartoolkit-and%2Fnyartoolkit-and.git;a=blobdiff_plain;f=lib%2Fsrc%2Fjp%2Fnyatla%2Fnyartoolkit%2Fcore%2Fanalyzer%2Fhistogram%2FNyARHistogramAnalyzer_SlidePTile.java;h=5fbd88056cd72da9791860ffa360a3313a8e3120;hp=369b12bd12512846f0174187b33c1d7ca5a05a9b;hb=ddd20b10306bf47117e6cd33be97df06f86d6500;hpb=c57e553fedfa0adb843aaa67c1ccd30888fadd27 diff --git a/lib/src/jp/nyatla/nyartoolkit/core/analyzer/histogram/NyARHistogramAnalyzer_SlidePTile.java b/lib/src/jp/nyatla/nyartoolkit/core/analyzer/histogram/NyARHistogramAnalyzer_SlidePTile.java index 369b12b..5fbd880 100644 --- a/lib/src/jp/nyatla/nyartoolkit/core/analyzer/histogram/NyARHistogramAnalyzer_SlidePTile.java +++ b/lib/src/jp/nyatla/nyartoolkit/core/analyzer/histogram/NyARHistogramAnalyzer_SlidePTile.java @@ -1,14 +1,35 @@ +/* + * PROJECT: NyARToolkit(Extension) + * -------------------------------------------------------------------------------- + * The NyARToolkit is Java edition ARToolKit class library. + * Copyright (C)2008-2009 Ryo Iizuka + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * For further information please contact. + * http://nyatla.jp/nyatoolkit/ + * or + * + */ package jp.nyatla.nyartoolkit.core.analyzer.histogram; import jp.nyatla.nyartoolkit.core.types.NyARHistogram; - /** - * PTileを使った敷居値決定クラスです。 - * 明点と暗点を双方向からPTile法で敷居値を計算し、その中央値を閾値とします。 - * - * + * このクラスは、明点・暗点のPTail法で求めた敷居値を合算して、敷居値を計算します。 + *

敷居値決定のアルゴリズム - 明点・暗点両側からPTail法を用いて一定割合の画素を取り除き、その中間値を求めます。

*/ public class NyARHistogramAnalyzer_SlidePTile implements INyARHistogramAnalyzer_Threshold { @@ -16,14 +37,17 @@ public class NyARHistogramAnalyzer_SlidePTile implements INyARHistogramAnalyzer_ /** * コンストラクタです。 * @param i_persentage - * 敷居値とする、PTileのパーセンテージ値を指定します。 + * 明点、暗点の両側から取り除く、画素の割合を指定します。0<n<50の範囲で指定します。 */ public NyARHistogramAnalyzer_SlidePTile(int i_persentage) { assert (0 <= i_persentage && i_persentage <= 50); //初期化 this._persentage=i_persentage; - } + } + /** + * この関数は、SlidePTileを用いて敷居値を1個求めます。敷居値の範囲は、i_histogram引数の範囲と同じです。 + */ public int getThreshold(NyARHistogram i_histogram) { //総ピクセル数を計算