Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
8785ac1d
"git@developer.sourcefind.cn:OpenDAS/dlib.git" did not exist on "2a56ca8d334cb5b5980158e7b998c1426d6d1e5c"
Commit
8785ac1d
authored
May 23, 2018
by
Davis King
Browse files
Clarified spec
parent
844b3552
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
dlib/image_transforms/interpolation_abstract.h
dlib/image_transforms/interpolation_abstract.h
+8
-9
No files found.
dlib/image_transforms/interpolation_abstract.h
View file @
8785ac1d
...
@@ -1466,15 +1466,14 @@ namespace dlib
...
@@ -1466,15 +1466,14 @@ namespace dlib
- pts.size() == 4
- pts.size() == 4
ensures
ensures
- The 4 points in pts define a convex quadrilateral and this function extracts
- The 4 points in pts define a convex quadrilateral and this function extracts
that part of the i
mage
and stores it into #out. Therefore, each
corner of
that part of the i
nput image img
and stores it into #out. Therefore, each
the quadrilateral is associated to a corner of #out and bilinear
corner of
the quadrilateral is associated to a corner of #out and bilinear
interpolation and a projective mapping is used to transform the pixels in the
interpolation and a projective mapping is used to transform the pixels in the
quadrilateral in img into #out. To determine which corners of the
quadrilateral into #out. To determine which corners of the quadrilateral map
quadrilateral map to which corners of #out we fit the tightest possible
to which corners of #out we fit the tightest possible rectangle to the
rectangle to the quadrilateral and map its vertices to their nearest
quadrilateral and map its vertices to their nearest rectangle corners. These
rectangle corners. These corners are then trivially mapped to #out (i.e.
corners are then trivially mapped to #out (i.e. upper left corner to upper
upper left corner to upper left corner, upper right corner to upper right
left corner, upper right corner to upper right corner, etc.).
corner, etc.).
- #out.nr() == out.nr() && #out.nc() == out.nc().
- #out.nr() == out.nr() && #out.nc() == out.nc().
I.e. out should already be sized to whatever size you want it to be.
I.e. out should already be sized to whatever size you want it to be.
!*/
!*/
...
@@ -1496,7 +1495,7 @@ namespace dlib
...
@@ -1496,7 +1495,7 @@ namespace dlib
ensures
ensures
- This routine simply finds the 4 intersecting points of the given lines and
- This routine simply finds the 4 intersecting points of the given lines and
uses them in a call to the version of extract_image_4points() defined above.
uses them in a call to the version of extract_image_4points() defined above.
i.e. extract_image_
chip
s(img, out, intersections_between_lines)
i.e. extract_image_
4point
s(img, out, intersections_between_lines)
- Since 4 lines might intersect at more than 4 locations, we select the
- Since 4 lines might intersect at more than 4 locations, we select the
intersections that give a quadrilateral with opposing sides that are as
intersections that give a quadrilateral with opposing sides that are as
parallel as possible.
parallel as possible.
...
...
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