Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -226,13 +226,12 @@ def blur_im(img,bounds):
|
|
226 |
w = int(p2[0]) - int(x)
|
227 |
h = int(p2[1]) - int(y)
|
228 |
draw = ImageDraw.Draw(im)
|
229 |
-
font_size=round(int(w)*0.)
|
230 |
font = ImageFont.truetype("./fonts/unifont-15.0.01.ttf", int(font_size))
|
231 |
draw.text((x, y),text, font = font, fill=(0,0,0))
|
232 |
-
kernel = np.ones((1, 1), np.uint8)
|
233 |
-
|
234 |
-
im[y:y+h, x:x+w] = cv2.
|
235 |
-
im[y:y+h, x:x+w] = cv2.erode(im[y:y+h, x:x+w], kernel, iterations=1)
|
236 |
|
237 |
return im
|
238 |
|
|
|
226 |
w = int(p2[0]) - int(x)
|
227 |
h = int(p2[1]) - int(y)
|
228 |
draw = ImageDraw.Draw(im)
|
229 |
+
font_size=round(int(w)*0.2)
|
230 |
font = ImageFont.truetype("./fonts/unifont-15.0.01.ttf", int(font_size))
|
231 |
draw.text((x, y),text, font = font, fill=(0,0,0))
|
232 |
+
#kernel = np.ones((1, 1), np.uint8)
|
233 |
+
#im[y:y+h, x:x+w] = cv2.dilate(im[y:y+h, x:x+w], kernel, iterations=1)
|
234 |
+
#im[y:y+h, x:x+w] = cv2.erode(im[y:y+h, x:x+w], kernel, iterations=1)
|
|
|
235 |
|
236 |
return im
|
237 |
|