84 lines
158 KiB
Plaintext
84 lines
158 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import cv2 as cv\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"import matplotlib\n",
|
||
|
"%matplotlib inline"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 52,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.image.AxesImage at 0x7f90524e0cd0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 52,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD5CAYAAADcDXXiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOz9y69t25beCf1af4wx5lx7n3PvDRvb2BZpkYkQBahYSYUCCIGoZS2VUKGA5BKUMyVqCKT8F7AEEhUEVFJQQDyERN0lJBIBSqXScjjtCEfcx9lrzTlGfzUKrfUx5r6RjntI+2aesPYI3TjnrL32nOPRR+utfe37viaqyrfj2/Ht+HZ8O/7FOsJ/2ifw7fh2fDu+Hd+Of/7Ht+D+7fh2fDu+Hf8CHt+C+7fj2/Ht+Hb8C3h8C+7fjm/Ht+Pb8S/g8S24fzu+Hd+Ob8e/gMe34P7t+HZ8O74d/wIev7fgLiL/HRH5/4jIvyci/9bv63u+Hd+Ob8e349vxZw/5ffDcRSQC/1/gvwX8IfD3gP+uqv6//rl/2bfj2/Ht+HZ8O/7M8fvK3P9V4N9T1X9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8ZNCWxVs2MrPoGaADgSVn4PpZThlU0GGBQ4FSylfnC5yb+vzZDDZgZXb1zSqEcGb9M/ucATd6oJrV2oSr7Fws2962ldYaOSdKaV5dRFKMBjPFRG2Vujfykm1T6A1y/Aq2ODcSx4vnd5VSziTFKsNkATuEc3M4joMlZ+rLfRURjuOwdRED3eHsYz8YoqjAklZEcSgqX8mOwzSllPOeCJwb6YS6ZnUz79f58xdI9LWKmtdnkB2WXeo
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"image = cv.imread(\"C_test_own.png\", cv.IMREAD_COLOR)\n",
|
||
|
"\n",
|
||
|
"image = cv.cvtColor(image, cv.COLOR_BGR2RGB)\n",
|
||
|
"image = image[0:600, 0:600]\n",
|
||
|
"\n",
|
||
|
"image = cv.cvtColor(image, cv.COLOR_RGB2BGR)\n",
|
||
|
"\n",
|
||
|
"plt.imshow(image)\n",
|
||
|
"# cv.imwrite('C_test_rect.png', image)"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3.8.12 64-bit",
|
||
|
"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.12"
|
||
|
},
|
||
|
"orig_nbformat": 4,
|
||
|
"vscode": {
|
||
|
"interpreter": {
|
||
|
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|