321 lines
2.3 MiB
Plaintext
321 lines
2.3 MiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"id": "81322b7f",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import cv2 as cv\n",
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"%matplotlib inline"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "9165d029",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"#zadanie 1"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"id": "5de78779",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"park = cv.imread(\"img/park-to-eq.jpg\", cv.IMREAD_COLOR)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"id": "4531895e",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'Image')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 10,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAdoAAAE/CAYAAADhbQKeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOz9Xawt27bfB/1a772qxhhzzrXWXvt833vse0NuogQHHjCOBA+AAggSIueFyAGUIAVZAoVIPMUIEUEkJD8gAVJAYKEIe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L0EkrreQN5WX2Zn4CmUzxdT5BJSz4jNf6a6YNG8KVy/rr2Ij8W+tDp/8tspg/A6a+f5npuljwuZyLV9wVUVOUrQDNH4GTcZwVJlprmAmrXFb7c6Gvd8OTrmh1NlFagf6mRKxCsgFPqz5O6rZPaPSrmJwJE/WahMU4vZSnPTFpuUVZmuNa69lVeUu8bicxMTeb2WCojwqQJl+qWNMqe2lhvHTFDIG9LiiWJxURPih7sZuzbbBBlwx3Sv6I/vsVoj8aAygZRRf2ew/7+/6Oqf3LV6B/PfbQS3qBxIOIx4iENpHTAh56msWRZzDH4HpfukO4FKg4EEg7FopoQGbt7mnhFLoJJwrFMja0iuZFkGf5E0i+Db36gjIYCiAt1so7LOPEEzgk25yC8LrNU8WQEVFmNsGyQUCLOwzaNc6Xo7aYsq4+AOwN5qec0Msfn5YSaxnxV4JNl6RMErqXS8wzgrOa0lt4fow8JdiI8VNX9Oun8qumXvc9Y08dY3/fRo0Atj3xjtFk4DSK6HJ8L+DinUC1+yhhsnkNm1AJnq4i60DKGyc+Jommukz+Tca3FyerbSSHPAfpY4pOxNHK
|
||
|
"text/plain": [
|
||
|
"<Figure size 1440x360 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(20,5))\n",
|
||
|
"plt.subplot(121)\n",
|
||
|
"plt.imshow(park[:,:,::-1])\n",
|
||
|
"plt.title(\"Image\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 19,
|
||
|
"id": "922d7624",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'Image')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 19,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||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QWMCLgguRSar2iBXBy1BKj3quivESmyN8YJ6oULIxkrxoM/OrS2+sJ7T2jpg9OgBd24XXPqzL9EocsK727yx3uWNUPCClqyfb/CMq/jir3+Rne0Rr957ic5w8ITr+/AU7deAZ0XkKYyA/N/mKP3bESlaDbyPXFhaIw/3OXvp5xnlV9lreBYvLtDjs2SNEeV4RGdwyEKvxaSTcffCOpM7hyyuN2j5iI5LJkXOuDClUwVoYvcly0CjUI1BnRKjw3tTPMHXQR1F8wwd6TSsa0+1w7SmM0stc6hGRCEET9D5hcE8Rg1ilm3umZT2e+aFfqaM0qCaCisCQ1UyESqFEOGeRBSH4GmkAHWFoN7hEIIGpIKWAqIUar615BCJSFQkOjKBykeiCo0IgchYIYiCU8QLBebd1BozxJAsX8GAcrMQ0gcR1RPi93MS3ZNDW/qE9fknRcHOz6A6CMUHU0h+bM9a7UHF3KH+h5+VH6y+joqLkM15UJbU+QFjrrXDjyIf4NJO8sZrJSsC3juqKo1DBJ+5qZNeVTq1J52z9zQGfUzpZrmrT4Y48CrkATNWRGmk2KaoeWu1gnD1yo/ik0Z3Apm348WgZMloEjEDKDvBUxV4LB0WBGIVqW3eLDkNTtXSTsemsJOSS4cIS0QGCN4B0cK4mialto3LEKbebJ72d3D0pY2CR2g0IlntTYakTMW29QHypGSlmgtPHbm6E77LsP+cQ4MQvU+HFXx9AxXcWFF1uIwUXbT13QUb97A049Q1ZvlBjbaSl01TskQzYEIhyIUOXanYKoWl1YzqX93m+T/1DEUQhlXFalPo3T2k7HV5d63FlW7k1S9+hZUFz5XWVUIz49FhfsI1mXwoilZVKxH594F/hjnt/+9E+XaiDPuebV7Exzc
|
||
|
"text/plain": [
|
||
|
"<Figure size 1440x360 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"new_park = park.copy()\n",
|
||
|
"new_park[:,:,0] = cv.equalizeHist(new_park[:,:,0])\n",
|
||
|
"new_park[:,:,1] = cv.equalizeHist(new_park[:,:,1])\n",
|
||
|
"new_park[:,:,2] = cv.equalizeHist(new_park[:,:,2])\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(20,5))\n",
|
||
|
"plt.subplot(121)\n",
|
||
|
"plt.imshow(new_park[:,:,::-1])\n",
|
||
|
"plt.title(\"Image\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 24,
|
||
|
"id": "c35ed246",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'Image')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 24,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAdoAAAE/CAYAAADhbQKeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOz9eaxnSXbfiX1OxL2/7e1r7lmVtXdVV1ezu9lkUxQlkiI1WqkZWILGs2gAGwJsywZsGLCMgQczYxvQH8ZIHsseD+FFM5ihNVpAbZREUaS4s9nspaq69qqsyj1fvn37rfdGHP8REffe38uXVdXNLrJEvQNkvvd+v3vjxo3lrN9zQlSVMzqjMzqjMzqjM/pkyPx+d+CMzuiMzuiMzugPMp0J2jM6ozM6ozM6o0+QzgTtGZ3RGZ3RGZ3RJ0hngvaMzuiMzuiMzugTpDNBe0ZndEZndEZn9AnSmaA9ozM6ozM6ozP6BOlM0J7RGZ3RGZ3RGX2CdCZoz+iMPuUkIjdE5I/9fvfjjM7ojL47OhO0Z3RGZ3RGZ3RGnyCdCdozOqN/TUhE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HFSkmcZ7eIYpznH0mW21eX4g/+G2SXD0tzTSLfD4Lh9+iTyCQlaVS1F5K8AP09I7/n/xJJvp9JglLPPZ8jcB8zNtZm4z+DanyEf3iH3Y3Zaj9E9fJ1s+KvM5jmmfIKBm0elYDI8pqWORTvC2Db7zOHLDLUhZjiJizqDynuANxjjo0CxeFGM1+oCJQhBtS4IThXQjLBSMpASmgtUM0QVFU/TcZM0VWst3ntUFavRLeKDhelsvTh9bDIDnPG19asGMbZyc6jP47oN31uvGAfeKs6AGiWzDjGCySx
|
||
|
"text/plain": [
|
||
|
"<Figure size 1440x360 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"#HSV\n",
|
||
|
"park_hsv = cv.cvtColor(park, cv.COLOR_BGR2HSV)\n",
|
||
|
"# wystarczy zastosować equalize na kanale V, który odpowiada za jasność\n",
|
||
|
"park_hsv[:,:,2] = cv.equalizeHist(park_hsv[:,:,2])\n",
|
||
|
"\n",
|
||
|
"park_rgb = cv.cvtColor(park_hsv, cv.COLOR_HSV2RGB)\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(20,5))\n",
|
||
|
"plt.subplot(121)\n",
|
||
|
"plt.imshow(park_rgb)\n",
|
||
|
"plt.title(\"Image\")\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 27,
|
||
|
"id": "e5f4848f",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'Image')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 27,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZwAAAJOCAYAAACDX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+eGQyEAi+CxbTrTpCA0x+hZZtJzmYAC1wypUAguMNm8dXTiLeBrMZy/AeBPpu9/AhKZswtC1I3iNkdCYz6lKFJQARqjNWUMMCZFoEL+XkyWahzZVqDPixEDq8OkLQiiFCqO8KZ5wSVIa4fTb9JfFmErlFzOqi9UoiIlonDJPqQ3OPIYIw2LAK8X/ynN4SngUPHDrMNpakSyFcZZtMlLbY7IScpsyAn76o3E4OUNY1gxR6KpGKEhME9YKlAr4cvyiN/DCTMajnPBN8cZ3xyPuJ8L7uYJE4ADFUyJ6zUi1aRk7QoFyTMmLItTUNgIU6guC1UhpIqL1Ydmsru+ToQKwTgJDM0SvuCqdCu0ZpOI5iJssRVGa4Rzq0JwmF1AsrZKEeGhoAGtYYagxnGecZwLPhwP+OY44TgDM8loiAhnTHhcCL96ZDycHvHp4RGPy1napxkf7o+4P844zDMOtODXv7nDL765xx0BMzVMaJjmg/fjeH/AN3cH1J+JJlYbo1bG4+kRD6cFp1qx1IbHKoyS2QQoYZTcdAaJRkv7Lt7VWl2oonlGBbAsDY91QTktmAn4FRUcJsLdPOMwFxznCYfDhHkqmCfCcSIsdcEvP53wt375GTh8xOdTQW0N/+7vfIfvZsYf+sVH/IGffwBTr7kzi2AqsrFqGhDmvVQRcJZasSxV1820bwaa0BUqBVQmZ7NEhGWpWJaTYpXs/ZbGfCgTWLXeLOOYia5wzJnvLScmTnGAlhgTqmvJ1NkcX0ln8PUYzr8C4DeJ6O+BJB78M+jTfAxgRDQGZgS6kEkMIT1mgYhgTIZ
|
||
|
"text/plain": [
|
||
|
"<Figure size 2160x720 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"#Zadanie 2 \n",
|
||
|
"man = cv.imread(\"img/man-at-desk.jpg\", cv.IMREAD_COLOR)\n",
|
||
|
"plt.figure(figsize=(30,10))\n",
|
||
|
"plt.subplot(121)\n",
|
||
|
"plt.imshow(man[:,:,::-1])\n",
|
||
|
"plt.title(\"Image\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"id": "1cd9c922",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'Image')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZwAAAJOCAYAAACDX7GAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOz9ebDt23bfhX3GnPPXrGZ3p7391WuuelnSk/xsy1ZjWwZjYqRACLah3BDHAWxcBfkjoUIIpEIVpIMAoSgSXKkKphwBpmKIkYwNtjDCtoT0nmS9J+n1tz392c3aa/1+v9mM/DHmWnufe8597+l1uog9pPvOOWvvtdavmb85xviO7/gOUVWu7Mqu7Mqu7Mq+3uZ+ow/gyq7syq7syv6HYVcO58qu7Mqu7Mq+IXblcK7syq7syq7sG2JXDufKruzKruzKviF25XCu7Mqu7Mqu7BtiVw7nyq7syq7syr4hduVwruzKruzKruwbYlcO58qu7F0mIp8XkR/9jT6OK7uy32x25XCu7Mqu7Mqu7BtiVw7nyq7sPUxE/riI/Dci8q+JyLGIfFZEfqC+/oaI3BORP3bp9/9+EfkFETmtP/8X3/V5f1REviAiD0Xkf3s5kxIRJyL/axH5TP35T4jItW/wKV/ZlX1d7crhXNmVfXH7bcAvAteB/wD4C8BvBT4M/GPAvyUiy/q758AfBQ6Bvx/4J0XkxwFE5NuBfxv4R4HngQPgxUvf82eBH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omXQKtHWSRwhJjQq6g0yKGrPhfOBQoGUcL6B0OKaFlQpKVJyInvL+KYCYRC0G3FZIShkhWJ
|
||
|
"text/plain": [
|
||
|
"<Figure size 2160x720 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"man_hsv = cv.cvtColor(man, cv.COLOR_BGR2HSV)\n",
|
||
|
"# wystarczy zastosować equalize na kanale V, który odpowiada za jasność\n",
|
||
|
"man_hsv[:,:,2] = cv.equalizeHist(man_hsv[:,:,2])\n",
|
||
|
"\n",
|
||
|
"man_rgb = cv.cvtColor(man_hsv, cv.COLOR_HSV2RGB)\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(30,10))\n",
|
||
|
"plt.subplot(121)\n",
|
||
|
"plt.imshow(man_rgb)\n",
|
||
|
"plt.title(\"Image\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 43,
|
||
|
"id": "0ab99029",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'After')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 43,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA2UAAAJOCAYAAAA3aq8SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOz9Wax127bfB/1a732MMedc6yt2cc65le/1zbVNYkdxhAQOJkQCKSRSEpIH5BQoMS8JQYIHhER4QrwYCYESESJEEimFLAJEgFAqBRJQIoQ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DxZ/KzI+hzn/lBO21Vebqc5Qrg298StsGJKA05vWQ6TeGxDrfUgUgzvCb0hJDoImQRnNpgkbJWckGWZWsRjFFEbIqSGDW4oPyG1cm5quqSPC5MCOIoJahGFGEXpTrTvjo+Y5n+57YBbquJ4VAlIAEJYmQYiRFB3Fo3TsBikEhMBU4TjPTlDkeT4zzRCmGiiAhoZrr3hWKurDRKvWbqhikKX2lzrPUZ7L6joQQz8TT2VoOQHKJydBH+q5j1ydShBgCsYKqJEIQ5y2Y+XfR0GIECVUoCVaM++PID1/fMqnS7RK//AvfI8lMCrLs4XU9N7Hgf4emEFYhpE2RteBCRNTnoRSmOVOKolr3IA4ClUCpgiPGSKzvATNOUyaEwClPBAn0XVdnRjBVVBVpQj083ntKfQfWntvqPJ6pJoiER4qpmfEv/7E/95e40NehL5SP8EBGEgjDR2CREA3pKocWoQRhnieC+joIQdBSSJKcV6CE4soiYYIQKq8PVWENiEYsCCFGzDJWiht
|
||
|
"text/plain": [
|
||
|
"<Figure size 1080x720 with 2 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"man_new_hsv = cv.cvtColor(man, cv.COLOR_BGR2HSV)\n",
|
||
|
"clahe = cv.createCLAHE(clipLimit=2.0, tileGridSize=(5,5))\n",
|
||
|
"\n",
|
||
|
"H, S, V = cv.split(man_new_hsv)\n",
|
||
|
"\n",
|
||
|
"output1_H = clahe.apply(H)\n",
|
||
|
"output1_S = clahe.apply(S)\n",
|
||
|
"output1_V = clahe.apply(V)\n",
|
||
|
"\n",
|
||
|
"clahe = cv.merge((output1_H, output1_S, output1_V))\n",
|
||
|
"\n",
|
||
|
"final = cv.cvtColor(clahe, cv.COLOR_HSV2RGB)\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(15,10))\n",
|
||
|
"plt.subplot(121)\n",
|
||
|
"plt.imshow(man[:,:,::-1])\n",
|
||
|
"plt.title(\"Before\")\n",
|
||
|
"plt.subplot(122)\n",
|
||
|
"plt.imshow(final)\n",
|
||
|
"plt.title(\"After\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "f436667a",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"#zadanie 3"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"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",
|
||
|
"version": "3.8.8"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 5
|
||
|
}
|