-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- LEP relabeled so that no strange behavior is seen on the high recal…
…l ranges
- Loading branch information
1 parent
1ef55f8
commit c102aad
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
function relabeled = relabel(partition) | ||
% relabeled = relabel(partition) | ||
% | ||
% Relabels connected regions in the partition, sweeping from left to right | ||
% and from up to down. See tests for examples. | ||
% ------------------------------------------------------------------------ | ||
% INPUTS | ||
% partition Partition to relabel | ||
% | ||
% OUTPUTS | ||
% relabeled Relabeled partition | ||
% ------------------------------------------------------------------------ | ||
% Copyright (C) | ||
% Universitat Politecnica de Catalunya (UPC) - Barcelona - Spain | ||
% | ||
% Jordi Pont-Tuset <[email protected]> | ||
% June 2011 | ||
% ------------------------------------------------------------------------ | ||
|
||
seg = seg2gridbmap(partition); | ||
seg(1:2:end,1:2:end)=1; | ||
filled_contours = bwlabel(1-seg',4); | ||
relabeled = filled_contours(2:2:end,2:2:end)'; | ||
end |
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