Skip to main content
. Author manuscript; available in PMC: 2017 Jun 16.
Published in final edited form as: Proc IEEE Int Symp Biomed Imaging. 2016 Jun 16;2016:1041–1045. doi: 10.1109/ISBI.2016.7493444

Algorithm 1 New Seed Detection Algorithm

Input: Icolor: original image; L ← Ø; V(x) ← 0, ∀x; parameters (ρ(r), {si}, α, β, D1, D2)
Output: L: a list of seeds for cells
1: {Initialization Phase}
2: Decouple Icolor into two stain channels: hematoxylin IH and eosin IE
3: Construct mask image: Ψ ← complement(IH) and marker image: Φ ← IHρ
4: Compute reconstructed image RΦχρ(Ψ)morphRecon(Φ,Ψ,ρ)
5: Compute difference image ΔΨRΦχρ(Ψ)
6: Igray(x) ← rgb2Gray(Icolor); M(x) ← otusuThresholding(Igray(x))
7: {Voting Map Construction}
8: for all i ∈ (1, 2, …, N) do
9: for all x ∈ Ω do
10:   λ2 (x) ← eigHessian(Δ(x), si)
11:   if sign(λ2(x))< 0 then
12:    V(x) ← V(x) + 1
13: {Detecting and Merging Seeds}
14: vsort ← descentSort(V(x)); v0→1 ← flip(normalize(vsort))
15: Let vc and vp be the current and previous voting value in vsort
16: for all vc and vpvsort, where vcvsort(i) do
17:  find objects 𝒪(vc) ← label(V(x) ≥ vc)
18: for all o ∈ 𝒪(vc) do
19:   if size(o)≥ A(α, β, vi) = β + exp(αv0→1 (i)) && M(centroid(o)) = 1 && oL = Ø then
20:    LL ∪ {centroid(o)}
21: while any(L.pairwiseDistance() ≤ D1)=true do
22:  find pL s.t. any(L.pairwiseDistance(p) ≤ D1) = true && sum(L.pairwiseDistance(p)) ≤ sum(L.pairwiseDistance(p′)) ∀p′L
23:  find Q = {q| s.t. (L.pairwiseDistance(p, q) ≤ D1) = true}
24: LL ∪ Mean({p} ∪ Q)
25: LL \ ({p} ∪ Q)
26: {Merging Seeds with Edge Information}
27: while any(L.pairwiseDistance() ≤ D2 && !L.isBlockedByEdge()) = true do
28: for all pL do
29:   find Q(p) = {q| s.t. (L.pairwiseDistance(p, q) ≤ D2 && !L.isBlockedByEdge(p, q)) = true}
30:   find pL s.t. Q(p) ∆ Ø && sum(L.pairwiseDistance(p, Q(p))) ≤ sum(L.pairwiseDistance(p′,Q(p′))) ∀p′L
31: LL ∪ Mean({p} ∪ Q(p))
32: LL \ ({p} ∪ Q(p))