MCPcopy Create free account
hub / github.com/JimmyHHua/opencv_tutorials / method_2

Function method_2

python/code_045/opencv_045.py:11–15  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

9
10
11def method_2(image):
12 blurred = cv.GaussianBlur(image, (3, 3), 0) # 高斯去噪音
13 gray = cv.cvtColor(blurred, cv.COLOR_BGR2GRAY)
14 t, binary = cv.threshold(gray, 0, 255, cv.THRESH_BINARY | cv.THRESH_OTSU)
15 return binary
16
17
18def method_3(image):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected