JPEG is not a pixel-exact format, even in YCbCr color space. Different Discrete Cosine Transformation implementations may produce slightly different YCbCr and hence RGB values, and still be considered valid JPEG implementations.
For example, libjpeg is just one software implementation, in one programming language, but it has multiple FDCT / IDCT implementations (e.g. 4 different jidct???.c files). Some use floating point math. Some use fixed point (integer) math, especially useful if your CPU doesn't support floating point in hardware. Some implementations are "fast", which are indeed as advertised, but have worse quality on some measures. They're all valid, spec-compliant implementations, but they have different rounding errors, and won't give identical RGB results on all inputs. Newer image formats like WebP have tightened up the variety in valid decodings, but JPEG is what it is. I'm therefore unsurprised that Go's decoding can differ slightly from whatever OpenCV uses. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.