Skip to content

Commit

Permalink
Fix compilation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir55 committed Dec 2, 2017
1 parent c736291 commit 1e92c25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/LineSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void
LineSegmentation::generate_chunks()
{
int width = binary_img.cols;
int chunk_width = width / CHUNKS_NUMBER;
chunk_width = width / CHUNKS_NUMBER;


for (int i_chunk = 0, start_pixel = 0; i_chunk < CHUNKS_NUMBER; ++i_chunk) {
Expand All @@ -109,8 +109,8 @@ LineSegmentation::generate_chunks()
}
}

Line
LineSegmentation::connect_valleys(int i, Valley *current_valley, Line &line, int valleys_min_abs_dist)
Line*
LineSegmentation::connect_valleys(int i, Valley *current_valley, Line *line, int valleys_min_abs_dist)
{
if (i == 0 || chunks[i]->valleys.empty()) return line;

Expand All @@ -134,7 +134,7 @@ LineSegmentation::connect_valleys(int i, Valley *current_valley, Line &line, int
return line;
}

line.valleys_ids.push_back(this->chunks[i]->valleys[connected_to]->valley_id);
line->valleys_ids.push_back(this->chunks[i]->valleys[connected_to]->valley_id);
Valley *v = this->chunks[i]->valleys[connected_to];
v->used = true;
return connect_valleys(i - 1, v, line, valleys_min_abs_dist);
Expand Down
12 changes: 6 additions & 6 deletions src/LineSegmentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ using namespace cv;
using namespace std;

class LineSegmentation;
class Region;
class Valley;

/// A class representing the separator between line regions.
class Line
Expand Down Expand Up @@ -246,6 +248,8 @@ class LineSegmentation
///< The average height of lines in the image.
int avg_space_height;
///< The average height of white spaces in the image.
int chunk_width;
///< width of the chunk.
// ToDo @Samir55 add CHUNKS_TO_BE_PROCESSED and chunk_width when needed.

/// Read the image file into CV matrix
Expand All @@ -268,10 +272,6 @@ class LineSegmentation
void
get_initial_lines();

/// Generate the initial line points.
void
generate_initial_points();

/// Generate the lines regions (A 2D mat describing each line in the image).
void
generate_regions();
Expand All @@ -298,6 +298,6 @@ class LineSegmentation
/// \param i integer The index of the chunk.
/// \param current_valley Valley The current valley.
/// \return Line a candidate(initial line)
Line
connect_valleys(int i, Valley *current_valley, Line &line, int valleys_min_abs_dist);
Line*
connect_valleys(int i, Valley *current_valley, Line *line, int valleys_min_abs_dist);
};

0 comments on commit 1e92c25

Please sign in to comment.