warp() (and therefore imwarp()) affecting forward warps
(direction = "forward", the default in imwarp()) with linear or cubic
interpolation. These paths scatter source pixels into the output via an
accumulating read-modify-write blend, so running them under OpenMP made the
result depend on thread scheduling: repeated calls on the same input could
return different images once more than a handful of threads were active
(OMP_NUM_THREADS above roughly 6 on the machine where this was found).
The affected CImg loops are now serialised, which makes forward warps
deterministic and bit-identical to the single-thread result. Forward warps are
consequently no longer sped up by OpenMP; backward warps are unaffected.require(plyr) somewhere.imeval(boats,~ xs*.)
is equivalent to: (Xc(boats)/width(boats))*boats and creates a fading effect.
imchange(boats,~ c==1,~ xs*.)
is the same thing but applied only to the first colour channel (R)im <- boats
im[sample(nPix(im),1e4)] <- NA
inpaint(im,1) %>% imlist(im,.) %>%
setNames(c("before","after")) %>%
plot(layout="row")
colorise(boats,~ sqrt(xc^2+yc^2) < 140,"blue",alpha=.2) %>% plot
see ?colorise for more.imfill(10,10,val="red") or autocrop(im,col="black")imfill(10,10,val='red')imfill(10,10)[3,1] does what you'd expect (i.e., the same as imfill(10,10)[3,1,1,1])