Hey all. I'm curious if, unless specified otherwise, all image processing algorithms should be performed in linear color space.
I can verify visually what color space a Gaussian blur should be done in: blurring an image with one half pure green and one half pure blue will yield some cyan between the colors when done in linear space. The same blur done in sRGB space yields some colors that don't make as much sense. Some algorithms, like colorimetric conversion to grayscale
, even specify what color space images should be processed in.
But what about something like a Sobel filter? Or an unsharp mask? With operations like these it's hard for me to discern visually whether or not I did the math in the correct color space. The best I can do is look at how GIMP or ImageMagick do it, and I can't seem to find consistent trends there. Does anyone know if I should just assume that my math should always be done in linear color space? Or of a rule of thumb I could adopt to determine this sort of thing intuitively for different algorithms—sort of like the visual check for the Gaussian blur?
Any help is appreciated!