I'll be decrementing the boundary values only. So should I `del` the
matched values instead of making them 0 ?


On Thu, Sep 19, 2013 at 10:42 PM, Johannes Schönberger <
notifications@github.com> wrote:

> In skimage/filter/_inpaint_criminisi.pyx:
>
> > +    .. [1] A. Criminisi, P. Perez, and K. Toyama. 2004. Region filling and
> > +           object removal by exemplar-based image inpainting. Trans. Img. Proc.
> > +           13, 9 (September 2004), 1200-1212. DOI=10.1109/TIP.2004.833105.
> > +
> > +    """
> > +
> > +    offset = window // 2
> > +    inner = (slice(offset, -offset), slice(offset, -offset))
> > +    source_image = painted[inner].copy()
> > +
> > +    t_row, t_col = np.ogrid[-offset:offset + 1, -offset:offset + 1]
> > +    sigma = window / 3
> > +    gauss_mask = _gaussian(sigma, (window, window))
> > +    confidence = 1. - mask
> > +
> > +    while mask.any():
>
> Can't you keep track of the number of masked values and decrement?
> Johannes Schönberger
> … <#141373586908ac71_>
>  Am 19.09.2013 um 19:11 schrieb "Chintak Sheth" <notifications@github.com>:
> In skimage/filter/_inpaint_criminisi.pyx: > + .. [1] A. Criminisi, P.
> Perez, and K. Toyama. 2004. Region filling and > + object removal by
> exemplar-based image inpainting. Trans. Img. Proc. > + 13, 9 (September
> 2004), 1200-1212. DOI=10.1109/TIP.2004.833105. > + > + """ > + > + offset =
> window // 2 > + inner = (slice(offset, -offset), slice(offset, -offset)) >
> + source_image = painted[inner].copy() > + > + t_row, t_col =
> np.ogrid[-offset:offset + 1, -offset:offset + 1] > + sigma = window / 3 > +
> gauss_mask = _gaussian(sigma, (window, window)) > + confidence = 1. - mask
> > + > + while mask.any(): I'll be changing mask at each iteration, so it's
> either mask.any() or np.nonzero iterative computation. — Reply to this
> email directly or view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scikit-image/scikit-image/pull/706/files#r6466342>
> .
>



-- 
Chintak