// 輪郭の最大長は画面に映りうる最大の長方形サイズ。\r
int number_of_coord = (this._width + this._height) * 2;\r
\r
- // 輪郭バッファは頂点変換をするので、輪郭バッファの2倍取る。\r
+ // 輪郭バッファ\r
this._max_coord = number_of_coord;\r
- this._xcoord = new int[number_of_coord * 2];\r
- this._ycoord = new int[number_of_coord * 2];\r
+ this._xcoord = new int[number_of_coord];\r
+ this._ycoord = new int[number_of_coord];\r
return;\r
}\r
\r
\r
final int xsize = this._width;\r
final int ysize = this._height;\r
- final int[] xcoord = this._xcoord;\r
- final int[] ycoord = this._ycoord;\r
+ int[] xcoord = this._xcoord;\r
+ int[] ycoord = this._ycoord;\r
final int coord_max = this._max_coord;\r
\r
\r
\r
for (int i=0; i < label_num; i++) {\r
final RleLabelFragmentInfoStack.RleLabelFragmentInfo label_pt=labels[i];\r
- final int label_area = label_pt.area;\r
+ int label_area = label_pt.area;\r
\r
// クリップ領域が画面の枠に接していれば除外\r
if (label_pt.clip_l == 0 || label_pt.clip_r == xsize-1){\r
// 重なっているようだ。\r
continue;\r
}\r
- \r
+\r
// 輪郭を取得\r
- final int coord_num = _cpickup.getContour(i_raster,label_pt.entry_x,label_pt.clip_t, coord_max, xcoord, ycoord);\r
+ int coord_num = _cpickup.getContour(i_raster,label_pt.entry_x,label_pt.clip_t, coord_max, xcoord, ycoord);\r
if (coord_num == coord_max) {\r
// 輪郭が大きすぎる。\r
continue;\r
}\r
- //輪郭分析用に正規化する。\r
- final int vertex1 = SquareContourDetector.normalizeCoord(xcoord, ycoord, coord_num);\r
+ \r
+ NyARSquare square_ptr = o_square_stack.prePush();\r
\r
//ここから先が輪郭分析\r
- NyARSquare square_ptr = o_square_stack.prePush();\r
- if(!this._sqconvertor.coordToSquare(xcoord,ycoord,vertex1,coord_num,label_area,square_ptr)){\r
+ if(!this._sqconvertor.coordToSquare(xcoord,ycoord,coord_num,label_area,square_ptr)){\r
o_square_stack.pop();// 頂点の取得が出来なかったので破棄\r
continue; \r
}\r
+ \r
+ \r
// 検出済の矩形の属したラベルを重なりチェックに追加する。\r
overlap.push(label_pt);\r
}\r