pragnakalp
commited on
Commit
•
32bab7d
1
Parent(s):
26680d5
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,6 @@ def get_grayscale(image):
|
|
79 |
# Thresholding or Binarization
|
80 |
def thresholding(src):
|
81 |
return cv2.threshold(src,127,255, cv2.THRESH_TOZERO)[1]
|
82 |
-
readme.txt
|
83 |
def ocr_with_easy(img):
|
84 |
gray_scale_image=get_grayscale(img)
|
85 |
thresholding(gray_scale_image)
|
@@ -128,7 +127,7 @@ def save_details(Method,text_output,img):
|
|
128 |
splitted_path = os.path.splitext(picture_path)
|
129 |
modified_picture_path = splitted_path[0] + curr_datetime + splitted_path[1]
|
130 |
cv2.imwrite("myimage.jpg", img)
|
131 |
-
with open('
|
132 |
f.write(picture_path)
|
133 |
print("write Successfully")
|
134 |
# img = Image.open(r"/home/user/app/")
|
|
|
79 |
# Thresholding or Binarization
|
80 |
def thresholding(src):
|
81 |
return cv2.threshold(src,127,255, cv2.THRESH_TOZERO)[1]
|
|
|
82 |
def ocr_with_easy(img):
|
83 |
gray_scale_image=get_grayscale(img)
|
84 |
thresholding(gray_scale_image)
|
|
|
127 |
splitted_path = os.path.splitext(picture_path)
|
128 |
modified_picture_path = splitted_path[0] + curr_datetime + splitted_path[1]
|
129 |
cv2.imwrite("myimage.jpg", img)
|
130 |
+
with open('savedata.txt', 'w') as f:
|
131 |
f.write(picture_path)
|
132 |
print("write Successfully")
|
133 |
# img = Image.open(r"/home/user/app/")
|