I have a function where I have got the RGB-values from the image and calculate the mean value for each pixel, how can I approach this problem?
function RGB2G_mean(img::Matrix{RGB{T}}) where T<:Fractional
# get RGB-values from img
# R,G,B=...
output =
return Gray.(output)
end
To address a concern of BatWannaBe in the comments, yes,
meanguards against overflow.