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
# in a terminal | |
# python -m pip install --user opencv-contrib-python numpy scipy matplotlib ipython jupyter pandas sympy nose | |
import cv2 | |
import pandas as pd | |
import numpy as np | |
import imutils | |
from scipy.spatial import distance as dist | |
from imutils import perspective |
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
// The image is originally animated on to the view controller then added to the scroll view. | |
// So, there might be some animation residue in here. | |
// Class needs: <UIScrollViewDelegate> | |
func viewDidLoad() { | |
let width = UIScreen.mainScreen().bounds.size.width | |
let aspect: CGFloat = width / shotWidth | |
var frame = CGRectMake(0, 0, shotWidth * aspect, shotHeight * aspect) | |
self.scrollView = UIScrollView(frame: frame) |