I'm trying to compare to images in my phone's SDcard, so I wrote this piece of code.
package com.example.test;
import java.io.File;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
File img1=new File("mnt/sdcard/xx/IMG-20130123-WA0004.jpg");
File img2=new File("mnt/sdcard/xx/IMG-20130124-WA0000.jpg");
double l2_norm = cvNorm( img1, img2 );
}
}
I have imported OpenCV as a project in my Eclipse Workspace and set it as a library. My test project uses this library.
Now, I get this error The method cvNorm(File, File) is undefined for the type MainActivity
I searched for over 3 hours for the proper code or method but none seem to work and Eclipse isn't suggesting the correct imports. Could someone tell me the correct code?