Skip to content
Update getting started with image streams authored by Vsevolod Vlaskine's avatar Vsevolod Vlaskine
......@@ -204,7 +204,27 @@ See **cv-calc --help --verbose** for details and meanwhile try **cv-calc life**
```
# converting images from/to csv
...
# image-from-csv
You can create images from [**csv** or binary fixed-width data](https://gitlab.com/orthographic/comma/-/wikis/csv/getting-started:-basic-data-manipulations,-ascii-and-binary-data) where each input record would represent a pixel.
```
> cat <<eof | image-from-csv --fields x,y,r,g,b --output "rows=8;cols=8;type=3ub" | cv-cat "resize=512,512,nearest;view=stay;null"
3,3,255,0,0
3,4,0,255,0
4,4,0,0,255
eof
```
For an image stream, specify **block** field (since we are using **view=stay**, press a key to go to the next image):
```
> cat <<eof | image-from-csv --fields block,x,y,r,g,b --output "rows=8;cols=8;type=3ub" | cv-cat "resize=512,512,nearest;view=stay;null"
0,3,3,255,0,0
0,3,4,0,255,0
0,4,4,0,0,255
1,2,1,255,255,0
1,2,2,255,255,0
1,2,3,0,255,255
eof
```
# links to more (potentially unmaintained) documentation elsewhere:
- [https://github.com/acfr/snark/wiki/get-started-with-image-data](https://github.com/acfr/snark/wiki/get-started-with-image-data)
......
......