I've been working with object detection and i have achieved a lot with opencv in android, but, i found that the JavaCameraView was using a very low resolution, and i need it to be better, because i have to detect text on a photo taken after an object detection, so i changed the resolution of the object in this line on CameraBridgeViewBase.java:
// NOTE: The order of bitmap constructor and camera connection is important for android 4.1.x
// Bitmap must be constructed before surface
private void onEnterStartedState() {
Log.d(TAG, "call onEnterStartedState");
/* Connect camera */
Log.d("RESOLUTION_TAG", "camera initialized with: "+getWidth()+";"+getHeight());
if (!connectCamera(mMaxWidth, mMaxHeight)) { //here i changed it
AlertDialog ad = new AlertDialog.Builder(getContext()).create();
ad.setCancelable(false); // This blocks the 'BACK' button
ad.setMessage("It seems that you device does not support camera (or it is locked). Application will be closed.");
ad.setButton(DialogInterface.BUTTON_NEUTRAL, "OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
((Activity) getContext()).finish();
}
});
ad.show();
}
}
i changed it to 2160x3840, and this is not the biggest resolution of my cellphone's camera, the problem is that the FPS of the camera goes really low, and i've tested other opencv apps and they have a real good image quality but don't suffer this really low fps count, even without doing object detection the FPS still low, so, what could be the solution here? JavaCamera2View fixed this? i need help on this