# Seed Region Growing Threshold

I have this matrix

The following points

• R1 = (1,7) = 0
• R2 = (3,2) = 6
• R3 = (5,5) = 3
• R4 = (7,3) = 1

And using this equation |g(seedi) – g(pixel)| < T for T=1

And this is the solution for threshold = 1

I don't understand why all the ones for example, belong to R1 = α

Based on the equation we have |0 - 1| < 1, which means it shouldn't become α.

Given your seed locations and the threshold of 1, that means that not every pixel can be labelled. See below. $$\begin{array}{ccccccc} 5 & 6 & 1 & 1 & 1 & 0 & \require{enclose}\enclose{circle}[mathcolor="red"]{\color{black}{0}}\\ 6 & 7 & 7 & 1 & 1 & 1 & 6\\ 3 & \enclose{circle}[mathcolor="green"]{\color{black}{6}} & 7 & 7 & 7 & 6 & 5\\ 4 & 3 & 7 & 7& 7 & 5 & 3\\ 3 & 3 & 2 & 1 & \enclose{circle}[mathcolor="blue"]{\color{black}{3}} & 3 & 4\\ 2 & 2 & 1 & 2 & 1 & 2 & 3\\ 1 & 1 & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & 1 & 1 & 2 & 2\\ \end{array}\\ \Huge \updownarrow\\ \begin{array}{ccccccc} 5 & \enclose{circle}[mathcolor="green"]{\color{black}{6}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} &\enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \require{enclose}\enclose{circle}[mathcolor="red"]{\color{black}{0}} & \require{enclose}\enclose{circle}[mathcolor="red"]{\color{black}{0}}\\ \enclose{circle}[mathcolor="green"]{\color{black}{6}} & 7 & 7 & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="green"]{\color{black}{6}}\\ \enclose{circle}[mathcolor="blue"]{\color{black}{3}} & \enclose{circle}[mathcolor="green"]{\color{black}{6}} & 7 & 7 & 7 & \enclose{circle}[mathcolor="green"]{\color{black}{6}} & 5\\ 4 & \enclose{circle}[mathcolor="blue"]{\color{black}{3}} & 7 & 7& 7 & 5 & \enclose{circle}[mathcolor="blue"]{\color{black}{3}}\\ \enclose{circle}[mathcolor="blue"]{\color{black}{3}} & \enclose{circle}[mathcolor="blue"]{\color{black}{3}} & 2 & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="blue"]{\color{black}{3}} & \enclose{circle}[mathcolor="blue"]{\color{black}{3}} & 4\\ 2 & 2 & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & 2 & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & 2 & \enclose{circle}[mathcolor="blue"]{\color{black}{3}}\\ \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & \enclose{circle}[mathcolor="cyan"]{\color{black}{1}} & 2 & 2\\ \end{array}\\$$ It looks like there should be 4 labels, not three... and, yes, it looks like the 0 and 1 seeded regions have been merged.
In addition to the lack of labels for all pixels (3 vs 4), I wonder if it's because the calculations are being done in (double precision) floating point so that $|1.00 - 0.00| < 1.00$