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
f69abfd0
Commit
f69abfd0
authored
Jun 02, 2022
by
Bryce Hepner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
still long
parent
76fd64f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
ReducedRuntimeEncoder.ipynb
ReducedRuntimeEncoder.ipynb
+27
-8
No files found.
ReducedRuntimeEncoder.ipynb
View file @
f69abfd0
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
76
,
"execution_count":
43
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
100
,
"execution_count":
44
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -293,7 +293,7 @@
...
@@ -293,7 +293,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
101
,
"execution_count":
45
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -333,7 +333,7 @@
...
@@ -333,7 +333,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
105
,
"execution_count":
46
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -365,7 +365,6 @@
...
@@ -365,7 +365,6 @@
" \n",
" \n",
" the_keys4 = list(list_dic[4].keys())\n",
" the_keys4 = list(list_dic[4].keys())\n",
" the_values4 = list(list_dic[4].values())\n",
" the_values4 = list(list_dic[4].values())\n",
" \n",
" #Matrix system of points that will be used to solve the least squares fitting hyperplane\n",
" #Matrix system of points that will be used to solve the least squares fitting hyperplane\n",
" points = np.array([[-1,-1,1], [-1,0,1], [-1,1,1], [0,-1,1]])\n",
" points = np.array([[-1,-1,1], [-1,0,1], [-1,1,1], [0,-1,1]])\n",
" \n",
" \n",
...
@@ -422,7 +421,7 @@
...
@@ -422,7 +421,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
106
,
"execution_count":
47
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -485,7 +484,7 @@
...
@@ -485,7 +484,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
107
,
"execution_count":
48
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -500,13 +499,33 @@
...
@@ -500,13 +499,33 @@
"source": [
"source": [
"scenes = file_extractor()\n",
"scenes = file_extractor()\n",
"images = image_extractor(scenes)\n",
"images = image_extractor(scenes)\n",
"list_dic, image, new_error, diff, bound, predict, bins, A, nodes = huffman(images[
0
], 4, False)\n",
"list_dic, image, new_error, diff, bound, predict, bins, A, nodes = huffman(images[
1
], 4, False)\n",
"encoded_string = encoder(new_error, list_dic, diff, bound, bins)\n",
"encoded_string = encoder(new_error, list_dic, diff, bound, bins)\n",
"reconstruct_image = decoder(A, encoded_string, list_dic, bins, False,nodes)\n",
"reconstruct_image = decoder(A, encoded_string, list_dic, bins, False,nodes)\n",
"print(np.allclose(image, reconstruct_image))\n",
"print(np.allclose(image, reconstruct_image))\n",
"print(len(list_dic))\n"
"print(len(list_dic))\n"
]
]
},
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.4232928466796875"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"compress_rate(image, new_error, diff, bound, list_dic, bins)"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": null,
...
...
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