2019-12-08 03:13:45 +00:00
|
|
|
{
|
|
|
|
"cells": [
|
2021-01-01 22:05:49 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 6,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"import cv2\n",
|
|
|
|
"import math\n",
|
|
|
|
"import numpy as np\n",
|
|
|
|
"from scipy.signal import convolve2d\n",
|
|
|
|
"from matplotlib import pyplot as plt"
|
|
|
|
]
|
|
|
|
},
|
2019-12-08 03:13:45 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2021-01-01 22:05:49 +00:00
|
|
|
"# edge detection"
|
2019-12-08 03:13:45 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-01-01 22:05:49 +00:00
|
|
|
"execution_count": 2,
|
2019-12-08 03:13:45 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
2021-01-01 22:05:49 +00:00
|
|
|
"output_type": "execute_result",
|
2019-12-08 03:13:45 +00:00
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2021-01-01 22:05:49 +00:00
|
|
|
"<matplotlib.image.AxesImage at 0x1a7791a11c0>"
|
2019-12-08 03:13:45 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
2021-01-01 22:05:49 +00:00
|
|
|
"execution_count": 2
|
2019-12-08 03:13:45 +00:00
|
|
|
},
|
|
|
|
{
|
2021-01-01 22:05:49 +00:00
|
|
|
"output_type": "display_data",
|
2019-12-08 03:13:45 +00:00
|
|
|
"data": {
|
2021-01-01 22:05:49 +00:00
|
|
|
"text/plain": "<Figure size 432x288 with 1 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Created with matplotlib (https://matplotlib.org/) -->\r\n<svg height=\"251.806921pt\" version=\"1.1\" viewBox=\"0 0 367.157923 251.806921\" width=\"367.157923pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <metadata>\r\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\r\n <cc:Work>\r\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\r\n <dc:date>2021-01-01T21:45:18.924969</dc:date>\r\n <dc:format>image/svg+xml</dc:format>\r\n <dc:creator>\r\n <cc:Agent>\r\n <dc:title>Matplotlib v3.3.3, https://matplotlib.org/</dc:title>\r\n </cc:Agent>\r\n </dc:creator>\r\n </cc:Work>\r\n </rdf:RDF>\r\n </metadata>\r\n <defs>\r\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\r\n </defs>\r\n <g id=\"figure_1\">\r\n <g id=\"patch_1\">\r\n <path d=\"M 0 251.806921 \r\nL 367.157923 251.806921 \r\nL 367.157923 0 \r\nL 0 0 \r\nz\r\n\" style=\"fill:none;\"/>\r\n </g>\r\n <g id=\"axes_1\">\r\n <g id=\"patch_2\">\r\n <path d=\"M 33.2875 227.928796 \r\nL 359.957923 227.928796 \r\nL 359.957923 10.488796 \r\nL 33.2875 10.488796 \r\nz\r\n\" style=\"fill:#ffffff;\"/>\r\n </g>\r\n <g clip-path=\"url(#p90a5767683)\">\r\n <image height=\"218\" id=\"imagef5a6f8221b\" transform=\"scale(1 -1)translate(0 -218)\" width=\"327\" x=\"33.2875\" xlink:href=\"data:image/png;base64,\r\niVBORw0KGgoAAAANSUhEUgAAAUcAAADaCAYAAAA1xoBCAAEAAElEQVR4nDz9x69sa5rm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],
|
|
|
|
"source": [
|
2019-12-08 22:19:30 +00:00
|
|
|
"img = cv2.imread('sheep.png')[:,:,::-1]\n",
|
|
|
|
"plt.imshow(img)"
|
2019-12-08 03:13:45 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2021-01-01 22:05:49 +00:00
|
|
|
"# sobel filter"
|
2019-12-08 03:13:45 +00:00
|
|
|
]
|
|
|
|
},
|
2019-12-08 12:02:15 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-01-01 22:05:49 +00:00
|
|
|
"execution_count": 3,
|
2019-12-08 12:02:15 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
2021-01-01 22:05:49 +00:00
|
|
|
"output_type": "execute_result",
|
2019-12-08 12:02:15 +00:00
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2021-01-01 22:05:49 +00:00
|
|
|
"<matplotlib.image.AxesImage at 0x1a7792c9250>"
|
2019-12-08 12:02:15 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
2021-01-01 22:05:49 +00:00
|
|
|
"execution_count": 3
|
2019-12-08 12:02:15 +00:00
|
|
|
},
|
|
|
|
{
|
2021-01-01 22:05:49 +00:00
|
|
|
"output_type": "display_data",
|
2019-12-08 12:02:15 +00:00
|
|
|
"data": {
|
2021-01-01 22:05:49 +00:00
|
|
|
"text/plain": "<Figure size 432x288 with 1 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Created with matplotlib (https://matplotlib.org/) -->\r\n<svg height=\"146.735677pt\" version=\"1.1\" viewBox=\"0 0 375.2875 146.735677\" width=\"375.2875pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <metadata>\r\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\r\n <cc:Work>\r\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\r\n <dc:date>2021-01-01T21:45:19.849968</dc:date>\r\n <dc:format>image/svg+xml</dc:format>\r\n <dc:creator>\r\n <cc:Agent>\r\n <dc:title>Matplotlib v3.3.3, https://matplotlib.org/</dc:title>\r\n </cc:Agent>\r\n </dc:creator>\r\n </cc:Work>\r\n </rdf:RDF>\r\n </metadata>\r\n <defs>\r\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\r\n </defs>\r\n <g id=\"figure_1\">\r\n <g id=\"patch_1\">\r\n <path d=\"M 0 146.735677 \r\nL 375.2875 146.735677 \r\nL 375.2875 0 \r\nL 0 0 \r\nz\r\n\" style=\"fill:none;\"/>\r\n </g>\r\n <g id=\"axes_1\">\r\n <g id=\"patch_2\">\r\n <path d=\"M 33.2875 122.857552 \r\nL 368.0875 122.857552 \r\nL 368.0875 10.740885 \r\nL 33.2875 10.740885 \r\nz\r\n\" style=\"fill:#ffffff;\"/>\r\n </g>\r\n <g clip-path=\"url(#p4bb49c358f)\">\r\n <image height=\"113\" id=\"image4e83990c65\" transform=\"scale(1 -1)translate(0 -113)\" width=\"335\" x=\"33.2875\" xlink:href=\"data:image/png;base64,\r\niVBORw0KGgoAAAANSUhEUgAAAU8AAABxCAYAAABVyiGbAADVbUlEQVR4nGz92ZIsWbIlhi3dk5l7RJwhK7Oqbt+B7Au0gMIBpAhfyDcKv4NfxB/gb1D4wneKkA98aAgIQABpAN2371RdWTmccyLc3cz2oHzQYVtUI0RSMjMGdzezvXWrLl1rKf3N/+3/yvTUkNeG3gNCGOAREOLA6AEAQMQYTAj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nKN7T1MclpbiA/yAn6/3SaCbgEadi730q6T9e+sEEglfa9Obhvf6vfRcgAPj6Cb0Gb8oZ5SqPr36ItlE5rqePUL0yMjWBSmno57a/K8/XosIqqvGhiLMgy7778jEGOg0p6dXvNaAQlGt+u4Mvn4lxK2CU0m1EKygQKAOgMy9i1S3Xjm9tx8nrfrcEenP9wRAEqBG1u/1y46AV71DHvjCqBFdw/+thlDjWRSKqg1bLBvwKCOBiOZQe/zDu6w6PdUCwb1+zcQS6H2+NROFGJQ7IysPhUKkvPaYN5m8Knh2Iax95uG/RwjI8bc4B3bxAwaI3YUoNmazTD7PcLe30UOeDD+Eg33uTf43I6xdg7L9vxfdLwxxh1Au/jQwSt6eAKSCVUfbE/kfIhJ9+fzELYPgbvddeM1KC7hnsEXXWpzdDff2Tzs5n1TYBA/2GC6xeIOneH31AyVuCzd5tYtbDFien868W0R2/2FWBVvD81r68fGkpjqudXew7HJWELzFjaG1b6kXZs9i94AbDHF5nXU2qCGkNr4mNdkySnBxlukZdfmm3j/rIhf8ZR83F7rJTb4wzxp+45I1T/r5wc23lUzmrYB2PnRLUa5vzZfdH6YJw0InBGwMUY98hGIYcD0Q8juYYSL2kL73uv2caEGHQHynaUEgbB0HVGfSOyeJVFzDJgJ65IwnweHAY11Y94vc904Tj0kZJBGKdvImwL8+ThZwCeZvUl+sRyH77T+s84PvZaYWrQjic/umVHb7HwjhnwmxooQJIL1taLJYpsLD+cHoUF9tjb7w9afO1u2aXabjI89WiRoz+oVqO8LjjfMuLdBbhNgm8CQn6mNZOddOPZqk1AHTBJI4o03g69fiPY91SAP81AfHp3xYTSP+2GytcEn8rt
|
2019-12-08 12:02:15 +00:00
|
|
|
},
|
|
|
|
"metadata": {
|
|
|
|
"needs_background": "light"
|
2021-01-01 22:05:49 +00:00
|
|
|
}
|
2019-12-08 12:02:15 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"kx = np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]) / 4\n",
|
|
|
|
"ky = np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]) / 4\n",
|
|
|
|
"\n",
|
2019-12-08 22:19:30 +00:00
|
|
|
"grey = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n",
|
2019-12-08 12:02:15 +00:00
|
|
|
"\n",
|
|
|
|
"blur = convolve2d(grey, np.array([[1, 1, 1], [1, 1, 1], [1, 1, 1]]) / 9)\n",
|
|
|
|
"\n",
|
|
|
|
"dx = convolve2d(blur, kx)\n",
|
|
|
|
"dy = convolve2d(blur, ky)\n",
|
|
|
|
"\n",
|
|
|
|
"x = np.concatenate((dx, dy), axis=1)\n",
|
|
|
|
"\n",
|
|
|
|
"plt.imshow(x)"
|
|
|
|
]
|
|
|
|
},
|
2019-12-08 03:13:45 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-01-01 22:05:49 +00:00
|
|
|
"execution_count": 4,
|
2019-12-08 03:13:45 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
2021-01-01 22:05:49 +00:00
|
|
|
"output_type": "execute_result",
|
2019-12-08 03:13:45 +00:00
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2021-01-01 22:05:49 +00:00
|
|
|
"<matplotlib.image.AxesImage at 0x1a77a5474c0>"
|
2019-12-08 03:13:45 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
2021-01-01 22:05:49 +00:00
|
|
|
"execution_count": 4
|
2019-12-08 03:13:45 +00:00
|
|
|
},
|
|
|
|
{
|
2021-01-01 22:05:49 +00:00
|
|
|
"output_type": "display_data",
|
2019-12-08 03:13:45 +00:00
|
|
|
"data": {
|
2021-01-01 22:05:49 +00:00
|
|
|
"text/plain": "<Figure size 432x288 with 1 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Created with matplotlib (https://matplotlib.org/) -->\r\n<svg height=\"146.390698pt\" version=\"1.1\" viewBox=\"0 0 375.2875 146.390698\" width=\"375.2875pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <metadata>\r\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\r\n <cc:Work>\r\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\r\n <dc:date>2021-01-01T21:45:20.356969</dc:date>\r\n <dc:format>image/svg+xml</dc:format>\r\n <dc:creator>\r\n <cc:Agent>\r\n <dc:title>Matplotlib v3.3.3, https://matplotlib.org/</dc:title>\r\n </cc:Agent>\r\n </dc:creator>\r\n </cc:Work>\r\n </rdf:RDF>\r\n </metadata>\r\n <defs>\r\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\r\n </defs>\r\n <g id=\"figure_1\">\r\n <g id=\"patch_1\">\r\n <path d=\"M 0 146.390698 \r\nL 375.2875 146.390698 \r\nL 375.2875 -0 \r\nL 0 -0 \r\nz\r\n\" style=\"fill:none;\"/>\r\n </g>\r\n <g id=\"axes_1\">\r\n <g id=\"patch_2\">\r\n <path d=\"M 33.2875 122.512573 \r\nL 368.0875 122.512573 \r\nL 368.0875 10.739281 \r\nL 33.2875 10.739281 \r\nz\r\n\" style=\"fill:#ffffff;\"/>\r\n </g>\r\n <g clip-path=\"url(#p1b33a23801)\">\r\n <image height=\"112\" id=\"image3930bf028a\" transform=\"scale(1 -1)translate(0 -112)\" width=\"335\" x=\"33.2875\" xlink:href=\"data:image/png;base64,\r\niVBORw0KGgoAAAANSUhEUgAAAU8AAABwCAYAAACelvI+AACuz0lEQVR4nOyddZgUZ9b2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UoX0GSdnGfqaZufRvSLRVS/NY6Dsiop7onHagjS82EyroPdRH9qJXJtGzV3h2FcYSd+rQdfjJHm2SKvnvgUF7xxBcEwnYNmbKfyvhE4kyWSv2hCqWsETUW022k9ZzTJJ9VQ3hIHNV
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACSCAYAAAC+Pop7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAC4q0lEQVR4nOydd5gUVdaH31vVabon55wjOcOAgqAoYsScFQPmvKZdd1131TXnLCbMKBgxIAIGhpzDRIbJOYeeTlX3+6NxYJxBgqDoN+/zzDMz1RVuVVeduvfcc35HSCnpp59++unnr4XyRzegn3766aefg0+/ce+nn376+QvSb9z76aeffv6C9Bv3fvrpp5+/IP3GvZ9++unnL0i/ce+nn376+QtyyIy7EGKaECJfCFEkhLjzUB2nn3766aef3ohDEecuhFCBAmAqUAGsBs6VUm476Afrp59++umnF4eq5z4GKJJSFkspXcD7wCmH6Fj99NNPP/38AsMh2m8MUL7b/xXA2N1XEELMAmYB2KxiZHKKSn+ubD+HEwYhUPunpfo5jFm7ydkgpQzr67NDZdz3ipTyZeBlgCFDjDI84N8YK5v+qOb0008v8u8PoWjy69h1F8N+uhy33fRHN6mffgC4YtSP/D00HzWqqHRP6xwq414JxO32f+zOZX0iAWNlE56SskPUnH762X+0zggAmnQXqXe3oxXt+INb1E8/Xma/cQR/Pzb/V9c5VGPO1UCaECJJCGECzgE+O0TH6qeffvrp5xcckp67lNIjhLgO+AZQgdeklFsPxbH66aeffvrpzSHzuUspvwS+PFT776effvrpZ8/0hwL0008//fwF6TfufwIMyYkwbsgf3Yx++unnT8QfFgrZz77jKS6B4j+6Ff3008+fif6eez/99NPPX5B+495PP/308xek37j3008//fwF6Tfu/fTTTz9/QfqNez/99NPPX5B+495PP/308xek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u+pHDuezV+ehS4bVLT6FuoA+qC/xLnL9y5H4OhIB1tVirA1k3MhFbsRGDHZ5ZNxkEpD/YxVP34x0V7sYzZ7zGkx+dSf7FNiZZWvhPw0jmvz2JqBw7yqptvY7x6gUnM+LqDTyc+RETLbuWD/n+StJnu3jmg6do141MefV2jO3gX6qR/PEakPKgn2/xzDjOyvqRJTVpeEL8EICnvILwt5rIe3wQNx65kLvnncedVsn08etpS9WJ+MU+Su7LJu2IEopXZZN8+/7NB/ymUEghRIkQYrMQYoMQYs3OZcFCiG+FEIU7fwf9lmP0s3/Yn4rhufrJDDFZuOKCL3nl2KP5et444sKaaRzn5viVV3NTyAqOT/I+GEf7aExOLSBuoWSypY2LF85C6OCxgbm4npKzo6kfrjDrvnkUXByAJaaDteP9eOn7KXzflMYKh0b6m1dz4XM30zhA5daQlXzYEULQLQotJ3TiWRxK+6gYdlwk0fKKDu7J6pJV9hSWdikcn3Ntj6gJ5V/1vFcxmnqPP2tPfYJ1056iXfeBX0RNFV1gIETtINLQSnuChcivyrGf3Ibi6o+uOthoRTtQV23jlbnT+Pzqh3HbIPJzM8lRDfg834j17QC+6+qZkzDN6qQzzsagIaUM/uIGVmUHEP1IDmLZBqTbhXS7ACh6YCRqTCTBry+nbKLkH7deCYBdd5H+/cWEfWEm49lcAhW49u4biL83h6jHc/D7egtNF4/p1daDQdRPTqJMLdySvAjFvet+ch4xgNenzuatp47nohOWsPa0x3kw6nsM9t6hmRGja3BrKsPHF+z38Q9Gz32ylLJht//vBL6TUj4ohLhz5/93HITj9LMPWBeso+TmMGaWHckFYTnMG3YclkZJWW0wr09+jfsvvZjTAi7gh8Efd29zasha7kobynKnDzGLBPLyGuo
|
2019-12-08 03:13:45 +00:00
|
|
|
},
|
|
|
|
"metadata": {
|
|
|
|
"needs_background": "light"
|
2021-01-01 22:05:49 +00:00
|
|
|
}
|
2019-12-08 03:13:45 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"kx = np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]) / 4\n",
|
|
|
|
"ky = np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]) / 4\n",
|
|
|
|
"\n",
|
2019-12-08 22:19:30 +00:00
|
|
|
"grey = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n",
|
2019-12-08 03:13:45 +00:00
|
|
|
"\n",
|
|
|
|
"blur = convolve2d(grey, np.array([[1, 1, 1], [1, 1, 1], [1, 1, 1]]) / 9)\n",
|
|
|
|
"\n",
|
|
|
|
"dx_grey = convolve2d(grey, kx)\n",
|
|
|
|
"dy_grey = convolve2d(grey, ky)\n",
|
|
|
|
"\n",
|
|
|
|
"dx_blur = convolve2d(blur, kx)\n",
|
|
|
|
"dy_blur = convolve2d(blur, ky)\n",
|
|
|
|
"\n",
|
|
|
|
"dx = np.concatenate((dx_grey, dx_blur[1:-1, 1:-1]), axis=1)\n",
|
|
|
|
"dy = np.concatenate((dy_grey, dy_blur[1:-1, 1:-1]), axis=1)\n",
|
|
|
|
"\n",
|
2019-12-08 22:19:30 +00:00
|
|
|
"x = np.sqrt(dx**2 + dy**2) > 20\n",
|
|
|
|
"plt.imshow(x)"
|
2019-12-08 03:13:45 +00:00
|
|
|
]
|
2021-01-01 22:05:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"source": [
|
|
|
|
"# canny filter"
|
|
|
|
],
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 5,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"output_type": "execute_result",
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"<matplotlib.image.AxesImage at 0x1a77a2d5dc0>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"execution_count": 5
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"output_type": "display_data",
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 432x288 with 1 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Created with matplotlib (https://matplotlib.org/) -->\r\n<svg height=\"251.806921pt\" version=\"1.1\" viewBox=\"0 0 367.157923 251.806921\" width=\"367.157923pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <metadata>\r\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\r\n <cc:Work>\r\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\r\n <dc:date>2021-01-01T21:45:20.917970</dc:date>\r\n <dc:format>image/svg+xml</dc:format>\r\n <dc:creator>\r\n <cc:Agent>\r\n <dc:title>Matplotlib v3.3.3, https://matplotlib.org/</dc:title>\r\n </cc:Agent>\r\n </dc:creator>\r\n </cc:Work>\r\n </rdf:RDF>\r\n </metadata>\r\n <defs>\r\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\r\n </defs>\r\n <g id=\"figure_1\">\r\n <g id=\"patch_1\">\r\n <path d=\"M 0 251.806921 \r\nL 367.157923 251.806921 \r\nL 367.157923 0 \r\nL 0 0 \r\nz\r\n\" style=\"fill:none;\"/>\r\n </g>\r\n <g id=\"axes_1\">\r\n <g id=\"patch_2\">\r\n <path d=\"M 33.2875 227.928796 \r\nL 359.957923 227.928796 \r\nL 359.957923 10.488796 \r\nL 33.2875 10.488796 \r\nz\r\n\" style=\"fill:#ffffff;\"/>\r\n </g>\r\n <g clip-path=\"url(#p100ee77410)\">\r\n <image height=\"218\" id=\"imaged9d992af71\" transform=\"scale(1 -1)translate(0 -218)\" width=\"327\" x=\"33.2875\" xlink:href=\"data:image/png;base64,\r\niVBORw0KGgoAAAANSUhEUgAAAUcAAADaCAYAAAA1xoBCAACIMUlEQVR4nOydd3gURRvAf3t7l14IIQRSgBRCh5BASAII0juIVFFEUURExAK2z4ZdRBSUKoooiHTpEVBpIZRA6KSQTigJhPR2t/v9cZBw5JJcKgne73nuSXZ3dnZub/bdmXfeImiuesr9nbx54Pi3J2jTqsLNsLw83nTrYvDpW68cx1RQMbBFd6SMjJIvc7qAA28G4vpBOFHftcZ6bUiFmps7xA//j49x8mVv9qxbWbj/cK7EHHcfAEQbG1af3814957sjjuGRpYY5OxTYp0r4w8xueMwNDdv8VF0KHP6j0YTGV2h9lUVgsqEbbFHGOLsC0BQUhj39peNiSGMbtEbKSurcN+70WE8YgYDB4xDOnOpQte98lYgcuc0XB4/X2ZZpXsz5uxbxztufhW6lqFYHnAg8SdP7FYeqdbrVDX2h+1Y4/YPAB0/mUbDRcEPuEVl430KQt7zw2z7sSqpTw7owBM/7+L3lk4Gn6OokitXEql7R4as2E9/J28G9R7NgVzKJRgBhjl3pr+TNz+d34VoZ1dq2X9+Wk7M3FblFow3nwuAfS46+xSHtMLi7uez3o8RlBRGUFIYOy8dAEAuyGdAk07lutYH7r7M3LUNRduW5TqvMihdXQrbvjL+ULHjQUlhRX8Fgc2Jx7BSmAGwIv5Q4blf9hlBfyfvCgvG+A8CyW2fjfKgLak7mpdZXh0dy/uPjCQoKYwlccXbXV5ejIwiKCkMOaCDzv6sR5LrhGB8/OKNwt8ib2Dnwv2d//dinRCMd9m/bBlZo8onB0pCOHKatRP6Ft6Xj2OOl3mOor+Lb5VcvFIo4GW7OLZfCeXPvWsrVdWkZj3QpKaWeDzE24SZVzvx78LFZIzzL1fd9j8egT5XyBrVhb+XLtFbRh0TR38X38LPE637szYhGFmtZnBTP7ZfCTX4evO82vP0xiAE3zblamdlOJ+fw6A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/NgUX/yGsDJuv8GnuwJYPnyJ4GZ+BDfzI7tjJpfeCapQf2OE52Yzw71XmW02JRxlU8J
|
|
|
|
},
|
|
|
|
"metadata": {
|
|
|
|
"needs_background": "light"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"img = cv2.imread('sheep.png')\n",
|
|
|
|
"edges = cv2.Canny(img, 150, 220)\n",
|
|
|
|
"plt.imshow(edges)"
|
|
|
|
]
|
2019-12-08 03:13:45 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"display_name": "Python 3",
|
|
|
|
"language": "python",
|
|
|
|
"name": "python3"
|
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"codemirror_mode": {
|
|
|
|
"name": "ipython",
|
|
|
|
"version": 3
|
|
|
|
},
|
|
|
|
"file_extension": ".py",
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
"name": "python",
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
"pygments_lexer": "ipython3",
|
2021-01-01 22:05:49 +00:00
|
|
|
"version": "3.8.4-final"
|
2019-12-08 03:13:45 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 4
|
2021-01-01 22:05:49 +00:00
|
|
|
}
|