Skip to main content

A camera widget for qt GUIs using qtpy

Project description

Early stage Qt widget for monitoring cameras at NSLS-II

This is a simple Qt-based widget for monitoring a camera on the network, and performing some overdrawing of the images. It is still subject to change.

It depends upon qtpy which needs PySide2 or PyQt5 in order to show anything.

This currently expects a network endpoint that offers a single JPEG file, which it will use to download from periodically. Things like the FFMPEG plugin for the area detector and the AXIS webcams support this. Likely soon I will add support for the MJPEG stream that is offered by some of the cameras for more efficient data streaming from the cameras.

Expected camera urls/endpoints:

  • Endpoints that offer single JPEG files that are downloaded periodically based on frame rate
  • MJPEG stream (URL must end with mjpg or cgi)

Installation and usage

As of v0.0.2 the widget is not pip installable.

To use clone the repo and run either of the 2 apps developed that use the widget python main.py - Shows a grid of camera feeds python monitor.py - Shows a grid of camera feeds as thumnails which can be clicked to shown on the "main" camera feed. Sort of like a Master Control in TV stations

Plugins API

A number of plugins have been developed to allow each instance of the QMicroscope camera to have it's own set of features as defined by the application. Plugins defined for the two implemented apps are as follows:

main.py

  • Record plugin (alpha testing)
    • Allows user to record video feed into MJPG format

monitor.py

Main camera feed

  • Crosshair plugin
    • Draws a crosshair with a specific color and position
    • Option available to always center the crosshair regardless of size of image
  • Grid plugin
    • Draws a grid with specified number of rows and columns
    • Options to change color, hide or show grid and selector
  • Scale plugin
    • Draws a scale in the x-y direction
    • Options to change color, location, text shown on each axis and toggle visibility
  • Crop plugin
    • Crop the video feed to a specific area
  • Preset plugin
    • Allows settings of other plugins to be named and saved
    • Settings can be restored at any point

Thumbnail camera feed

  • Toggle plugin
    • Adds a checkbox to the camera feed that will pause or resume the video feed

Plugin API

Instructions to write your own plugin, coming soon (checkout the plugins folder)

Project details


Download files

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

Source Distribution

qmicroscope-0.0.4.tar.gz (245.3 kB view details)

Uploaded Source

Built Distribution

qmicroscope-0.0.4-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file qmicroscope-0.0.4.tar.gz.

File metadata

  • Download URL: qmicroscope-0.0.4.tar.gz
  • Upload date:
  • Size: 245.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for qmicroscope-0.0.4.tar.gz
Algorithm Hash digest
SHA256 29aca2e298bd5a78cdc4b7f43b7155ece5a5945a9f03fd010b67da34c23a3748
MD5 36fbe77aa39c9b230e0a577697d1470b
BLAKE2b-256 d9eb3885c3a1e31daa02dda6ab9b59ce899b18c5fcc5956e3b99cf29113b79bf

See more details on using hashes here.

Provenance

File details

Details for the file qmicroscope-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for qmicroscope-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3428a5cb0e65155317b55e9584bf9cb05bdb6742baffda49a18ef1bd85a68884
MD5 61bc91fbaffc1cc7f1db107b00499ce2
BLAKE2b-256 ba629559a6275ddb2cf3d53a1cbb1629a6f4314772ebd08325df176f033d682e

See more details on using hashes here.

Provenance

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