Commit 3943682b authored by Kelly Chang's avatar Kelly Chang

commenting the code

parent 817a3ee5
...@@ -213,8 +213,8 @@ ...@@ -213,8 +213,8 @@
" 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",
" # get the prediction error and difference\n", " # get the prediction error and difference\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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment