mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
revamped
This commit is contained in:
parent
16a4f79477
commit
7c5a1a75b7
@ -16,12 +16,19 @@
|
|||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc/imgproc.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
void help()
|
||||||
|
{
|
||||||
|
cout <<
|
||||||
|
"\nThis program is demonstration for ellipse fitting. The program finds\n"
|
||||||
|
"contours and approximate it by ellipses.\n"
|
||||||
|
"Call:\n"
|
||||||
|
"./fitellipse [image_name -- Default stuff.jpg]\n" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
int sliderPos = 70;
|
int sliderPos = 70;
|
||||||
|
|
||||||
Mat image;
|
Mat image;
|
||||||
@ -34,7 +41,7 @@ int main( int argc, char** argv )
|
|||||||
image = imread(filename, 0);
|
image = imread(filename, 0);
|
||||||
if( image.empty() )
|
if( image.empty() )
|
||||||
{
|
{
|
||||||
cout << "Usage: fitellipse <image_name>\n";
|
cout << "Couldn't open image " << filename << "\nUsage: fitellipse <image_name>\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user