opencv_annotation
๋ ๋ค์ ์ค๋ฅ ๋ฉ์์ง๋ฅผ ์ถ๋ ฅํ๊ณ ์ข
๋ฃํฉ๋๋ค.
The image folder given does not exist. Please check again!
... --images
์ธ์๋ก ์ด๋ฏธ์ง๊ฐ ์๋ ๊ธฐ์กด ๋๋ ํ ๋ฆฌ์ ๋ํ ์ ๋ ๊ฒฝ๋ก๋ฅผ ์ ๋ฌํ์์๋ ๋ถ๊ตฌํ๊ณ .
๋ค์ ๋ช ๋ น์ ์ฌ์ฉํ์ต๋๋ค.
$ opencv_annotation --images /home/taras/Projects/OpenCV/resources/images/goban_empty/ --annotations /home/taras/Projects/OpenCV/resources/data/goban_empty_annotations.txt
--images
์ธ์์ ๋ํด ์ง์ ๋ ํด๋๊ฐ ์กด์ฌํฉ๋๋ค. ๊ฒฝ๋ก์์ ํํ ์ฌ๋์๋ฅผ ์ ๊ฑฐํ๋ ค๊ณ ์๋ํ์ง๋ง ํจ๊ณผ๊ฐ ์์์ต๋๋ค. /home
์ ๊ฐ์ ๋ค๋ฅธ ๊ธฐ์กด ํด๋์ ๋ํ ๊ฒฝ๋ก๋ ์๋ํ์ต๋๋ค. ์ฌ์ ํ ๋์ผํ ๊ฒฐ๊ณผ, ๋์ผํ ์ค๋ฅ ๋ฉ์์ง๊ฐ ์ธ์๋ฉ๋๋ค.
cv::CommandlineParser๋ --key=value
ํ์์ args๋ฅผ ์ฌ์ฉํ๋ฏ๋ก( =
๋๋ฝ๋จ), ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉํ์ง ์๋ ํ:
$ opencv_annotation --images=/home/taras/Projects/OpenCV/resources/images/goban_empty/ --annotations=/home/taras/Projects/OpenCV/resources/data/goban_empty_annotations.txt
, ๊ทธ๊ฒ์ ๋น์ ์ด ์ ๊ณตํ๋ ๋ชจ๋ ๊ฒฝ๋ก๋ฅผ _๋ฌด์_ํฉ๋๋ค.
@berak ๊ฐ์ฌํฉ๋๋ค! ์, ์ค์ ๋ก =
์ ํจ๊ป ์๋ํฉ๋๋ค. ๋ด ์ค์.
์ด ๋ฌธ์ ๋ฅผ ๋ค์ ์ฌ์ญ์์ค. ๋งค๊ฐ ๋ณ์์ =
๋ฅผ ์ฌ์ฉํ์ง ์๋ ๊ฒ๊ณผ ๋๊ฐ์ ๋ฌธ์ ๋ฅผ ์ฐ์ฐํ ๋ฐ๊ฒฌํ์ต๋๋ค. ์ ์๊ฒ ๋ฒ๊ธ =
์ด ํ์ํ์ง๋ง ์ ์๊ฐ์๋ =
์ฌ์ฉ ํ์ง ์์ผ๋ฉด ์ผ์ข
์ ์ค๋ฅ๊ฐ ๋ฐ์ ํด์ผ ํฉ๋๋ค . ๋ถ๋ฆ
$ opencv_annotation -i /home/user/images/ -a /home/user/annotations.txt
( =
) --images
๋ --annotations
๋ ์ค์ ๋์ง ์์ต๋๋ค. ๋ง์ต๋๊น? ๋ฌธ์ ๋ ํ์ฌ https://github.com/opencv/opencv/blob/master/apps/annotation/opencv_annotation.cpp#L238 ์ด ํธ๋ฆฌ๊ฑฐ๋์ง ์๋ ๊ฒ์ฒ๋ผ ๋ณด์ด๋ ์ค๋ฅ ๋ฉ์์ง๊ฐ ์๋ค๋ ๊ฒ์
๋๋ค. ๋จ์ํ ์ด ์ถ๋ ฅ์ด ์ฐฝ์ด ์ด๋ฆฌ์ง ์๋ ๋ช
๋ น์ค:
* mark rectangles with the left mouse button,
* press 'c' to accept a selection,
* press 'd' to delete the latest selection,
* press 'n' to proceed with next image,
* press 'esc' to stop.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
cv::CommandlineParser๋
--key=value
ํ์์ args๋ฅผ ์ฌ์ฉํ๋ฏ๋ก(=
๋๋ฝ๋จ), ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉํ์ง ์๋ ํ:, ๊ทธ๊ฒ์ ๋น์ ์ด ์ ๊ณตํ๋ ๋ชจ๋ ๊ฒฝ๋ก๋ฅผ _๋ฌด์_ํฉ๋๋ค.