Hello there,
I want to find the total Sum of Squared Errors of a set of colors from their mean. Using Colors
.
The colors and the mean look something like this, where m = mean(cols)
.
cols[1:10] = RGB{FixedPointNumbers.Normed{UInt8,8}}[RGB{N0f8}(0.086,0.051,0.024), RGB{N0f8}(0.094,0.059,0.031), RGB{N0f8}(0.106,0.071,0.051), RGB{N0f8}(0.141,0.106,0.086), RGB{N0f8}(0.102,0.067,0.047), RGB{N0f8}(0.141,0.106,0.086), RGB{N0f8}(0.176,0.149,0.125), RGB{N0f8}(0.078,0.051,0.027), RGB{N0f8}(0.114,0.086,0.063), RGB{N0f8}(0.149,0.122,0.098)]
m = RGB{Float64}(0.5797770398481967,0.5710550284629976,0.5525899746995568)
But
sse = sum(abs2, cols .- m)
throws error
`
ERROR: LoadError: MethodError: no method matching depwarn(::String, ::Symbol; force=false)
`
I am wondering how to do it? I will be finding SSE of sections of image over and over again. What is the best way to do it? Convert the original image to Floats? I will also be using hex(m)
to save the mean color to an svg image.
Edit MWE:
cols = rand(RGB{Float64}, 4, 4)
m = mean(cols)
cols .- m # Also a Matrix of RGB{Float64} with some negative values!!!
sum(abs2, cols .- m) # Errors out
Thanks.