Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For more information, along with a detailed code review check out the following
- [http://www.pyimagesearch.com/2015/08/10/checking-your-opencv-version-using-python/](http://www.pyimagesearch.com/2015/08/10/checking-your-opencv-version-using-python/)

## Installation
Provided you already have NumPy, SciPy, Matplotlib, and OpenCV already installed, the `imutils` package is completely `pip`-installable:
Provided you already have NumPy, Matplotlib, and OpenCV already installed, the `imutils` package is completely `pip`-installable:

<pre>$ pip install imutils</pre>

Expand Down
3 changes: 1 addition & 2 deletions imutils/perspective.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# website: http://www.pyimagesearch.com

# import the necessary packages
from scipy.spatial import distance as dist
import numpy as np
import cv2

Expand All @@ -26,7 +25,7 @@ def order_points(pts):
# top-left and right-most points; by the Pythagorean
# theorem, the point with the largest distance will be
# our bottom-right point
D = dist.cdist(tl[np.newaxis], rightMost, "euclidean")[0]
D = np.linalg.norm(np.subtract(tl[np.newaxis], rightMost), axis=1)
(br, tr) = rightMost[np.argsort(D)[::-1], :]

# return the coordinates in top-left, top-right,
Expand Down