1 つの画像の RGB 値を取得するために、次のコード スニペットを使用しました
int[] pix = new int[picw * pich];
bitmap.getPixels(pix, 0, picw, 0, 0, picw, pich);
int R, G, B,Y;
for (int y = 0; y < pich; y++){
for (int x = 0; x < picw; x++)
{
int index = y * picw + x;
int R = (pix[index] >> 16) & 0xff; //bitwise shifting
int G = (pix[index] >> 8) & 0xff;
int B = pix[index] & 0xff;
//R,G.B - Red, Green, Blue
//to restore the values after RGB modification, use
//next statement
pix[index] = 0xff000000 | (R << 16) | (G << 8) | B;
}}
2 つの画像を比較したいのですが、ピクセル値を比較するとコストが高くなることはわかっています。OpenCV ライブラリも分析しましたが、要件には触れません。
AndroidでRGB値を使用して画像を比較するアルゴリズムはありますか?
また
RGB値を比較する他の方法はありますか?
ありがとう、