Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PIL.Image | |
| import PIL.ImageOps | |
| import numpy as np | |
| def exif_transpose(img): | |
| if not img: | |
| return img | |
| exif_orientation_tag = 274 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| double angle(Point pt1, Point pt2, Point pt0) { | |
| //p0为公共点 | |
| double dx1 = pt1.x - pt0.x; | |
| double dy1 = pt1.y - pt0.y; | |
| double dx2 = pt2.x - pt0.x; | |
| double dy2 = pt2.y - pt0.y; | |
| double angle_line = (dx1 * dx2 + dy1 * dy2) / sqrt((dx1 * dx1 + dy1 * dy1) * (dx2 * dx2 + dy2 * dy2) + 1e-10); | |
| return acos(angle_line) * 180 / 3.141592653; | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TF_TYPE="cpu" # Change to "gpu" for GPU support | |
| OS="linux" # Change to "darwin" for Mac OS | |
| TARGET_DIRECTORY="/usr/local" | |
| curl -L \ | |
| "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-${TF_TYPE}-${OS}-x86_64-1.4.1.tar.gz" | | |
| sudo tar -C $TARGET_DIRECTORY -xz |