Skip to content
Snippets Groups Projects
Unverified Commit 357da3cd authored by Kerautret Bertrand's avatar Kerautret Bertrand :thinking:
Browse files

Demo : add multiple points output

parent bf05ab97
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,8 @@ int main (int argc, char *argv[])
}
fin.close();
}
fout << "# Line detection generated from " << argv[0] << "with format : X1 Y1 X2 Y2 on each line" << std::endl;
// Blurred segment detection
vector<BlurredSegment *> bss;
BSDetector detector;
......@@ -110,6 +111,35 @@ int main (int argc, char *argv[])
nbseg ++;
}
}
vector<BlurredSegment *>::const_iterator it = bss.begin ();
while (it != bss.end ())
{
// Affichage du premier point
vector<Pt2i> points = (*it)->getAllPoints ();
fout << points.front().x() << " " << points.front().y() << " "
<< points.back().x() << " " << points.back().y() << std::endl;
// Affichage du DSS englobant
// vector<Pt2i> bnd;
// DigitalStraightSegment *dss = (*it)->getSegment ();
// if (dss != NULL)
// {
// dss->getBounds (bnd, 0, 0, width, height, false);
// // cout << "DSS starts from (" << bnd.front().x()
// // << "," << bnd.front().y() << ")" << endl;
// auto b = bnd.begin();
// for (auto &x: bnd){
// cout << "DSS starts from (" << x.x()
// << "," << x.y() << ")" << endl;
// }
// }
it++;
}
std::cout << nbseg << " detections" << std::endl;
}
else
......@@ -119,7 +149,7 @@ int main (int argc, char *argv[])
bss = detector.getBlurredSegments ();
}
fout << "# Line detection generated from " << argv[0] << "with format : X1 Y1 X2 Y2 on each line" << std::endl;
// Display
if (! bss.empty ())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment