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

kelly changes

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