grass
grass copied to clipboard
i.his.rgb: add test file
This PR introduces a dedicated regression test suite for the 'i.his.rgb` module in GRASS. The tests are designed to validate the correctness of HIS to RGB conversion across multiple well-defined input cases and ensure that key functionalities behave as expected under controlled conditions.
Tests Included
-
test_grayscale: Verifies that whensaturation = 0, all three RGB bands match the intensity input. It confirms correct handling of grayscale logic. -
test_primary_colors: Tests pure hue-to-RGB conversions at full intensity and saturation.- Red hue (0°): R = 255, G = 0, B = 0
- Green hue (120°): G = 255, R = 0, B = 0
- Blue hue (240°): B = 255, R = 0, G = 0
- This test checks the mathematical correctness of the hue-to-RGB interpolation at key reference angles.
-
test_mask_handling: Confirms that the module respects raster masks by validating that only unmasked regions are processed.
Looking forward to feedback.
The tests fail currently due to bugs in implementation. https://github.com/OSGeo/grass/issues/5659