EBImage.md: Image processing and analysis toolbox for R

画像処理および画像解析

> library(EBImage)

バージョン: 4.10.1


関数名 概略
EBImage Package overview
EBImage-defunct EBImage defunct functions
Image Image class
bwlabel Binary segmentation
channel Color and image color mode conversions
colorLabels Color Code Labels
combine Combining images
computeFeatures Compute object features
dilate Perform morphological operations on images
display Image Display
distmap Distance map transform
drawCircle Draw a circle on an image.
equalize Histogram Equalization
fillHull Fill holes in objects
filter2 2D Convolution Filter
floodFill Region filling
gblur Low-pass Gaussian filter
localCurvature Local Curvature
medianFilter 2D constant time median filtering
normalize Intensity values linear scaling
ocontour Oriented contours
otsu Calculate Otsu's threshold
paintObjects Marks objects in images
propagate Voronoi-based segmentation on image manifolds
readImage Image I/O
resize Spatial linear transformations
rmObjects Object removal and re-indexation
stackObjects Places detected objects into an image stack
thresh Adaptive thresholding
tile Tiling/untiling images
transpose Image Transposition
watershed Watershed transformation and watershed based object detection

display

画像の表示

> readImage(system.file("images", "sample-color.png", package = "EBImage")) %>% display()

readImage

画像ファイルの読み込みと書き込み

引数

  • files
  • type... jpeg, png およびtiffに対応
  • all
  • names
  • x
  • bits.per.sample
  • compression
  • quality
  • ...
> img <- readImage(files = system.file("images", "sample-color.png", package = "EBImage"))
> str(img)
> print(img)
Image 
  colorMode    : Color 
  storage.mode : double 
  dim          : 768 512 3 
  frames.total : 3 
  frames.render: 1 

imageData(object)[1:5,1:6,1]
          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
[1,] 0.4549020 0.4784314 0.4941176 0.5137255 0.5294118 0.5529412
[2,] 0.4588235 0.4784314 0.4941176 0.4980392 0.5215686 0.5490196
[3,] 0.4705882 0.4823529 0.4980392 0.5137255 0.5294118 0.5372549
[4,] 0.4666667 0.4745098 0.5058824 0.5137255 0.5450980 0.5647059
[5,] 0.4705882 0.4705882 0.4901961 0.5137255 0.5372549 0.5647059

表示にはdisplay()を使う

参考