(please forgive my imperfect English.)

Hi. I'll get straight to the point.

Please note that I haven't code anything in this project just yet.
This is only an idea.

In  human language, my goal is to:

1. Take a picture of a blank white A4 paper.
2. Verify (by code) that the picture is "White". (this's why I include
'simple' in the topic)

I mean, the program should be able to tell if the user just took the
picture of "white" paper and not any other colors.


For the code...
I can guess that the actual process should be:

1. Use Camera API to take a picture. // this step should be easy
2. Convert it to Bitmap. // this step should also be easy
3. Verify that it is "White". //*** now I need some help here.

How can I do step 3? I look up the docs and found this is the Bitmap
class:

getPixels  (int[] pixels, int offset, int stride, int x, int y, int
width, int height)

I can use this and compare the data pixel-by-pixel but it seems
expensive.

Could anyone recommend me a more proper way(if there is) to do this
please?

Thank you in advance.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to