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
5abc68cc
Commit
5abc68cc
authored
Apr 14, 2022
by
Nathaniel Callens
Browse files
Options
Browse Files
Download
Plain Diff
function added
parents
b574577b
8b6c1728
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Encoding_decoding.ipynb
Encoding_decoding.ipynb
+5
-2
No files found.
Encoding_decoding.ipynb
View file @
5abc68cc
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
" diff (510, 638): difference of min and max of the 4 neighbors\n",
" diff (510, 638): difference of min and max of the 4 neighbors\n",
" boundary (2300,): the boundary values after subtracting the very first pixel value\n",
" boundary (2300,): the boundary values after subtracting the very first pixel value\n",
" predict (325380,): the list of predicted values\n",
" predict (325380,): the list of predicted values\n",
" bins (num_bins
)
\n",
" bins (num_bins
- 1,): a list of threshold to cut the bins
\n",
" A (3 X 3): system of equation\n",
" A (3 X 3): system of equation\n",
" \n",
" \n",
" \"\"\"\n",
" \"\"\"\n",
...
@@ -306,6 +306,9 @@
...
@@ -306,6 +306,9 @@
"outputs": [],
"outputs": [],
"source": [
"source": [
"def encoder(error, list_dic, diff, bound, bins):\n",
"def encoder(error, list_dic, diff, bound, bins):\n",
" \"\"\"\n",
" This function \n",
" \"\"\"\n",
" # copy the error matrix (including the boundary)\n",
" # copy the error matrix (including the boundary)\n",
" encoded = np.copy(error).astype(int).astype(str).astype(object)\n",
" encoded = np.copy(error).astype(int).astype(str).astype(object)\n",
" #diff = np.reshape(diff,(510,638))\n",
" #diff = np.reshape(diff,(510,638))\n",
...
...
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