member val Shore = Heap.Heap<float32, Point>(cmp) with get
member val Level = 0.f with get, set
member val Surface = 0 with get, set
+ member this.IsInfinite = this.Surface = Int32.MaxValue
let private areaOperationF (img: Image<Gray, float32>) (areas: (int * 'a) list) (f: ('a -> float32 -> unit) option) (op: AreaOperation) =
let w = img.Width
else
if not <| Object.ReferenceEquals(other, null)
then // We touching another island.
- if island.Surface + other.Surface >= area
+ if island.IsInfinite || other.IsInfinite || island.Surface + other.Surface >= area
then
stop <- true
else // We can merge 'other' into 'surface'.