[BioC] EBImage: filtering in the presence of NAs
Arnaud Duranel
arnaud.duranel.09 at ucl.ac.uk
Fri Mar 8 15:43:33 CET 2013
Hello
None of the EBImage filtering functions seems to work when there are NAs
in the image:
library(EBImage)
lenac = readImage(system.file("images", "lena-color.png",
package="EBImage"))
lenag<-channel(lenac, 'gray')
lenag[1:50, ]<-NA
flo = makeBrush(21, shape='disc', step=FALSE)^2
flo = flo/sum(flo)
lenaflo = filter2(lenag, flo)
display(lenaflo)
any(!is.na(lenaflo))
Is there a way to process an image that includes NAs, with some kind of
na.rm=TRUE?
I am working with pictures of irregularly-shaped objects, and the pixels
between the picture margins and the object were set to NA using a mask.
I want to apply filters to the object itself, not to the whole image. Is
there another way to do this?
Many thanks for your help.
Best regards
A. Duranel, UCL Department of Geography
More information about the Bioconductor
mailing list