You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refine_post_merge_boundaries in agglo.py was created for the purpose of maintaining the integrity of 0-labeled boundaries in cases such as the following:
1 0 2 0
1 0 0 3
0 4 0 3
When we have a merge of body 3 into body 2, a new pixel is added to the boundary between 1 and 2. If this addition is not noted, when 1 and 4 are merged, that pixel will be removed and the boundary between 1 and 2 will have a leak.
However, it turns out that this function could be used to detect when boundary pixels are double-counted during a merge and correct the double counting.
idxs=set(boundaries_to_edit[(u,v)])
ifself.has_edge(u, v):
idxs=idxs-self[u][v]['boundary']
self[u][v]['boundary'].update(idxs)
self.feature_manager.pixelwise_update_edge_cache(self, u, v,
self[u][v]['feature-cache'], list(idxs))
Find the intersection of idxs and self[u][v]['boundary'] and use the feature_manager to pixelwise_update with remove=True.
The text was updated successfully, but these errors were encountered:
refine_post_merge_boundaries
inagglo.py
was created for the purpose of maintaining the integrity of 0-labeled boundaries in cases such as the following:When we have a merge of body 3 into body 2, a new pixel is added to the boundary between 1 and 2. If this addition is not noted, when 1 and 4 are merged, that pixel will be removed and the boundary between 1 and 2 will have a leak.
However, it turns out that this function could be used to detect when boundary pixels are double-counted during a merge and correct the double counting.
Find the intersection of
idxs
andself[u][v]['boundary']
and use the feature_manager topixelwise_update
withremove=True
.The text was updated successfully, but these errors were encountered: