import cv2 # For OpenCV modules (For Image I/O and Contour Finding) import numpy as np # For general purpose array manipulation import scipy . fftpack # For FFT2 #### imclearborder definition def imclearborder ( imgBW , radius ): # Given a black and white image, first find all of its contours imgBWcopy = imgBW . copy () contours , hierarchy = cv2 . findContours ( imgBWcopy . copy (), cv2 . RETR_LIST , cv2 . CHAIN_APPROX_SIMPLE ) # Get dimensions of image imgRows = imgBW . shape [ 0 ] imgCols = imgBW . shape [ 1 ] contourList = [] # ID list of contours that touch the border # For each contour... for idx in np . arange ( len ( contours )): # Get the i'th contour cnt = contours [ idx ] # Look at each point in the contour for pt in cnt : rowCnt = pt [ 0 ][ 1 ] colCnt = pt [ 0 ][ 0 ] # If this is within the radius of th...
에 실려 있습니다. 여기에서는 84480000Hz로 변경하고 있습니다 만, 다른 기사를 보면 좀 더 빨리 할 수 있습니다. 즉 시작 4 배가됩니다. 그러나 이러한 실행하면 화면의 반응이 상당히 생계내는 때문에 이미지를 표시하는 소프트웨어에는 권장되지 않습니다. (caffe, torch7 등은 문제 없음. 확실히 속도를 실감 할 수있는)
답글삭제