开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: OT (slightly) Crosshair for camera on homebrew Pick&Place


 

Using ffplay, part of the ffmpeg software, you can overlay a "grid" centered at the, err, center, of your live video, if the grid cell is large enough you will result in just vertical line and a horizontal line passing through that center point.

Something like this, here x and y are the calculated center point, w and h are the size of the cells, which are larger than the video input size, and t is the thickness

? ? ffplay -i inputvideo.mkv -vf drawgrid=x=320:y=220:w=1000:h=1000:t=5

ffplay (and ffmpeg) can stream from a connected webcam on linux using vl2 -?

So, the command for doing it live might be something like?this I think (I don't have a webcam to try)

? ? ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0? -vf drawgrid=x=320:y=220:w=1000:h=1000:t=5


On Fri, 13 May 2022 at 04:27, David Slipper <softfoot@...> wrote:

Hi, I have built a manual pick and place system that gets around my
rather unsteady hands (the indignities of age) and have a USB microscope
mounted on it to provide a means of aiming, but I need some sort of
cross-hair to help.

I have found PixMicro which works well but only under Windows.

Ideally, I want to use a Raspberry Pi 4 with (ideally) Ubuntu to display
the camera output.

Can anyone suggest a Linux webcam viewer that has a cross-hair facility ??

Regards,
Dave







Join [email protected] to automatically receive all group messages.