/** * GSラスタの2値ラべリングを実行します。 * @param i_gs_raster * @param i_th * 二値化の敷居値を指定します。 * @param o_stack * 結果を蓄積するスタックオブジェクトを指定します。 * 関数は、このオブジェクトに結果を追記します。 * @return * @throws NyARException */ public virtual void labeling(NyARGrayscaleRaster i_gs_raster, int i_th) { Debug.Assert(i_gs_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8)); NyARIntSize size = i_gs_raster.getSize(); this.imple_labeling(i_gs_raster, i_th, 0, 0, size.w, size.h); }
/** * ラスタの指定点を基点に、輪郭線を抽出します。開始点は、輪郭の一部、かつ左上のエッジで有る必要があります。 * @param i_raster * 輪郭線を抽出するラスタを指定します。 * @param i_th * 輪郭とみなす暗点の敷居値を指定します。 * @param i_entry_x * 輪郭抽出の開始点です。 * @param i_entry_y * 輪郭抽出の開始点です。 * @param o_coord * 輪郭点を格納する配列を指定します。i_array_sizeよりも大きなサイズの配列が必要です。 * @return * 輪郭の抽出に成功するとtrueを返します。輪郭抽出に十分なバッファが無いと、falseになります。 * @throws NyARException */ public bool getContour(NyARGrayscaleRaster i_raster, int i_th, int i_entry_x, int i_entry_y, NyARIntCoordinates o_coord) { Debug.Assert(i_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8)); NyARIntSize s = i_raster.getSize(); return(impl_getContour(i_raster, 0, 0, s.w - 1, s.h - 1, i_th, i_entry_x, i_entry_y, o_coord)); }
/** * * @param i_raster * @param i_th * 画像を2値化するための閾値。暗点<=i_th<明点となります。 * @param i_entry_x * 輪郭の追跡開始点を指定します。 * @param i_entry_y * @param i_array_size * @param o_coord_x * @param o_coord_y * @return * @throws NyARException */ public int getContour(NyARGrayscaleRaster i_raster, int i_th, int i_entry_x, int i_entry_y, int i_array_size, int[] o_coord_x, int[] o_coord_y) { Debug.Assert(i_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8)); return(impl_getContour(i_raster, i_th, i_entry_x, i_entry_y, i_array_size, o_coord_x, o_coord_y)); }
/** * * @param i_raster * @param i_th * 画像を2値化するための閾値。暗点<=i_th<明点となります。 * @param i_entry_x * 輪郭の追跡開始点を指定します。 * @param i_entry_y * @param i_array_size * @param o_coord_x * @param o_coord_y * @return * @throws NyARException */ public int getContour(NyARGrayscaleRaster i_raster, int i_th, int i_entry_x, int i_entry_y, int i_array_size, int[] o_coord_x, int[] o_coord_y) { Debug.Assert(i_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8)); return impl_getContour(i_raster, i_th, i_entry_x, i_entry_y, i_array_size, o_coord_x, o_coord_y); }
/** * 範囲付きでGSラスタの2値ラべリングを実行します。 * @param i_gs_raster * @param i_area * @param i_th * @param o_stack * 結果を蓄積するスタックオブジェクトを指定します。 * 関数は、このオブジェクトに結果を追記します。 * @return * @throws NyARException */ public virtual void labeling(NyARGrayscaleRaster i_gs_raster, NyARIntRect i_area, int i_th) { Debug.Assert(i_gs_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8)); this.imple_labeling(i_gs_raster, i_th, i_area.x, i_area.y, i_area.w, i_area.h); }
/** * BINラスタをラベリングします。 * @param i_gs_raster * @param i_th * 画像を2値化するための閾値。暗点<=th<明点となります。 * @param i_top * @param i_bottom * @param o_stack * @return * @throws NyARException */ public int labeling(NyARGrayscaleRaster i_gs_raster, int i_th, int i_top, int i_bottom, RleLabelFragmentInfoStack o_stack) { Debug.Assert(i_gs_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8)); return(this.imple_labeling(i_gs_raster, i_th, i_top, i_bottom, o_stack)); }
public bool getContour(NyARGrayscaleRaster i_raster, NyARIntRect i_area, int i_th, int i_entry_x, int i_entry_y, NyARIntCoordinates o_coord) { Debug.Assert(i_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8)); return(impl_getContour(i_raster, i_area.x, i_area.y, i_area.x + i_area.w - 1, i_area.h + i_area.y - 1, i_th, i_entry_x, i_entry_y, o_coord)); }