diff --git a/jupyter.ipynb b/jupyter.ipynb index c064244..eee29df 100644 --- a/jupyter.ipynb +++ b/jupyter.ipynb @@ -14,7 +14,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/8w/3c34c7kd2n144tvm764_pdbw0000gq/T/ipykernel_2611/1657712203.py:16: DeprecationWarning: Importing display from IPython.core.display is deprecated since IPython 7.14, please import from IPython display\n", + "/var/folders/8w/3c34c7kd2n144tvm764_pdbw0000gq/T/ipykernel_3019/1657712203.py:16: DeprecationWarning: Importing display from IPython.core.display is deprecated since IPython 7.14, please import from IPython display\n", " from IPython.core.display import display, HTML\n" ] }, @@ -130,7 +130,6 @@ "gray_images = {\n", " \"cat\":rgb2gray(img_as_float(data.chelsea())),\n", " \"astro\":rgb2gray(img_as_float(data.astronaut())),\n", - " \"line\": rgb2gray(img_as_float(Image.open('line.jpeg'))),\n", " \"camera\":data.camera(),\n", " \"coin\": data.coins(),\n", " \"clock\":data.clock(),\n", @@ -397,7 +396,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -479,7 +478,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "3468cf44f3e4421296a63af940c78d21", + "model_id": "40f7f6318beb4d248fc1b3aa82096324", "version_major": 2, "version_minor": 0 }, @@ -507,7 +506,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 12, "metadata": { "pycharm": { "name": "#%%\n" @@ -517,7 +516,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "248d76e7698e4f3f90a42587e6c4a66b", + "model_id": "3ec2852728b145a0b405eb6c24ef4e9b", "version_major": 2, "version_minor": 0 }, @@ -637,12 +636,12 @@ " return (original_shape[0]*original_shape[1]*original_shape[2])//(original_shape[0] + 3*original_shape[1] + 1)\n", "\n", "\n", - "list_widget = widgets.Dropdown(options=list(color_images.keys()))\n", + "list_widget_color = widgets.Dropdown(options=list(color_images.keys()))\n", "int_slider_widget = widgets.IntSlider(min=1,max=compute_k_max_color_images('cat'))\n", "def update_k_max_color(*args):\n", - " img_name=list_widget.value\n", + " img_name=list_widget_color.value\n", " int_slider_widget.max = compute_k_max_color_images(img_name)\n", - "list_widget.observe(update_k_max_color,'value')" + "list_widget_color.observe(update_k_max_color,'value')" ] }, { @@ -668,7 +667,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "cd415e4147de4fe5bfe269eefe92062a", + "model_id": "eaba6da4395e43d4ab429b4cca24ad3f", "version_major": 2, "version_minor": 0 }, @@ -681,7 +680,7 @@ } ], "source": [ - "interact(compress_show_color_images_reshape,img_name=list_widget,k=int_slider_widget);" + "interact(compress_show_color_images_reshape,img_name=list_widget_color,k=int_slider_widget);" ] }, { @@ -759,12 +758,12 @@ " return (original_shape[0]*original_shape[1]*original_shape[2])// (3*(original_shape[0] + original_shape[1] + 1))\n", "\n", "\n", - "list_widget = widgets.Dropdown(options=list(color_images.keys()))\n", + "list_widget_color = widgets.Dropdown(options=list(color_images.keys()))\n", "int_slider_widget = widgets.IntSlider(min=1,max=compute_k_max_color_images_layers('cat'))\n", "def update_k_max_color_layers(*args):\n", - " img_name=list_widget.value\n", + " img_name=list_widget_color.value\n", " int_slider_widget.max = compute_k_max_color_images_layers(img_name)\n", - "list_widget.observe(update_k_max_color_layers,'value')" + "list_widget_color.observe(update_k_max_color_layers,'value')" ] }, { @@ -779,7 +778,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "9e15fb8aaa9e44e880a8d7fa9e7fed1d", + "model_id": "5089ca8c1cb845478b279185787ad156", "version_major": 2, "version_minor": 0 }, @@ -792,7 +791,7 @@ } ], "source": [ - "interact(compress_show_color_images_layer,img_name=list_widget,k=int_slider_widget);" + "interact(compress_show_color_images_layer,img_name=list_widget_color,k=int_slider_widget);" ] } ], diff --git a/line.jpeg b/line.jpeg deleted file mode 100644 index 44539dd..0000000 Binary files a/line.jpeg and /dev/null differ