Callback buffer was too small
Hi. I've been trying to get a very basic OpenCV based app to work (at this moment in time, it only takes in an input from the camera). However, I keep coming across this error:
E/Camera-JNI﹕ Callback buffer was too small! Expected 1382400 bytes, but got 608256 bytes!
My main gripe with this seemingly arcane error is that the OpenCV samples work on my phone (Galaxy S3, running CM10.2 (Android 4.3.1). My code is pretty much a carbon copy of the code found in the samples.
public class MainActivity extends ActionBarActivity implements CameraBridgeViewBase.CvCameraViewListener2, View.OnTouchListener {
private CameraView mCameraView;
private static final String TAG = "com.adilhz.logging";
private BaseLoaderCallback mBaseLoaderCallback = new BaseLoaderCallback(this) {
@Override
public void onManagerConnected(int status) {
switch(status) {
case LoaderCallbackInterface.SUCCESS:
Log.d(TAG,"Loaded OpenCV");
mCameraView.enableView();
mCameraView.setOnTouchListener(MainActivity.this);
break;
default:
Log.d(TAG,"OpenCV"+status);
super.onManagerConnected(status);
break;
}
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.activity_main);
mCameraView = (CameraView)findViewById(R.id.java_surface_view);
mCameraView.setVisibility(SurfaceView.VISIBLE);
mCameraView.setCvCameraViewListener(this);
}
@Override
public void onResume() {
super.onResume();
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_9, this, mBaseLoaderCallback);
}
Could someone provide some pointers as to where I'm going wrong?
Thanks, Adil
Did you ever find our what caused that error? I'm getting the same error too.
E/Camera-JNI(18041): Callback buffer was too small! Expected 608256 bytes, but got 38016 bytes!