From 4a2ebf8d53cd5a8f6af3eebd14b998b6a6f1e695 Mon Sep 17 00:00:00 2001 From: Kmeid Saad Date: Thu, 19 Nov 2020 17:14:16 +0100 Subject: [PATCH 1/6] Extend CameraSensorViewConfiguration formats Updated CameraSensorViewConfiguration Message extended the channel formats and added several fields to CameraSensorViewConfiguration. Updated field numbers to ensure backward compatibility. Signed-off-by: Kmeid Saad --- osi_sensorviewconfiguration.proto | 111 ++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 6 deletions(-) diff --git a/osi_sensorviewconfiguration.proto b/osi_sensorviewconfiguration.proto index 0e133b2b1..ed781943f 100644 --- a/osi_sensorviewconfiguration.proto +++ b/osi_sensorviewconfiguration.proto @@ -686,7 +686,7 @@ message CameraSensorViewConfiguration // optional uint32 number_of_pixels_vertical = 7; - // Format for image data (includes number, kind and format of channels). + // Format for image data (includes number, kind and format of channels). // // In the message provided by the sensor model, this field can // be repeated and all values are acceptable to the model, with @@ -701,7 +701,7 @@ message CameraSensorViewConfiguration // cannot provide image data in one of the requested formats. // // \rules - // is_greater_than_or_equal_to: 1 + // is_greater_than_or_equal_to: 1 // \endrules // repeated ChannelFormat channel_format = 8; @@ -752,27 +752,126 @@ message CameraSensorViewConfiguration // CHANNEL_FORMAT_RGB_F32_LIN = 9; - // Bayer RGGB Channels UINT8 FP Linear. + // Bayer BGGR Channels UINT8 FP Linear. // CHANNEL_FORMAT_BAYER_BGGR_U8_LIN = 10; - // Bayer RGGB Channels UINT16 FP Linear. + // Bayer BGGR Channels UINT16 FP Linear. // CHANNEL_FORMAT_BAYER_BGGR_U16_LIN = 11; - // Bayer RGGB Channels UINT32 FP Linear. + // Bayer BGGR Channels UINT32 FP Linear. // CHANNEL_FORMAT_BAYER_BGGR_U32_LIN = 12; - // Bayer RGGB Channels Single Precision FP Linear. + // Bayer BGGR Channels Single Precision FP Linear. // CHANNEL_FORMAT_BAYER_BGGR_F32_LIN = 13; + // Bayer RGGB Channels UINT8 FP Linear. + // + CHANNEL_FORMAT_BAYER_RGGB_U8_LIN = 14; + + // Bayer RGGB Channels UINT16 FP Linear. + // + CHANNEL_FORMAT_BAYER_RGGB_U16_LIN = 15; + + // Bayer RGGB Channels UINT32 FP Linear. + // + CHANNEL_FORMAT_BAYER_RGGB_U32_LIN = 16; + + // Bayer RGGB Channels Single Precision FP Linear. + // + CHANNEL_FORMAT_BAYER_RGGB_F32_LIN = 17; + + // Read Clear Clear Clear Channels UINT8 FP Linear. + // + CHANNEL_FORMAT_RCCC_U8_LIN = 18; + + // Read Clear Clear Clear Channels UINT16 FP Linear. + // + CHANNEL_FORMAT_RCCC_U16_LIN = 19; + + // Read Clear Clear Clear Channels UINT32 FP Linear. + // + CHANNEL_FORMAT_RCCC_U32_LIN = 20; + + // Read Clear Clear Clear Channels Single Precision FP Linear. + // + CHANNEL_FORMAT_RCCC_F32_LIN = 21; + + // Read Clear Clear Blue Channels UINT8 FP Linear. + // + CHANNEL_FORMAT_RCCB_U8_LIN = 22; + + // Read Clear Clear Blue Channels UINT16 FP Linear. + // + CHANNEL_FORMAT_RCCB_U16_LIN = 23; + + // Read Clear Clear Blue Channels UINT32 FP Linear. + // + CHANNEL_FORMAT_RCCB_U32_LIN = 24; + + // Read Clear Clear Blue Channels Single Precision FP Linear. + // + CHANNEL_FORMAT_RCCB_F32_LIN = 25; + + // TBD: Further channel permutations and padding (e.g. RGBZ, // BGR, BAYER_RGGB/GBRG/GRBG/...), non-BAYER filters, non-linear // encodings, ... } + // Number of samples per pixel. + // + // \note This is a characteristic of the ray tracing engine of the + // environment simulation, not a direct characteristic of the sensor. + // + // \rules + // is_greater_than_or_equal_to: 1 + // \endrules + // + optional uint32 samples_per_pixel = 9; + + // Maximum number of interactions to take into account. + // + // \note This is a characteristic of the ray tracing engine of the + // environment simulation, not a direct characteristic of the sensor. + // + // \rules + // is_greater_than_or_equal_to: 1 + // \endrules + // + optional uint32 max_number_of_interactions = 10; + + // In use-cases where a spectral ray-tracer is used, this message determines the range of the wavelength + // and its desired number of samples. + // + optional WavelengthData wavelength_data = 11; + + // \brief Detailed WavelengthRange message. + // + // Defines the start (minimum) and the end (maximum) values of the wavelength. + // Additionally, the number of samples within this range is defined in this message. + // + message WavelengthData + { + // The start, or the minimum, wavelength to be considered by the spectral ray tracer. + // + // Unit: nm + // + optional uint32 start = 1; + + // The end, or the maximum, wavelength to be considered by the spectral ray tracer. + // Unit: nm + // + optional uint32 end = 2; + + // Number of samples to be considered withing the defined wavelength range. + // + optional uint32 samples_number = 3; + } + // TBD: Optical (and other) effects to apply to image, etc. // } From abd2e5ba9a940c37cd7cf253af0497ddb33187f4 Mon Sep 17 00:00:00 2001 From: Kmeid Saad Date: Wed, 20 Jan 2021 07:38:23 +0100 Subject: [PATCH 2/6] Adjust wavelength data handling in CameraSensorViewConfiguration Changed wavelength_data field from optional to repeated, updated fields type under WavelengthData from uint32 to double and provided more description for samples_number. Signed-off-by: Kmeid Saad --- .gitignore | 1 + osi_sensorviewconfiguration.proto | 37 +++++++++++++++++-------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index de104d3fd..5b1593b8c 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ githooks/pre-commit # PyCharm specific files .idea +.vscode/settings.json diff --git a/osi_sensorviewconfiguration.proto b/osi_sensorviewconfiguration.proto index ed781943f..a8f379565 100644 --- a/osi_sensorviewconfiguration.proto +++ b/osi_sensorviewconfiguration.proto @@ -686,7 +686,7 @@ message CameraSensorViewConfiguration // optional uint32 number_of_pixels_vertical = 7; - // Format for image data (includes number, kind and format of channels). + // Format for image data (includes number, kind and format of channels). // // In the message provided by the sensor model, this field can // be repeated and all values are acceptable to the model, with @@ -701,7 +701,7 @@ message CameraSensorViewConfiguration // cannot provide image data in one of the requested formats. // // \rules - // is_greater_than_or_equal_to: 1 + // is_greater_than_or_equal_to: 1 // \endrules // repeated ChannelFormat channel_format = 8; @@ -784,35 +784,35 @@ message CameraSensorViewConfiguration // CHANNEL_FORMAT_BAYER_RGGB_F32_LIN = 17; - // Read Clear Clear Clear Channels UINT8 FP Linear. + // Red Clear Clear Clear Channels UINT8 FP Linear. // CHANNEL_FORMAT_RCCC_U8_LIN = 18; - // Read Clear Clear Clear Channels UINT16 FP Linear. + // Red Clear Clear Clear Channels UINT16 FP Linear. // CHANNEL_FORMAT_RCCC_U16_LIN = 19; - // Read Clear Clear Clear Channels UINT32 FP Linear. + // Red Clear Clear Clear Channels UINT32 FP Linear. // CHANNEL_FORMAT_RCCC_U32_LIN = 20; - // Read Clear Clear Clear Channels Single Precision FP Linear. + // Red Clear Clear Clear Channels Single Precision FP Linear. // CHANNEL_FORMAT_RCCC_F32_LIN = 21; - // Read Clear Clear Blue Channels UINT8 FP Linear. + // Red Clear Clear Blue Channels UINT8 FP Linear. // CHANNEL_FORMAT_RCCB_U8_LIN = 22; - // Read Clear Clear Blue Channels UINT16 FP Linear. + // Red Clear Clear Blue Channels UINT16 FP Linear. // CHANNEL_FORMAT_RCCB_U16_LIN = 23; - // Read Clear Clear Blue Channels UINT32 FP Linear. + // Red Clear Clear Blue Channels UINT32 FP Linear. // CHANNEL_FORMAT_RCCB_U32_LIN = 24; - // Read Clear Clear Blue Channels Single Precision FP Linear. + // Red Clear Clear Blue Channels Single Precision FP Linear. // CHANNEL_FORMAT_RCCB_F32_LIN = 25; @@ -847,7 +847,7 @@ message CameraSensorViewConfiguration // In use-cases where a spectral ray-tracer is used, this message determines the range of the wavelength // and its desired number of samples. // - optional WavelengthData wavelength_data = 11; + repeated WavelengthData wavelength_data = 11; // \brief Detailed WavelengthRange message. // @@ -858,18 +858,21 @@ message CameraSensorViewConfiguration { // The start, or the minimum, wavelength to be considered by the spectral ray tracer. // - // Unit: nm + // Unit: m // - optional uint32 start = 1; + optional double start = 1; // The end, or the maximum, wavelength to be considered by the spectral ray tracer. - // Unit: nm // - optional uint32 end = 2; + // Unit: m + // + optional double end = 2; - // Number of samples to be considered withing the defined wavelength range. + // Number of samples to be considered within the defined wavelength range. // - optional uint32 samples_number = 3; + // \note This defines the number of wavelengths to be computed during simulation, not to be confused with samples_per_pixel. + // + optional double samples_number = 3; } // TBD: Optical (and other) effects to apply to image, etc. From ab694217c218f8bee7985458b45ceeed53fa9760 Mon Sep 17 00:00:00 2001 From: Kmeid Saad Date: Fri, 5 Feb 2021 19:45:17 +0100 Subject: [PATCH 3/6] Factor WavelengthData out to osi_common.proto Moved WavelengthData to osi_comon.proto since it will be used by other osi messages like emmiting objects. Signed-off-by: Kmeid Saad --- osi_common.proto | 26 ++++++++++++++++++++++++++ osi_sensorviewconfiguration.proto | 28 +--------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/osi_common.proto b/osi_common.proto index f093193c2..4e5454911 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -491,3 +491,29 @@ message StatePoint // optional Orientation3d orientation = 3; } +// +// \brief Detailed WavelengthRange message. +// +// Defines the start (minimum) and the end (maximum) values of the wavelength. +// Additionally, the number of samples within this range is defined in this message. +// +message WavelengthData +{ + // The start, or the minimum wavelength value. + // + // Unit: m + // + optional double start = 1; + + // The start, or the minimum wavelength value. + // + // Unit: m + // + optional double end = 2; + + // Number of samples to be considered within the defined wavelength range. + // + // \note This defines the number of wavelengths to be computed during simulation, not to be confused with samples_per_pixel. + // + optional double samples_number = 3; +} \ No newline at end of file diff --git a/osi_sensorviewconfiguration.proto b/osi_sensorviewconfiguration.proto index a8f379565..bcdc82517 100644 --- a/osi_sensorviewconfiguration.proto +++ b/osi_sensorviewconfiguration.proto @@ -848,33 +848,7 @@ message CameraSensorViewConfiguration // and its desired number of samples. // repeated WavelengthData wavelength_data = 11; - - // \brief Detailed WavelengthRange message. - // - // Defines the start (minimum) and the end (maximum) values of the wavelength. - // Additionally, the number of samples within this range is defined in this message. - // - message WavelengthData - { - // The start, or the minimum, wavelength to be considered by the spectral ray tracer. - // - // Unit: m - // - optional double start = 1; - - // The end, or the maximum, wavelength to be considered by the spectral ray tracer. - // - // Unit: m - // - optional double end = 2; - - // Number of samples to be considered within the defined wavelength range. - // - // \note This defines the number of wavelengths to be computed during simulation, not to be confused with samples_per_pixel. - // - optional double samples_number = 3; - } - + // TBD: Optical (and other) effects to apply to image, etc. // } From b45d3b1606270bf5a675148de86098274a3ebe45 Mon Sep 17 00:00:00 2001 From: Kmeid Saad Date: Sat, 6 Feb 2021 12:04:14 +0100 Subject: [PATCH 4/6] Refine samples_number description for clarity Signed-off-by: Kmeid Saad --- osi_common.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osi_common.proto b/osi_common.proto index 4e5454911..d38436155 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -512,7 +512,7 @@ message WavelengthData optional double end = 2; // Number of samples to be considered within the defined wavelength range. - // + // The number of samples includes the start and the end values that are defined in this message, starting from the "start" value. // \note This defines the number of wavelengths to be computed during simulation, not to be confused with samples_per_pixel. // optional double samples_number = 3; From 3a78b2b087642c76fa84bd5a99c985b0226e3005 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Sat, 6 Feb 2021 12:21:54 +0100 Subject: [PATCH 5/6] Fix newline and rule issues, slight reformat Signed-off-by: Pierre R. Mai --- osi_common.proto | 3 +- osi_sensorviewconfiguration.proto | 61 ++++++++++++++----------------- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/osi_common.proto b/osi_common.proto index d38436155..8fa113c73 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -516,4 +516,5 @@ message WavelengthData // \note This defines the number of wavelengths to be computed during simulation, not to be confused with samples_per_pixel. // optional double samples_number = 3; -} \ No newline at end of file +} + diff --git a/osi_sensorviewconfiguration.proto b/osi_sensorviewconfiguration.proto index bcdc82517..3df348a54 100644 --- a/osi_sensorviewconfiguration.proto +++ b/osi_sensorviewconfiguration.proto @@ -706,6 +706,34 @@ message CameraSensorViewConfiguration // repeated ChannelFormat channel_format = 8; + // Number of samples per pixel. + // + // \note This is a characteristic of the ray tracing engine of the + // environment simulation, not a direct characteristic of the sensor. + // + // \rules + // is_greater_than_or_equal_to: 1 + // \endrules + // + optional uint32 samples_per_pixel = 9; + + // Maximum number of interactions to take into account. + // + // \note This is a characteristic of the ray tracing engine of the + // environment simulation, not a direct characteristic of the sensor. + // + // \rules + // is_greater_than_or_equal_to: 1 + // \endrules + // + optional uint32 max_number_of_interactions = 10; + + // In use-cases where a spectral ray-tracer is used, this message + // determines the range of the wavelength and its desired number + // of samples. + // + repeated WavelengthData wavelength_data = 11; + // Channel format. // enum ChannelFormat @@ -816,41 +844,8 @@ message CameraSensorViewConfiguration // CHANNEL_FORMAT_RCCB_F32_LIN = 25; - - // TBD: Further channel permutations and padding (e.g. RGBZ, - // BGR, BAYER_RGGB/GBRG/GRBG/...), non-BAYER filters, non-linear - // encodings, ... } - - // Number of samples per pixel. - // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. - // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules - // - optional uint32 samples_per_pixel = 9; - - // Maximum number of interactions to take into account. - // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. - // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules - // - optional uint32 max_number_of_interactions = 10; - - // In use-cases where a spectral ray-tracer is used, this message determines the range of the wavelength - // and its desired number of samples. - // - repeated WavelengthData wavelength_data = 11; - // TBD: Optical (and other) effects to apply to image, etc. - // } // From 2b4fda22ecf9248c5f1533e3354e6397cef0f593 Mon Sep 17 00:00:00 2001 From: Kmeid Saad Date: Thu, 11 Feb 2021 13:39:12 +0100 Subject: [PATCH 6/6] Fix documentation of WavelengthData Signed-off-by: Pierre R. Mai --- osi_common.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osi_common.proto b/osi_common.proto index 8fa113c73..7ab5852ec 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -505,7 +505,7 @@ message WavelengthData // optional double start = 1; - // The start, or the minimum wavelength value. + // The end, or the maximum wavelength value. // // Unit: m //