2b32895c3178a412a701aba09dbad821d8acbd1a,test/color/test_hls.py,TestRgbToHls,test_rgb_to_hls,#TestRgbToHls#Any#,19

Before Change



        h_expected = 2 * math.pi * expected[:, :, 0] / 360.
        l_expected = expected[:, :, 1]
        s_expected = expected[:, :, 2]
    
        f = kornia.color.RgbToHls()
        result = f(data)

After Change


        data = torch.rand(3, 5, 5).to(device)

        // OpenCV
        data_cv = kornia.tensor_to_image(data.clone())

        expected = cv2.cvtColor(data_cv, cv2.COLOR_RGB2HLS)
        expected = kornia.image_to_tensor(expected, True).to(device)
        expected[0] = 2 * math.pi * expected[0] / 360.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: arraiy/torchgeometry
Commit Name: 2b32895c3178a412a701aba09dbad821d8acbd1a
Time: 2019-11-19
Author: edgar.riba@gmail.com
File Name: test/color/test_hls.py
Class Name: TestRgbToHls
Method Name: test_rgb_to_hls


Project Name: arraiy/torchgeometry
Commit Name: 2b32895c3178a412a701aba09dbad821d8acbd1a
Time: 2019-11-19
Author: edgar.riba@gmail.com
File Name: test/color/test_hsv.py
Class Name: TestHsvToRgb
Method Name: test_hsv_to_rgb


Project Name: arraiy/torchgeometry
Commit Name: 2b32895c3178a412a701aba09dbad821d8acbd1a
Time: 2019-11-19
Author: edgar.riba@gmail.com
File Name: test/color/test_hls.py
Class Name: TestHlsToRgb
Method Name: test_hls_to_rgb