@@ -204,7 +204,9 @@ See **cv-calc --help --verbose** for details and meanwhile try **cv-calc life**
```
# converting images from/to csv
# image-from-csv
## image-from-csv
You may have data, e.g. cartesian 3D points or heatmaps, that you would like to convert into images.
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.
@@ -225,6 +227,34 @@ For an image stream, specify **block** field (since we are using **view=stay**,
1,2,3,0,255,255
eof
```
## image-to-csv
Rather than performing operations on images, you might need to handle individual pixels, e.g. project them into the 3D space. Use **image-to-csv**, e.g. try:
```
> cv-cat --file cat.jpg | image-to-csv | head -n4
20201120T104314.416482,0,0,49,57,26
20201120T104314.416482,1,0,50,58,27
20201120T104314.416482,2,0,47,55,25
20201120T104314.416482,3,0,48,55,28
```
The fields of the output records are: timestamp; x, y pixel coordinates, and RGB channels, if the image is a 3-channel RGB.