Commit 75b76554 authored by siddharth's avatar siddharth

errors in samples/cpp removed

parent 01e1ccfa
...@@ -69,6 +69,10 @@ float red, green, blue; ...@@ -69,6 +69,10 @@ float red, green, blue;
double low_t, high_t; double low_t, high_t;
void source(int, int, int, int, void*);
void destination(int, int, int, int, void*);
void checkfile(char*);
void source(int event, int x, int y, int, void*) void source(int event, int x, int y, int, void*)
{ {
...@@ -304,7 +308,7 @@ void checkfile(char *file) ...@@ -304,7 +308,7 @@ void checkfile(char *file)
} }
} }
int main(int argc, char **argv) int main()
{ {
cout << endl; cout << endl;
cout << "Cloning Module" << endl; cout << "Cloning Module" << endl;
......
...@@ -36,6 +36,8 @@ int minx,miny,maxx,maxy,lenx,leny; ...@@ -36,6 +36,8 @@ int minx,miny,maxx,maxy,lenx,leny;
int channel; int channel;
void mouseHandler(int, int, int, int, void*);
void mouseHandler(int event, int x, int y, int, void*) void mouseHandler(int event, int x, int y, int, void*)
{ {
...@@ -123,6 +125,13 @@ void mouseHandler(int event, int x, int y, int, void*) ...@@ -123,6 +125,13 @@ void mouseHandler(int event, int x, int y, int, void*)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
if(argc != 2)
{
cout << "usage: " << argv[0] << " <input_image>" << endl;
exit(1);
}
Mat src = imread(argv[1]); Mat src = imread(argv[1]);
minx = INT_MAX; miny = INT_MAX; maxx = INT_MIN; maxy = INT_MIN; minx = INT_MAX; miny = INT_MAX; maxx = INT_MIN; maxy = INT_MIN;
......
...@@ -28,19 +28,16 @@ using namespace cv; ...@@ -28,19 +28,16 @@ using namespace cv;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
int num,type;
int flag = 0;
Mat I = imread(argv[1]);
if(argc < 2) if(argc < 2)
{ {
cout << "usage: " << argv[0] << " <Input image> " << endl; cout << "usage: " << argv[0] << " <Input image> " << endl;
exit(0); exit(0);
} }
int num,type;
Mat I = imread(argv[1]);
if(!I.data) if(!I.data)
{ {
cout << "Image not found" << endl; cout << "Image not found" << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment