Skip to main content

Blinky Tools

This package contains a number of tools to work with Blinkies, small sound-to-light conversion sensors.

Install

pip install blinkytools

Use the GUI

The GUI can be used to record Blinky signals on live data by providing the identifier of the video stream

python -m blinkytools -v <video_stream>

or from a file by providing a file name

python -m blinkytools -v <video_filename>

When called without argument, the default video stream is used.

The GUI can also be used with a Shodensha DN3V-130BU industrial camera, but this requires to install the driver and python bindings for the driver from here.

python -m blinkytools -i

Preview the content of a file

The package can also be used to preview the content of a file recorded using the GUI.

python -m blinkytools.file_preview <filename>

Open file from within Python

The file format is MessagePack and can thus be read by any appropriate software package. The content is as follows:

  • Software version
  • File creation date
  • Framerate of the signal
  • A dictionary of extra metadata
  • The Blinky signals stored as a binary data array

This is an example of script that opens a Blinky file.

from blinkytools import BlinkyFile

# open the file and load the content
filename = "myfile.blinky"
content = BlinkyFile.load(filename)

print("Software version used:", content.version)
print("Framerate:", content.fps)
print("File created on:", content.creation)
print("Dictionary of extra metadata:", content.metadata)

# The Blinky signal are in the data attribute
print("The data shape and type:", content.data.shape, content.data.dtype)

The dimension of the content.data array is as follows.

  • For monochrome cameras, the array has 4 dimensions, with shape == (n_time, n_blinkies, h_patch, w_patch), where n_time and n_blinkies are the number of frames and Blinky sensors, respectively. The data is exctraced in small patches of h_patch x w_patch around the Blinky locations.
  • For color cameras, the array has 5 dimensions, with shape == (n_time, n_blinkies, h_patch, w_patch, n_colors), where n_colors is the number of color channels.

Note on storage of Numpy arrays in MessagePack

When using the BlinkyFile class, the signals are automatically transformed into numpy.ndarray. The arrays are stored in MessagePack format as the following dictionary:

{
  "__nd__": True,  # indicates this is a numpy ndarray
  "shape": obj.shape,  # shape of the array
  "dtype": obj.dtype.str,  # numeric type of the data
  "data": obj.tobytes(),  # the data as a byte array
}

Note that this information is only needed if dealing with the content of the file directly.l When using blinkytools, the conversion is transparent.

Metadata

Release files for blinkytools 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blinkytools 0.0.5
File Size Uploaded Provenance Actions
blinkytools-0.0.5.tar.gz 18.7 kB Without provenance Details for blinkytools-0.0.5.tar.gz

Release files / blinkytools-0.0.5.tar.gz

Download URL blinkytools-0.0.5.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
627b7b23ce96536544dedd9b28e7b3f7b3776b98989632676947e8db7e1b71fa
BLAKE2b-256 checksum
How to use checksums
38597ffa891b4799a9842694b49467fc114aae6e31571479a9cc318561d04df1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.0

Security for blinkytools 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page