Marthee commited on
Commit
b3e31f7
·
verified ·
1 Parent(s): 7298db3

Update Counting_Columns_2_1.py

Browse files
Files changed (1) hide show
  1. Counting_Columns_2_1.py +2 -2
Counting_Columns_2_1.py CHANGED
@@ -189,14 +189,14 @@ def mainfun(pdf_name):
189
  page = pdf_document[0]
190
  rotation = page.rotation
191
  derotationMatrix=page.derotation_matrix
192
- texts_from_pdf = get_text_from_pdf(plan)
193
  text_points, txtpts_ky_vlu = getTextsPoints(texts_from_pdf)
194
  if rotation != 0:
195
  if rotation ==90:
196
  text_points = fix_rotation_90(text_points, derotationMatrix)
197
  txtpts_ky_vlu = fix_90_ky_val(txtpts_ky_vlu, derotationMatrix)
198
 
199
- img = convert2img(plan)
200
  imgResult = segment_brown(img)
201
  outsu = threshold(imgResult)
202
  column_points,mask_clmns, mask_walls = get_columns_info(outsu, img)
 
189
  page = pdf_document[0]
190
  rotation = page.rotation
191
  derotationMatrix=page.derotation_matrix
192
+ texts_from_pdf = get_text_from_pdf(pdf_name)
193
  text_points, txtpts_ky_vlu = getTextsPoints(texts_from_pdf)
194
  if rotation != 0:
195
  if rotation ==90:
196
  text_points = fix_rotation_90(text_points, derotationMatrix)
197
  txtpts_ky_vlu = fix_90_ky_val(txtpts_ky_vlu, derotationMatrix)
198
 
199
+ img = convert2img(pdf_name)
200
  imgResult = segment_brown(img)
201
  outsu = threshold(imgResult)
202
  column_points,mask_clmns, mask_walls = get_columns_info(outsu, img)