diff --git a/Ipol/paper/Algos/algoFinal.tex b/Ipol/paper/Algos/algoFinal.tex index a9314e591a5decee0ea8a0a5bb871a7a1a1931d9..e00575d34d19cd68088dcfc371fd44561ca9dc53 100644 --- a/Ipol/paper/Algos/algoFinal.tex +++ b/Ipol/paper/Algos/algoFinal.tex @@ -11,9 +11,10 @@ \SetKwData{ath}{$\varepsilon$} \SetKwData{on}{isExtending} %\SetKwData{nb}{$n_E$} -\SetKwData{side}{side} +\SetKwData{side}{$side$} \SetKwData{index}{$I$} \SetKwData{ninter}{$n_I$} +\SetKwData{niside}{$n_I[side]$} %\SetKwData{nbin}{$N_{inter}$} \SetKwData{imax}{$N_I$} \SetKwData{gdiff}{$\delta_G$} @@ -66,10 +67,9 @@ \bs \takes \bsinit (\scan$[$\index$[$0$]]$, \ath) \nb \takes 0\; - \ninter \takes 0\; \pinchcount \takes 0\; - \on \takes (true, true)\; - \While{\on $\neq$ (false, false)}{ + \ninter \takes (0, 0)\; + \While{\ninter $\neq$ (\imax, \imax)}{ \nb \takes \nb + 1\; \bsth \takes \thickness(\bs)\; \If{\pinchcount = \pinchdelay}{ @@ -83,25 +83,24 @@ \Comment*{Aligns scan stripe on blurred segment.} } \ForEach{\side}{ - \If{\on$[$\side$]$}{ + \If{\niside $\leq$ \imax}{ \scan \takes \nscan (\ds, \side)\; \index \takes \locmax (\scan, \gmap, \gdiff, \vmap, \dirn)\; + \trial \takes false\; \added \takes false\; \While{\added = false and \trial $<$ \size(\index)}{ \added \takes \addpt (\bs, \scan$[$\index$[$\trial$]]$) \Comment*{Tests BS extension} + \trial \takes \trial + 1\; } \pinchcount \takes \pinchcount + 1\; \eIf{\added}{ \If{\pinchcount $<$ \pinchdelay and \bsth $<$ \thickness(\bs)}{ \pinchcount \takes 0 \Comment*{Not yet stabilized.} } - \ninter \takes 0 \Comment*{Resets fail count.} + \niside \takes 0 \Comment*{Resets fail count.} }{ - \ninter \takes \ninter + 1 \Comment*{Increments extension count.} - \If{\ninter $>$ \imax}{ - \on$[$\side$]$ \takes false \Comment*{Stops BS extension} - } + \niside \takes \niside + 1 \Comment*{Increments fail count.} } } } diff --git a/Ipol/paper/Algos/algoInitial.tex b/Ipol/paper/Algos/algoInitial.tex index f44e570149f2ebaa6e560cfd85c6c30bf4c9da2f..e3371f436a78693ee431806deb11548a7c1b1d30 100644 --- a/Ipol/paper/Algos/algoInitial.tex +++ b/Ipol/paper/Algos/algoInitial.tex @@ -10,6 +10,7 @@ \SetKwData{side}{side} \SetKwData{index}{$i$} \SetKwData{ninter}{$n_I$} +\SetKwData{niside}{$n_I[side]$} \SetKwData{imax}{$N_I$} \SetKwData{nmax}{$N_E$} \SetKwData{gmin}{$G_{min}$} @@ -32,33 +33,33 @@ \Output{a detected blurred segment \bs} \bs \takes $\emptyset$\; -\ds \takes \getds (\is) \Comment*{Gets a DS from input segment} +\ds \takes \getds (\is) +\Comment*{Gets a DS from input segment.} \scan \takes \fscan (\ds)\; \index \takes \largest (\scan, \gmap, \gmin) -\Comment*{Gets index of pixel with max gradient} +\Comment*{Gets index of pixel with max gradient.} \If{\grad(\gmap$[$\scan$[$\index$]]$) $\geq$ \gmin}{ \bs \takes \bsinit (\scan$[$\index$]$, \ath) - \ninter \takes 0\; \nb \takes 0\; - \on \takes (true, true)\; - \While{\on $\neq$ (false, false) and \nb $\neq$ \nmax + \ninter \takes (0, 0) + \Comment*{One counter for each side.} + \While{\ninter $\neq$ (\imax, \imax) and \nb $\neq$ \nmax \Comment*{No more than \nmax extent.}}{ \ForEach{\side}{ - \If{\on$[$\side$]$}{ + \If{\niside $\leq$ \imax}{ \scan \takes \nscan (\ds, \side)\; \index \takes \largest (\scan, \gmap)\; - \eIf{\addpt (\bs, \scan$[$\index$]$) \Comment*{Tests BS extension}}{ - \ninter \takes 0 \Comment*{Resets fail count.} + \eIf{\addpt (\bs, \scan$[$\index$]$) \Comment*{Tests BS extension.}}{ + \niside \takes 0 \Comment*{Resets fail count.} }{ - \ninter \takes \ninter + 1 \Comment*{Increments extension count.} - \If{\ninter $>$ \imax}{ - \on$[$\side$]$ \takes false \Comment*{Stops BS extension} - } + \niside \takes \niside + 1 + \Comment*{Increments fail count.} } } } - \nb \takes \nb + 1\; + \nb \takes \nb + 1 + \Comment*{Increments extension count.} } } \label{algo:initial} diff --git a/Ipol/paper/Makefile b/Ipol/paper/Makefile new file mode 100755 index 0000000000000000000000000000000000000000..4632ff1eae3f30535478b3353c7e75ac4ead2599 --- /dev/null +++ b/Ipol/paper/Makefile @@ -0,0 +1,12 @@ +all: + @echo "ps pdf release" + make pdf + +pdf: + pdflatex article + bibtex article + pdflatex article + pdflatex article + +clean: + rm -f article.pdf article.ps article.dvi article.log article.out article.bbl article.blg article.aux *~