I am developing an image segmentation application that will use watersheds. For that, I found a code that I will need to use in python. However, I\'m having a hard time conv
numpy.zeros_like basically creates an array the same shape as the input with all zeros in it.
https://numpy.org/doc/stable/reference/generated/numpy.zeros_like.html
In this case, you have a simple 2d array so you could roll your own just by indexing through the whole array (all dimensions) and setting everything to zero.
var marker = Array(srcOriginal.rows()) {Array(srcOriginal.cols()) {0} }