Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
image-compression
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
image-compression
Commits
36d6711f
Commit
36d6711f
authored
Jun 01, 2022
by
Bryce Hepner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
just timestamp changes
parent
a9bf04b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
31 deletions
+14
-31
Encoding_decoding.ipynb
Encoding_decoding.ipynb
+14
-31
No files found.
Encoding_decoding.ipynb
View file @
36d6711f
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
2
,
"execution_count":
1
,
"id": "14f74f21",
"metadata": {},
"outputs": [],
...
...
@@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
2
,
"id": "c16af61f",
"metadata": {},
"outputs": [],
...
...
@@ -77,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count":
4
,
"execution_count":
3
,
"id": "53786325",
"metadata": {},
"outputs": [],
...
...
@@ -153,7 +153,7 @@
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
4
,
"id": "6b965751",
"metadata": {},
"outputs": [],
...
...
@@ -209,7 +209,7 @@
},
{
"cell_type": "code",
"execution_count":
6
,
"execution_count":
5
,
"id": "b7561883",
"metadata": {},
"outputs": [],
...
...
@@ -318,7 +318,7 @@
},
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
6
,
"id": "2eb774d2",
"metadata": {},
"outputs": [],
...
...
@@ -358,7 +358,7 @@
},
{
"cell_type": "code",
"execution_count":
8
,
"execution_count":
7
,
"id": "8eeb40d0",
"metadata": {},
"outputs": [],
...
...
@@ -445,7 +445,7 @@
},
{
"cell_type": "code",
"execution_count":
9
,
"execution_count":
8
,
"id": "f959fe93",
"metadata": {},
"outputs": [],
...
...
@@ -509,7 +509,7 @@
},
{
"cell_type": "code",
"execution_count":
10
,
"execution_count":
9
,
"id": "3e0e9742",
"metadata": {},
"outputs": [
...
...
@@ -537,7 +537,7 @@
},
{
"cell_type": "code",
"execution_count": 1
6
,
"execution_count": 1
0
,
"id": "004e8ba8",
"metadata": {},
"outputs": [
...
...
@@ -547,7 +547,7 @@
"0.4232928466796875"
]
},
"execution_count": 1
6
,
"execution_count": 1
0
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -558,7 +558,7 @@
},
{
"cell_type": "code",
"execution_count": 1
05
,
"execution_count": 1
1
,
"id": "a282f9e6",
"metadata": {},
"outputs": [
...
...
@@ -578,27 +578,10 @@
},
{
"cell_type": "code",
"execution_count":
19
,
"execution_count":
null
,
"id": "7efe26b9",
"metadata": {},
"outputs": [
{
"ename": "TypeError",
"evalue": "Cannot handle this data type: (1, 1), |O",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
"File \u001b[0;32m~/.local/lib/python3.8/site-packages/PIL/Image.py:2928\u001b[0m, in \u001b[0;36mfromarray\u001b[0;34m(obj, mode)\u001b[0m\n\u001b[1;32m <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2926'>2927</a>\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m-> <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2927'>2928</a>\u001b[0m mode, rawmode \u001b[39m=\u001b[39m _fromarray_typemap[typekey]\n\u001b[1;32m <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2928'>2929</a>\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mKeyError\u001b[39;00m \u001b[39mas\u001b[39;00m e:\n",
"\u001b[0;31mKeyError\u001b[0m: ((1, 1), '|O')",
"\nThe above exception was the direct cause of the following exception:\n",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m/home/bryce/git/master/Encoding_decoding.ipynb Cell 12'\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> <a href='vscode-notebook-cell:/home/bryce/git/master/Encoding_decoding.ipynb#ch0000011?line=0'>1</a>\u001b[0m compressed_image \u001b[39m=\u001b[39m Image\u001b[39m.\u001b[39;49mfromarray(encoded_matrix)\n\u001b[1;32m <a href='vscode-notebook-cell:/home/bryce/git/master/Encoding_decoding.ipynb#ch0000011?line=1'>2</a>\u001b[0m compressed_image\u001b[39m.\u001b[39msave(\u001b[39m\"\u001b[39m\u001b[39mHuffmanedTry1.tiff\u001b[39m\u001b[39m\"\u001b[39m)\n",
"File \u001b[0;32m~/.local/lib/python3.8/site-packages/PIL/Image.py:2930\u001b[0m, in \u001b[0;36mfromarray\u001b[0;34m(obj, mode)\u001b[0m\n\u001b[1;32m <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2927'>2928</a>\u001b[0m mode, rawmode \u001b[39m=\u001b[39m _fromarray_typemap[typekey]\n\u001b[1;32m <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2928'>2929</a>\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mKeyError\u001b[39;00m \u001b[39mas\u001b[39;00m e:\n\u001b[0;32m-> <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2929'>2930</a>\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mTypeError\u001b[39;00m(\u001b[39m\"\u001b[39m\u001b[39mCannot handle this data type: \u001b[39m\u001b[39m%s\u001b[39;00m\u001b[39m, \u001b[39m\u001b[39m%s\u001b[39;00m\u001b[39m\"\u001b[39m \u001b[39m%\u001b[39m typekey) \u001b[39mfrom\u001b[39;00m \u001b[39me\u001b[39;00m\n\u001b[1;32m <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2930'>2931</a>\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m <a href='file:///~/.local/lib/python3.8/site-packages/PIL/Image.py?line=2931'>2932</a>\u001b[0m rawmode \u001b[39m=\u001b[39m mode\n",
"\u001b[0;31mTypeError\u001b[0m: Cannot handle this data type: (1, 1), |O"
]
}
],
"outputs": [],
"source": []
},
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment