TissueMAPS / JtLibrary

Please use the https://github.com/TissueMAPS/TissueMAPS instead.
Apache License 2.0
0 stars 2 forks source link

Wrong object count in identify_secondary_iw.m #3

Closed hackermd closed 8 years ago

hackermd commented 8 years ago

For some images, the object count is wrong after applying the watershed segmentation. The reason is not clear to me yet. It is related to the shape of the primary objects, however, since smoothing the input mask solves the problem. It could be related to the labeling of objects, which is different in Matlab and Python.

hackermd commented 8 years ago

That was due to differences in labelling of images between Matlab and Python modules. The mahotas function uses a 4-neighbourhood labelling by default, while Matlab's bwlabel uses a 8-neighbourhood. Fixed with commits 0e8d0bd167191b22f7288440c01b15e6bfc20b6f and 86f6e78a0fc0cff360fd3f9afb865c14a395f375.