Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions notebooks/03-dev/chapter6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,33 @@
"import cv2\n",
" \n",
"# Import a picture of Prof. Dowling in grayscale\n",
"img = cv2.imread('https://dowlinglab.nd.edu/assets/320333/dowling_alex_sq.jpg', 0)\n",
"\n",
"# Use this for local execution of the notebook (no internet required)\n",
"# img = cv2.imread('../../media/dowling_alex_sq.jpg', 0)\n",
"if \"google.colab\" in sys.modules:\n",
" # Download\n",
" !wget 'https://dowlinglab.nd.edu/assets/320333/dowling_alex_sq.jpg'\n",
" image_location = 'dowling_alex_sq.jpg'\n",
"else\n",
" # Use local copy already in repo (no internet required)\n",
" image_location = '../../media/dowling_alex_sq.jpg'\n",
"\n",
"img.shape"
"img = cv2.imread(image_location, 0)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(img)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(img.shape)"
]
},
{
Expand Down
31 changes: 26 additions & 5 deletions notebooks/03/chapter6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,33 @@
"import cv2\n",
" \n",
"# Import a picture of Prof. Dowling in grayscale\n",
"img = cv2.imread('https://dowlinglab.nd.edu/assets/320333/dowling_alex_sq.jpg', 0)\n",
"\n",
"# Use this for local execution of the notebook (no internet required)\n",
"# img = cv2.imread('../../media/dowling_alex_sq.jpg', 0)\n",
"if \"google.colab\" in sys.modules:\n",
" # Download\n",
" !wget 'https://dowlinglab.nd.edu/assets/320333/dowling_alex_sq.jpg'\n",
" image_location = 'dowling_alex_sq.jpg'\n",
"else\n",
" # Use local copy already in repo (no internet required)\n",
" image_location = '../../media/dowling_alex_sq.jpg'\n",
"\n",
"img.shape"
"img = cv2.imread(image_location, 0)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(img)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(img.shape)"
]
},
{
Expand Down