Commit 62b8cccf authored by Kelly Chang's avatar Kelly Chang

kelly changes

parent 0b79d1b7
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 81, "execution_count": 87,
"id": "9ed20f84", "id": "9ed20f84",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -120,14 +120,15 @@ ...@@ -120,14 +120,15 @@
" y = np.array([-z[0]+z[2]-z[3], z[0]+z[1]+z[2], -z[0]-z[1]-z[2]-z[3]])\n", " y = np.array([-z[0]+z[2]-z[3], z[0]+z[1]+z[2], -z[0]-z[1]-z[2]-z[3]])\n",
" predict[r,c] = np.linalg.solve(A,y)[-1]\n", " predict[r,c] = np.linalg.solve(A,y)[-1]\n",
" diff[r,c] = (np.max(actual_surrounding)-np.min(actual_surrounding))\n", " diff[r,c] = (np.max(actual_surrounding)-np.min(actual_surrounding))\n",
" \n", " predict = np.ravel(predict[1:-1,1:-1])\n",
" diff = np.ravel(diff[1:-1,1:-1])\n",
" image = np.ravel(image[1:-1,1:-1])\n", " image = np.ravel(image[1:-1,1:-1])\n",
" return image, predict, diff" " return image, predict, diff"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 82, "execution_count": 88,
"id": "8e3ef654", "id": "8e3ef654",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -139,7 +140,7 @@ ...@@ -139,7 +140,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 83, "execution_count": 89,
"id": "dda442ae", "id": "dda442ae",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 81, "execution_count": 87,
"id": "9ed20f84", "id": "9ed20f84",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -120,14 +120,15 @@ ...@@ -120,14 +120,15 @@
" y = np.array([-z[0]+z[2]-z[3], z[0]+z[1]+z[2], -z[0]-z[1]-z[2]-z[3]])\n", " y = np.array([-z[0]+z[2]-z[3], z[0]+z[1]+z[2], -z[0]-z[1]-z[2]-z[3]])\n",
" predict[r,c] = np.linalg.solve(A,y)[-1]\n", " predict[r,c] = np.linalg.solve(A,y)[-1]\n",
" diff[r,c] = (np.max(actual_surrounding)-np.min(actual_surrounding))\n", " diff[r,c] = (np.max(actual_surrounding)-np.min(actual_surrounding))\n",
" \n", " predict = np.ravel(predict[1:-1,1:-1])\n",
" diff = np.ravel(diff[1:-1,1:-1])\n",
" image = np.ravel(image[1:-1,1:-1])\n", " image = np.ravel(image[1:-1,1:-1])\n",
" return image, predict, diff" " return image, predict, diff"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 82, "execution_count": 88,
"id": "8e3ef654", "id": "8e3ef654",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
...@@ -139,7 +140,7 @@ ...@@ -139,7 +140,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 83, "execution_count": 89,
"id": "dda442ae", "id": "dda442ae",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
......
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