Last active
June 11, 2021 11:05
-
-
Save jeanpat/5712699 to your computer and use it in GitHub Desktop.
A ipython notebook. Takes an image, converts its skeleton to a networkx graph
This file contains 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
{ | |
"metadata": { | |
"name": "From shape skeleton to graph" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "import Image, ImageDraw, ImageFont\n\nimport mahotas as mh\nfrom mahotas import polygon\nimport pymorph as pm\n\nimport networkx as nx\n\nfrom scipy import ndimage as nd\nimport skimage.transform as transform\nimport skimage.io as sio\nimport scipy.misc as sm\n\nimport os\nimport math\n", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 59 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "def branchedPoints(skel):\n branch1=np.array([[2, 1, 2], [1, 1, 1], [2, 2, 2]])\n branch2=np.array([[1, 2, 1], [2, 1, 2], [1, 2, 1]])\n branch3=np.array([[1, 2, 1], [2, 1, 2], [1, 2, 2]])\n branch4=np.array([[2, 1, 2], [1, 1, 2], [2, 1, 2]])\n branch5=np.array([[1, 2, 2], [2, 1, 2], [1, 2, 1]])\n branch6=np.array([[2, 2, 2], [1, 1, 1], [2, 1, 2]])\n branch7=np.array([[2, 2, 1], [2, 1, 2], [1, 2, 1]])\n branch8=np.array([[2, 1, 2], [2, 1, 1], [2, 1, 2]])\n branch9=np.array([[1, 2, 1], [2, 1, 2], [2, 2, 1]])\n br1=mh.morph.hitmiss(skel,branch1)\n br2=mh.morph.hitmiss(skel,branch2)\n br3=mh.morph.hitmiss(skel,branch3)\n br4=mh.morph.hitmiss(skel,branch4)\n br5=mh.morph.hitmiss(skel,branch5)\n br6=mh.morph.hitmiss(skel,branch6)\n br7=mh.morph.hitmiss(skel,branch7)\n br8=mh.morph.hitmiss(skel,branch8)\n br9=mh.morph.hitmiss(skel,branch9)\n return br1+br2+br3+br4+br5+br6+br7+br8+br9\n\ndef endPoints(skel):\n endpoint1=np.array([[0, 0, 0],\n [0, 1, 0],\n [2, 1, 2]])\n \n endpoint2=np.array([[0, 0, 0],\n [0, 1, 2],\n [0, 2, 1]])\n \n endpoint3=np.array([[0, 0, 2],\n [0, 1, 1],\n [0, 0, 2]])\n \n endpoint4=np.array([[0, 2, 1],\n [0, 1, 2],\n [0, 0, 0]])\n \n endpoint5=np.array([[2, 1, 2],\n [0, 1, 0],\n [0, 0, 0]])\n \n endpoint6=np.array([[1, 2, 0],\n [2, 1, 0],\n [0, 0, 0]])\n \n endpoint7=np.array([[2, 0, 0],\n [1, 1, 0],\n [2, 0, 0]])\n \n endpoint8=np.array([[0, 0, 0],\n [2, 1, 0],\n [1, 2, 0]])\n \n ep1=mh.morph.hitmiss(skel,endpoint1)\n ep2=mh.morph.hitmiss(skel,endpoint2)\n ep3=mh.morph.hitmiss(skel,endpoint3)\n ep4=mh.morph.hitmiss(skel,endpoint4)\n ep5=mh.morph.hitmiss(skel,endpoint5)\n ep6=mh.morph.hitmiss(skel,endpoint6)\n ep7=mh.morph.hitmiss(skel,endpoint7)\n ep8=mh.morph.hitmiss(skel,endpoint8)\n ep = ep1+ep2+ep3+ep4+ep5+ep6+ep7+ep8\n return ep\n\ndef pruning(skeleton, size):\n '''remove iteratively end points \"size\" \n times from the skeleton\n '''\n for i in range(0, size):\n endpoints = endPoints(skeleton)\n endpoints = np.logical_not(endpoints)\n skeleton = np.logical_and(skeleton,endpoints)\n return skeleton", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 60 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "image = Image.new(\"RGBA\", (600,150), (255,255,255))\ndraw = ImageDraw.Draw(image)\nfontsize = 150\nfont = ImageFont.truetype(\"/usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf\", fontsize)\ntxt = 'A'\ndraw.text((30, 5), txt, (0,0,0), font=font)\nimg = image.resize((188,45), Image.ANTIALIAS)\nplt.imshow(img)", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "pyout", | |
"prompt_number": 61, | |
"text": "<matplotlib.image.AxesImage at 0xaf026ac>" | |
}, | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAksAAACiCAYAAABRaYlhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3WuIXOd9P/DvzJnbzuzMnpndnZm9SNpQWbGVOLGK2kBJ\nYIsqh1AQDgEnppglcd6k9EXaQqK8itQ3WdOWkrYulGKKoOBab2rLbSxik6xpElJDK0OIQ22KJc/u\n3HbmzP1+zpn/C/+fx+ecOTsrrXakvXw/sOxqNJdnx4P15Xd+z+/xDIfDIYiIiIjIlfdhL4CIiIjo\nIGNYIiIiIhqDYYmIiIhoDIYlIiIiojEYloiIiIjGYFgiIiIiGuO+wtLNmzfx6KOP4pFHHsHzzz+/\nX2siIiIiOjA8e52zZBgGPvnJT+LNN9/E0tISfud3fgcvvfQSHnvssf1eIxEREdFD49vrA99++22c\nPn0aKysrAICvfe1rePXVV21hyePx3PcCiYiIiB4UtxrSnsPS1tYWTpw4If+8vLyM//qv/xq53/e/\n/31cuXJlry9DNOLKlSv8TNG+4eeJ9hM/T4fbTkWePYelu60abWxsyA/O6uoqVldX9/qSRERERPtm\nY2MDGxsbu95vz2FpaWkJmUxG/jmTyWB5eXnkfqurq0zZREREdOA4izhXr151vd+ed8OdP38e77//\nPm7fvo1+v4+XX34Zly5dcl0I0X7iZ4r2Ez9PtJ/4eTqa9rwbDgBef/11fPvb34ZhGHjuuefwve99\nz/7kHo9roxQRERHRQbNTbrmvsLTXFyUiIiI6aHbKLZzgTURERDQGwxIRERHRGAxLRERERGMwLBER\nERGNwbBERERENAbDEhEREdEYDEtEREREYzAsERERE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6BD4whe+gHg8brttp8/Pq6++imeeeQZ+vx8rKys4\nffq0DOhEgttnCnDf0MTP1NExsbC0tbWFEydOyD8vLy9ja2trUi9HR5TH48Ef/MEf4Pz58/inf/on\nAEChUEAqlQIApFIpFAqFh7lEOmR2+vxks1ksLy/L+/H/WXQv/u7v/g6f/exn8dxzz8lLu/xMHR0T\nC0ucsUT74ec//zlu3bqF119/HS+88AL+8z//0/b3Ho+HnzXas90+P/xs0d341re+hQ8++ADvvPMO\nFhYW8Od//uc73pefqcNpYmFpaWkJmUxG/jmTydgSNtHdWFhYAADMz8/jy1/+Mt5++22kUink83kA\nQC6XQzKZfJhLpENmp8+P8/9Zm5ubWFpaeihrpMMlmUzK4P3Nb35TXmrjZ+romFhYOn/+PN5//33c\nvn0b/X4fL7/8Mi5dujSpl6MjqN1uo9FoAABarRZ+/OMf4/HHH8elS5dw7do1AMC1a9fw1FNPPcxl\n0iGz0+fn0qVL+Nd//Vf0+3188MEHeP/99+UOTKJxcrmc/Pnf/u3f5E45fqaOjolN8Pb5fPj7v/97\nfPGLX4RhGHjuuefw2GOPTerl6AgqFAr48pe/DADQdR1/9Ed/hCeffBLnz5/H008/jRdffBErKyu4\nfv36Q14pHVTPPPMM3nrrLZRKJZw4cQJ/8Rd/gcuXL7t+fs6ePYunn34aZ8+ehc/nwz/8wz/wkgmN\ncH6mrl69io2NDbzzzjvweDz4xCc+gX/8x38EwM/UUTLRs+GIiIiIDjtO8CYiIiIag2GJiIiIaAyG\nJSIiIqIxGJaIiIiIxmBYIiIiIhqDYYmIiIhojP8HYFBoXrSC+ysAAAAASUVORK5CYII=\n" | |
} | |
], | |
"prompt_number": 61 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "img = np.array(img)\nim = img[:,0:50,0]\nim = im < 128\nskel = mh.thin(im)\n# To fix the algorithm, prune the skeleton 1,2,3...\nskel = pruning(skel,3)\nbp = branchedPoints(skel)\nep = endPoints(skel)\nedge = skel-bp\n\nedge_lab,n = mh.label(edge)\nbp_lab,_ = mh.label(bp)\nep_lab,_ = mh.label(ep)", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 62 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "figsize(10,20)\nsubplot(141,frameon = False, xticks = [], yticks = [])\ntitle('pruning 0')\nimshow(mh.thin(im),interpolation = 'nearest')\nsubplot(142,frameon = False, xticks = [], yticks = [])\ntitle('pruning 1')\nimshow(pruning(mh.thin(im),1),interpolation = 'nearest')\nsubplot(143,frameon = False, xticks = [], yticks = [])\ntitle('pruning 2')\nimshow(pruning(mh.thin(im),2),interpolation = 'nearest')\nsubplot(144,frameon = False, xticks = [], yticks = [])\ntitle('pruning 3')\nimshow(pruning(mh.thin(im),3),interpolation = 'nearest')", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "pyout", | |
"prompt_number": 63, | |
"text": "<matplotlib.image.AxesImage at 0xcf0066c>" | |
}, | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAjwAAACKCAYAAACuA5DbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAC09JREFUeJzt3V9o1fUfx/HXmc7a3H82144aA81pG+1mF8s1Kggl9SKM\nYDSItIjA6CJMwcX+sBVtCNGFXgST1sVSgjDwX4MNE2N0E0nlIEjcMklQ53LYVsr3d9Fvx22dzfPn\n+933+32f5+PKwzmdfc45rz6+fH+/37OI4ziOAAAADMvyewEAAABeo/AAAADzKDwAAMA8Cg8AADCP\nwgMAAMyj8AAAAPMoPPPk5+fr8uXLfi8DIUeO4AZyhHSRofsoPPPcvn1blZWVnjz3Rx99pIqKChUW\nFuq1117T33//7cnPgf+8ytFPP/2krVu3qqysTFlZ/O9rnVc56uvrU11dnQoLC7V27Vrt379f9+7d\nc/3nwH9eZejo0aPauHGjCgsLVVpaqp07d+rq1auu/xw3mdox79696/cSFvT111+ru7tb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AAGAehQcAAJjn+yGtGWEai6Uq3uWhYRwLBk0m\nvHfzX2MmHHbxi9U8WX1dQWftfQ/z62HCAwAAzPN9whPmtpiIeK/P+muG98gQACSHCQ8AADCPwgMA\nAMyj8AAAAPMoPAAAwDwKDwAAMI/CAwAAzKPwAAAA8yg8AADAPAoPAAAwj8IDAADMo/AAAADzKDwA\nAMA8Cg8AADCPwgMAAMyLOI7j+L0IAAAALzHhAQAA5lF4AACAeRQeAABgHoUHAACYR+EBAADmUXgA\nAIB5/wM/2Wni1FZT4AAAAABJRU5ErkJggg==\n" | |
} | |
], | |
"prompt_number": 63 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "subplot(221,frameon = False, xticks = [], yticks = [])\ntitle('skeleton')\nimshow(skel,interpolation = 'nearest')\nsubplot(223,frameon = False, xticks = [], yticks = [])\ntitle('skel-bp -> label')\nimshow(edge_lab,interpolation = 'nearest')\nsubplot(224,frameon = False, xticks = [], yticks = [])\ntitle('skel -> end points')\nimshow(ep_lab,interpolation = 'nearest')\nsubplot(222,frameon = False, xticks = [], yticks = [])\ntitle('branched points (bp)')\nimshow(bp_lab,interpolation = 'nearest')", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "pyout", | |
"prompt_number": 64, | |
"text": "<matplotlib.image.AxesImage at 0xd0ed9ec>" | |
}, | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAjwAAANiCAYAAABl/BOpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuQleV9wPHfYVHBuNwRYZcVVrQkGqMNirE6kIrXYKWo\nEUTrJRltGqOYjAENCF4Sq5GO1TpNTE1pRMWSMaMSHYlaHGK9ZkKMKKIioAGV5SKguCz49g/HU1Z2\ncQVh4cfnM8MMey7vPuc97sN3n332tVQURREAAIm1ae0BAABsa4IHAEhP8AAA6QkeACA9wQMApCd4\nAID0BE8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OHD49p06bFhg0b\n4t57742rr7462rdvHwceeGCcc845n/rjnwkTJkT79u3joIMOivPOO6/8mu+888648soro1u3btGt\nW7eYMGFC3HHHHc0e5+KLL4599tknOnfuHCeffHJ5zE19/t133z1eeeWVqKuriz333HOTFZyPrVy5\nMiorKze5fejQoXHUUUfF7rvvHj/+8Y/jySefbLS6NmbMmOjUqVP07t07Ro8e3eh9/Ph4K1eu3Ox5\n2ZUJnp1Qv3794qabboqJEydGjx49YuTIkbFkyZIoiiKeeuqpeOGFF2LMmDHlxy9cuDAWL14cnTt3\nLv+57rrr4p133tnk2AsXLoxp06Y1euwTTzwRb731VvkxG//obPHixVFTU9PoGPvuu28sXry4/PE+\n++xT/nv79u1jzZo1n8t5AFpm4x/T1NTUNPr67N69e+y+++7lj99///248MILo0+fPtGxY8cYNGhQ\nvPvuu43+gW/ua/qNN94of/PVlI836H7yeQsXLoynn3660bxz1113xdtvvx11dXWxfv36TV7DZ33N\nS5YsiYiIJUuWxL777tvs+fikzzJ/3X777TFv3rz44he/GIcffnizP2Lq3LlzrF69utFtpVIpqqur\nyx9/4QtfiC5dujQa2+bex4+P16lTp2bHt6sTPDupkSNHxqxZs2LhwoVRKpVizJgxUSqV4rjjjoux\nY8fGMcccUw6ampqa6Nu3b6xYsaL8Z9WqVTF9+vRNjltTUxNnn312o8euXr06fvjDH0bEppuWq6qq\nYuHChY1uW7hwYVRVVW2jVw58VhvvBVm0aFH06tWr/PEnv6YnTZoU8+bNi2eeeSbefffdePzxx6Mo\nihZtqK2pqdns/prNPW/QoEGbzDu33nprdOvWLdq2bbvJa/g0zb3mXr16xYIFC5q877No6hc4+vXr\nF3fddVcsXbo0xowZE6eddlqsXbt2k8cdfPDB8frrr8eHH37Y6PY33nij/Pc1a9bE8uXLG43tk69p\n43n2pZdeij59+sRee+31mV/LrkLw7ITmzZsXjz32WNTX18cee+wR7dq1i4qKivL9l112WZx55plx\nzDHHxLJly+Kwww6LysrKuOGGG2Lt2rWxYcOGeOGFF+K5557b5NhnnXVWPPDAAzFjxozYsGFDfPDB\nBzFz5szysmqPHj0aTWgnnXRSzJs3L+6+++5Yv3593HPPPTF37twYOnRo+TEtmSiBbaMoirj11lvj\nL3/5Syxfvjx+/OMfb/aaLWvWrIn27dtHx44dY/ny5XHVVVc1ecymnHnmmfHII4/EtGnTYv369bFs\n2bL405/+tNnnRER84xvfiHnz5sWUKVOioaEhGhoa4tlnn425c+dGRUVFDB8+PCZOnBhr166NF198\nMf7rv/7rU39j9Nprr421a9fGnDlzYvLkyXHGGWdExEffLF577bVRV1cXdXV1cfXVV2/Rdch69OgR\ny5Yti1WrVpVvmzJlSixdujQiIjp27BilUinatNn0n9nq6uro169fPP300+XbiqKIBx98MJ544olY\nt25djB8/Pr72ta81ipobb7wxVq5cGW+88UbcfPPN5dcUEfH444/HSSed9Jlfx65E8OyE6uvr4/LL\nL4/u3btHz549o66uLq677rqI+P/vOsaNGxfDhg2LIUOGxOrVq2P69Okxe/bsqK2tje7du8cFF1xQ\n/kLd+PoP1dXVcd9998VPfvKT2HvvvaOmpiYmTZpUnqwuueSS+PWvfx1dunSJ0aNHR5cuXWL69Okx\nadKk6NatW9x4440xffr06NKlS3m8G09MO8O1OCCTUqkUo0aNiuOOOy7222+/2H///WPcuHGN7t/Y\n6NGjY+3atdGtW7c48sgj48QTT9zkMc19TdfU1MSDDz4YkyZNiq5du8ahhx4azz///CaP++RxKisr\nY8aMGTF16tSoqqqKnj17xuWXX17+7al/+7d/izVr1sQ+++wT559/fpx//vmf+roHDRoU/fr1iyFD\nhsRll10WQ4YMiYiP5sYBAwbEwQcfHAcffHAMGDBgs+fjk+P9+P7+/fvHyJEjo7a2Nrp06RJLliyJ\nhx9+OA466KCorKyMSy+9NKZOnRp77LFHk8e68MILG+0d+vh9uuqqq6Jr167xxz/+MaZMmdLoOaec\nckp89atfjUMPPTSGDh3a6DxMnTo1Lrzwwk89L7uyUuHbbwCSWLBgQdTW1sb69eubXF3ZUaxbty4O\nPfTQeOyxxxr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2FWVSqVt8rxSqbTFx94RbM3Yd+bXDTuabTVH7Yi21bz57//+7y1+\n7Lnnnhu9e/eOa6655nMfBx+xwtNKiqLYrs/7PKxbty7efffdbfo5tub1tea5gWy21xz19ttvb9Hn\ngc9K8Gxj119/fVRXV0eHDh2if//+8dhjj23ymIaGhhg5cmScdtpp0dDQEIsXL45TTz019t5776it\nrY1bbrnlM33OV199NQYOHBgdO3aMYcOGxYoVKyIiYsGCBdGmTZv4xS9+EVVVVdGrV6+YNGlSi4+7\ndOnSqKmpibPOOiseffTR+PDDDz/TuD52ySWXRE1NTXTs2DEGDBgQv//978v3lUql+OCDD2LEiBHR\noUOH+OpXvxrPP/98+f6tPTdAY60xR23svPPOi4EDB8bPf/7zWLlyZYufN3fu3Dj22GOja9eu0b9/\n/5g2bVr5vnPPPTe++93vxtChQ6NDhw5xxBFHxPz588v3/+53v4v+/ftHp06d4nvf+14URdFsqE2c\nODFOO+20Zuekl156KQYPHhydO3eOgw46KB544IFG4xg/fnxERMycOTOqq6vjX/7lX6JHjx7Rq1ev\nmDx5ckRE3HbbbXHXXXfFDTfcEJWVlXHKKadERMveG1pO8GxDL7/8ctx6663x3HPPxapVq2LGjBnR\np0+fRo/54IMPYtiwYdG+ffuYNm1aVFRUxMknnxyHHnpoLF68OB599NG46aabYsaMGS36nEVRxK9+\n9av4z//8z1iyZEm0bds2Lr744kaPmTlzZrz66qsxY8aMuP766+PRRx9t0bGrqqpi3rx5ceihh8al\nl14atbW1MWHChHj99ddb9PyPHX744fGnP/0pVqxYEWeeeWacfvrpsW7duvL477vvvvjmN79Zvn/Y\nsGGxYcOG+PDDD7fq3ACNtcYc9Un3339/XHHFFfHwww9Hnz59YtSoUfHII49sdqXovffei2OPPTbO\nOuusWLp0aUydOjX+6Z/+KV566aXyY+65556YOHFirFixIvr16xc/+tGPIiKirq4uTj311PjJT34S\ny5Yti/322y+eeOKJzf5I6/77729yTmpoaIiTTz45TjjhhFi6dGnccsstMWrUqJg3b15EbPqjsrff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Q0/g2In/3sZ7F69epYvXp1jB07tnz7okWLGv19t912i27dujV7\nf1VV1SbjrqmpKR971apV5ds3bNgQDz30UIwcOTL23XffeOihh+KKK66IN998s0W/ej5r1qz46U9/\nGtOmTYuVK1fGihUromPHjo2+s3njjTfKf//www/jzTffjKqqqujdu3eLzw3QMttyjvqkhx56qDyv\njBw5snz7K6+8EuPHj4/a2toYPXp0HHzwwTF//vz46U9/2uRxampqYtCgQY3GsHr16mZXhDbWq1ev\nRnNMURSNPm5Kc3PSx8faeP5auHBhozm1pfNSU4/b3HvDZyd4tqF58+bFY489FvX19bHHHntEu3bt\noqKiotFjLrvssjjzzDPjmGOOiWXLlsVhhx0WlZWVccMNN8TatWtjw4YN8cILL8Rzzz0XEZ/+GxBF\nUcSUKVPipZdeivfffz+uvPLKOP300xt9MV177bWxdu3amDNnTkyePDnOOOOMFr2ed955J6qrq2Pc\nuHFx5JFHxmuvvRa//vWv4xvf+Eaj71o2Z/Xq1dG2bdvo1q1brFu3Lq6++upGQRUR8Yc//CF+85vf\nxPr16+Omm26Kdu3axRFHHLHV5wZorDXmqE86//zz48gjj4xVq1bFb37zm5g9e3Zccskl0bVr12af\nM3To0Jg3b15MmTIlGhoaoqGhIZ599tmYO3fup47hpJNOijlz5pTnmJtvvjneeuutzY6xuTnp8MMP\njz333DNuuOGGaGhoiJkzZ8b06dNjxIgR5XG09Hz06NGj0cbqlrw3fDaCZxuqr6+Pyy+/PLp37x49\ne/aMurq6uO666yKi8Wa2cePGxbBhw2LIkCGxevXqmD59esyePTtqa2uje/fuccEFF5Sj4NOuF/Hx\nHp5zzz03evbsGevWrYubb7650WMGDRoU/fr1iyFDhsRll10WQ4YMadHr+cIXvhAzZsyIP/zhD/G9\n730vunTp0qLnbTzmE044IU444YQ44IADok+fPtG+ffuoqalp9Nhhw4bFPffcE126dIk777wz7r33\n3qioqIiKioqtOjdAY60xR33Sd77znViyZEn867/+axxyyCEtes5ee+0VM2bMiKlTp0ZVVVX07Nkz\nLr/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TkSu\nQmCC\n" | |
} | |
], | |
"prompt_number": 64 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "endpoints = np.zeros(skel.shape)\nedges = np.zeros(skel.shape)\n\nfor l in range(1,n+1):\n cur_edge = edge_lab == l\n cur_end_points = endPoints(cur_edge)\n pruned_edge = pruning(cur_edge,1)\n edges = np.logical_or(pruned_edge, edges)\n endpoints = np.logical_or(endpoints,cur_end_points)\n \nlab_bp, nbp = mh.label(bp)\nlab_ep, nep = mh.label(endpoints+ep)\npruned_edges, ned = mh.label(edges)", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 65 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "plt.figsize(13,8)\nsubplot(321,frameon = False, xticks = [], yticks = [])\ntitle(str(np.unique(skel)))\nimshow(skel, interpolation='nearest')\n\nsubplot(322,frameon = False, xticks = [], yticks = [])\ntitle(str(np.unique(lab_bp)))\nimshow(lab_bp, interpolation='nearest')\n\nsubplot(323,frameon = False, xticks = [], yticks = [])\ntitle(str(np.unique(edge_lab)))\nimshow(edge_lab, interpolation='nearest')\n\nsubplot(326,frameon = False, xticks = [], yticks = [])\nedge_mask = lab_ep>0\nep_edgelab = edge_lab*edge_mask\ntitle(str(np.unique(ep_edgelab)))\nimshow(ep_edgelab,interpolation='nearest')#lab_ep\n\nsubplot(324,frameon = False, xticks = [], yticks = [])\ntitle(str(np.unique(pruned_edges)))\nimshow(pruned_edges, interpolation='nearest')\n\nsubplot(325,frameon = False, xticks = [], yticks = [])\ntitle(str(np.unique(lab_ep)))\nimshow(lab_ep, interpolation='nearest')", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "pyout", | |
"prompt_number": 66, | |
"text": "<matplotlib.image.AxesImage at 0xd4333ac>" | |
}, | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAisAAAHbCAYAAAAK1NqsAAAABHNCSVQICA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yc+8Yk4evTo\nCc317//+7+MP/uAPoru7O6666qoolUpRKpXKjh0YGIjf+73fiw996EPx6quvxre//e348pe/HP/0\nT/90QnMA4Ph0dHTE4sWLh1130UUXDe6gj6fHH388mpqaYvbs2eP+2JNNRcXKL/7iL8bs2bNj9uzZ\ncdddd8WHP/zhWL58edTU1MQ555wT1113XXznO98pe9/TTjstOjo6oqenJxobGwc/87J9+/a4/vrr\nY9myZVEqlWLNmjUxbdq0ePLJJ09orhdffHF84hOfiIiI008/PSJ+Prbe9m//9m/xk5/8JG6++eao\nra2NBQsWxLXXXhvf+MY3TmgOAByfI0eORGNj47DrGhoaxv2zJAcOHIgNGzbEXXfdNa6PO1nVTvQE\nxtPrr78eNTXv9FdnZ2ds3Lgx/v3f/z3efPPN+N///d9YunRp2fv+3d/9Xdx2221x0003xeLFi+OL\nX/xi/Pqv/3q8/PLL0dbWNuzYpa+vL/7rv/7rhOY69DMro3n55Zfj1VdfHVbX/f39cemll57QHAA4\nPvX19dHT0zPsuu7u7mhoaBi35zh06FCsXLky1q9fH1deeeW4Pe5kVlE7K+/2x3/8x/GBD3wgXnjh\nheju7o7bb789BgYGyo5dunRpPPzww3Ho0KFYvXp1XHHFFRER8f73vz/+5E/+JLq6ugb/O3LkyAn9\nBSp35DNz5sx48803B//82muvDV4+++yzY8GCBcPm0NPTE4888sh7ngMAx2/RokXR3t4+7Lr29vZY\ntGjRuDx+V1dXrFy5MlavXh2bNm0al8esBBUdK0eOHIn6+vqYMWNG7N+/P/7yL/+y7Li+vr74+te/\nHt3d3TFlypSor6+PKVOmRETEH/3RH8VXvvKVeOqpp6Ioivif//mf+Md//Mc4cuTIe55XueOeD37w\ng/Hoo49GV1dXvPbaa/HlL3958Lbly5dHfX19/Pmf/3n87Gc/i/7+/viP//iPePrpp9/zHAA4fpdd\ndllMmTIl7rnnnujt7Y177rknampqBj/n+G5FUcRbb70VfX19URRF9Pb2jviZx56envjYxz4Wl1xy\nSWzduvVkvoxJZ9LGyrsX/HI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gwcPFgcPHixee+214uKLLy62\nbdtW9PT0lB3/8MMPFz/96U+LgYGB4l//9V+LM888s2hraxtxLpdeemlx/fXXF729vcW+ffuKefPm\nFbt37x5x/Jtvvlk0NjYWe/bsOeZr3LdvXzFjxoxi9+7dxcDAQPHCCy8U5513XrFjx45h4979/xNA\nJam2tagS3tNPeay88MILw6575plniiVLlhTTp08vlixZUuzdu3fE++/Zs6colUpFqVQqampqilKp\nVKxYsaLs2AcffLAolUrFzJkzi7q6uqKurq6or68vXnnllbLj165dW5xxxhlFXV1dcf755xd33HFH\nMTAwMKbXddlllxU7d+4c8fZPf/rTxZw5c4q6urriV3/1V4t77733mI/34x//uFi1alVRV1dXLFy4\nsNi+ffsxx+/atauYP3/+mOb61a9+tbjggguK+vr64qyzzipuuummYbcPDAxUxF9sgJFU01pUKe/p\npaI4dQdc06dPj2nTpkVLS0ts2bLlVD0tY/TAAw/Exo0bo7e3N/bt23fM34IBmKyqZS2qpPf0Uxor\nAADHyz9kCACkJlYAgNRqj3VjqdR6iqZBpSuK1omeAnASWS8YL+XWCzsrAEBqYgUASE2sAACpiRUA\nIDWxAgCkJlYAgNTECgCQmlgBAFITKwBAamIFAEhNrAAAqYkVACA1sQIApCZWAIDUxAoAkJpYAQBS\nEysAQGpiBQBITawAAKmJFQAgNbECAKQmVgCA1MQKAJCaWAEAUhMrAEBqYgUASE2sAACpiRUAIDWx\nAgCkJlYAgNTECgCQmlgBAFITKwBAamIFAEhNrAAAqYkVACA1sQIApCZWAIDUxAoAkJpYAQBSEysA\nQGpiBQBITawAAKmJFQAgNbECAKQmVgCA1MQKAJCaWAEAUhMrAEBqYgUASE2sAACpiRUAIDWxAgCk\nJlYAgNTECgCQmlgBAFITKwBAamIFAEhNrAAAqYkVACA1sQIApCZWAIDUxAoAkJpYAQBSEysAQGpi\nBQBITawAAKmJFQAgNbECAKQmVgCA1MQKAJCaWAEAUhMrAEBqYgUASE2sAACpiRUAIDWxAgCkJlYA\ngNTECgCQmlgBAFKrnegJnDytI1xOpLW1/GUATp3J8F48GeZ4EtlZAQBSEysAQGoVdQw0t/jDwcuH\nSq2Dl28ujg5evq102qmc0s85UNw7ePms0jvXF/dtGbxc2rD5VE4JoOoMXxdaBy9nei8ePpd3rt8c\n71y/JapjvbCzAgCkJlYAgNRKRVEUI944ZGsMTkRRtE70FICTyHrBeCm3XthZAQBSEysAQGpiBQBI\nTawAAKmJFQAgNbECAKQmVgCA1MQKAJCaWAEAUhMrAEBqYgUASE2sAACpiRUAIDWxAgCkJlYAgNTE\nCgCQmlgBAFITKwBAamIFAEhNrAAAqdVO9ATGqjh7y+Dl0iubJ3AmE2dzvPO/wZaozv8NAEZzc3F0\n8PJtpdMmcCYTp9LWCzsrAEBqpaIoihFvLLWewqlQyYqidaKnAJxE1gvGS7n1ws4KAJCaWAEAUhMr\nAEBqYgUASE2sAACpiRUAIDWxAgCkJlYAgNTECgCQmlgBAFITKwBAamIFAEhNrAAAqYkVACA1sQIA\npCZWAIDUxAoAkJpYAQBSEysAQGpiBQBIrVQURTHRkwAAGImdFQAgNbECAKQmVgCA1MQKAJCaWAEA\nUhMrAEBq/w+cV8A+3i4sNAAAAABJRU5ErkJggg==\n" | |
} | |
], | |
"prompt_number": 66 | |
}, | |
{ | |
"cell_type": "heading", | |
"level": 3, | |
"metadata": {}, | |
"source": "First make vertex from branched points and then link to the neighbouring endpoints" | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "BPlabel=np.unique(lab_bp)[1:]\nEPlabel=np.unique(lab_ep)[1:]\nEDlabel=np.unique(pruned_edges)[1:]\n\nG=nx.Graph()\nnode_index=BPlabel.max()\nselected_ep_labels = []\nfor bpl in BPlabel:\n #branched point location\n bp_row,bp_col= np.where(lab_bp==bpl)[0][0], np.where(lab_bp==bpl)[1][0]\n bp_neighbor= lab_ep[bp_row-1:bp_row+2,bp_col-1:bp_col+2]\n \n G.add_node(bpl,kind='BP',row=bp_row,col=bp_col,label=bpl)\n #branched point neighborhood\n neig_in_EP=lab_ep[bp_row-1:bp_row+2,bp_col-1:bp_col+2]\n neig_inEplabel=np.unique(neig_in_EP)[1:]\n print 'bp label',bpl,' pos',(bp_row,bp_col), 'ep neighbor label:',neig_inEplabel\n \n for epl in neig_inEplabel:\n selected_ep_labels.append(epl)\n node_index = node_index+1\n #print 'bp label',bpl,' pos',(bp_row,bp_col),neig_inEplabel, 'current ep',epl\n ep_row,ep_col= np.where(lab_ep==epl)[0][0], np.where(lab_ep==epl)[1][0]\n G.add_node(node_index,kind='EP',row=ep_row,col=ep_col,label=epl)\n G.add_edge(bpl,node_index, weight=1)\n print 'bp label',bpl,':',(bp_row,bp_col),neig_inEplabel,' -ep',epl,'(',node_index,')',':',(ep_row,ep_col),\n #print 'edge',(bpl, node_index)\n", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "bp label 1 pos (29, 16) ep neighbor label: [1 3 4]\nbp label 1 : (29, 16) [1 3 4] -ep 1 ( 3 ) : (28, 16) bp label 1 : (29, 16) [1 3 4] -ep 3 ( 4 ) : (29, 15) bp label 1 : (29, 16) [1 3 4] -ep 4 ( 5 ) : (29, 17) bp label 2 pos (29, 30) ep neighbor label: [2 5 6]\nbp label 2 : (29, 30) [2 5 6] -ep 2 ( 6 ) : (28, 30) bp label 2 : (29, 30) [2 5 6] -ep 5 ( 7 ) : (29, 29) bp label 2 : (29, 30) [2 5 6] -ep 6 ( 8 ) : (29, 31)\n" | |
} | |
], | |
"prompt_number": 67 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "figsize(5,7)\nnx.draw(G)", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAZcAAAIWCAYAAACbYsDtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUVPWdsPGnqqubXtibT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K1o4z9/CvQESoHLgVeb7bcU\n6FBYaFwktVnGJbC+ffvSr18/XmlhWxdgez7g5cG8PP5l9OjAk0lS6hiXJBg/YQJl7du3uG0McCfw\nJVAOTAJO3mR7HXB/QQHjLrss2WNKUtIYlyQYNWoU78XjzGph2zXAocCewD7APwE/32T7vbEY/ffe\nmwEDBqRgUklKDi9FTpLXX3+ds0aMYEZVFftt53NeAMZ27MisefPo379/MseTpKRy5ZIkQ4cO5faH\nHuLYoiKeghZP8H+jArg5Hmdcp068NHOmYZHU5hmXJPrn0aN5Zvp07thvP3YvLua6vDz+G/iapnMu\nC4BLCgroU1jIrCFDmDV/Poceemh6h5akADwsliLvvfcek2+9lRnTplG+YQN58TjdOnXih6efzgUX\nXUTfvn3TPaIkBWNcJEnBeVhMkhSccZEkBWdcJEnBGRdJUnDGRZIUnHGRJAVnXCRJwRkXSVJwxkWS\nFJxxkSQFZ1wkScEZF0lScMZFkhSccZEkBWdcJEnBGRdJUnDGRZIUnHGRJAVnXCRJwRkXSVJwxkWS\nFJxxkSQFZ1wkScEZF0lScMZFkhSccZEkBWdcJEnBGRdJUnDGRZIUnHGRJAVnXCRJwRkXSVJwxkWS\nFJxxkSQFZ1wkScEZF0lScMZFkhSccZEkBWdcJEnBGRdJUnDGRZIUnHGRJAVnXCRJwRkXSVJwxkWS\nFJxxkSQFZ1wkScEZF0lScMZFkhSccZEkBWdcJEnBGRdJUnDGRZIUnHGRJAVnXCRJwRkXSVJwxkWS\nFJxxkSQFZ1wkScEZF0lScMZFkhSccZEkBWdcJEnBGRdJUnDGRZIU3P8DrhmeZR+ERFcAAAAASUVO\nRK5CYII=\n" | |
} | |
], | |
"prompt_number": 68 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "#Add isolated endpoints in the Graph\n#label of isolated end points\nlonely_ep = list(set(EPlabel) - set(selected_ep_labels))\n#lep:lonely ep \nfor lep in lonely_ep:\n lep_row,lep_col= np.where(lab_ep==lep)[0][0], np.where(lab_ep==lep)[1][0]\n node_index = node_index+1\n G.add_node(node_index,kind='EP',row=lep_row,col=lep_col,label=lep)\n\n#print G.node[1] \n#edges dict\nedges={}\nfor ed in EDlabel:\n edges[ed] = np.where(pruned_edges==ed),np.sum(pruned_edges==ed)\n #print edges[ed]\n#get nodes of kind EP\n\nep_nodes=[node for node,data in G.nodes(data=True) if data['kind'] == 'EP']\nprint ep_nodes\n#print edges.keys()\nep_edges_lab = (lab_ep>0)*edge_lab\n#print G.nodes()\n#", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "[3, 4, 5, 6, 7, 8, 9, 10]\n" | |
} | |
], | |
"prompt_number": 69 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "figsize(5,8)\ntitle('Isolated endpoints are added')\nnx.draw(G)", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAUYAAAHnCAYAAADEl/S7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8FOXhx/HP5s5u7gRCOFNFEVAr9QSsICKCnIpFoCJF\nLSCiohRUlB8elQoKKlbAAzkVDxSLKKioIKJcolAUSkWuAAZIICTZ3Hl+fyzE5MnmJJtg+b5fL16Q\nnZmdZzfhk9mZ2VmHMcYgIiJF/Op6ACIipxuFUUTEojCKiFgURhERi8IoImJRGEVELArjaaxjx47M\nmjWrVtb16KOPMmjQoFpZl5+fHz///PMp38/111/P/Pnza2BEvx0VfZ8SExP57LPPqnXfp7Ls/xqF\n0Udq4ofM4XDgcDgqvb7PP//8lNb1W/PRRx9VOua1+UvGlyr6PlXlZ6Yml/1fozD6SG3/kDkcDnSu\nftlq63uRn59fK+sR31IYa8FPP/1Ehw4diIqKol69evTv379o2tdff82ll15KVFQUl112Gd98843X\n+9i5cyedOnUiLi6OevXqccstt5CWlgbAoEGD2Lt3Lz179iQ8PJxnnnkGgLVr19KuXTuio6O56KKL\nWLVqVdH97dq1iw4dOhAREUGXLl04cuRIuY9h6dKlXHTRRURHR9O+fXv+/e9/F01LTExkypQp/P73\nvycqKor+/fuTk5NTNP3pp5+mYcOGNG7cmNdee63E/f7lL39h+PDhdOnShYiICDp27MjevXsr9fwU\n3wqcM2cOV155JWPGjCEmJoazzjqL5cuXA/Dwww+zevVqRo4cSXh4OPfccw8A9913H/Hx8URGRnLh\nhRfyww8/eH3ss2fPplWrVkRERHD22Wfz8ssvF01buXIljRs3ZvLkySQkJHD77bdjjOGpp56iefPm\nxMXFcfPNN3P06FGv933s2DF69OhB/fr1iYmJoWfPnuzfv7/S36f58+fTrFkz4uLimDhxYolpFY2j\nvGXPeEZ8IjEx0Xz22WfGGGP69+9vJk6caIwxJicnx6xZs8YYY0xKSoqJiooyCxYsMAUFBWbhwoUm\nOjrapKamGmOM6dixo5k1a5YxxpiffvrJrFixwuTm5prDhw+bq666yowaNcrr+owxJikpycTGxppl\ny5YZY4z59NNPTWxsrDly5IgxxpgrrrjCjB492uTm5povv/zShIeHm0GDBnl9LJs2bTL169c369ev\nN4WFhWbu3LkmMTHR5ObmFq378ssvNwcPHjSpqammZcuWZubMmcYYY5YtW2bi4+PNDz/8YDIzM82A\nAQOMw+EwO3fuNMYYM3jwYBMeHm5Wr15tcnJyzL333muuvPLKKj8/s2fPNoGBgebVV181hYWFZsaM\nGaZhw4ZFj6H4vMYYs3z5cnPxxRebtLQ0Y4wx27dvNwcPHvT6+D/88EPz888/G2OMWbVqlXE6nWbT\npk3GGGO++OILExAQYB588EGTm5trsrKyzHPPPWfatm1r9u/fb3Jzc82wYcPMgAEDvN53SkqKee+9\n90xWVpZJT083f/rTn0yfPn2Kppf3ffrhhx9MWFhY0XN3//33m4CAgKKfg/LGUdGyZzqF0UeKh+rW\nW281Q4cONUlJSSXmmTdvnrn88stL3Na2bVszZ84cY0zp/8zFLV682LRp08br+owx5q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kp\nNG/cmM3Z2TS1puXj+UyWN/B8bvTNwGTg5DVwPgVGNmzItn378Cvj0wBFTmf6qRWvYmNjGf/YY3R3\nOjlqTQsAXsSztXgQeI5fo7gDuDU0lOdnzVIU5TdLP7lSpvvGjKHr7bfzR6eTnysx/9dAh9BQ/vHP\nf9K1a1dfD0/EZ/RSWir0/NSpPPbII3Ty82NEZiZX8+vpPHnA+8D08HD+4+/Py/Pn06NHj7obrEgN\nUBilUtLT01kwfz7Tn36ag7/8QlxgIAXAoZwc/nDBBYx44AH69OlDYGBgXQ9V5JQpjFIlxhiSk5NJ\nTU3F39+fuLg4YmNj63pYIjVKYRQRsejgi4iIRWEUEbEojCIiFoVRRMSiMIqIWBRGERGLwigiYlEY\nRUQsCqOIiEVhFBGxKIwiIhaFUUTEojCKiFgURhERi8IoImJRGEVELAqjiIhFYRQRsSiMIiIWhVFE\nxKIwiohYFEYREYvCKCJiURhFRCwKo4iIRWEUEbEojCIiFoVRRMSiMIqIWBRGERGLwigiYlEYRUQs\nCqOIiEVhFBGxKIwiIhaFUUTEojCKiFgURhERi8IoImJRGEVELAqjiIhFYRQRsSiMIiIWhVFExKIw\niohYFEYREYvCKCJiURhFRCwKo4iIRWEUEbEojCIiFoVRRMSiMIqIWBRGERGLwigiYlEYRUQsCqOI\niEVhFBGxKIwiIhaFUUTEojCKiFgURhERi8IoImJRGEVELAqjiIhFYRQRsSiMIiIWhVFExKIwiohY\nFEYREYvCKCJiURhFRCz/D62FPockhoIOAAAAAElFTkSuQmCC\n" | |
} | |
], | |
"prompt_number": 70 | |
}, | |
{ | |
"cell_type": "heading", | |
"level": 3, | |
"metadata": {}, | |
"source": "each endpoints pairs are linked" | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "# get all nodes of kind EP\n#get their label\nnode_to_label={}\nlabel_to_node={}\nfor node,data in G.nodes(data=True):\n if data['kind']=='EP':\n #print node,data['label']\n label_to_node[data['label']]=node\nprint label_to_node", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "{1: 3, 2: 6, 3: 4, 4: 5, 5: 7, 6: 8, 7: 10, 8: 9}\n" | |
} | |
], | |
"prompt_number": 71 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "#ep_labels from edge lab -> ep labels directly!\n#\n# node_index is not endpoint label!\n#\nmap_epEdlab_epPair={}\nprint EDlabel\n##plt.figsize(14,8)\nfor elab in EDlabel:\n #subplot(3,3,elab)\n mask = (ep_edges_lab==elab)# ep lab=edges lab\n nodes_pair = np.unique(mask*lab_ep)[1:]\n pair_weight = np.sum(pruned_edges==elab)\n edge_image = (pruned_edges==elab)*elab\n print 'edge lab',elab, 'ep2 lab',nodes_pair,'weight',pair_weight,'node1:',nodes_pair[0]\n ##title(str(elab)+str(np.where(ep_edgelab==elab))+str(nodes_pair))\n ##imshow(mask, interpolation='nearest')\n node1 = label_to_node[nodes_pair[0]]\n node2 = label_to_node[nodes_pair[1]]\n G.add_edge(node1, node2, weight = pair_weight, image=edge_image)", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "[1 2 3 4]\nedge lab 1 ep2 lab [1 2] weight 45 node1: 1\nedge lab 2 ep2 lab [3 7] weight 11 node1: 3\nedge lab 3 ep2 lab [4 5] weight 10 node1: 4\nedge lab 4 ep2 lab [6 8] weight 10 node1: 6\n" | |
} | |
], | |
"prompt_number": 72 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "plt.figsize(5,8)\npos=nx.spring_layout(G)\n#nx.draw_circular(G)\n#subplot(121)\n#nx.draw(G, width=range(1,4))\n#imshow(edge_lab,interpolation='nearest')\n\n#subplot(122)\nedge_labels=dict([((u,v,),d['weight']) for u,v,d in G.edges(data=True)])\nnx.draw(G)\n#nx.draw_networkx_edge_labels(G,pos,edge_labels=edge_labels)", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAZcAAAJeCAYAAAB4aUjsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FPXCxfHvpmfTiIEQeuiEUESqVBEBFUGqYC9gQ8Vr\nRe/F3sGuiKIURUCkSxFUUBEBC0VaKIIECSG0hIT0su8fAV8MARKY2dlyPs/jo+xMssf13j37Kztj\nczgcDkRERAzkY3UAERHxPCoXERExnMpFREQMp3IRERHDqVxERMRwKhcRETGcykVERAynchEREcOp\nXERExHAqFxERMZzKRUREDKdyERERw6lcRETEcCoXERExnMpFREQMp3IRERHDqVxERMRwKhcRETGc\nykVERAynchEREcOpXERExHAqFxERMZzKRUREDKdyERERw6lcRETEcCoXERExnMpFREQMp3IRERHD\nqVxERMRwKhcRETGcykVERAynchEREcOpXERExHAqFxERMZzKRUREDKdyERERw6lcRETEcCoXEREx\nnMpFREQMp3IRERHDqVxERMRwKhcRETGcykVERAynchEREcOpXERExHAqFxERMZzKRUREDKdyERER\nw6lcRETEcCoXERExnMpFREQMp3IRERHDqVxERMRwKhcRETGcn9UBPMX69etZsmQJR1NS8PH1Japy\nZXr37k1cXJzV0UREnM7mcDgcVodwV3l5ecyYMYMPXnuNpL/+YmBeHpULCnAA+/39+dLPj/gmTRg+\nciR9+/bF19fX6sgiIk6hcjlPR48epW+PHti2bePhzEx6cfowMA+YA7wRGkqVtm2ZPn8+ISEhzg8r\nIuJkKpfzkJ6eTudWrbg8MZHX8/LOuXCVB9wVFMSepk1Z+tNPBAYGOiOmiIhltKB/Hm6/7jou3buX\nN8pQLAABwMScHKI2b+ahe+4xO56IiOU0cimn7du306VFCxKzsyk5/kgA7gPWAZWAMUDfU46nAnWC\ngtiemEh0dLRzAouIWEAjl3Ia9847DM3PP61YCoBrgT4Ul8h44CZg5ynnRAL9gQnjxzsjqoiIZTRy\nKYecnByqRUWxLiuLWiWOb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bLgb1AGHBLUREfvf++ExNbQyMXEZFy6NqqFfeuXct1wFyKP6Ev\nBbKBSSfOOQzUAyYAvYFRwE/AamAH0DEsjL8PHSIwMNDZ8Z1GIxcRkTJyOBz8vGEDvU/8uR9wLRBV\n4rw5QBNgABAAPAv8QXGxNDhx/o4dO5wR2TIqFxGRMsrKysLXZiO4xOMlp3+2wL/WY+wUj2RO3lr5\nIh8f0tLSTErpGlQuIiJlFBAQQH5h4WllYivx50yg5Pfyw4HjJ/4578Tv8mQqFxGRMvL39yfCbufv\nEo+XLJtQIL3EY8coXtAvAPbm5VG5cmWTUroGlYuISDkMGTKECb6+/3qs5MglnuI1lpMygV0nHl8E\n1KlTR1uRRUTk/w1/6CE+DgggHygEcigejRQCuSf+3o/i9ZU5J44/B1xM8WL+B6GhDB850oroTqWt\nyCIi5dS1dWv6r1vHkaIini9x7FngaYq/53I/kAi0AyZT/F2XAeHhJKakEBQU5MTEzqdyEREpp507\nd9KpVSs+TE+nbxl/ZhPQPTiYT+fOpWfPnmbGcwmaFhMRKaf69euzcNky7o2IYLSPD2e7bVgBMAPo\nFl8HqlIAAAIWSURBVBzMOxMnekWxgMpFROS8tGrVipVr1/LzZZdRMyiIBwMCWAccAo4C24EXfX2p\nbbfzTpMmzF66lMFDhlgb2ok0LSYicoESExMZP3Ysc6ZN41BaGoVFRUSGhnJFz57c+/DDtGjRwuqI\nTqdyERERw2laTEREDKdyERERw6lcRETEcCoXERExnMpFREQMp3IRERHDqVxERMRwKhcRETGcykVE\nRAynchEREcOpXERExHAqFxERMZzKRUREDKdyERERw6lcRETEcCoXERExnMpFREQMp3IRERHDqVxE\nRMRwKhcRETGcykVERAynchEREcOpXERExHAqFxERMZzKRUREDKdyERERw6lcRETEcCoXERExnMpF\nREQMp3IRERHDqVxERMRwKhcRETGcykVERAynchEREcOpXERExHAqFxERMZzKRUREDKdyERERw6lc\nRETEcCoXERExnMpFREQMp3IRERHDqVxERMRwKhcRETGcykVERAynchEREcOpXERExHAqFxERMZzK\nRUREDKdyERERw6lcRETEcCoXERExnMpFREQMp3IRERHDqVxERMRwKhcRETGcykVERAynchEREcOp\nXERExHAqFxERMZzKRUREDKdyERERw6lcRETEcCoXERExnMpFREQMp3IRERHDqVxERMRwKhcRETGc\nykVERAynchEREcOpXERExHAqFxERMZzKRUREDPd/qE1KA4BPGYoAAAAASUVORK5CYII=\n" | |
} | |
], | |
"prompt_number": 73 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 73 | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
This file contains 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
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <codecell> | |
import Image, ImageDraw, ImageFont | |
import mahotas as mh | |
from mahotas import polygon | |
import pymorph as pm | |
import networkx as nx | |
from scipy import ndimage as nd | |
import skimage.transform as transform | |
import skimage.io as sio | |
import scipy.misc as sm | |
import os | |
import math | |
# <codecell> | |
def branchedPoints(skel): | |
branch1=np.array([[2, 1, 2], [1, 1, 1], [2, 2, 2]]) | |
branch2=np.array([[1, 2, 1], [2, 1, 2], [1, 2, 1]]) | |
branch3=np.array([[1, 2, 1], [2, 1, 2], [1, 2, 2]]) | |
branch4=np.array([[2, 1, 2], [1, 1, 2], [2, 1, 2]]) | |
branch5=np.array([[1, 2, 2], [2, 1, 2], [1, 2, 1]]) | |
branch6=np.array([[2, 2, 2], [1, 1, 1], [2, 1, 2]]) | |
branch7=np.array([[2, 2, 1], [2, 1, 2], [1, 2, 1]]) | |
branch8=np.array([[2, 1, 2], [2, 1, 1], [2, 1, 2]]) | |
branch9=np.array([[1, 2, 1], [2, 1, 2], [2, 2, 1]]) | |
br1=mh.morph.hitmiss(skel,branch1) | |
br2=mh.morph.hitmiss(skel,branch2) | |
br3=mh.morph.hitmiss(skel,branch3) | |
br4=mh.morph.hitmiss(skel,branch4) | |
br5=mh.morph.hitmiss(skel,branch5) | |
br6=mh.morph.hitmiss(skel,branch6) | |
br7=mh.morph.hitmiss(skel,branch7) | |
br8=mh.morph.hitmiss(skel,branch8) | |
br9=mh.morph.hitmiss(skel,branch9) | |
return br1+br2+br3+br4+br5+br6+br7+br8+br9 | |
def endPoints(skel): | |
endpoint1=np.array([[0, 0, 0], | |
[0, 1, 0], | |
[2, 1, 2]]) | |
endpoint2=np.array([[0, 0, 0], | |
[0, 1, 2], | |
[0, 2, 1]]) | |
endpoint3=np.array([[0, 0, 2], | |
[0, 1, 1], | |
[0, 0, 2]]) | |
endpoint4=np.array([[0, 2, 1], | |
[0, 1, 2], | |
[0, 0, 0]]) | |
endpoint5=np.array([[2, 1, 2], | |
[0, 1, 0], | |
[0, 0, 0]]) | |
endpoint6=np.array([[1, 2, 0], | |
[2, 1, 0], | |
[0, 0, 0]]) | |
endpoint7=np.array([[2, 0, 0], | |
[1, 1, 0], | |
[2, 0, 0]]) | |
endpoint8=np.array([[0, 0, 0], | |
[2, 1, 0], | |
[1, 2, 0]]) | |
ep1=mh.morph.hitmiss(skel,endpoint1) | |
ep2=mh.morph.hitmiss(skel,endpoint2) | |
ep3=mh.morph.hitmiss(skel,endpoint3) | |
ep4=mh.morph.hitmiss(skel,endpoint4) | |
ep5=mh.morph.hitmiss(skel,endpoint5) | |
ep6=mh.morph.hitmiss(skel,endpoint6) | |
ep7=mh.morph.hitmiss(skel,endpoint7) | |
ep8=mh.morph.hitmiss(skel,endpoint8) | |
ep = ep1+ep2+ep3+ep4+ep5+ep6+ep7+ep8 | |
return ep | |
def pruning(skeleton, size): | |
'''remove iteratively end points "size" | |
times from the skeleton | |
''' | |
for i in range(0, size): | |
endpoints = endPoints(skeleton) | |
endpoints = np.logical_not(endpoints) | |
skeleton = np.logical_and(skeleton,endpoints) | |
return skeleton | |
# <codecell> | |
image = Image.new("RGBA", (600,150), (255,255,255)) | |
draw = ImageDraw.Draw(image) | |
fontsize = 150 | |
font = ImageFont.truetype("/usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf", fontsize) | |
txt = 'A' | |
draw.text((30, 5), txt, (0,0,0), font=font) | |
img = image.resize((188,45), Image.ANTIALIAS) | |
plt.imshow(img) | |
# <codecell> | |
img = np.array(img) | |
im = img[:,0:50,0] | |
im = im < 128 | |
skel = mh.thin(im) | |
# To fix the algorithm, prune the skeleton 1,2,3... | |
skel = pruning(skel,3) | |
bp = branchedPoints(skel) | |
ep = endPoints(skel) | |
edge = skel-bp | |
edge_lab,n = mh.label(edge) | |
bp_lab,_ = mh.label(bp) | |
ep_lab,_ = mh.label(ep) | |
# <codecell> | |
figsize(10,20) | |
subplot(141,frameon = False, xticks = [], yticks = []) | |
title('pruning 0') | |
imshow(mh.thin(im),interpolation = 'nearest') | |
subplot(142,frameon = False, xticks = [], yticks = []) | |
title('pruning 1') | |
imshow(pruning(mh.thin(im),1),interpolation = 'nearest') | |
subplot(143,frameon = False, xticks = [], yticks = []) | |
title('pruning 2') | |
imshow(pruning(mh.thin(im),2),interpolation = 'nearest') | |
subplot(144,frameon = False, xticks = [], yticks = []) | |
title('pruning 3') | |
imshow(pruning(mh.thin(im),3),interpolation = 'nearest') | |
# <codecell> | |
subplot(221,frameon = False, xticks = [], yticks = []) | |
title('skeleton') | |
imshow(skel,interpolation = 'nearest') | |
subplot(223,frameon = False, xticks = [], yticks = []) | |
title('skel-bp -> label') | |
imshow(edge_lab,interpolation = 'nearest') | |
subplot(224,frameon = False, xticks = [], yticks = []) | |
title('skel -> end points') | |
imshow(ep_lab,interpolation = 'nearest') | |
subplot(222,frameon = False, xticks = [], yticks = []) | |
title('branched points (bp)') | |
imshow(bp_lab,interpolation = 'nearest') | |
# <codecell> | |
endpoints = np.zeros(skel.shape) | |
edges = np.zeros(skel.shape) | |
for l in range(1,n+1): | |
cur_edge = edge_lab == l | |
cur_end_points = endPoints(cur_edge) | |
pruned_edge = pruning(cur_edge,1) | |
edges = np.logical_or(pruned_edge, edges) | |
endpoints = np.logical_or(endpoints,cur_end_points) | |
lab_bp, nbp = mh.label(bp) | |
lab_ep, nep = mh.label(endpoints+ep) | |
pruned_edges, ned = mh.label(edges) | |
# <codecell> | |
plt.figsize(13,8) | |
subplot(321,frameon = False, xticks = [], yticks = []) | |
title(str(np.unique(skel))) | |
imshow(skel, interpolation='nearest') | |
subplot(322,frameon = False, xticks = [], yticks = []) | |
title(str(np.unique(lab_bp))) | |
imshow(lab_bp, interpolation='nearest') | |
subplot(323,frameon = False, xticks = [], yticks = []) | |
title(str(np.unique(edge_lab))) | |
imshow(edge_lab, interpolation='nearest') | |
subplot(326,frameon = False, xticks = [], yticks = []) | |
edge_mask = lab_ep>0 | |
ep_edgelab = edge_lab*edge_mask | |
title(str(np.unique(ep_edgelab))) | |
imshow(ep_edgelab,interpolation='nearest')#lab_ep | |
subplot(324,frameon = False, xticks = [], yticks = []) | |
title(str(np.unique(pruned_edges))) | |
imshow(pruned_edges, interpolation='nearest') | |
subplot(325,frameon = False, xticks = [], yticks = []) | |
title(str(np.unique(lab_ep))) | |
imshow(lab_ep, interpolation='nearest') | |
# <headingcell level=3> | |
# First make vertex from branched points and then link to the neighbouring endpoints | |
# <codecell> | |
BPlabel=np.unique(lab_bp)[1:] | |
EPlabel=np.unique(lab_ep)[1:] | |
EDlabel=np.unique(pruned_edges)[1:] | |
G=nx.Graph() | |
node_index=BPlabel.max() | |
selected_ep_labels = [] | |
for bpl in BPlabel: | |
#branched point location | |
bp_row,bp_col= np.where(lab_bp==bpl)[0][0], np.where(lab_bp==bpl)[1][0] | |
bp_neighbor= lab_ep[bp_row-1:bp_row+2,bp_col-1:bp_col+2] | |
G.add_node(bpl,kind='BP',row=bp_row,col=bp_col,label=bpl) | |
#branched point neighborhood | |
neig_in_EP=lab_ep[bp_row-1:bp_row+2,bp_col-1:bp_col+2] | |
neig_inEplabel=np.unique(neig_in_EP)[1:] | |
print 'bp label',bpl,' pos',(bp_row,bp_col), 'ep neighbor label:',neig_inEplabel | |
for epl in neig_inEplabel: | |
selected_ep_labels.append(epl) | |
node_index = node_index+1 | |
#print 'bp label',bpl,' pos',(bp_row,bp_col),neig_inEplabel, 'current ep',epl | |
ep_row,ep_col= np.where(lab_ep==epl)[0][0], np.where(lab_ep==epl)[1][0] | |
G.add_node(node_index,kind='EP',row=ep_row,col=ep_col,label=epl) | |
G.add_edge(bpl,node_index, weight=1) | |
print 'bp label',bpl,':',(bp_row,bp_col),neig_inEplabel,' -ep',epl,'(',node_index,')',':',(ep_row,ep_col), | |
#print 'edge',(bpl, node_index) | |
# <codecell> | |
figsize(5,7) | |
nx.draw(G) | |
# <codecell> | |
#Add isolated endpoints in the Graph | |
#label of isolated end points | |
lonely_ep = list(set(EPlabel) - set(selected_ep_labels)) | |
#lep:lonely ep | |
for lep in lonely_ep: | |
lep_row,lep_col= np.where(lab_ep==lep)[0][0], np.where(lab_ep==lep)[1][0] | |
node_index = node_index+1 | |
G.add_node(node_index,kind='EP',row=lep_row,col=lep_col,label=lep) | |
#print G.node[1] | |
#edges dict | |
edges={} | |
for ed in EDlabel: | |
edges[ed] = np.where(pruned_edges==ed),np.sum(pruned_edges==ed) | |
#print edges[ed] | |
#get nodes of kind EP | |
ep_nodes=[node for node,data in G.nodes(data=True) if data['kind'] == 'EP'] | |
print ep_nodes | |
#print edges.keys() | |
ep_edges_lab = (lab_ep>0)*edge_lab | |
#print G.nodes() | |
# | |
# <codecell> | |
figsize(5,8) | |
title('Isolated endpoints are added') | |
nx.draw(G) | |
# <headingcell level=3> | |
# each endpoints pairs are linked | |
# <codecell> | |
# get all nodes of kind EP | |
#get their label | |
node_to_label={} | |
label_to_node={} | |
for node,data in G.nodes(data=True): | |
if data['kind']=='EP': | |
#print node,data['label'] | |
label_to_node[data['label']]=node | |
print label_to_node | |
# <codecell> | |
#ep_labels from edge lab -> ep labels directly! | |
# | |
# node_index is not endpoint label! | |
# | |
map_epEdlab_epPair={} | |
print EDlabel | |
##plt.figsize(14,8) | |
for elab in EDlabel: | |
#subplot(3,3,elab) | |
mask = (ep_edges_lab==elab)# ep lab=edges lab | |
nodes_pair = np.unique(mask*lab_ep)[1:] | |
pair_weight = np.sum(pruned_edges==elab) | |
edge_image = (pruned_edges==elab)*elab | |
print 'edge lab',elab, 'ep2 lab',nodes_pair,'weight',pair_weight,'node1:',nodes_pair[0] | |
##title(str(elab)+str(np.where(ep_edgelab==elab))+str(nodes_pair)) | |
##imshow(mask, interpolation='nearest') | |
node1 = label_to_node[nodes_pair[0]] | |
node2 = label_to_node[nodes_pair[1]] | |
G.add_edge(node1, node2, weight = pair_weight, image=edge_image) | |
# <codecell> | |
plt.figsize(5,8) | |
pos=nx.spring_layout(G) | |
#nx.draw_circular(G) | |
#subplot(121) | |
#nx.draw(G, width=range(1,4)) | |
#imshow(edge_lab,interpolation='nearest') | |
#subplot(122) | |
edge_labels=dict([((u,v,),d['weight']) for u,v,d in G.edges(data=True)]) | |
nx.draw(G) | |
#nx.draw_networkx_edge_labels(G,pos,edge_labels=edge_labels) | |
# <codecell> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment