Ask Your Question

Revision history [back]

line function is not recognized

i am working in visual studio 2015 and opencv 3.1. when i run typical code for drawing line ;

include <opencv2 core="" core.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include<iostream>

using namespace cv;

int main() { // Create black empty images Mat image = Mat::zeros(400, 400, CV_8UC3);

// Draw a line 

line(image, Point(15, 20), Point(70, 50), Scalar(110, 220, 0), 2, 8);

waitKey(0);
return(0);

} i get the build error: identifier "line" is undefined

line function is not recognized

i am working in visual studio 2015 and opencv 3.1. when i run typical code for drawing line ;

include <opencv2 core="" core.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include<iostream>

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include<iostream>
using namespace cv;

cv;

int main() { // Create black empty images Mat image = Mat::zeros(400, 400, CV_8UC3);

CV_8UC3);
 // Draw a line
 line(image, Point(15, 20), Point(70, 50), Scalar(110, 220, 0), 2, 8);
 waitKey(0);
 return(0);
}

} i get the build error: identifier "line" is undefined