︠dea55be5-f2e5-43cc-b404-33a2ff76524ai︠ %md SageMathCloud includes the [OpenCV](http://opencv.org/) computer vision library, which "has more than 47 thousand people of user community and estimated number of downloads exceeding 9 million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics." There are many [Python tutorials available here](http://docs.opencv.org/trunk/doc/py_tutorials/py_tutorials.html). ︡4fe7bf68-55ff-48bb-865f-b3b28aeed2b9︡{"md":"\nSageMathCloud includes the [OpenCV](http://opencv.org/) computer vision library, which \"has more than 47 thousand people of user community and estimated number of downloads exceeding 9 million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics.\"\n\nThere are many [Python tutorials available here](http://docs.opencv.org/trunk/doc/py_tutorials/py_tutorials.html).\n\n"}︡ ︠312f191a-ed48-4105-b766-b61ceb640564s︠ import numpy as np import cv2 import pylab as plt img = cv2.imread('svr.jpg') edges = cv2.Canny(img,100,200) x=plt.subplot(121),plt.imshow(img,cmap = 'gray') x=plt.title('Original Image'), plt.xticks([]), plt.yticks([]) x=plt.subplot(122),plt.imshow(edges,cmap = 'gray') x=plt.title('Edge Image'), plt.xticks([]), plt.yticks([]) plt.show() ︡133d4b21-8f54-4f3f-bb23-be63caac68e1︡{"file":{"filename":"52494521-0dc6-4cda-a625-a0e2de911060.svg","show":true,"text":null,"uuid":"6cd1d861-95c4-43dc-9136-1c59450f215a"},"once":false}︡{"done":true}︡ ︠9c6c559b-c0a4-44d9-a812-08588a5126bbs︠ blur = cv2.blur(img,(5,5)) x=plt.subplot(121),plt.imshow(img),plt.title('Original') x=plt.xticks([]), plt.yticks([]) x=plt.subplot(122),plt.imshow(blur),plt.title('Blurred') x=plt.xticks([]), plt.yticks([]) plt.show() ︡21c014b6-a59c-41c6-bdfc-90c495922127︡{"file":{"filename":"d8b9970f-a9fc-4ae9-b4d9-b73b40e6649d.svg","show":true,"text":null,"uuid":"fe50e809-8cc1-4950-aef6-ef9c8f2c9d06"},"once":false}︡{"done":true}︡ ︠b67582bf-fe77-4e3a-8757-3486a6c3a233s︠ median = cv2.medianBlur(img,5) x=plt.subplot(121),plt.imshow(img),plt.title('Original') x=plt.xticks([]), plt.yticks([]) x=plt.subplot(122),plt.imshow(median),plt.title('Median blur') x=plt.xticks([]), plt.yticks([]) plt.show() ︡c440c1aa-a43d-425b-b699-eac6a0a9a68e︡{"file":{"filename":"1e309eb7-52a8-479a-bb27-07d281a1fb9c.svg","show":true,"text":null,"uuid":"1313601b-5892-47cb-aa66-2e8414eb3eb5"},"once":false}︡{"done":true}︡ ︠142df646-b209-4bd9-b458-1a13a9bd52fcs︠ ︡95b330f4-d661-4070-9fba-f3a7a371a01f︡{"done":true}︡ ︠8ae699ac-ba7b-49cc-877b-50bb520d824b︠