Created
November 15, 2020 14:47
-
-
Save jimlinntu/7bbcd0e4007e40ba21fcb7701164467c to your computer and use it in GitHub Desktop.
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 | |
def main(): | |
img = cv2.imread("./demo.jpeg", cv2.IMREAD_COLOR) | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
edges = cv2.Canny(img, 100, 200) | |
cv2.imwrite("edge.jpeg", edges) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment