Opened 9 years ago
Closed 9 years ago
#2856 closed defect (fixed)
i.segment: warning "Region consists of only one cell, nothing to update" slows down module
Reported by: | mlennert | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.4 |
Component: | Imagery | Version: | svn-trunk |
Keywords: | i.segment region | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
In the NC dataset:
g.region n=221318 s=220073 w=637746 e=639646 res=1 i.group ortho in=ortho_2001_t792_1m i.segment group=ortho@user1 output=ortho_seg_001 threshold=0.01 memory=2500
Then, when I try to use the output of this as seeds for the next level:
i.segment group=ortho@user1 output=ortho_seg_002_seeded threshold=0.02 seed=ortho_seg_001 memory=2500
I get tons of
WARNING: Region consists of only one cell, nothing to update
The module run takes +/- 1m25.
When I comment line 1086 in imagery/i.segment/create_isegs.c so that the warning is not issued, module run only takes about 20s.
Is this warning really necessary ? Or is it a bug that it appears in this context ?
Change History (4)
comment:1 by , 9 years ago
follow-up: 3 comment:2 by , 9 years ago
Replying to mlennert:
In the NC dataset:
g.region n=221318 s=220073 w=637746 e=639646 res=1 i.group ortho in=ortho_2001_t792_1m i.segment group=ortho@user1 output=ortho_seg_001 threshold=0.01 memory=2500Then, when I try to use the output of this as seeds for the next level:
i.segment group=ortho@user1 output=ortho_seg_002_seeded threshold=0.02 seed=ortho_seg_001 memory=2500I get tons of
WARNING: Region consists of only one cell, nothing to updateThe module run takes +/- 1m25.
When I comment line 1086 in imagery/i.segment/create_isegs.c so that the warning is not issued, module run only takes about 20s.
Is this warning really necessary ? Or is it a bug that it appears in this context ?
It is a bug that appears in this context. The warning is justified because it appears only when regions are merged. A merged region must always consist of more than one cell (merge of two original regions each consisting of at least one cell). The bug seems to be an inappropriate call to merge_regions().
follow-up: 4 comment:3 by , 9 years ago
Replying to mmetz:
Replying to mlennert:
In the NC dataset:
g.region n=221318 s=220073 w=637746 e=639646 res=1 i.group ortho in=ortho_2001_t792_1m i.segment group=ortho@user1 output=ortho_seg_001 threshold=0.01 memory=2500Then, when I try to use the output of this as seeds for the next level:
i.segment group=ortho@user1 output=ortho_seg_002_seeded threshold=0.02 seed=ortho_seg_001 memory=2500I get tons of
WARNING: Region consists of only one cell, nothing to updateThe module run takes +/- 1m25.
When I comment line 1086 in imagery/i.segment/create_isegs.c so that the warning is not issued, module run only takes about 20s.
Is this warning really necessary ? Or is it a bug that it appears in this context ?
It is a bug that appears in this context. The warning is justified because it appears only when regions are merged. A merged region must always consist of more than one cell (merge of two original regions each consisting of at least one cell). The bug seems to be an inappropriate call to merge_regions().
No, an inappropriate call to update_band_vals(). Fixed in r67915,6 (trunk, relbr70).
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to mmetz:
Replying to mmetz:
Replying to mlennert:
In the NC dataset:
g.region n=221318 s=220073 w=637746 e=639646 res=1 i.group ortho in=ortho_2001_t792_1m i.segment group=ortho@user1 output=ortho_seg_001 threshold=0.01 memory=2500Then, when I try to use the output of this as seeds for the next level:
i.segment group=ortho@user1 output=ortho_seg_002_seeded threshold=0.02 seed=ortho_seg_001 memory=2500I get tons of
WARNING: Region consists of only one cell, nothing to updateThe module run takes +/- 1m25.
When I comment line 1086 in imagery/i.segment/create_isegs.c so that the warning is not issued, module run only takes about 20s.
Is this warning really necessary ? Or is it a bug that it appears in this context ?
It is a bug that appears in this context. The warning is justified because it appears only when regions are merged. A merged region must always consist of more than one cell (merge of two original regions each consisting of at least one cell). The bug seems to be an inappropriate call to merge_regions().
No, an inappropriate call to update_band_vals(). Fixed in r67915,6 (trunk, relbr70).
Great. It works great for me. Thanks for the fix.
Closing.
Replying to mlennert:
What about changing it to G_verbose_message()?
Unfortunately I don't know, maybe the main authors?