Processing Android camera frames in real time

前端 未结 3 1859
迷失自我
迷失自我 2020-12-12 19:34

I\'m trying to create an Android application that will process camera frames in real time. To start off with, I just want to display a grayscale version of what the camera s

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 20:18

    This is not an easy task to achieve, with the current Android tools/API available. In general, realtime image-processing is better done at the NDK level. To just show the black and white, you can still do it in java. The byte array containing the frame data is in YUV format, where the Y-Plane comes first. So, if you get the just the Y-plane alone (first width x height bytes), it already gives you the black and white.

    I did achieve this through extensive work and trials. You can view the app at google: https://play.google.com/store/apps/details?id=com.nm.camerafx

提交回复
热议问题