Commit 8785ac1d authored by Davis King's avatar Davis King

Clarified spec

parent 844b3552
...@@ -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 image and stores it into #out. Therefore, each corner of that part of the input 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_chips(img, out, intersections_between_lines) i.e. extract_image_4points(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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment