This repository was archived by the owner on Nov 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +29
-11
lines changed
samples/samples_time_sync_sample
cv_modules/max_depth_value_module
utilities/logger/log_utils Expand file tree Collapse file tree 9 files changed +29
-11
lines changed Original file line number Diff line number Diff line change 33[ ![ Release] [ release-image] ] [ releases]
44[ ![ License] [ license-image] ] [ license]
55
6- [ release-image ] : http://img.shields.io/badge/release-0.2.7 -blue.svg?style=flat
6+ [ release-image ] : http://img.shields.io/badge/release-0.2.9 -blue.svg?style=flat
77[ releases ] : https://github.com/IntelRealSense/realsense_sdk
88
99[ license-image ] : http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ void frame_handler(rs::frame new_frame)
112112 info.width = new_frame.get_width ();
113113 info.height = new_frame.get_height ();
114114 info.format = rs::utils::convert_pixel_format (new_frame.get_format ());
115- info.pitch = ( new_frame.get_bpp () / 8 ) * info. width ;
115+ info.pitch = new_frame.get_stride () ;
116116
117117 auto st_type = rs::utils::convert_stream_type (new_frame.get_stream_type ());
118118
Original file line number Diff line number Diff line change 11set(SDK_VERSION_MAJOR 0 )
22set(SDK_VERSION_MINOR 2 )
3- set(SDK_VERSION_COMMIT_NUMBER 8 )
3+ set(SDK_VERSION_COMMIT_NUMBER 9 )
44set(SDK_VERSION_COMMIT_ID 0 )
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ namespace rs
143143 int32_t width; /* width of the image in pixels */
144144 int32_t height; /* height of the image in pixels */
145145 pixel_format format; /* image pixel format */
146- int32_t pitch; /* pitch of the image in pixels, also known as stride*/
146+ int32_t pitch; /* number of bytes in a single image row of pixels, also known as stride*/
147147 };
148148
149149 struct pointI32
Original file line number Diff line number Diff line change 1+ // License: Apache 2.0. See LICENSE file in root directory.
2+ // Copyright(c) 2016 Intel Corporation. All Rights Reserved.
3+ #pragma once
4+
15#define SDK_VER_MAJOR 0
26#define SDK_VER_MINOR 2
3- #define SDK_VER_COMMIT_NUMBER 8
7+ #define SDK_VER_COMMIT_NUMBER 9
48#define SDK_VER_COMMIT_ID 0
5- #define SDK_VERSION_STRING static char version_id[] = "VERSION: 0.2.8.0";
9+ #define SDK_VERSION_STRING static volatile char version_id[] = "VERSION: 0.2.9.0";
10+
11+ SDK_VERSION_STRING
Original file line number Diff line number Diff line change 77#include " image_utils.h"
88#pragma warning (disable : 4068)
99#include " math_projection_interface.h"
10-
10+ # include " rs_sdk_version.h "
1111#include " rs/utils/self_releasing_array_data_releaser.h"
1212
13+
1314using namespace rs ::utils;
1415
1516static void *aligned_malloc (int size);
Original file line number Diff line number Diff line change 11// License: Apache 2.0. See LICENSE file in root directory.
22// Copyright(c) 2016 Intel Corporation. All Rights Reserved.
33
4+ #include " rs_sdk_version.h"
45#include < iostream>
56#include < thread>
67#include < cstring>
Original file line number Diff line number Diff line change 11// License: Apache 2.0. See LICENSE file in root directory.
22// Copyright(c) 2016 Intel Corporation. All Rights Reserved.
33
4+ #include " rs_sdk_version.h"
45#include < iostream>
56#include < thread>
67#include < cstring>
@@ -179,13 +180,21 @@ namespace rs
179180 // protect algorithm exception safety
180181 try
181182 {
182- const uint16_t * current_pixel = static_cast <const uint16_t * >(depth_image->query_data ());
183+ const uint8_t * current_pixel = static_cast <const uint8_t * >(depth_image->query_data ());
183184 auto depth_image_info = depth_image->query_info ();
184- for (auto i = 0 ; i < depth_image_info.height * depth_image_info.pitch ; i++)
185+
186+ for (auto y = 0 ; y < depth_image_info.height ; y++)
185187 {
186- if (current_pixel[i] > max_depth_value )
188+ for ( auto x = 0 ; x < depth_image_info. width ; x+= 2 )
187189 {
188- max_depth_value = current_pixel[i];
190+ auto pixel_with_pitch_allignment = y * depth_image_info.pitch + x;
191+ // combine 2 uint8_t to uint16_t
192+ uint16_t current_pixel_value = current_pixel[pixel_with_pitch_allignment] | current_pixel[pixel_with_pitch_allignment + 1 ] << 8 ;
193+
194+ if (current_pixel_value > max_depth_value)
195+ {
196+ max_depth_value = current_pixel_value ;
197+ }
189198 }
190199 }
191200
Original file line number Diff line number Diff line change 11// License: Apache 2.0. See LICENSE file in root directory.
22// Copyright(c) 2016 Intel Corporation. All Rights Reserved.
3+ #include " rs_sdk_version.h"
34#include " rs/utils/log_utils.h"
45#include " rs/core/status.h"
56#include " fstream"
You can’t perform that action at this time.
0 commit comments