6 #include "../include/librealsense2/hpp/rs_sensor.hpp" 7 #include "../include/librealsense2/hpp/rs_processing.hpp" 19 auto height_out =
width;
23 for (
int i = 0;
i <= height - 8;
i =
i + 8)
25 for (
int j = 0;
j <= width - 8;
j =
j + 8)
27 for (
int ii = 0;
ii < 8; ++
ii)
29 for (
int jj = 0; jj < 8; ++jj)
31 auto source_index = ((
j + jj) + (width * (
i +
ii))) * SIZE;
32 memcpy((
void*)(&buffer[7 - jj][(7 -
ii) * SIZE]), &source[source_index], SIZE);
36 for (
int ii = 0;
ii < 8; ++
ii)
38 auto out_index = (((height_out - 8 -
j + 1) * width_out) -
i - 8 + (
ii)* width_out);
39 memcpy(&
out[(out_index)* SIZE], &(buffer[
ii]), 8 * SIZE);
49 auto height_out =
width;
54 auto row_offset =
i *
width;
57 auto out_index = (((height_out -
j) * width_out) -
i - 1) * SIZE;
65 #pragma pack (push, 1) 75 for (
int i = (width - 1), out_i = ((width - 1) * 2);
i >= 0; --
i, out_i -= 2)
80 auto val = *(
reinterpret_cast<const lsb_msb*
>(&out[(row_offset +
j)]));
81 auto out_index = out_i * height +
j;
82 out[out_index] =
val.lsb << 4;
90 :
rotation_transform(
"Rotation Transform", target_format, target_stream, extension_type)
118 int rotated_width =
height;
119 int rotated_height =
width;
123 rotate_image_optimized<1>(
dest,
source, rotated_width, rotated_height, actual_size);
126 rotate_image_optimized<2>(
dest,
source, rotated_width, rotated_height, actual_size);
143 int rotated_width =
height;
144 int rotated_height =
width;
rs2::stream_profile _source_stream_profile
const char * rs2_format_to_string(rs2_format format)
GLuint const GLchar * name
stream_profile get_profile() const
rs2_format _target_format
GLsizei const GLchar *const * string
void rotate_confidence(byte *const dest[], const byte *source, int width, int height, int actual_size)
void rotate_image(byte *const dest[], const byte *source, int width, int height, int actual_size)
rs2::stream_profile _target_stream_profile
GLint GLsizei GLsizei height
rs2_stream _target_stream
rs2_format
A stream's format identifies how binary data is encoded within a frame.
stream_filter _stream_filter
void rotate_image_optimized(byte *dest[], const byte *source, int width, int height)
rs2_stream
Streams are different types of data provided by RealSense devices.
librealsense::stream_profile_interface * profile
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
const rs2_stream_profile * get() const
GLsizei GLsizei GLchar * source
virtual void set_unique_id(int uid)=0
int get_image_bpp(rs2_format format)
stream_profile clone(rs2_stream type, int index, rs2_format format) const
void copy(void *dst, void const *src, size_t size)