1. QT Creator 설치
a. sudo apt-get install libgl1-mesa-dev
b. sudo apt-get install build-essential
c. sudo apt-add-repository universe
d. sudo apt-get update
e. sudo apt-get install qt5-default
f. sudo apt-get install qtcreator
2. QT build Setting
a. Tools->Options->Build & Run->Compilers(in qt creator)
가. Click the ‘Add’ button and select ‘GCC’. In the ‘Compiler path:’ text box, place the path to the gcc compiler. On a standard installation the path is: /usr/bin/gcc.
나. custom – arm – linux – generic – elf – 64 bit
3. QT - Opencv Setting
a. OPENCV 위치
가. LIB > /usr/lib
나. INCLUDE > /usr/include
b. sudo apt-get install v4l-utils
c. Test ( webcamViewer)
가. terminal > v4l2-ctl -d /dev/video0 --list-formats ( check connected camera )
나. pro > ###opencv
INCLUDEPATH += /usr/include/
LIBS += -L/usr/lib/ \
-lopencv_highgui -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_videoio
d. 예제 샘플
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
using namespace cv;
using namespace std;
int main(int argc, char *argv[])
{
VideoCapture hVC(1);
Mat viewMat ;
while(true)
{
hVC >> viewMat;
imshow("vMat", viewMat);
waitKey(1);
}
return 0;
}
|
'프로그래밍 > LINUX' 카테고리의 다른 글
1. TX2 기본 설치[NVIDIA GPU TX2 BOARD] (0) | 2019.11.14 |
---|