homebrewを用いてMacにOpenCVを導入 ref: http://qiita.com/sy_sft_/items/535b2d2a2b488f1af151
You have not agreed to the Xcode license.
Before running the installer again please agree to the license by opening
Xcode.app or running:
sudo xcodebuild -license
import cv2
import numpy as np
import sys
cv2.namedWindow('edge')
img = cv2.imread('test1.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
thrs1 =1000
thrs2 =10
edge = cv2.Canny(gray, thrs1, thrs2, apertureSize=5)
cv2.imshow('edge', edge)
cv2.waitKey(0)
cv2.destroyAllWindows()