Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charucoboard initialisation crashes #10

Open
Andyjk1406 opened this issue Dec 20, 2018 · 0 comments
Open

Charucoboard initialisation crashes #10

Andyjk1406 opened this issue Dec 20, 2018 · 0 comments

Comments

@Andyjk1406
Copy link

Andyjk1406 commented Dec 20, 2018

Hi - nice library!

I have a problem initialising a Charucoboard. The following java function works fine to display the yellow opencv Mat and everything builds fine in Eclipse so I think I have the opencv3-android-sdk-with-contrib installed correctly.

But if I try to create a charucoboard the app just closes on the line:
cboard = CharucoBoard.create(10,10,10f,10f,dict);

Am I using this wrong ?

`
public void helloworld() {
// make a mat and draw something
Scalar bg_colour;
bg_colour = new Scalar(255, 255, 0);
Mat m = new Mat(500,1000, CvType.CV_8UC3, bg_colour);

        // CharucoBoard creation
        Size sz = new Size(500,500);
        Dictionary dict = Aruco.getPredefinedDictionary (11);

        CharucoBoard cboard;
        cboard = CharucoBoard.create(10,10,10f,10f,dict);
        //cboard.draw(sz, m);
        
        // convert to bitmap:
        Bitmap bm = Bitmap.createBitmap(m.cols(), m.rows(),Bitmap.Config.ARGB_8888);
        Utils.matToBitmap(m, bm);

        // find the imageview and draw it!
        ImageView iv = (ImageView) findViewById(R.id.imageView1);
        iv.setImageBitmap(bm);
        
    }`
@Andyjk1406 Andyjk1406 changed the title Charucoboard initialisation crashe Charucoboard initialisation crashes Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant