I am currently working with OpenCV Tutorial 2 - Mixed Process, and I wanted to call a list with resolutions. The code is:
public boolean onOptionsItemSelected(MenuItem item) { Log.i(TAG, "called onOptionsItemSelected; selected item: " + item);
if (item == mItemPreviewRGBA) { mViewMode = VIEW_MODE_RGBA; } else if (item == mItemPreviewGray) { mViewMode = VIEW_MODE_GRAY; } else if (item == mItemPreviewCanny) { mViewMode = VIEW_MODE_CANNY; } else if (item == mItemPreviewFeatures) { mViewMode = VIEW_MODE_FEATURES; } else if (item == mResolutionMenu) { int id = item.getItemId(); Size resolution = mResolutionList.get(id); mOpenCvCameraView.setResolution(resolution); resolution = mOpenCvCameraView.getResolution(); String caption = Integer.valueOf(resolution.width).toString()
+ "x" + Integer.valueOf(resolution.height).toString();
Toast.makeText(this, caption, Toast.LENGTH_SHORT).show(); } return true; }
But Eclipse is giving me the next errors (can't launch the app because of this): The Method setResolution(Camera.size) is undefined for the type CameraBridgeViewBase. These occur for the setResolution() and getResolution().
I have no idea what I'm doing wrong and Google isn't of much help