Skip to content

Commit

Permalink
bugfix: ln 874 when components.size()==0 gets stuck in loop due to -1
Browse files Browse the repository at this point in the history
  • Loading branch information
xthepoet committed Jan 11, 2013
1 parent 8dc49ff commit bccff3e
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 bccff3e

Please sign in to comment.