traitement-image.ipynb 1005 Bytes
Newer Older
1
{"cells":[{"metadata":{"trusted":true},"cell_type":"code","source":"from matplotlib import image\nimport matplotlib.pyplot as plt","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"# image released in the public domain\nimg = image.imread(\"sandbox.png\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure()\nplt.imshow(img)\nplt.axis(\"off\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"img = 1 - img","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure()\nplt.imshow(img)\nplt.axis(\"off\")\nplt.show()","execution_count":null,"outputs":[{"output_type":"display_data","data":{"application/javascript":"element.append(window.mplBus.pop(0));"},"metadata":{}}]}],"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"}},"nbformat":4,"nbformat_minor":2}