research:201712
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| research:201712 [2017/12/28 04:37] – created donghee | research:201712 [2018/07/18 15:05] (current) – donghee | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| Docker실행 | Docker실행 | ||
| + | |||
| ``` | ``` | ||
| docker run -it --rm -p 8888:8888 -v `pwd`:/src udacity/ | docker run -it --rm -p 8888:8888 -v `pwd`:/src udacity/ | ||
| Line 24: | Line 25: | ||
| Docker 접속 | Docker 접속 | ||
| + | |||
| ``` | ``` | ||
| docker exec -it containerid / | docker exec -it containerid / | ||
| - | ``` | + | ``` |
| ## Finding Lines of Color | ## Finding Lines of Color | ||
| Line 32: | Line 34: | ||
| 이미지에서 특정 threshold 이하면 까만색으로 바꾼다. 못보던 구문. numpy에서 darray 다루는 방법. | 이미지에서 특정 threshold 이하면 까만색으로 바꾼다. 못보던 구문. numpy에서 darray 다루는 방법. | ||
| multidimentinal index와 slice를 사용한거다. | multidimentinal index와 slice를 사용한거다. | ||
| - | | + | |
| ``` | ``` | ||
| thresholds = (image[:,:, | thresholds = (image[:,:, | ||
| Line 39: | Line 41: | ||
| | | ||
| color_select[thresholds] = [0, 0, 0] | color_select[thresholds] = [0, 0, 0] | ||
| - | ``` | + | ``` |
| ndarray index and slicing | ndarray index and slicing | ||
| Line 51: | Line 53: | ||
| ``` | ``` | ||
| | | ||
| - | ``` | + | ``` |
| c[:,0,0] # 가장 왼쪽 컬럼 빨간 성분 | c[:,0,0] # 가장 왼쪽 컬럼 빨간 성분 | ||
| array([ | array([ | ||
| ``` | ``` | ||
| - | ``` | + | ``` |
| c[:,:,0] # 모든 요소의 빨간성분 | c[:,:,0] # 모든 요소의 빨간성분 | ||
| array([[ | array([[ | ||
| Line 68: | Line 70: | ||
| [216, 219, 222, 225, 228, 231, 234, 237, 240]]) | [216, 219, 222, 225, 228, 231, 234, 237, 240]]) | ||
| ``` | ``` | ||
| - | |||
| thresholds를 selector로 사용했다. | thresholds를 selector로 사용했다. | ||
| Line 74: | Line 75: | ||
| numpy.where를 참고 | numpy.where를 참고 | ||
| - | ``` | + | ``` |
| x = np.array([True, | x = np.array([True, | ||
| y = np.arange(4) # [0 1 2 3 ] | y = np.arange(4) # [0 1 2 3 ] | ||
| Line 95: | Line 96: | ||
| blur_gray = cv2.GaussianBlur(gray, | blur_gray = cv2.GaussianBlur(gray, | ||
| ``` | ``` | ||
| + | |||
| 왜 GaussianBlue를 하지? 노이즈 제거. | 왜 GaussianBlue를 하지? 노이즈 제거. | ||
| 커널은 함수로 N x N matrix의 합성곱(convolution) | 커널은 함수로 N x N matrix의 합성곱(convolution) | ||
| Canny | Canny | ||
| - | ``` | + | ``` |
| edges = cv2.Canny(blur_gray, | edges = cv2.Canny(blur_gray, | ||
| ``` | ``` | ||
research/201712.1514435873.txt.gz · Last modified: 2018/07/18 14:09 (external edit)