Merge branch 'develop'
This commit is contained in:
commit
539a2f45f0
|
|
@ -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;
|
||||||
|
}
|
||||||
Binary file not shown.
1
main.cpp
1
main.cpp
|
|
@ -1,5 +1,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "arithmetic.h"
|
#include "arithmetic.h"
|
||||||
|
#include "opencv2/opencv.hpp"
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
13
makefile.txt
13
makefile.txt
|
|
@ -1,8 +1,9 @@
|
||||||
all: main arithmetic
|
all: main arithmetic hello_world
|
||||||
g++ main.o arithmetic.o
|
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
|
main: main.cpp
|
||||||
g++ -c main.cpp
|
g++ -c main.cpp -I/usr/include/opencv4
|
||||||
|
|
||||||
arithmetic: arithmetic.cpp arithmetic.h
|
arithmetic: arithmetic.cpp arithmetic.h
|
||||||
g++ -c arithmetic.cpp
|
g++ -c arithmetic.cpp
|
||||||
|
|
@ -10,3 +11,7 @@ arithmetic: arithmetic.cpp arithmetic.h
|
||||||
clean:
|
clean:
|
||||||
rm*.o
|
rm*.o
|
||||||
rm a.out
|
rm a.out
|
||||||
|
|
||||||
|
hello_world: hello_world.cpp
|
||||||
|
g++ -c hello_world.cpp -I/usr/include/opencv4
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue