Skip to content

Commit

Permalink
Merge pull request #2 from xthepoet/patch-1
Browse files Browse the repository at this point in the history
bugfix: ln 874 when components.size()==0 gets stuck in loop due to -1
  • Loading branch information
aperrault committed Jan 11, 2013
2 parents 8dc49ff + bccff3e commit 5f95d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TextDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ std::vector<Chain> makeChains( IplImage * colorImage,

// form all eligible pairs and calculate the direction of each
std::vector<Chain> chains;
for ( unsigned int i = 0; i < components.size() - 1; i++ ) {
for ( unsigned int i = 0; i < components.size(); i++ ) {
for ( unsigned int j = i + 1; j < components.size(); j++ ) {
// TODO add color metric
if ( (compMedians[i]/compMedians[j] <= 2.0 || compMedians[j]/compMedians[i] <= 2.0) &&
Expand Down

0 comments on commit 5f95d34

Please sign in to comment.