Update samples (#10333)
* Update samples * Update calib3d.hpp * Update calib3d.hpp * Update calib3d.hpp * Update calib3d.hpp
This commit is contained in:
committed by
Vadim Pisarevsky
parent
d3a124c820
commit
1654dfe3a9
@@ -24,17 +24,21 @@
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
CV_Assert(argc == 2);
|
||||
Mat src;
|
||||
src = imread(argv[1], IMREAD_COLOR);
|
||||
CommandLineParser parser( argc, argv, "{@input | ../data/HappyFish.jpg | input image}" );
|
||||
Mat src = imread( parser.get<String>( "@input" ), IMREAD_COLOR );
|
||||
if ( src.empty() )
|
||||
{
|
||||
cout << "Could not open or find the image!\n" << endl;
|
||||
cout << "Usage: " << argv[0] << " <Input image>" << endl;
|
||||
return -1;
|
||||
}
|
||||
Mat gray = Mat( src.size(), CV_8UC1 );
|
||||
Mat color_boost = Mat( src.size(), CV_8UC3 );
|
||||
|
||||
Mat gray = Mat(src.size(),CV_8UC1);
|
||||
Mat color_boost = Mat(src.size(),CV_8UC3);
|
||||
|
||||
decolor(src,gray,color_boost);
|
||||
imshow("grayscale",gray);
|
||||
imshow("color_boost",color_boost);
|
||||
decolor( src, gray, color_boost );
|
||||
imshow( "grayscale", gray );
|
||||
imshow( "color_boost", color_boost );
|
||||
waitKey(0);
|
||||
}
|
||||
|
||||
@@ -14,32 +14,24 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#include "opencv2/photo.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/core.hpp"
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if(argc < 2)
|
||||
{
|
||||
cout << "usage: " << argv[0] << " <Input image> " << endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int num,type;
|
||||
|
||||
Mat src = imread(argv[1], IMREAD_COLOR);
|
||||
CommandLineParser parser(argc, argv, "{@input | ../data/lena.jpg | input image}");
|
||||
Mat src = imread(parser.get<String>("@input"), IMREAD_COLOR);
|
||||
|
||||
if(src.empty())
|
||||
{
|
||||
cout << "Image not found" << endl;
|
||||
cout << "Could not open or find the image!\n" << endl;
|
||||
cout << "Usage: " << argv[0] << " <Input image>" << endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user