How to get the values of histogram with image as parameter. According to this, the values can be retrieved because hist() returns a value.
The rest of the code works fine. However, null is returned to histogram (full code):
library(EBImage)
image = readImage("cat.png")
grayImage <- channel(image,"gray")
grayScaled = floor(grayImage * 255)
histogram <- hist(grayScaled)
> histogram
NULL
Package EBImage is used here. So I want to get the intensities or counts like histogram$counts but the variable histogram is null.