I've noticed that the matrix output of an image from Python cv2, has different values for the same pixel read by Java ImageIO. What is the cause of this and how can we get an unanimous value in Java without usage of Java-OpenCV dependency.
Test code and bus.jpg for comparison:
import cv2
if __name__ == '__main__':
path = 'bus.jpg'
img0 = cv2.imread(path) # BGR
print(img0[0][0][0]) # 122 output
VS
final BufferedImage image = ImageIO.read(new File("bus.jpg"));
var rgb = image.getRGB(0, 0);
var red = (rgb >> 16) & 0xFF;
var green = (rgb >> 8) & 0xFF;
var blue = rgb & 0xFF;
System.out.println(blue); // 118 output