Skip to content

Commit

Permalink
add debuging lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir55 committed Dec 2, 2017
1 parent 1e92c25 commit 2e01df1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/LineSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,13 +685,13 @@ Region::bi_variate_gaussian_density(Mat point)
void
LineSegmentation::sieve()
{
notPrimesArr[0] = notPrimesArr[1] = 1;
not_primes_arr[0] = not_primes_arr[1] = 1;
for (int i = 2; i < 1e5; ++i) {
if (notPrimesArr[i]) continue;
if (not_primes_arr[i]) continue;

primes.push_back(i);
for (int j = i * 2; j < 1e5; j += i) {
notPrimesArr[j] = 1;
not_primes_arr[j] = 1;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/LineSegmentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class Chunk
class LineSegmentation
{
private:
bool notPrimesArr[100007];
bool not_primes_arr[100007];
vector<int> primes;

void
Expand Down
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#include "LineSegmentation.hpp"

int main() {
string img_path = "../img/A.jpg";
string img_path = "../img/1min.png";
LineSegmentation line_segmentation(img_path);
vector<cv::Mat> lines = line_segmentation.segment();
// ToDo @Samir55 Remove.
int idx = 0;
for(auto m : lines) {
imwrite("Line " + to_string(idx++) + ".jpg", m);
}
return 0;
}

0 comments on commit 2e01df1

Please sign in to comment.