mirror of https://github.com/davisking/dlib.git
Clarified spec
This commit is contained in:
parent
844b355232
commit
8785ac1d9a
|
@ -1466,15 +1466,14 @@ namespace dlib
|
|||
- pts.size() == 4
|
||||
ensures
|
||||
- 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
|
||||
the quadrilateral is associated to a corner of #out and bilinear
|
||||
that part of the input image img and stores it into #out. Therefore, each
|
||||
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
|
||||
quadrilateral in img into #out. To determine which corners of the
|
||||
quadrilateral map to which corners of #out we fit the tightest possible
|
||||
rectangle to the quadrilateral and map its vertices to their nearest
|
||||
rectangle corners. These corners are then trivially mapped to #out (i.e.
|
||||
upper left corner to upper left corner, upper right corner to upper right
|
||||
corner, etc.).
|
||||
quadrilateral into #out. To determine which corners of the quadrilateral map
|
||||
to which corners of #out we fit the tightest possible rectangle to the
|
||||
quadrilateral and map its vertices to their nearest rectangle corners. These
|
||||
corners are then trivially mapped to #out (i.e. upper left corner to upper
|
||||
left corner, upper right corner to upper right corner, etc.).
|
||||
- #out.nr() == out.nr() && #out.nc() == out.nc().
|
||||
I.e. out should already be sized to whatever size you want it to be.
|
||||
!*/
|
||||
|
@ -1496,7 +1495,7 @@ namespace dlib
|
|||
ensures
|
||||
- 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.
|
||||
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
|
||||
intersections that give a quadrilateral with opposing sides that are as
|
||||
parallel as possible.
|
||||
|
|
Loading…
Reference in New Issue