简体   繁体   English

在Android中读取像素颜色

[英]Read pixel colors in android

I have an image of a person taken from camera in android phone. 我有一个从Android手机中的相机拍摄的人的图像。 I want to perform face localization in this image using the concept of color segmentation. 我想使用颜色分割的概念在此图像中执行人脸定位。 For this I need to read the value of Red, Green and Blue componets of pixel in android. 为此,我需要在android中读取像素的红色,绿色和蓝色分量的值。 Please tell me how to do this in android. 请告诉我如何在android中执行此操作。

You need to use public int getPixel (int x, int y) method, it returns Color of specific location(pixel) 您需要使用public int getPixel (int x, int y)方法,它返回特定位置的颜色(像素)

Please visit this link . 请访问此链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM