Skip to content

Commit b380db4

Browse files
Merge pull request #2801 from avinashkranjan/deepsource-transform-0c70ebfc
format code with autopep8
2 parents 068c7b8 + 094d50e commit b380db4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Border Extraction/Border_extraction.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
photo = askopenfilename()
1212
img = cv2.imread(photo)
13-
n,l,m = img.shape
14-
size = (n,l)
13+
n, l, m = img.shape
14+
size = (n, l)
1515
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
1616

17-
threshold_value = 20 # this value needs to be adjusted for every image
17+
threshold_value = 20 # this value needs to be adjusted for every image
1818
ret, thresh = cv2.threshold(gray, threshold_value, 255, 0)
1919

20-
kernel = np.ones((5,5),np.uint8)
20+
kernel = np.ones((5, 5), np.uint8)
2121
# dilation and erosion are applied to binary images
2222
dilated = cv2.dilate(thresh, kernel, iterations=1)
2323
eroded = cv2.erode(thresh, kernel, iterations=1)
@@ -29,4 +29,4 @@
2929
cv2.waitKey(0)
3030
cv2.destroyAllWindows()
3131

32-
window.mainloop()
32+
window.mainloop()

0 commit comments

Comments
 (0)