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

How to reduce the elapsed time on work to OpenCVFrameGrabber #2251

Open
spy00798 opened this issue Jul 9, 2024 · 2 comments
Open

How to reduce the elapsed time on work to OpenCVFrameGrabber #2251

spy00798 opened this issue Jul 9, 2024 · 2 comments

Comments

@spy00798
Copy link

spy00798 commented Jul 9, 2024

This code is Take picture with camera connnected in PC.

private static FrameGrabber grabber = null;

grabber = OpenCVFrameGrabber.createDefault(0);
                grabber.setImageWidth(1280);
                grabber.setImageHeight(720);
                grabber.start();
                if (grabber == null) {
                    return null;
                }
                frame = grabber.grab();
                FrameConverter converter = new Java2DFrameConverter();

                BufferedImage img = (BufferedImage) converter.convert(frame);

but this code running time is 13sec.
I want reduce time in 5sec.
Why spend time too long and What can I do?

@saudet
Copy link
Member

saudet commented Jul 9, 2024

Java2DFrameConverter is quite slow, don't use that

@spy00798
Copy link
Author

spy00798 commented Jul 9, 2024

Java2DFrameConverter is quite slow, don't use that

but I need Frame convert to JPG Image. and VideoInputFrameGrabber is run fast but it's could not running by using SVP-USB500W02M device (maybe other also)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants