(url, readFlag=cv2.IMREAD_COLOR)
| 130 | return cv2.cvtColor(image, cv2.COLOR_BGR2RGB) |
| 131 | |
| 132 | def url_to_image(url, readFlag=cv2.IMREAD_COLOR): |
| 133 | # download the image, convert it to a NumPy array, and then read |
| 134 | # it into OpenCV format |
| 135 | resp = urlopen(url) |
| 136 | image = np.asarray(bytearray(resp.read()), dtype="uint8") |
| 137 | image = cv2.imdecode(image, readFlag) |
| 138 | |
| 139 | # return the image |
| 140 | return image |
| 141 | |
| 142 | def auto_canny(image, sigma=0.33): |
| 143 | # compute the median of the single channel pixel intensities |
nothing calls this directly
no test coverage detected
searching dependent graphs…