Analyzes the colors of the pixels

some help please...
I created an app that analyzes the colors of the pixels in a photo to determine if any elements are present.
Now I have this need, that is, I have to take the photo with an external camera.

  1. Can I use the external camera like the internal one via an extension?
  2. Otherwise could I take the photo with Arduino or Raspberry and send it via Bluetooth to the app?
    Or what do you recommend? ideal would be point 1...
    Thank you.


Same image zoomed in:


the image I need to analyze has a high color difference between the background and the element to be checked...

what do you think about it?