Atualli commited on
Commit
40abeda
·
1 Parent(s): 280cb6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -79,8 +79,11 @@ def execute_text_recognition_tflite( boxes, frame, interpreter, input_details, o
79
  return text,cv2.resize(save_frame,(94,24))
80
 
81
  def greet(image):
82
- sharpened = unsharp_mask(image)
83
- image = increase_brightness(sharpened, value=10) # 60 ->5qoOk.png #10 -> if8nC.png
 
 
 
84
 
85
  resized = cv2.resize(image, (320,320), interpolation=cv2.INTER_LINEAR)
86
  input_data = resized.astype(np.float32) # Set as 3D RGB float array
 
79
  return text,cv2.resize(save_frame,(94,24))
80
 
81
  def greet(image):
82
+ #sharpened = unsharp_mask(image)
83
+ #image = increase_brightness(sharpened, value=10) # 60 ->5qoOk.png #10 -> if8nC.png
84
+
85
+ norm_img = np.zeros((image.shape[0], image.shape[1]))
86
+ image = cv2.normalize(image, norm_img, 0, 255, cv2.NORM_MINMAX)
87
 
88
  resized = cv2.resize(image, (320,320), interpolation=cv2.INTER_LINEAR)
89
  input_data = resized.astype(np.float32) # Set as 3D RGB float array