modules/shape/samples/shape_example.cpp
Примеры с cv2.imshow требуют сборки OpenCV с GUI. В ноутбуке с headless-версией используйте вывод изображений через Matplotlib.
Loading...
Searching...
No Matches
modules/shape/samples/shape_example.cpp
An example using shape distance algorithm
/*
* shape_context.cpp -- Shape context demo for shape matching
*/
#include "opencv2/shape.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <opencv2/core/utility.hpp>
#include <iostream>
#include <string>
using namespace std;
using namespace cv;
static ()
{
(
);
}
<> ( & , = )
{
<<> > ;
<> ;
(, , , );
( =; <.(); ++)
{
( =; <[].(); ++)
{
.( [][] );
}
}
=;
( =().()-; <; ++)
{
.([++]);
}
::();
<> ;
( =; <; ++)
{
.([]);
}
;
}
( , ** )
{
= ;
:: (, , );
(.())
{
();
;
}
= .<>();
(!.())
{
.();
();
;
}
( < || > )
{
();
;
}
:: <::> = ::();
(,);
;
<<<<<<;
=(.(), );
;
(, , , , , );
(, );
(, ,);
<> = ();
= ;
=;
( =; <=; ++ )
{
(==) ;
();
;
<<<<<<;
<<<<.()<<;
=(.(), );
;
(, , , , , );
(, );
(, .+,);
<> = ();
= ->( , );
( < )
{
= ;
= ;
}
::<<<<.()<<<<.()<<<<<<::;
}
();
;
<<<<<<;
=(.(), );
;
(, , , , , );
(, );
(, .+,);
();
;
}