generating haralick texture measures.
1
0
Entering edit mode
@milton-cezar-ribeiro-2602
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080119/ 04a3dbc7/attachment.pl
• 766 views
ADD COMMENT
0
Entering edit mode
Oleg Sklyar ▴ 260
@oleg-sklyar-1882
Last seen 10.2 years ago
Hi Miltinho, the package name is EBImage, not EPImage, but actually I do not understand what you want to obtain (what are Haralick texture images?) and what you also want to achieve finally. Haralick features (not images) are calculated for each individual object in an image (not for an image as a whole) from the corresponding co-occurrence matrices. There are 13 of them implemented in the package. So for each individual object in an image you can get at most 13 values (or if you really need those - 13 co-occurrence matrices), for n objects in an image you can get a matrix of n*13 values, which you can obtain with 'haralickFeatures' *after* you have segmented and indexed all the objects. Objects are indexed by positive *integer* numbers instead of pixel color values with 0 being background, and 1, 2, 3 etc - being objects - in your example, therefore, io will never be indexing objects - as there a very low chance to get 1 and it is impossible to get anything higher (to have at least one object)! You can correct your example to generate some random objects, e.g. in the following way: io<-round(as(ii,"IndexedImage")*5) > table(io) io 0 1 2 3 4 5 1020 2060 1940 1949 1964 1067 Then it is also not clear what you want to achieve with nc=3 - this basically tells the script to reduce the number of colors that encode image to 3! Have you seen any photographic image made in 3 colors or shades of gray? Finally, why do you need the matrices? Sure one can calculate further statistics on those, not described by Haralick, but well some work was put into deriving those 13 and already the last 3 have no name as they do not have much of a meaning - just numbers - so do you want to derive new ones? Good luck if so, if not, then you only need those 13 numbers (calculated on say nc=256, i.e. 256x256 matrices instead of 3x3 matrices, which in amount of information account to less than 13 features). > hr<-haralickMatrix(io, ii, nc = 3) > hr , , 1 [,1] [,2] [,3] [1,] 1 0 0 [2,] 0 0 0 [3,] 0 0 0 , , 2 [,1] [,2] [,3] [1,] 1 0 0 [2,] 0 0 0 [3,] 0 0 0 , , 3 Regards, Oleg Milton Cezar Ribeiro wrote: > I Dear all, > > I just started to use EPImage package. I am looking for to generate Haralick texture images from a greyscale image. > > I have an greyscale image like the simulated below, and my intention is to generate a set of texture image, where each pixel of an image is the estimated texture measure. The output images will be used a modeling approach as input image. > > ii<-as.Image(matrix(runif(10000),nc=100)) > io<-as(ii,"IndexedImage") > hr<-haralickMatrix(io, ii, nc = 3) > > Any suggestion are welcome > > Kind regards > > Miltinho > Brazil > > > > para armazenamento! > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466
ADD COMMENT

Login before adding your answer.

Traffic: 487 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6