Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add temperature variations to thermal camera readings based on color #211

Merged
merged 6 commits into from
Jan 26, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jan 23, 2021

The thermal camera class has functions to set heat source and ambient temperature range. This was simulated by varying an object's temperature based on its depth value (distance from the camera). This PR provides an alternative way to vary an object's temperature based on its color value.

Non-heat source objects, i.e visuals without a uniform temperature or heat signature, will now have variations in their thermal readings as a function of color - the darker the object the warmer the object. See gazebosim/gz-sim#578 for an example output

Note: This is not how a physical thermal camera works. The goal is to provide automated way of simulating enough temperature differences so that thermal data processing algorithms are able to segment out different objects in the scene.

Signed-off-by: Ian Chen <[email protected]>
Comment on lines +202 to +206
/// \brief Helper function to convert an ogre Pbs datablck to Unlit datablock
/// \param[in] _in Input pbs datablock
/// \param[out] _out Output unlit datablock
public: static void PbsToUnlitDatablock(Ogre::HlmsPbsDatablock *_in,
Ogre::HlmsUnlitDatablock *_out);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this break API/ABI? Or are header files in the ogre2 directory built in a way that is different from headers in ign-rendering's include directory?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is there any reason why this method is marked static? And since _in is not modified in the function, should we mark the _in parameter as const?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a new static function should be fine, see a list of things allowed here

iche033 and others added 2 commits January 25, 2021 15:29
@adlarkin adlarkin merged commit 7f5a9fb into adlarkin/heat_signature_thermal_camera Jan 26, 2021
@adlarkin adlarkin deleted the iche033/rgb_to_temp branch January 26, 2021 00:22
iche033 added a commit that referenced this pull request Feb 2, 2021
* started incorporating heat signature to thermal objects

Signed-off-by: Ashton Larkin <[email protected]>

* promising results with hardcoded texture

Signed-off-by: Ashton Larkin <[email protected]>

* heat signature for one object is working

Signed-off-by: Ashton Larkin <[email protected]>

* enable multiple objects with different heat signatures

Signed-off-by: Ashton Larkin <[email protected]>

* allow for users to specify a custom temperature range

Signed-off-by: Ashton Larkin <[email protected]>

* add check back in to fix missing background

Signed-off-by: Ashton Larkin <[email protected]>

* Add temperature variations to thermal camera readings based on color (#211)

* vary non-heat source temp based on rgb balues

Signed-off-by: Ian Chen <[email protected]>

* add more comments, var to set rgb to temp

Signed-off-by: Ian Chen <[email protected]>

* add more doc

Signed-off-by: Ian Chen <[email protected]>

* remove comment

Signed-off-by: Ian Chen <[email protected]>

* feedback changes

Signed-off-by: Ian Chen <[email protected]>

* added reference link to RGB/grayscale equation

Signed-off-by: Ashton Larkin <[email protected]>

Co-authored-by: Ashton Larkin <[email protected]>

* make sure user input temperature range is within [0,655.35] kelvin

Signed-off-by: Ashton Larkin <[email protected]>

* added heat signature thermal camera test

Signed-off-by: Ashton Larkin <[email protected]>

* added missing test texture and fixed codecheck

Signed-off-by: Ashton Larkin <[email protected]>

* revert addition of Ogre2Material::PbsToUnlitDatablock helper function

Signed-off-by: Ashton Larkin <[email protected]>

* address review feedback

Signed-off-by: Ashton Larkin <[email protected]>

* address windows warnings

Signed-off-by: Ashton Larkin <[email protected]>

Co-authored-by: Ian Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants