简体   繁体   中英

How to capture screen and detect the screen info

I'm fairly new to android and xamarin, but I'm making an app for a school project in Xamarin which is about visible light messaging . That's a kind of messaging with a code-language like morse, but with light. My phone has to see that light and recognise the flickering of that light. Therefor I made an app with an in-built camera like the snapchat app. Now I have to recognise what's going on on my screen when the camera is open, but i have no idea how to capture the screen. Is there anyone with any experience on things like this (like face-recognition,...)

Thanks in advance!

I am not familiar with the camera detector. But I would like to give you some ideas about your app.

  1. Achieve your camera preview. Textureview is a good choice.
  2. Get the single frame of your camera. Try to use Emgu CV or some other tools.
  3. Detect the light of your frame. This is a challenge, create a model for your light detect the model in the frame.

For example: your light must be white color you can create a model for your light:

  Class MyLight
  {
     byte[] myColor= new byte[] { 0xFF, 0xFF, 0xFF };//RGB
  }

Get the All pixels of your frame and detect the write color by traversing your pixel array.

MyLight object will not be such simple many situations need to be considered.

Good Luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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