Skip to content

Instantly share code, notes, and snippets.

@executed
Created June 15, 2022 19:03
Show Gist options
  • Select an option

  • Save executed/1af474dec85cac63aef9620157f46de0 to your computer and use it in GitHub Desktop.

Select an option

Save executed/1af474dec85cac63aef9620157f46de0 to your computer and use it in GitHub Desktop.
lab3.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "lab3.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyM6j4nc93XV88QsE7VD0JVZ",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/executed/1af474dec85cac63aef9620157f46de0/lab3.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "QSddJW2FsQ3o"
},
"outputs": [],
"source": [
"import cv2\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt"
]
},
{
"cell_type": "code",
"source": [
"plt.rcParams['figure.figsize'] = [15, 10]\n",
"img = cv2.imread('/content/sample_data/pap.png')\n",
"img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\n",
"plt.imshow(img)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 613
},
"id": "SaKIaMpXskhS",
"outputId": "1fdf3668-6e99-421b-c7d9-a52c77e9dfa9"
},
"execution_count": 7,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fc2f25cd090>"
]
},
"metadata": {},
"execution_count": 7
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 1080x720 with 1 Axes>"
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment