name-value-apply is a thin wrapper around
name-value-convert --take-last functionality. It takes multiple configuration files in command line and takes only the value of last occurrence of each name in all the files.
This allow to consistently combine a bunch of configuration files; for example, you may have a default configuration file for your device, then a file with some settings customised, etc.
math-array utility in snark is a trivial wrapper for a range of numpy array operations. the main purpose of math-array is to easily run array operations on streams of data compatible with the csv-style utilities in comma and snark.
math-array does not attempt to substitute numpy functionality. If you need something customised, just write your own python code as usual.
Currently, it exposes three operations:
- (relatively) arbitrary numpy array operation
(Relatively) arbitrary numpy array operation
See math-array --help for more details.
Among all, csv-paste can number lines of its output. Now, individualised parameters have been added, if there are several instances of line-number in command line parameters. Examples:
As other comma utilities, all the operations csv-paste can operate on ascii or binary data. See csv-paste --help for more configuration possibilities.
csv-thin thins down high bandwidth data by a given rate.
A new option,
--period, allows you to specify the period of output, regardless of the rate of the input data (assuming that it's at least as fast as the desired output rate).
csv-paste for a high-rate input source you can try it with:
By default it uses wall-clock time for clocking the data. Alternately, and useful with pre-captured data, you can use a time field in the data:
Multiple rectangular regions can be specified in
roi operation of
cv-calc (like the
draw operation), so that:
- everything outside these regions in the input images is set to zero, or
- these regions are cropped out of input images into separate images (the arguments prefixed to input will be removed).
All images in the input stream must have same number of regions. Any region with zero width or height (e.g. 0,0,0,0) will be ignored and, if needed, can be used so that all images have same number of regions.
If all the bounding boxes for an image have zero area, then the whole image will be set to zero
To try following examples, download this image.
If you are putting together a training dataset for classification or object detection, you may need to create a uniformly distributed random selection of image crops from your image data.
The following pipeline helps you to do it. It picks random images, cuts 4 random patches of size 300x200 from each of them, and saves them as png files in the current directory.
(Note: index parameter in file=png,,index is required, because otherwise the filenames for the patches cut out of the same image would have different filenames.)
See cv-calc --help for more configuration options.
To recap: io-cat is a utility extending cat functionality towards merging live streams. io-cat semantics is the same as cat on files, but it can merge streams, too, e.g. merge three streams:
It supports a couple of simple merge policies: first come first serve by default, or round robin: e.g. try:
Now, io-cat also can wait for publishing servers to start, using io-cat --connect-attempts option, e.g:
See io-cat --help for more configuration options.
Last but not least, broadly, the right approach to persistent clients would be using a publish/subscribe middleware, of your liking. ZeroMQ is a light-weight choice (and comma zero-cat supports a core subset of it). However, if you just want to quickly cobble together simple merging of multiple streams, potentially from heterogeneous sources, io-cat is there for you.