티스토리 뷰
OpenCV 3.4를 우분투에 처음부터 make 해서 깔았음.
위의 블로그 글대로 똑같이 진행하면 됨.
그리고 나서, https://github.com/yjxiong/dense_flow 에서 opencv 3.1 branch로 가서 파일을 다운받고 make하면 됨
사용할 때 command는 약간 불친절하게 적혀있지만,
###Usage
./extract_gpu -f=test.avi -x=tmp/flow_x -y=tmp/flow_y -i=tmp/image
-b=20 -t=1 -d=0 -s=1 -o=dir
test.avi
: input videotmp
: folder containing RGB images and optical flow imagesdir
: output generated images to folder. if set tozip
, will write images to zip files instead.
상세정보를 쓰면 아래와 같음.
const char* keys =
{
"{ f vidFile | ex2.avi | filename of video }"
"{ x xFlowFile | flow_x | filename of flow x component }"
"{ y yFlowFile | flow_y | filename of flow x component }"
"{ i imgFile | flow_i | filename of flow image}"
"{ b bound | 15 | specify the maximum of optical flow}"
"{ t type | 0 | specify the optical flow algorithm }"
"{ d device_id | 0 | set gpu id}"
"{ s step | 1 | specify the step for frame sampling}"
"{ o out | zip | output style}"
"{ w newWidth | 0 | output style}"
"{ h newHeight | 0 | output style}"
};
{
"{ f vidFile | ex2.avi | filename of video }"
"{ x xFlowFile | flow_x | filename of flow x component }"
"{ y yFlowFile | flow_y | filename of flow x component }"
"{ i imgFile | flow_i | filename of flow image}"
"{ b bound | 15 | specify the maximum of optical flow}"
"{ t type | 0 | specify the optical flow algorithm }"
"{ d device_id | 0 | set gpu id}"
"{ s step | 1 | specify the step for frame sampling}"
"{ o out | zip | output style}"
"{ w newWidth | 0 | output style}"
"{ h newHeight | 0 | output style}"
};
t는 Type인데, 0일 때는 farn / 1일 때는 tv_l1 / 2일때 brox
o는 dir로 쓰면 폴더가 만들어지고 그 안에 이미지 파일들이 생김 / zip로 쓰면 압축파일 형태로 결과물을 생성
d는 gpu device id
데이터셋 전부에 대해서 OF 뽑을 때는 dense flow의 git에 있는 python 파일을 참고해서 돌리기가 가능
$ python3 build_of.py <video_folder> <result_folder> --num_worker 1
'코딩' 카테고리의 다른 글
OpenCV imshow 관련 (0) | 2018.02.27 |
---|---|
C++에서 윈도우 파일 리스트 입력받기. (0) | 2018.02.27 |
sublime으로 latex 환경 셋팅 (0) | 2017.12.29 |
OpenCV 3.3.1 Visual Studio 2013으로 make 하기 (0) | 2017.11.09 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 섬
- 섬여행
- 홍도
- PIL
- 일본 방송국
- 파일리스트
- 캐논
- 흑산도
- 경주
- framerate조정
- 캐논후드
- 28mm f1.8
- 연구실사진
- 황룡사지터
- 일주여행
- VC2008
- 자전거
- 28.8 후드
- virtualdub 동영상 읽기
- 경주국립박물관
- ffshow
- 렌즈
- 28.8
- VirtualDub
- 도쿄
- 삼식이
- 시그마30.4
- 제주도
- EW-63
- 남도여행
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함