################# #############
################## ################
################### ##################
######## ####### ###################
###### ####### ####### ######
###### ####### #######
################# #######
################ #######
################# #######
###### ####### #######
###### ####### #######
###### ####### ####### ######
######## ####### ###################
######## ####### ###### ################## ######
######## ####### ###### ################ ######
######## ####### ###### ############# ######
It produces the thinned output:
# ########## #######
## # #### #
# # ##
# # #
# # #
# # #
############ #
# # #
# # #
# # #
# # #
# ##
# ############
### ###
| P9 | P2 | P3 |
| P8 | P1 | P4 |
| P7 | P6 | P5 |
Task: Write a routine to perform Zhang-Suen thinning on an image matrix of ones and zeroes.
thinImage must be a function
testString: assert.equal(typeof thinImage, 'function', 'thinImage must be a function');
- text: thinImage must return an array
testString: assert(Array.isArray(result), 'thinImage must return an array');
- text: thinImage must return an array of strings
testString: assert.equal(typeof result[0], 'string', 'thinImage must return an array of strings');
- text: thinImage must return an array of strings
testString: assert.deepEqual(result, expected, 'thinImage must return an array of strings');
```