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

Camera scaling #157

Open
SkidrowH opened this issue Mar 8, 2024 · 1 comment
Open

Camera scaling #157

SkidrowH opened this issue Mar 8, 2024 · 1 comment

Comments

@SkidrowH
Copy link

SkidrowH commented Mar 8, 2024

Hello.

As I understand the camera code currently selects the highest resolution which fits the screen instead of selecting highest that the camera supports and scaling it down. Issue with it is that my cameras full resolution is 1920x1080 but my screen resolution is 1024x600 which basically means that the code currently selects 640x480 and I only get a small part of the camera display.

Right now I'm using v4l2loopback to create a fake video device where I set the fake video device resolution a bit smaller than code selects as display resolution and use command gst-launch-1.0 v4l2src device=/dev/video0 ! "image/jpeg,width=1920,height=1080,framerate=25/1" ! jpegdec ! videoconvert ! videoscale ! tee name=t ! queue ! v4l2sink device=/dev/video5 to take camera full resolution and scale it down to fake video device sinks resolution. As the application also uses gstreamer pipeline I thought that maybe it could be done in code also.

I might have this issue because I use a AHD to USB converter board and digital cameras might do their own scaling if you select a lower resolution.

@rsjudka
Copy link
Contributor

rsjudka commented Apr 2, 2024

hmm yeah I can see how that's unoptimal here.. definitely something we'll want to look into!

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