Compare commits

...

5 Commits

Author SHA1 Message Date
Julian LECLERC 539a2f45f0 Merge branch 'develop' 2022-03-30 12:02:26 +02:00
Julian LECLERC b3317447a6 hello world opencv 2022-03-30 12:01:52 +02:00
Julian LECLERC 72fb71f7ac added opencv 2022-03-30 11:26:36 +02:00
Julian LECLERC ad28b9e545 merge
Merge branch 'develop'
2022-03-30 11:10:24 +02:00
Julian LECLERC 98435c957a added makefile 2022-03-30 11:05:24 +02:00
6 changed files with 37 additions and 0 deletions

BIN
a.out

Binary file not shown.

19
hello_world.cpp Normal file
View File

@ -0,0 +1,19 @@
#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 image
putText(img, "Hello World", cv::Point(15,70), cv::FONT_HERSHEY_PLAIN, 3, cv::Scalar(0,255,0),4);;
//display the image
imshow("Win",img);
//wait for a key press to exit
cv::waitKey(0);
return 0;
}

BIN
hello_world.o Normal file

Binary file not shown.

View File

@ -1,5 +1,6 @@
#include <iostream>
#include "arithmetic.h"
#include "opencv2/opencv.hpp"
int main()
{

BIN
main.o

Binary file not shown.

17
makefile.txt Normal file
View File

@ -0,0 +1,17 @@
all: main arithmetic hello_world
g++ main.o arithmetic.o -L/usr/lib/x86_64-linux-gnu -lopencv_core
g++ hello_world.o -o hello -L/usr/lib/x86_64-linux-gnu -lopencv_core
main: main.cpp
g++ -c main.cpp -I/usr/include/opencv4
arithmetic: arithmetic.cpp arithmetic.h
g++ -c arithmetic.cpp
clean:
rm*.o
rm a.out
hello_world: hello_world.cpp
g++ -c hello_world.cpp -I/usr/include/opencv4