I want to estimate the rough brightness of a frame that comes in as a camera preview frame, as below. I want the method to be quite fast.
public void onPreviewFrame(final byte[] bytes, Camera camera) {
// calculate brightness
}
Is there a way to do it without converting to RGB? It also would be very good if there is a fast way to determine blurriness without using OpenCV.
Ok, I figured it out myself: