User Tools

Site Tools


research:201712

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
research:201712 [2017/12/28 04:37] – created dongheeresearch: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/carnd-term1-starter-kit test.ipynb docker run -it --rm -p 8888:8888 -v `pwd`:/src udacity/carnd-term1-starter-kit test.ipynb
Line 24: Line 25:
  
 Docker 접속 Docker 접속
 +
 ``` ```
 docker exec -it containerid /bin/bash     docker exec -it containerid /bin/bash    
-```    +```
  
 ## 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[:,:,0] < rgb_threshold[0]) \ thresholds = (image[:,:,0] < rgb_threshold[0]) \
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([  0,  27,  54,  81, 108, 135, 162, 189, 216]) array([  0,  27,  54,  81, 108, 135, 162, 189, 216])
 ``` ```
  
-```        +```
 c[:,:,0] # 모든 요소의 빨간성분 c[:,:,0] # 모든 요소의 빨간성분
 array([[  0,   3,   6,   9,  12,  15,  18,  21,  24], array([[  0,   3,   6,   9,  12,  15,  18,  21,  24],
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, False, True, False]) x = np.array([True, False, True, False])
 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,(kernel_size, kernel_size),0) blur_gray = cv2.GaussianBlur(gray,(kernel_size, kernel_size),0)
 ``` ```
 +
 왜 GaussianBlue를 하지? 노이즈 제거. 왜 GaussianBlue를 하지? 노이즈 제거.
 커널은 함수로 N x N matrix의 합성곱(convolution)  커널은 함수로 N x N matrix의 합성곱(convolution) 
  
 Canny Canny
-```        +```
 edges = cv2.Canny(blur_gray, low_threshold, high_threshold) edges = cv2.Canny(blur_gray, low_threshold, high_threshold)
 ``` ```
research/201712.1514435873.txt.gz · Last modified: 2018/07/18 14:09 (external edit)