EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: USB V4L2 driver camera
From: "Palaha, Arvinder \(DLSLtd, RAL, LSCI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Mon, 11 Jan 2021 11:40:41 +0000
Hi Jakub, Michael,

these look great! I will set up a test for it (using a usb endoscope style camera) and report back.

Cheers!

Arvinder Palaha
Beamline Control Systems
DH G.63
T: +44-(0)1235-77-8137
E: arvinder.palaha at diamond.ac.uk


From: Michael Davidsaver <mdavidsaver at gmail.com>
Sent: 08 January 2021 16:58
To: Palaha, Arvinder (DLSLtd,RAL,LSCI) <arvinder.palaha at diamond.ac.uk>
Cc: tech-talk <tech-talk at aps.anl.gov>
Subject: Re: USB V4L2 driver camera
 
On 1/8/21 6:59 AM, Palaha, Arvinder (DLSLtd, RAL, LSCI) via Tech-talk wrote:
> Dear tech-talk-ers,
>
> I'm having a look again at implementing controls for a usb camera using the v4l2 driver, and my approach is to use a python ioc to issue commands and set up and control an ffmpeg server, and hopefully pipe in the video stream into areaDetector/AD. I think this seems reasonable, but if there are better approaches, I'd be eager to hear them 🙂
>
> Looking back through the archive, it seems this was looked at in 2014, and potentially before then also. Has there been any progress on this topic since then?
>
> If/when I do get this running, I'll post on here about it as it seems it'd be useful.
>
> Wishing everyone good health and happy new year,


I've uploaded a small project I did ~2 years ago.  It reads frames from
a V4L2 device, and publishes them with PV access (as an NTNDArray).
This can be viewed directly with eg. cs-studio or pydm.  It can also
be read into areaDetector with the PVA client camera driver.

https://github.com/mdavidsaver/p4pvid

Big caveat.  This was a weekend project which has only been tested with
laptop webcams.  It supports only a limited number of color modes
(GRAY, YUYV, and a few others untested).

Still, it should at least be easy to test.

> git clone https://github.com/mdavidsaver/p4pvid
> cd p4pvid
> virtualenv -p python3 env
> . env/bin/activate
> python -m pip install -r requirements.txt
> python setup.py build_ext -i

> python -m p4pvid /dev/video0 vidpv

Then you can eg. point a cs-studio/phoebus image widget at "pva://vidpv".

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


References:
USB V4L2 driver camera Palaha, Arvinder (DLSLtd, RAL, LSCI) via Tech-talk
Re: USB V4L2 driver camera Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: RE: Can't enable custom frame rates for a basler camera in area detector Abdalla Ahmad via Tech-talk
Next: can't readable 'arduino.proto' in 'helloWorldIOCApp/Db' Andrea Solano via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: USB V4L2 driver camera Michael Davidsaver via Tech-talk
Next: Thorlabs motor controller Siddons, David via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 11 Jan 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·