Args: range(list or tuple): range from which the applied hue offset is selected (maximum range can be [-90,90] for both uint8 and float32) rgb (bool): whether input is RGB or BGR.
(self, range=(0, 180), rgb=True)
| 17 | """ |
| 18 | |
| 19 | def __init__(self, range=(0, 180), rgb=True): |
| 20 | """ |
| 21 | Args: |
| 22 | range(list or tuple): range from which the applied hue offset is selected |
| 23 | (maximum range can be [-90,90] for both uint8 and float32) |
| 24 | rgb (bool): whether input is RGB or BGR. |
| 25 | """ |
| 26 | super(Hue, self).__init__() |
| 27 | rgb = bool(rgb) |
| 28 | self._init(locals()) |
| 29 | |
| 30 | def _get_augment_params(self, _): |
| 31 | return self._rand_range(*self.range) |