Closed t-bltg closed 3 years ago
I would guess that you should replace abs
with norm
in https://github.com/JuliaPlots/VisualRegressionTests.jl/blob/cb6433496fd451572fafe560a80ef8db5e2739ef/src/utils.jl#L26 .
There are some hard landings here for the recent CVS development, one of the major breaking change is that abs
and abs2
are undefined for RGB
types https://github.com/JuliaGraphics/ColorVectorSpace.jl/pull/131. I would suggest drop all ColorTypes
and ColorVectorSpace
dependency, and use ImageCore@0.9
instead; ImageCore@0.9
reexports ColorTypes and also loads CVS 0.9.
To upgrade the codebase to CVS@0.9, one needs to define his own _abs
method, https://github.com/JuliaGraphics/ColorVectorSpace.jl#abs-and-abs2, and then replace sumdiff(abs, A, B)
with sumdiff(_abs, A, B)
.
There are some hard landings here for the recent CVS development, one of the major breaking change is that
abs
andabs2
are undefined forRGB
types JuliaGraphics/ColorVectorSpace.jl#131. I would suggest drop allColorTypes
andColorVectorSpace
dependency, and useImageCore@0.9
instead;ImageCore@0.9
reexports ColorTypes and also loads CVS 0.9.To upgrade the codebase to CVS@0.9, one needs to define his own
_abs
method, https://github.com/JuliaGraphics/ColorVectorSpace.jl#abs-and-abs2, and then replacesumdiff(abs, A, B)
withsumdiff(_abs, A, B)
.
Thanks for taking the time to answer, very clear.
Images dependency might be too large for this package; and Images isn't yet compatible with CVS 0.9 yet so you might get a fake fix by adding Images dependency.
Images dependency might be too large for this package; and Images isn't yet compatible with CVS 0.9 yet so you might get a fake fix by adding Images dependency.
The reason why I'm trying to add Images
is that the implementation of maxabsfinite
was failing here, should I copy the whole code for maxabsfinite
of https://github.com/JuliaImages/Images.jl/blob/master/src/algorithms.jl here ?.
Is there a reason why these algorithms are not in ImageCore
instead ?
It's cumbersome:
Ah okay, that now lives in ImageBase v0.1.3
ImageCore is designed to be a collection of traits and array types so we don't add many functions there.
Ah okay, that now lives in ImageBase v0.1.3
Oh thanks for pointing ImageBase
.
God, that took an awful number of runs to get fixed for an equivalent 2
lines change.
I forgot how nasty colors and images can be, definitely not my expertise area.
I'm glad people like @johnnychen94 eat this at beakfast :laughing:
@mateuszbaran, any idea why the tests fails now, and how we can fix this ?
cc @johnnychen94 who might know
ColorTypes
orColorVectorSpace
better than me.