{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import sys\n", "import os\n", "import matplotlib.pyplot as plt\n", "\n", "os.chdir('../')\n", "sys.path.append(os.getcwd())\n", "\n", "from utils import img\n", "from utils import color\n", "\n", "input_img = img.load('data/gas_fovea_2020.12.31/upsampling_test/input/out_view_0000.png')\n", "ycbcr = color.rgb2ycbcr(input_img)\n", "rgb = color.ycbcr2rgb(ycbcr)\n", "\n", "plt.figure()\n", "img.plot(input_img)\n", "plt.figure()\n", "plt.subplot(1, 4, 1)\n", "img.plot(ycbcr)\n", "plt.subplot(1, 4, 2)\n", "img.plot(ycbcr[:, 0])\n", "plt.subplot(1, 4, 3)\n", "img.plot(ycbcr[:, 1])\n", "plt.subplot(1, 4, 4)\n", "img.plot(ycbcr[:, 2])\n", "plt.figure()\n", "img.plot(rgb)\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.7.9 64-bit ('pytorch': conda)", "name": "python379jvsc74a57bd0660ca2a75467d3af74a68fcc6f40bc78ab96b99ff17d2f100b5ca821fbb183f2" }, "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.7.9" }, "orig_nbformat": 2 }, "nbformat": 4, "nbformat_minor": 2 }