JaredBailey commited on
Commit
277b364
·
verified ·
1 Parent(s): 0c09562

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -205,12 +205,14 @@ if st.session_state.screen == 2:
205
  st.session_state.blank_img = np.zeros((height + 640, width + 640, 3), np.uint8)
206
  st.session_state.blank_img[0:height, 0:width] = st.session_state.boxed_image
207
 
 
208
  for i in range(0, width, 600):
209
  for j in range(0, height, 600):
210
  # draw the rectangle
211
  cv2.rectangle(st.session_state.blank_img, (i, j), (i + 640, j + 640), (0, 255, 0), 10)
212
  # add the number of the rectangle
213
- cv2.putText(st.session_state.blank_img, str(int(i / 600) * 10 + int(j / 600)), (i + 200, j + 320), cv2.FONT_HERSHEY_SIMPLEX, 10, (0, 255, 0), 10)
 
214
  st.image(st.session_state.blank_img, use_column_width=True)
215
 
216
  with row5_col3:
 
205
  st.session_state.blank_img = np.zeros((height + 640, width + 640, 3), np.uint8)
206
  st.session_state.blank_img[0:height, 0:width] = st.session_state.boxed_image
207
 
208
+ counter = 1
209
  for i in range(0, width, 600):
210
  for j in range(0, height, 600):
211
  # draw the rectangle
212
  cv2.rectangle(st.session_state.blank_img, (i, j), (i + 640, j + 640), (0, 255, 0), 10)
213
  # add the number of the rectangle
214
+ cv2.putText(st.session_state.blank_img, str(str(counter)), (i + 200, j + 320), cv2.FONT_HERSHEY_SIMPLEX, 10, (0, 255, 0), 10)
215
+ counter += 1
216
  st.image(st.session_state.blank_img, use_column_width=True)
217
 
218
  with row5_col3: