1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-20 21:40:49 +08:00

Lines extraction and descriptors testing completed

This commit is contained in:
biagio montesano
2014-06-25 16:10:46 +02:00
parent fc72a71b33
commit 96183dd09b
29 changed files with 617 additions and 474 deletions

View File

@@ -1,6 +1,5 @@
#include <opencv2/line_descriptor.hpp>
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
#include <opencv2/imgproc.hpp>
@@ -18,6 +17,14 @@ static const char* keys =
};
static void help()
{
cout << "\nThis example shows the functionalities of lines extraction " <<
"furnished by BinaryDescriptor class\n" <<
"Please, run this sample using a command in the form\n" <<
"./example_line_descriptor_lines_extraction <path_to_input_image>" << endl;
}
int main( int argc, char** argv )
{
/* get parameters from comand line */
@@ -26,7 +33,7 @@ int main( int argc, char** argv )
if(image_path.empty())
{
// help();
help();
return -1;
}
@@ -49,7 +56,7 @@ int main( int argc, char** argv )
vector<KeyLine> lines;
/* extract lines */
bd->detectKL(imageMat, lines, mask);
bd->detect(imageMat, lines, mask);
/* draw lines extracted from octave 0 */
cv::Mat output = imageMat.clone();
@@ -70,9 +77,6 @@ int main( int argc, char** argv )
/* draw line */
line(output, pt1, pt2, Scalar(B,G,R), 5);
std::cout << "Dati linea" << " " << kl.startPointX << " " <<
kl.startPointY << " " << kl.endPointX << " " <<
kl.endPointY << " " << kl.lineLength << std::endl;
}
}