diff --git a/hello_world b/hello_world new file mode 100755 index 0000000..fe6e344 Binary files /dev/null and b/hello_world differ diff --git a/hello_world.cpp b/hello_world.cpp new file mode 100644 index 0000000..173a54f --- /dev/null +++ b/hello_world.cpp @@ -0,0 +1,15 @@ +#include "opencv2/opencv.hpp" +#include "opencv2/highgui/highgui.hpp" +int main() +{ + // initialize a matrix of black pixels + cv::Mat img = cv::Mat::zeros(120, 350, CV_8UC3); + // write text on the image + putText(img, "Hello World", cv::Point(15, 70), cv::FONT_HERSHEY_PLAIN, 3, cv::Scalar(0, 255, 0), + 4); + // display the image + imshow("eeeeh bin non mec", img); + // wait for a key press to exit the program + cv::waitKey(0); + return 0; +} diff --git a/makefile b/makefile index 9a8464a..79ec614 100644 --- a/makefile +++ b/makefile @@ -1,9 +1,15 @@ -all: main arithmetic - g++ arithmetic.o main.o -L/usr/lib/x86_64-linux-gnu -lopencv_core +all: hello_world + g++ hello_world.o -o hello_world -L/usr/lib/x86_64-linux-gnu -lopencv_core -lopencv_highgui -lopencv_imgproc + main: main.cpp g++ -c main.cpp -I/usr/include/opencv4 + arithmetic: arithmetic.cpp arithmetic.h g++ -c arithmetic.cpp + +hello_world: hello_world.cpp + g++ -c hello_world.cpp -I/usr/include/opencv4/opencv2 -I/usr/include/opencv4 + clean: rm *.o rm a.out