Comments (3)
Currently there's no configuration for this, but if you edit the x/y values in screenQuad and overlayQuad in cam_overlay.c you should be able to adjust the position on screen.
https://github.com/meekys/cam_overlay/blob/master/cam_overlay.c#L264
Values are x, y, z, u, v for each line and the x/y values range from -1.0 for far left/top to 1.0 for far right/bottom
ie. This should display an image half the size in the middle of the screen
static GLfloat screenQuad[4][5] = { // x, y, z, u, v
{-0.5f, 0.5f, 0.0f, 0.0f, 0.0f}, // Top left
{-0.5f, -0.5f, 0.0f, 0.0f, 1.0f}, // Bottom left
{ 0.5f, 0.5f, 0.0f, 1.0f, 0.0f}, // Top right
{ 0.5f, -0.5f, 0.0f, 1.0f, 1.0f} // Bottom right
};
After these changes you will need to re-run make
from cam_overlay.
Thanks I had tried this before and by change resolution of input but problem is somewhere else.
Picture looks like stretched to 4:3 format and bottom part is cutted from picture.
Ratio change in the code did not help too.
from cam_overlay.
What resolutions are shown on startup for the cam/display?
Dimensions: 720 x 480 Pixel Format: YUYV
Opened screen 0 @ 1920 x 1200
What resolutions are available?
v4l2-ctl --list-formats-ext
Does capturing an image using fswebcam or any other v4l2 capable software you've got installed also crop the image?
fswebcam --no-banner -S 100 image.jpg
You might also be able to fiddle with this line to adjust the display ratio, but it sounds like you've already tried this? By default it should stretch the image to the screen dimensions. If you set this to 1, it should appear as a square image.
https://github.com/meekys/cam_overlay/blob/master/cam_overlay.c#L290
from cam_overlay.
Related Issues (20)
- Able to make a screenshot? HOT 1
- * failed to add service - already in use? when using dtoverlay=vc4-fkms-v3d HOT 2
- VIDIOC_REQBUFS error 12 when firing cam_overlay HOT 7
- [RPI][X11] Compile failure HOT 2
- split screen front and rearview HOT 4
- Possible to add option without guidelines HOT 4
- add button to change camview? HOT 1
- overlay.png is forced rendered in perspective HOT 4
- in cpp branch -u and --userp dont work HOT 2
- DisplayBCM error in CPP branch using RCA output HOT 8
- No issue: made a script to switch cameras and a new overlay HOT 1
- dependencies to run cam_overlay.bin HOT 5
- Stretch doesn't work with video input mjpeg HOT 3
- Possible to add speed detection/distance meter? HOT 1
- Can't get it work on RPI4 buster/crankshaft, help HOT 8
- Cannot compile on raspberry pi due to conflict between gl and gles2
- * failed to add service - already in use? HOT 4
- Crankshaft black screen HOT 10
- can't build cpp branch
- Another Crankshaft related issue about cam_overlay on Pi 3 model B and Pi 4B HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cam_overlay.