Compare commits

...

5 Commits

Author SHA1 Message Date
Your Name a2178af37e hello_world merging 2022-03-30 10:52:11 +02:00
Your Name 4417e6753b hello_world file 2 2022-03-30 10:49:58 +02:00
Your Name baf0900886 hello_world file 2022-03-30 10:49:36 +02:00
Your Name c4d7d727c8 makefile master 2022-03-30 09:54:37 +02:00
Your Name e4c3d1f330 makefile update 2022-03-30 09:49:00 +02:00
10 changed files with 54 additions and 0 deletions

BIN
a.out Executable file

Binary file not shown.

6
arithmetic.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "arithmetic.h"
int add(int a, int b)
{
int c = a+b;
return c;
}

1
arithmetic.h Normal file
View File

@ -0,0 +1 @@
int add(int, int);

BIN
arithmetic.o Normal file

Binary file not shown.

21
hello_world.cpp Normal file
View File

@ -0,0 +1,21 @@
#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("Win", img);
// wait for a key press to exit the program
cv::waitKey(0);
return 0;
}

BIN
hello_world.o Normal file

Binary file not shown.

11
main.cpp Normal file
View File

@ -0,0 +1,11 @@
#include <iostream>
#include "arithmetic.h"
#include "opencv2/opencv.hpp"
int main()
{
std::cout<<"Hello world!"<<std::endl;
std::cout<<"c: "<<add(1,2)<<std::endl;
return 0;
}

BIN
main.o Normal file

Binary file not shown.

15
makefile Normal file
View File

@ -0,0 +1,15 @@
all: main arithmetic hello
g++ main.o arithmetic.o -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
hello: hello_world.cpp
g++ -c hello_world.cpp -I/usr/include/opencv4
clean:
rm *.o
rm a.out

0
textfile.md Normal file
View File