Created
March 5, 2023 21:45
-
-
Save b10011/706032cb73ad2927904163dcd8eb6d1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "948b24d7", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Notebook stuff\n", | |
"from PIL import Image\n", | |
"from IPython.display import display\n", | |
"\n", | |
"def imshow(image):\n", | |
" if len(image.shape) == 2:\n", | |
" image = cv2.cvtColor(image, cv2.COLOR_GRAY2BGR)\n", | |
" else:\n", | |
" image = image[:, :, ::-1]\n", | |
" return display(Image.fromarray(image))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "886faaba", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Python code imports\n", | |
"import cv2\n", | |
"from skimage.morphology import skeletonize" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "d3969869", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment