I managed to capture the camera frames on the native side by calling:
cv::VideoCapture videoCapture(CV_CAP_ANDROID + 0);
videoCapture.set(CV_CAP_PROP_FRAME_WIDTH, 320);
videoCapture.set(CV_CAP_PROP_FRAME_HEIGHT, 240);
cv::Mat image;
videoCapture >> image;
However, the captured image has 3-bytes per pixel, as compared to Android native capture which is 1.5 bytes per pixel. For example, in case of 320x240, the number of bytes in the image captured through OpenCV is 230400, while they are 115200 when captured by Android API.
How can I capture images with NV21 format (i.e. 1.5 bytes per pixel).