Skip to main content

Composition of scripts to control a web camera

Project description

Project flashcam

FLASk powered Hybrid webCAM

IN DEVELOPMENT

Why

Because any idea can be implemented in the code without a dependence on a closed source. And there are few ideas implemented by now.

Start

Production web interface:

export PATH=$PATH:$HOME/.local/bin
export DISPLAY=:0
killall -9 gunicorn
$( sleep 5;flashcam ask;)&
flashcamg

Just run on local network, force a port 8000

export PATH=$PATH:$HOME/.local/bin
flashcam flask -n 8000 # -p  00.0-usb-0:1.3:1.0

Select a camera

If there are two or more connected, try flashcam ls and select a proper IDpath like flashcam flask -p 00.0-usb-0:1.3:1.0.

It is possible to run with two cameras, but with local network mode and pay attention to MJPG pixelformat and using different ports.

When config is already fine-tuned for something else

Deactivate blur, accumulate, threshold, telegram, set basic resolution, another port:

flashcam flask -p clock -a 10 -b 3  -r 640x480 -n 5000 -j False -t 0 -a 0 -b 1

Config

Located at $HOME/.config.flashcam/cfg.conf it allows to setup basically everything.

A lot of options is possible to set and override from commandline.

Basic scenarios

Just use

Probably the option 'PIXELFORMAT':'MJPG' to read physical camera as mjpg is fine.

High quality

When trying e.g. for astrophotography, you may prefer 'PIXELFORMAT':'YUYV' to read camera without artifacts. While it works for 640x480, this may not be possible for higher resolution.

Motion detection

Technical details

  • web.py module is the one that is called by gunicorn and provides the interface. See frames(), where Camera() class (defined in realcamera.py) is called first.

Usage

See README.howto.org

Some references that may or may not be related

https://longervision.github.io/2017/03/12/ComputerVision/OpenCV/opencv-external-posture-estimation-ArUco-board/

https://github.com/LongerVision/Examples_OpenCV/blob/master/01_internal_camera_calibration/chessboard.py

https://markhedleyjones.com/projects/calibration-checkerboard-collection

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flashcam-1.11.57.tar.gz (2.6 MB view details)

Uploaded Source

File details

Details for the file flashcam-1.11.57.tar.gz.

File metadata

  • Download URL: flashcam-1.11.57.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for flashcam-1.11.57.tar.gz
Algorithm Hash digest
SHA256 3e25a0ed2d4ab1a4499811c8104c332a4e86e263593c5311fb60da49c5f5b507
MD5 6df244e1d8815126c6c1f89cdc8d0374
BLAKE2b-256 bf49ea94fa1e2bdb77d514202b7515c738e42d3a1d2b453641909b1e467bec9d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page