1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

opencv4android Hello OpenCV Sample - confused

Last Updated:

  1. benjamin.grant.du

    benjamin.grant.du New Member This Topic's Starter

    Sep 10, 2009
    Likes Received:
    Android development with OpenCV — OpenCV 2.4.3 documentation

    Hi All,
    I'm trying the tutorial located here. I have compiled sample code for openCV without issues - so I'm sure I have all the necessary things installed for opencv. I've added the opencv library to my project and I'm compiling with java 1.6 (java 7 doesn't work with opencv4android right now).

    However, the sample code doesn't make sense to me once it gets to step 5 under Hello OpenCV example.
    public void onCreate (Bundle savedInstanceState) {
    mView = new HelloOpenCVView(this);
    setContentView (mView);

    Is the code I'm talking about, I immediately get the error "mView cannot be resolved to a variable" which makes sense to me...
    shouldn't it be...

    public void onCreate (Bundle savedInstanceState) {
    HelloOpenCVView mView = new HelloOpenCVView(this);
    setContentView (mView);

    The only thing is mview is consistently used without declaration throughout the code, so I think I'm missing something major. Anyone know what is supposed to be going on here/why it isn't working? Thought that it would be relatively easy to run the hello OpenCV example...


Share This Page