Skip to content

Commit

Permalink
add Fp32ToUInt16 node
Browse files Browse the repository at this point in the history
  • Loading branch information
anuejn committed Nov 4, 2023
1 parent 3ec09f1 commit 273ebd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ Some Nodes e.g. `RawBlobReader` or `RawDirectoryReader` need to know how to inte

These parameters only specify the interpretation but no conversions. So if you want to get an RGB image from a Bayer source you still need to take care of conversion with a `Debayer` node in between.

### DNG output
In the pipeline of the AXIOM raw recorder, sometimes images in floating point format can occur
(for example when averaging multiple frames). Although the DNG specification specifies floating
point DNG files, not a lot of software actually supports it. To avoid issues with downstream
processing software you can convert your data to uint16 before writing DNG files. Example:

```shell
$ target/release/cli from-cli RawBlobReader --fp32 --width 3840 --height 2160 --bayer GBRG --file Halogen_Xrite_0_8ms.raw32 ! Fp32ToUInt16 --multiplier 16 ! CinemaDngWriter --path out
```

## Examples

Convert a directory of raw12 files from the Beta to mp4 (h264) using FFmpeg:
Expand Down
2 changes: 2 additions & 0 deletions src/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::{
//average::Average,
benchmark_sink::BenchmarkSink,
dual_frame_raw_decoder::{DualFrameRawDecoder, ReverseDualFrameRawDecoder},
fp_to_uint::Fp32ToUInt16,
//sz3::SZ3Compress,
zstd::ZstdBlobReader,
},
Expand Down Expand Up @@ -98,4 +99,5 @@ generate_dynamic_node_creation_functions![
FfmpegWriter,
CinemaDngFrameserver,
NullFrameSource,
Fp32ToUInt16,
];
1 change: 1 addition & 0 deletions src/nodes_cpu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ pub mod benchmark_sink;
pub mod bitdepth_convert;
pub mod dual_frame_raw_decoder;
//pub mod sz3;
pub mod fp_to_uint;
pub mod zstd;

0 comments on commit 273ebd2

Please sign in to comment.