Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
514a5718
Commit
514a5718
authored
Mar 12, 2024
by
liukaiwen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dev-in-line-bbox
parents
94a7ba3d
1d59509d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
boxbase.py
magic_pdf/libs/boxbase.py
+5
-4
No files found.
magic_pdf/libs/boxbase.py
View file @
514a5718
...
@@ -210,10 +210,11 @@ def get_minbox_if_overlap_by_ratio(bbox1, bbox2, ratio):
...
@@ -210,10 +210,11 @@ def get_minbox_if_overlap_by_ratio(bbox1, bbox2, ratio):
area1
=
(
x1_max
-
x1_min
)
*
(
y1_max
-
y1_min
)
area1
=
(
x1_max
-
x1_min
)
*
(
y1_max
-
y1_min
)
area2
=
(
x2_max
-
x2_min
)
*
(
y2_max
-
y2_min
)
area2
=
(
x2_max
-
x2_min
)
*
(
y2_max
-
y2_min
)
overlap_ratio
=
calculate_overlap_area_2_minbox_area_ratio
(
bbox1
,
bbox2
)
overlap_ratio
=
calculate_overlap_area_2_minbox_area_ratio
(
bbox1
,
bbox2
)
if
overlap_ratio
>
ratio
and
area1
<
area2
:
if
overlap_ratio
>
ratio
:
return
bbox1
if
area1
<=
area2
:
elif
overlap_ratio
>
ratio
and
area2
<
area1
:
return
bbox1
return
bbox2
else
:
return
bbox2
else
:
else
:
return
None
return
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment