Good day! If someone worked with the camera on android, tell me how you can change the image that is displayed in the preview. On the Internet I find only examples with conversion, but I would like to display, for example, a box in a certain place. As I understand, all changes should be made in the method

public void onPreviewFrame(byte[] data, Camera camera) 

Where in the data comes the image, but in what form and how to change it?
Thank you for understanding

    1 answer 1

    In StackOverflow, the topic was discussed in detail. And the recommended image processing method was laid out. In general, agreed that the raw image is served in the form of YUV, which must be recoded to get a Bitmap from it. Well, if there is a Bitmap - then you can turn it anyway, draw squares and so on.

    Flicking here .