pageauc / speed-camera

A Unix, Windows, Raspberry Pi Object Speed Camera using python, opencv, video streaming, motion tracking. Includes a Standalone Web Server Interface, Image Search using opencv template match and a whiptail Admin Menu Interface Includes picam and webcam Plugins for motion track security camera configuration including rclone sync script. watch-app allows remotely controller camera configuration from a remote storage service name. Uses sqlite3 and gnuplot for reporting. Recently added openalpr license plate reader support.
Apache License 2.0
983 stars 172 forks source link

Libcamera Support #93

Closed smyers75 closed 3 years ago

smyers75 commented 3 years ago

All of the new Higher Resolution Raspiberry Pi4 Cameras use Libcamera and do not support RaspiVid or RaspiStill Is there any chance of getting Speed Camera to work with Libcamera?

Example is the new ArduCam Pivariety IMX298 21MP and 16MP Cameras Neither of these new cams currently work with Speed Camera

It would be an extra nice feature to be able to capture the license plate of the Speeders in the photo, but a higher resolution Camera would need support.

pageauc commented 3 years ago

Speed camera supports USB cameras, IP Cameras through opencv and pi-camera modules through pi-camera python library

Best performance is with a 320x240 image stream image size. Using an expensive camera module with limited software support seems like a lot of work for little gain when you can just use a relatively cheap rpi camera module supported by python pi-camera software or and inexpensive USB or IP camera. I did look at the https://libcamera.org/index.html

https://www.raspberrypi.org/forums/viewtopic.php?t=273018&start=25

That said if the arducam is supported by opencv or can be configured as an IP camera, then speed camera should work.

On Sat, Jun 26, 2021 at 10:34 PM smyers75 @.***> wrote:

All of the new Higher Resolution Raspiberry Pi4 Cameras use Libcamera and do not support RaspiVid or RaspiStill Is there any change of getting Speed Camera to work with Libcamera?

Example is the new ArduCam Pivariety IMX298 21MP and 16MP Cameras Neither of these new cams currently work with Speed Camera

It would be an extra nice feature to be able to capture the license plate of the Speeders

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pageauc/speed-camera/issues/93, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNPKZCPIZKTFZKDX2S5OMLTU2E4HANCNFSM47L5VVXA .

-- YouTube Channel at https://www.youtube.com/user/pageaucp http://www.youtube.com/user/pageaucp GitHub Repository at https://github.com/pageauc

smyers75 commented 3 years ago

Sorry, I know "Github Issues" is not a discussion forum, but I'm unsure where else to say this. Thank you for taking the time to look into libcamera as it seems pi is heading to it because it is open, unlike MMAL/picamera Maybe the best solution for capturing details of excessively speeding vehicles would be two cameras, one at 320x240 to capture/log the speed of the object and another that is triggered by a setpoint to capture a HiRes photo of what just happened. (or maybe the HiRes comes 1st, then is overwritten if not past setpoint.)

pageauc commented 3 years ago

It takes a few seconds for a camera to warm up. If switching from a stream to camera still mode maybe 1-2 seconds to ensure camera can get white balance.

I have written a program called panopi https://github.com/pageauc/panopi that can simultaneously take multiple hi res images on multiple pi-camera RPI's. I have used up to five.. A message is sent to each pano camera to schedule the next timelapse event. Once taken, images are sent back to a hub via zmq transmission protocol. Hub can be one of the camera RPI's or a separate computer. The Hub then stitches the images into a panorama image. Taking images simultaneously means moving objects don't cause a problem. Triggering could also be by remote gpio, physical gpio or some other network messaging. I liked zmq. Anyway A similar setup can control one or more computers to trigger a hires image and send it back if required. You would need to trigger on the first motion track event to allow time for camera warmup. There are also RPI camera modules that allow connecting multiple pi cameras. You could also just connect multiple USB camera or trigger a regular camera via serial connection if supported.

I just program as one of my retirement pastimes for fun.. Taught myself python but did have a background in C,, Pascal,, Basic, bash,, Etc. I like python but sometimes you love to hate it. Claude ...

On Sun, Jun 27, 2021 at 1:02 PM smyers75 @.***> wrote:

Closed #93 https://github.com/pageauc/speed-camera/issues/93.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pageauc/speed-camera/issues/93#event-4944130896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNPKZDIEOK34KP5VGIYIR3TU5KTZANCNFSM47L5VVXA .

-- YouTube Channel at https://www.youtube.com/user/pageaucp http://www.youtube.com/user/pageaucp GitHub Repository at https://github.com/pageauc