Spaces:
Sleeping
Sleeping
Update Counting_Columns_2_1.py
Browse files- Counting_Columns_2_1.py +2 -2
Counting_Columns_2_1.py
CHANGED
|
@@ -102,7 +102,7 @@ def getTextsPoints(x):
|
|
| 102 |
pt_clm[calculate_midpoint(h[1],h[0],h[3],h[2])] = h[4]
|
| 103 |
return point_list, pt_clm
|
| 104 |
|
| 105 |
-
def fix_90_ky_val(pt_clm):
|
| 106 |
new_derotated = {}
|
| 107 |
for ky in pt_clm:
|
| 108 |
pts = fitz.Point(ky[0], ky[1]) * derotationMatrix
|
|
@@ -175,7 +175,7 @@ def mainfun(plan):
|
|
| 175 |
if rotation != 0:
|
| 176 |
if rotation ==90:
|
| 177 |
text_points = fix_rotation_90(text_points, derotationMatrix)
|
| 178 |
-
txtpts_ky_vlu = fix_90_ky_val(txtpts_ky_vlu)
|
| 179 |
|
| 180 |
img = convert2img(plan)
|
| 181 |
imgResult = segment_brown(img)
|
|
|
|
| 102 |
pt_clm[calculate_midpoint(h[1],h[0],h[3],h[2])] = h[4]
|
| 103 |
return point_list, pt_clm
|
| 104 |
|
| 105 |
+
def fix_90_ky_val(pt_clm, derotationMatrix):
|
| 106 |
new_derotated = {}
|
| 107 |
for ky in pt_clm:
|
| 108 |
pts = fitz.Point(ky[0], ky[1]) * derotationMatrix
|
|
|
|
| 175 |
if rotation != 0:
|
| 176 |
if rotation ==90:
|
| 177 |
text_points = fix_rotation_90(text_points, derotationMatrix)
|
| 178 |
+
txtpts_ky_vlu = fix_90_ky_val(txtpts_ky_vlu, derotationMatrix)
|
| 179 |
|
| 180 |
img = convert2img(plan)
|
| 181 |
imgResult = segment_brown(img)
|