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

Draw box on bitmap (Image) #2

Open
meysamSM7 opened this issue Feb 28, 2021 · 1 comment
Open

Draw box on bitmap (Image) #2

meysamSM7 opened this issue Feb 28, 2021 · 1 comment

Comments

@meysamSM7
Copy link

Hi,

                       Bitmap bitmap = camera2Fragment.textureView.getBitmap();
                        // draw on bitmap
                        Canvas canvas = new Canvas(bitmap);
                        MultiBoxTracker multiBoxTracker = new MultiBoxTracker(context);
                        multiBoxTracker.trackResults(recognitions, 0, null);
                        multiBoxTracker.draw(canvas);

Im wanna draw bitmap and storage it, on preview (when camera is open every thing is ok but when i get RecF (or location of box) and draw on bitmap, the location of boxes are not in the place

black is the activity
reed is frame
yellow is box (that user can see it)
green is bitmap (storaged)
white is box

location of the box is not ok
how can i solve it?

image

@mrinalTheCoder
Copy link
Owner

I think it's probably some scaling issue. The red box is scaled, but not the bitmap (yellow rectangle)

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

2 participants