MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / edge_mask

Function edge_mask

projects/Image Toonification/main.py:22–33  ·  view source on GitHub ↗
(img, line_size, blur_value)

Source from the content-addressed store, hash-verified

20
21
22def edge_mask(img, line_size, blur_value):
23 gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
24 gray_blur = cv2.medianBlur(gray, blur_value)
25 edges = cv2.adaptiveThreshold(
26 gray_blur,
27 255,
28 cv2.ADAPTIVE_THRESH_MEAN_C,
29 cv2.THRESH_BINARY,
30 line_size,
31 blur_value,
32 )
33 return edges
34
35
36img = cv2.imread(

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected