Skip to content

Commit

Permalink
add cell count in line2cell
Browse files Browse the repository at this point in the history
  • Loading branch information
kiang committed Apr 4, 2014
1 parent d9a6997 commit 92b32c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ nbproject
*.zip
pdf/
tmp/
*.jpg
2 changes: 2 additions & 0 deletions scripts/kiang/3_line2cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
$imageObj->width = $oFile[4];
$imageObj->height = $oFile[5];
$imageObj->cells = array();
$imageObj->cellCount = 0;
$previousLine = array();
$numberX = 0;
foreach ($oJson->cross_points AS $line) {
Expand All @@ -54,6 +55,7 @@
continue;
}
++$numberY;
++$imageObj->cellCount;
if (!isset($imageObj->cells[$numberX])) {
$imageObj->cells[$numberX] = array();
}
Expand Down

0 comments on commit 92b32c7

Please sign in to comment.