[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option
From: |
Avinoam Kalma |
Subject: |
[Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented |
Date: |
Mon, 22 Apr 2019 15:16:26 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 |
Follow-up Comment #12, bug #56141 (project octave):
I have tried to undestand the logic inside this function.
I took a 3x3 image, put 1 in the middle, 0/1 in other places, and see the
results of bwmorph.
There are 256 such binary images:
0 neigbours to the center pixel (1 case) - the pixel remains:
A = [0, 0, 0; 0, 1, 0; 0, 0, 0];
bwmorph(A,'endpoints') = A;
1 neigbours (8 cases) - the pixel remains:
A = [1, 0, 0; 0, 1, 0; 0, 0, 0];
B = bwmorph(A,'endpoints') = A
2 neigbours (28 cases):
here it is a little bit complicated. If the two neigbours
are adjacent in the same row or column (4-neighbours)
the pixel remains, otherwise it is removed.
3 neigbours (56 cases):
if the 3 pixels are in the same row or column, or create
with the internal pixel a 2x2 block (e.g. [1 1 0; 1 1 0; 0 0 0]), the pixel
remains, otherwise it is removed.
7 neighbours (8 cases): the pixel remains
8 neighbours (1 case): the pixe is removed.
So, I figure out 1 + 8 + 28 + 56 + 8 + 1 = 102 out of 256.
left to figure out:
4 neigbours - 70 cases
5 neigbours - 56 cases
6 neigbours - 28 cases
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56141>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, (continued)
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/20
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/20
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Avinoam Kalma, 2019/04/20
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/20
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/20
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/20
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/20
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Avinoam Kalma, 2019/04/21
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/21
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/21
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented,
Avinoam Kalma <=
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Avinoam Kalma, 2019/04/22
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Avinoam Kalma, 2019/04/22
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/22
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/23
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Avinoam Kalma, 2019/04/23
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Nicholas Jankowski, 2019/04/23
- [Octave-bug-tracker] [bug #56141] [octave forge] (image) bwmorph option 'endpoints' not implemented, Avinoam Kalma, 2019/04/28