Skip to content
Update getting started with image streams authored by Vsevolod Vlaskine's avatar Vsevolod Vlaskine
......@@ -192,6 +192,37 @@ It would look as following (press ctrl-c, when you want to stop):
Depending on your desired video quality, frame rate, compression, etc, you might need to change the command line parameters of **ffmpeg**. Sometimes it's not easy, but there is a lot of **ffmpeg** online documentation, Q&A, recipes, etc.
## cv-cat log: image stream logging
One **cv-cat** filter worth mentioning is **log**. E.g. if you want to log your camera feed in the current directory, you could run for some 20 seconds and then press **ctrl-c**:
```
> cv-cat --camera "log=.,period:10;null"
```
You will see in your current directory a couple of files named as something like:
```
> ls
20201121T110413.284712.bin 20201121T110423.380330.bin
```
Each file will contain 10 seconds-worth image data starting from the time as in the file name.
Further, try to run for some 20 seconds and then press **ctrl-c**:
```
> cv-cat --camera "log=.,period:10,index;null"
> ls
20201121T110831.643421.bin 20201121T110841.736154.bin index.bin
> cat index.bin | csv-from-bin t,uw,ul | head -n4
20201121T110831.643421,0,0
20201121T110831.687222,0,921620
20201121T110831.757203,0,1843240
20201121T110831.826652,0,2764860
```
**index.bin** allows conveniently search specific frames or frame ranges in the log files. For each logged frame, the **index.bin** file record contains frame timestamp, number of the log file in which it can be found and offset from the beginning of the file in bytes.
For more logging options, see **cv-cat --help --verbose**; look for **log=**.
**snark** has other camera data acquisition utilities like **fire-cat** for firewire cameras. They comply with **snark** image format. Or you can write your own camera data acquisition utility. If your utility outputs raw image data or implements **snark** image data format, it can be seamlessly used with **cv-cat** and other **snark** image utilitities.
It writes image stream into files based on
# **cv-calc**: more image manipulations
**cv-cat** essentially deals with image filter pipelines, i.e. for each input image there is exactly one output image.
......@@ -199,13 +230,11 @@ Depending on your desired video quality, frame rate, compression, etc, you might
**cv-calc** has operations for cropping, regions of interest, primitive drawing, equirectangular map generation, striding, thinning, etc.
See **cv-calc --help --verbose** for details and meanwhile try **cv-calc life** which runs a generalised version of [game of life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) on an arbitrary seed image.
See **cv-calc --help --verbose** for details and meanwhile try for fun **cv-calc life** which runs a generalised version of [game of life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) on an arbitrary seed image.
```
> cv-cat --file cat.jpg "resize=64,64" | cv-calc life --procreation 3 --stability 5.255 --step 0.02 | cv-cat "invert;resize=512,512,lanczos4;count;view;null"
```
## logging
todo
# converting images from/to csv
## image-from-csv
......
......