CARLA
Loading...
Searching...
No Matches
test_optical_flow_encoding.cpp File Reference
#include "test.h"
#include <carla/ros2/publishers/OpticalFlowEncoding.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <vector>

Go to the source code of this file.

Functions

 TEST (OpticalFlowEncoding, alpha_is_always_zero)
 TEST (OpticalFlowEncoding, buffer_length_matches_height_times_width_times_four)
 TEST (OpticalFlowEncoding, buffer_per_pixel_matches_pixel_helper)
 TEST (OpticalFlowEncoding, large_magnitude_saturates_brightness)
 TEST (OpticalFlowEncoding, negative_vx_lands_in_red_hemisphere)
 TEST (OpticalFlowEncoding, positive_vx_lands_in_cyan_hemisphere)
 TEST (OpticalFlowEncoding, zero_flow_is_black_with_zero_alpha)

Function Documentation

◆ TEST() [1/7]

TEST ( OpticalFlowEncoding ,
alpha_is_always_zero  )

Definition at line 26 of file test_optical_flow_encoding.cpp.

References carla::ros2::EncodeFlowPixelToBgra(), and TEST().

◆ TEST() [2/7]

TEST ( OpticalFlowEncoding ,
buffer_length_matches_height_times_width_times_four  )

Definition at line 65 of file test_optical_flow_encoding.cpp.

References carla::ros2::EncodeFlowImageToBgra(), and TEST().

◆ TEST() [3/7]

TEST ( OpticalFlowEncoding ,
buffer_per_pixel_matches_pixel_helper  )

◆ TEST() [4/7]

TEST ( OpticalFlowEncoding ,
large_magnitude_saturates_brightness  )

Definition at line 37 of file test_optical_flow_encoding.cpp.

References carla::ros2::EncodeFlowPixelToBgra(), and TEST().

◆ TEST() [5/7]

TEST ( OpticalFlowEncoding ,
negative_vx_lands_in_red_hemisphere  )

Definition at line 57 of file test_optical_flow_encoding.cpp.

References carla::ros2::EncodeFlowPixelToBgra(), and TEST().

◆ TEST() [6/7]

TEST ( OpticalFlowEncoding ,
positive_vx_lands_in_cyan_hemisphere  )

Definition at line 47 of file test_optical_flow_encoding.cpp.

References carla::ros2::EncodeFlowPixelToBgra(), and TEST().

◆ TEST() [7/7]

TEST ( OpticalFlowEncoding ,
zero_flow_is_black_with_zero_alpha  )

Definition at line 16 of file test_optical_flow_encoding.cpp.

References carla::ros2::EncodeFlowPixelToBgra(), and TEST().