Entering edit mode
Guest User ★ 12k@guest-user-4897
Last seen 7.1 years ago
Hi, I would like to develop a method for meassuring the percent area of a certain phase in an image. I have looked at packages EBImage and CRImage. But I am not able to make much headway. My code looks like this : library(EBImage) library(CRImage) img = readImage(system.file("images", "nuclei.tif", package="EBImage"))[,,1] #x = thresh(img, 10, 10, 0.05) #x = opening(img, makeBrush(5, shape=???disc???)) #x = bwlabel(x) imgG=EBImage::channel(img,"gray") t=calculateOtsu(as.vector(imgG)) imB<-createBinaryImage(imgG,threshold=t) fts = computeFeatures.shape(i1[,,1]) computeFeatures.shape seems to require a 2D array. But even the binary image has a dim 0f 510*510*4. I would like to have help with the following questions : 1. From any general image, how do I create a binary image after using different thresholding criteria (to start with, the otsu method). 2. Sum all the segment areas corresponding to the phase of interest and then get the percent area. 3. I would like to have some help in interpreting the results of the last command (computeFeatures.shape) when I vary the third dimension from 1 to 4. The s.area results are different. What does this mean? How does one get a binary image without this variation? Thanks, Ravi -- output of sessionInfo(): R version 2.15.1 (2012-06-22) Platform: i386-pc-mingw32/i386 (32-bit) locale:  LC_COLLATE=Swedish_Sweden.1252 LC_CTYPE=Swedish_Sweden.1252 LC_MONETARY=Swedish_Sweden.1252  LC_NUMERIC=C LC_TIME=Swedish_Sweden.1252 attached base packages:  splines stats graphics grDevices utils datasets methods base other attached packages:  CRImage_1.6.0 aCGH_1.34.0 multtest_2.12.0 Biobase_2.16.0 BiocGenerics_0.2.0 survival_2.36-14  cluster_1.14.2 DNAcopy_1.30.0 EBImage_3.12.0 abind_1.4-0 loaded via a namespace (and not attached):  class_7.3-4 codetools_0.2-8 e1071_1.6 foreach_1.4.0 iterators_1.0.6 MASS_7.3-19 stats4_2.15.1  tools_2.15.1 -- Sent via the guest posting facility at bioconductor.org.