/**
  * この関数は、ラスタの指定点を基点に、画像の特定の範囲内から輪郭線を抽出します。
  * 開始点は、輪郭の一部である必要があります。
  * 通常は、ラべリングの結果の上辺クリップとX軸エントリポイントを開始点として入力します。
  * @param i_raster
  * 輪郭線を抽出するラスタを指定します。
  * @param i_area
  * 輪郭線の抽出範囲を指定する矩形。i_rasterのサイズ内である必要があります。
  * @param i_th
  * 輪郭とみなす暗点の敷居値を指定します。
  * @param i_entry_x
  * 輪郭抽出の開始点です。
  * @param i_entry_y
  * 輪郭抽出の開始点です。
  * @param o_coord
  * 輪郭点を格納するオブジェクトを指定します。
  * @return
  * 輪郭線がo_coordの長さを超えた場合、falseを返します。
  * @
  */
 public bool getContour(INyARGrayscaleRaster i_raster, NyARIntRect i_area, int i_th, int i_entry_x, int i_entry_y, NyARIntCoordinates o_coord)
 {
     //ラスタドライバの切り替え
     if (i_raster != this._ref_last_input_raster)
     {
         this._imdriver = (IRasterDriver)i_raster.createInterface(typeof(IRasterDriver));
         this._ref_last_input_raster = i_raster;
     }
     return(this._imdriver.getContour(i_area.x, i_area.y, i_area.x + i_area.w - 1, i_area.h + i_area.y - 1, i_entry_x, i_entry_y, i_th, o_coord));
 }
        /**
         * この関数は、ラスタの指定点を基点に、輪郭線を抽出します。
         * 開始点は、輪郭の一部である必要があります。
         * 通常は、ラべリングの結果の上辺クリップとX軸エントリポイントを開始点として入力します。
         * @param i_raster
         * 輪郭線を抽出するラスタを指定します。
         * @param i_th
         * 輪郭とみなす暗点の敷居値を指定します。
         * @param i_entry_x
         * 輪郭抽出の開始点です。
         * @param i_entry_y
         * 輪郭抽出の開始点です。
         * @param o_coord
         * 輪郭点を格納する配列を指定します。i_array_sizeよりも大きなサイズの配列が必要です。
         * @return
         * 輪郭の抽出に成功するとtrueを返します。輪郭抽出に十分なバッファが無いと、falseになります。
         * @
         */
        public bool getContour(INyARGrayscaleRaster i_raster, int i_th, int i_entry_x, int i_entry_y, NyARIntCoordinates o_coord)
        {
            NyARIntSize s = i_raster.getSize();

            //ラスタドライバの切り替え
            if (i_raster != this._ref_last_input_raster)
            {
                this._imdriver = (IRasterDriver)i_raster.createInterface(typeof(IRasterDriver));
                this._ref_last_input_raster = i_raster;
            }
            return(this._imdriver.getContour(0, 0, s.w - 1, s.h - 1, i_entry_x, i_entry_y, i_th, o_coord));
        }
 /**
  * この関数は、ラスタの指定点を基点に、輪郭線を抽出します。
  * 開始点は、輪郭の一部である必要があります。
  * 通常は、ラべリングの結果の上辺クリップとX軸エントリポイントを開始点として入力します。
  * @param i_raster
  * 輪郭線を抽出するラスタを指定します。
  * @param i_th
  * 輪郭とみなす暗点の敷居値を指定します。
  * @param i_entry_x
  * 輪郭抽出の開始点です。
  * @param i_entry_y
  * 輪郭抽出の開始点です。
  * @param o_coord
  * 輪郭点を格納する配列を指定します。i_array_sizeよりも大きなサイズの配列が必要です。
  * @return
  * 輪郭の抽出に成功するとtrueを返します。輪郭抽出に十分なバッファが無いと、falseになります。
  * @
  */
 public bool getContour(INyARGrayscaleRaster i_raster, int i_th, int i_entry_x, int i_entry_y, NyARIntCoordinates o_coord)
 {
     NyARIntSize s = i_raster.getSize();
     //ラスタドライバの切り替え
     if (i_raster != this._ref_last_input_raster)
     {
         this._imdriver = (IRasterDriver)i_raster.createInterface(typeof(IRasterDriver));
         this._ref_last_input_raster = i_raster;
     }
     return this._imdriver.getContour(0, 0, s.w - 1, s.h - 1, i_entry_x, i_entry_y, i_th, o_coord);
 }
 /**
  * この関数は、ラスタの指定点を基点に、画像の特定の範囲内から輪郭線を抽出します。
  * 開始点は、輪郭の一部である必要があります。
  * 通常は、ラべリングの結果の上辺クリップとX軸エントリポイントを開始点として入力します。
  * @param i_raster
  * 輪郭線を抽出するラスタを指定します。
  * @param i_area
  * 輪郭線の抽出範囲を指定する矩形。i_rasterのサイズ内である必要があります。
  * @param i_th
  * 輪郭とみなす暗点の敷居値を指定します。
  * @param i_entry_x
  * 輪郭抽出の開始点です。
  * @param i_entry_y
  * 輪郭抽出の開始点です。
  * @param o_coord
  * 輪郭点を格納するオブジェクトを指定します。
  * @return
  * 輪郭線がo_coordの長さを超えた場合、falseを返します。
  * @
  */
 public bool getContour(INyARGrayscaleRaster i_raster, NyARIntRect i_area, int i_th, int i_entry_x, int i_entry_y, NyARIntCoordinates o_coord)
 {
     //ラスタドライバの切り替え
     if (i_raster != this._ref_last_input_raster)
     {
         this._imdriver = (IRasterDriver)i_raster.createInterface(typeof(IRasterDriver));
         this._ref_last_input_raster = i_raster;
     }
     return this._imdriver.getContour(i_area.x, i_area.y, i_area.x + i_area.w - 1, i_area.h + i_area.y - 1, i_entry_x, i_entry_y, i_th, o_coord);
 }
예제 #5
0
 public NyARGsEqualizeHistFilter_Any(INyARGrayscaleRaster i_raster)
 {
     this._tone_table = NyARGsFilterFactory.createCustomToneTableFilter(i_raster);
     this._histdrv    = (INyARHistogramFromRaster)i_raster.createInterface(typeof(INyARHistogramFromRaster));
 }
 public NyARGsEqualizeHistFilter_Any(INyARGrayscaleRaster i_raster)
 {
     this._tone_table = NyARGsFilterFactory.createCustomToneTableFilter(i_raster);
     this._histdrv = (INyARHistogramFromRaster)i_raster.createInterface(typeof(INyARHistogramFromRaster));
 }