http://code.opencv.org/issues/4231 ์์ ์ด์ ๋จ
|| Ehsan Azar on 2015-03-07 16:50
|| Priority: Normal
|| Affected: 2.4.9 (latest release)
|| Category: python bindings
|| Tracker: Bug
|| Difficulty:
|| PR:
|| Platform: Any / Any
[Here](http://docs.opencv.org/trunk/doc/py_tutorials/py_gui/py_video_display/py_video_display.html#saving-a-video) this line:
fourcc = cv2.VideoWriter_fourcc(*'XVID')
should be changed to this line:
fourcc = cv2.cv.FOURCC(*'XVID')
change <strong i="14">@fourcc</strong> = cv2.VideoWriter_fourcc(*'XVID')@ to <strong i="15">@fourcc</strong> = cv2.cv.FOURCC(*'XVID')@
- Category set to python bindings
๋๋ ๋น์ ์ด ํ๋ ธ๊ณ ๊ทธ๊ฒ์ ๋ฐ๊พธ๋ฉด ์๋๋ค๊ณ ์๊ฐํฉ๋๋ค. OSX์ homebrew์์ OpenCV 3.0์ ์ฌ์ฉํ๊ณ ์ ์ํ ๋๋ก fourcc = cv2.cv.FOURCC('m', 'p', '4', 'v')
๋ฅผ ์ฌ์ฉํ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ๋ถํํฉ๋๋ค.
Traceback (most recent call last):
File "./video.py", line 20, in <module>
fourcc = cv2.cv.FOURCC('m', 'p', '4', 'v')
AttributeError: 'module' object has no attribute 'cv'
Cleaned up camera.
ํ์ง๋ง fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')
๊ทธ๋๋ก ๋๋ฉด ์๋ํฉ๋๋ค.
๋ฌธ์ ๋งํฌ๋ ํธ๋ ํฌ(OpenCV 3.0) ๋ฌธ์๋ฅผ ์ฐธ์กฐํ์ง๋ง cv2.cv
๋ชจ๋์ OpenCV 2.4์์๋ง ์ฌ์ฉ๋ฉ๋๋ค.
์๊ฐ ์ด๊ณผ ์ค๋ฅ ์ ํ