Possible bug -connected-components IM 6.9.6.7 Q16 Mac OSX
Posted: 2016-12-07T23:18:23-07:00
One id shows in the listing that has area=416, which is below the threshold=40000, but it is actually not in the resulting image.
Input:
https://www.dropbox.com/s/frmfjv3wawxp4 ... 4.jpg?dl=0
9 ids listed and the last one is area 416 and should not be listed since the threshold was 40000
Objects (id: bounding-box centroid area mean-color):
0: 1700x2340+0+0 834.7,1175.6 3133346 gray(0)
15: 657x410+271+490 613.9,689.7 174785 gray(255)
12: 548x378+826+307 1124.7,476.3 142044 gray(255)
66: 509x382+351+1668 609.7,1858.3 135930 gray(255)
19: 551x350+860+736 1159.6,923.1 135762 gray(255)
71: 437x331+775+1871 1011.5,2043.3 108776 gray(255)
65: 467x317+830+1466 1076.7,1630.1 105779 gray(255)
9: 1479x138+51+128 794.2,176.7 41162 gray(255)
31: 33x29+65+1194 80.9,1207.8 416 gray(0)
To show that it is really not in the mask.png result, I run CCL again on mask.png and then it shows only 8 ids and none with area 416
0: 1700x2340+0+0 834.6,1175.6 3133762 gray(0)
3: 657x410+271+490 613.9,689.7 174785 gray(255)
2: 548x378+826+307 1124.7,476.3 142044 gray(255)
6: 509x382+351+1668 609.7,1858.3 135930 gray(255)
4: 551x350+860+736 1159.6,923.1 135762 gray(255)
7: 437x331+775+1871 1011.5,2043.3 108776 gray(255)
5: 467x317+830+1466 1076.7,1630.1 105779 gray(255)
1: 1479x138+51+128 794.2,176.7 41162 gray(255)
Input:
https://www.dropbox.com/s/frmfjv3wawxp4 ... 4.jpg?dl=0
Code: Select all
convert f3_f4.jpg -threshold 70% \
-morphology smooth Octagon \
-shave 10x10 -bordercolor white -border 10x10 \
-gravity east -chop 130x0 -background white -gravity east -splice 130x0 -negate out.png
convert out.png \
-define connected-components:mean-color=true \
-define connected-components:area-threshold=40000 \
-define connected-components:verbose=true \
-connected-components 4 mask.png
Objects (id: bounding-box centroid area mean-color):
0: 1700x2340+0+0 834.7,1175.6 3133346 gray(0)
15: 657x410+271+490 613.9,689.7 174785 gray(255)
12: 548x378+826+307 1124.7,476.3 142044 gray(255)
66: 509x382+351+1668 609.7,1858.3 135930 gray(255)
19: 551x350+860+736 1159.6,923.1 135762 gray(255)
71: 437x331+775+1871 1011.5,2043.3 108776 gray(255)
65: 467x317+830+1466 1076.7,1630.1 105779 gray(255)
9: 1479x138+51+128 794.2,176.7 41162 gray(255)
31: 33x29+65+1194 80.9,1207.8 416 gray(0)
To show that it is really not in the mask.png result, I run CCL again on mask.png and then it shows only 8 ids and none with area 416
Code: Select all
convert mask.png \
-define connected-components:verbose=true \
-connected-components 4 null:
3: 657x410+271+490 613.9,689.7 174785 gray(255)
2: 548x378+826+307 1124.7,476.3 142044 gray(255)
6: 509x382+351+1668 609.7,1858.3 135930 gray(255)
4: 551x350+860+736 1159.6,923.1 135762 gray(255)
7: 437x331+775+1871 1011.5,2043.3 108776 gray(255)
5: 467x317+830+1466 1076.7,1630.1 105779 gray(255)
1: 1479x138+51+128 794.2,176.7 41162 gray(255)