Last active
September 9, 2015 09:45
-
-
Save s-yoshiki/32d431a4ebed08db8ae5 to your computer and use it in GitHub Desktop.
homebrewを用いてMacにOpenCVを導入 ref: http://qiita.com/sy_sft_/items/535b2d2a2b488f1af151
This file contains 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
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 |
This file contains 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 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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment