knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(clasifierrr)
library(EBImage)
base_image <- readImageBw(system.file(
            "extdata", "4T1-shNT-1.png",
            package = "clasifierrr"))
display(base_image, method = "raster")

The features are just a series of filters applied to the main image. So it converts an image of heigh y and length x into a data frame of x * y number of rows and one column per feature.

feature_df <- calc_features(
    base_image, 
    filter_widths = c(3, 15, 31),
    shape_sizes = c(101, 201, 301, 551))
head(feature_df)

you can see the features that were calculated by using the following function

display_filters(feature_df, dims = dim(base_image))
display_filters(feature_df, dims = dim(base_image), scale = TRUE)


jspaezp/clasifierrr documentation built on March 2, 2020, 11:20 a.m.