【发布时间】:2015-08-09 17:01:07
【问题描述】:
您好,我想转换图像中的颜色,我使用的是逐像素方法,但它似乎很慢
src.getPixels(pixels, 0, width, 0, 0, width, height);
// RGB values
int R;
for (int i = 0; i < pixels.length; i++) {
// Get RGB values as ints
// Set pixel color
pixels[i] = color;
}
// Set pixels
src.setPixels(pixels, 0, width, 0, 0, width, height);
我的问题,我有什么办法可以使用 openCV 做到这一点?将像素更改为我想要的颜色?
【问题讨论】:
-
你想用一种颜色填充整个图像还是每个像素都有不同的颜色?
-
谢谢,每个像素都不应该有不同的颜色
标签: android opencv image-processing colors pixel