我在OpenCV和Java BufferedImage上使用OpenCL,发现打开图像会产生不同的数据输出。在一个简单的图像,如:
OpenCV输出是:
FFFFF8 FFFDFC F7FDFF F9FBFF FFFDFF FEFCFF FDFFFE FFFFEC FFFFE5 FFFFF4 EDE7FF B8B7FF 9E91FF 886FFF 7A5BFC 6E52F9
FFFFF7 FCFBFD F8FDFF F4FFFF F3FDF1 FFFFF4 FFFDFF F6F8FF D4DDFF 999DE4 655AC2 271C9B 121AA3 031FA9 021EAB 0B1FB2
FAFFFA FFFEFF F8FBFF F4FFFE F6FFF4 FFFFF8 FBF1FF 9C9FF4 2538C1 0116B8 171DC4 373FD8 2F55DD 266CE8 256BE6 326AE7
FFFBFF FFFBFF FFFFFC FAFFFB F8FBFF DEDEFF 716CC1 1619A3 1D2FE0 1C3EF6 2959FE 2D6CF2 3480F1 2374DD 2E79DF 377ADD
FFF4FF FFFDFE FFFFF1 FDF9FE D8D0FF 4540B3 181CB0 3141E1 3655F0 3973FB 1F79E5 1C8CDE 279CE1 49B8F6 5AC7FD 60CFFD
FEF4FF FFFBFA FFFFF5 DCDFFE 3E3AAB 1F1DCA 2B39ED 3864F7 3780EC 2484D0 41B0E2 5FE1FE 63FEFF 50FFF8 4CFFEE 4FFFE8
FBFEFF F7FCFF E8F2FF 5965B7 1420B4 2837EB 4168FF 2D7DE8 2098D4 54DBF7 78FCFF 70FDEA 43E8BB 23E59F 0ED87F 16DB79
FFFFF1 EFF7FF 8A94EC 0D16A6 2D42E4 3C6AF8 2D7DE2 31A0D8 65EFFF 65FFF4 40E5BA 31CB8A 44BE70 63BE68 77C463 7AC35C
FFFFEE CFCFFF 1014A3 2931E9 3857F4 3784E5 279BCA 70F3FF 70FDE8 3ADC9B 1AC464 4FCD69 98B363 CD8B50 D57137 CE702E
FFFDFF 9288DB 1B17BD 293EF3 3A76F8 2486C6 64E4F7 6CFFF0 3CDCA0 31C65E 71D55D 8F9D3D A3521F D3422D E84334 E94832
DCDFFF 463AA4 3537D1 295EEF 1F83E3 47B7E5 82FBFF 46E1C2 14BF70 68D164 9D8325 C34310 DE5045 B6454F A93C52 BB3A55
9DA7FF 1E1F99 344AD1 2C7AEB 128BD3 63E7FF 70F5EB 2CBF8B 4ECC7A 7F8F41 C3441D FF494A C23550 7B335E 7E2C75 A52185
7A7EFF 0B21A8 295CD8 2E7EE3 30A5E2 5AF7FF 41EBC1 43BE74 96AD63 A74F26 DF4A4D BF3154 952A63 9C3188 CB33B5 F42ED3
6259F6 001EAF 2D6AEA 3377DC 56C0F5 53FFF7 14DD94 64C269 D2894B DA3D29 BF4353 7B3264 912D85 E73BB7 F120B0 D30B9F
4938DF 172FC7 3369EC 3E7EDD 69D7FB 4EFFE8 15DD89 79C06A CF6B35 EA4935 B04555 782E70 C43EB6 E122A8 FC6CC5 FFCEF0
2F20C8 2532CE 305ADD 2C6FC4 4CC8DA 2BECBA 0BC36F 6BA95D B35F2F D34A30 A93945 992374 DC2EBC B9108F F4D4EC ADFFD5
Java BufferedImage输出是:
FFFFFA FFFDFC F8FEFF F5FCFF FDFFFF FEFFFD FFFFFE FBFBFB FDFBFF FAF6FF E6DBFF BBB0FF 948DFF 7168FF 5E52FF 5648FF
FFFFFB FEFCFB F9FFFF F7FFFF F3F9F8 FAFCFD FAFAFF F6F7FF D8DAFF 999CEA 5B59C6 150F9F 0000AA 0000B5 0000B9 0000C0
FEFEFE FDFFFF F7FDFE F9FFFF F9FFFE F8FCFF EFECFF 9A9CFE 2831C1 0000B4 0007C2 1737E0 104CEA 1F60F7 205FF6 2160F7
FFFDFF FBFCFF FBFFFF F8FEFF F3F8FF D8DAFF 6866CE 0609A3 0023DF 0033F6 1852FF 1564FE 0B7BFE 0072E4 0078E6 007BE5
FFFAFF FFFBFF FEFFFD F6F6FF D0CEFF 3F3BB9 0905B3 2238E5 1C50F6 1E6FFF 0076ED 0087E9 009BE5 00BCF6 21CDFC 2ED3FE
FFF9FF F9F7FF FAFBFF D7D9FF 3735B1 1310C1 1833E7 235CFF 1E79FB 007EE1 07ADEE 3DE0FF 4DFDFE 45FDF9 46FFED 48FFE9
FBFEFF F2F7FF E4EAFF 565FC4 030BB7 1230E7 2C69FF 0678F3 0092E1 38D8FF 58FEFD 4DFFE4 22E7B2 00E093 00D06D 00D365
FBFEFF EEF4FF 8A90F5 0004A3 1C3AE6 2762FF 0077F0 009BE5 4AEEFF 50FFEF 2AE3AF 1CC87B 38BC5E 53BF52 64C449 68C33E
FDFAFF D0CDFF 0900A2 1A28E4 2254F4 1E7CF6 0094DA 55F3FF 50FFDF 12DB8E 00BF48 5DC94B 9CB054 B58F46 B7752D BF6F29
F8F2FF 8B88DF 0500B9 1435F3 2373FF 007FD8 49E1FF 56FFEA 18DC91 21BF4C 74CE46 859C1B 8E5511 B3462C CE4438 DA443E
DBD5FF 3637AA 1C32D3 1857F5 007DEB 17B5F0 61FEFD 37E1B6 00BC56 6CCA51 997D12 A1450D C0534A B84254 B1365A B43560
9F9FFF 080FA0 1B41DD 1B72F9 0086DC 45E8FF 4DF8E5 19BE7E 60C961 7A8F24 A6481A DF4F4C B93255 A82166 AB1878 AE1583
7376FF 0008B2 1451E8 0378F1 00A4E7 45F6FF 27EAB7 39BC65 9DAA56 94531F C14E4F B82E59 A61C6A B81B92 E315BA F710D1
4E4FFF 0000B9 2161F6 0076E3 1FC4F7 49FFF6 00D688 56BF5C B58C46 B5422C BB4159 A82268 B2178D D532BF CF0DB3 BE009F
3027ED 0A17D3 2D61F7 0C7FE4 38DCFA 4AFFE6 00D57A 64C058 AE6E2F CC4A3C B53F5E A31F71 DE2CBA C116AB D674C6 FFC8FC
1400D7 141DDA 2051E9 006ECE 10C9DE 00E5B9 00BE5C 59AC41 A96124 CF443C A43054 A11A76 DE1ABC A90092 FFCAFC FFFDFF
两者之间存在一些非常明显的差异,我首先想知道为什么会发生这种情况,其次,如果我有什么办法可以做到更好的一致性(即保存为不同的图像格式)