Normally, the data byte[] that arrives from onPreviewFrame() has luma data packed in a width*height array.
To extract luma(x, y) you can use the following snippet:
void onPreviewFrame(byte[] data, android.hardware.Camera camera) {
byte result = data[x + y*width];
}
You don't need YuvImage for that.