mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-13 07:59:04 +08:00
Merge pull request #1655 from stweil/scanedg
block_edges: Add assertions for block coordinates
This commit is contained in:
commit
a4241c9817
@ -50,6 +50,8 @@ void block_edges(Pix *t_pix, // thresholded image
|
||||
CRACKEDGE *free_cracks = nullptr;
|
||||
|
||||
block->bounding_box(bleft, tright); // block box
|
||||
ASSERT_HOST(tright.x() <= width);
|
||||
ASSERT_HOST(tright.y() <= height);
|
||||
int block_width = tright.x() - bleft.x();
|
||||
for (int x = block_width; x >= 0; x--)
|
||||
ptrline[x] = nullptr; // no lines in progress
|
||||
|
Loading…
Reference in New Issue
Block a user