Skip to content

Conversation

@ev-mp
Copy link
Contributor

@ev-mp ev-mp commented Jul 5, 2021

Tracked on LRS-62

@ev-mp ev-mp force-pushed the ucal branch 2 times, most recently from 3c7738c to 9c5d9d5 Compare July 8, 2021 12:35
@ev-mp ev-mp mentioned this pull request Aug 1, 2021
@ev-mp ev-mp marked this pull request as ready for review September 22, 2021 07:22
daversintel and others added 23 commits October 10, 2021 14:56
2. Taget based focal length calibration.
3. UVMapping calibration.
Change-Id: I441f7208edd6de25f433b53fc3f216d3fe8fd2b0
Change-Id: Iaa92be84b7b77e9dbac126535dd2e320f534a7c0
Evgeni Raikhel added 10 commits October 12, 2021 21:51
Change-Id: I35043b064960fb8509085898329f6c9e8d15d2be
Change-Id: I6d75b823d3a58b49c832cc25601e130453853337
…gly.

Verify that the cali table is valid before calling FW flash API.Remove comments

Change-Id: Iefb5b37a871af9ce4cdd8185b7c8d36e9d814879
Change-Id: I1750b5e1f2e23fed537be228147610b7de2af33e
Change-Id: Ibb4f45c86a88d693214dc9d46b08da8edc9efb62
Change-Id: I5d5a0bdca32e1be13452e81c6d3a7c7aa692fb9f
Change-Id: I9ba2ae9fbe1a6f268cb79d8651e39049b5f25dc0
Change-Id: Ic0ddf6b1a0935367ab0237e971820d089c982cbd
Change-Id: I7cf8a2bc2335f9f543c17a217be59365b7a78c98
Change-Id: Idc41413272ae5236976fc65b68302f702613823f
@ev-mp ev-mp changed the title UCAL enhancements and refactoring draft UCAL enhancements and refactoring Oct 13, 2021
Copy link
Contributor

@remibettan remibettan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes - Impressive work!

namespace helpers
{
// Calculate CRC code for arbitrary characters buffer
uint32_t calc_crc32(const uint8_t* buf, size_t bufsize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the implementation of this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calibration-model.cpp

: process_manager("On-Chip Calibration"), _model(model), _dev(dev), _sub(sub), _viewer(viewer), _sub_color(sub_color), py_px_only(!uvmapping_calib_full)
{
auto dev_name = dev.get_info(RS2_CAMERA_INFO_NAME);
if (!strcmp(dev_name, "Intel RealSense D415"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make it characteristics oriented instead of specific camera name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec is SKU-specific. I will change the code for robustness

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

{
if (_sub)
{
_sub->show_algo_roi = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like same code instead of the pointer, both for on, and off - please consider to refactor with some helper function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, but lower priority

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

{
// Stop viewer UI
_sub->stop(_viewer.not_model);
if (_sub_color.get())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why there is a need to check _sub_color pointer and not _sub?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_sub stands for depth, and _sub_color - RGB

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

{
auto profiles = _sub->get_selected_profiles();
_sub->stop(_viewer.not_model);
if (_sub_color.get())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as before

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

for (int i = 0; i < _sub_color->res_values.size(); i++)
{
auto kvp = _sub_color->res_values[i];
if (kvp.first == 1280 && kvp.second == 720)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

int counter = 0;
int frm_idx = 0;
int limit = 50; // input frames required to calculate the target
float step = 50.f / limit; // frames gathering is 50% of the process, the rest is the internal data extraction and algo processing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used by GUI marker, don't think that it is necessary

ImGui::SetCursorScreenPos({ float(x + 135), tmp_y });
if (ImGui::RadioButton("OCC Extended", (int *)&(get_manager().action), 0))
get_manager().action = on_chip_calib_manager::RS2_CALIB_ACTION_ON_CHIP_OB_CALIB;
// Deprecase OCC-Extended
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments - consider to remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to keep it till the version is stabilized.
I'm not sure that this decision will hold

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

auto table = (librealsense::ds::coefficients_table*)calib_table.data();

float ar[2] = { 0 };
float tmp = left_rect_sides[2] + left_rect_sides[3];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider to use helper function in order to remove repetition of code for left and right

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The algorithmic part implementation is according to a reference design. I'd rather not refactor it to keep the Matlab/C++ parity

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

if (ar[0] > 0.0f)
align = ar[1] / ar[0] - 1.0f;

float ta[2] = { 0 };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please comment these "ta" and "gt" so that their meaning would be clear (or change the names)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish I knew it :) - it is the algo domain

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-D

@remibettan
Copy link
Contributor

Approved

Change-Id: Ia86a5a76f2b0a11ae56deba3d0b426a909e84191
@ev-mp ev-mp merged commit c334bda into realsenseai:development Oct 17, 2021
maloel added a commit to maloel/librealsense that referenced this pull request Oct 20, 2021
ev-mp pushed a commit to ev-mp/librealsense that referenced this pull request Oct 20, 2021
ev-mp added a commit that referenced this pull request Oct 20, 2021
ev-mp pushed a commit to ev-mp/librealsense that referenced this pull request May 9, 2022
ev-mp pushed a commit to ev-mp/librealsense that referenced this pull request May 10, 2022
ev-mp pushed a commit to ev-mp/librealsense that referenced this pull request May 29, 2022
Fix python compilation for new calibration values.

add comments
Fix some warnings

move calculation of sum of pixels in depth image to function: get_depth_frame_sum

fix merge.

retry on set_pu SEMAPHORE_TIMEOUT error

CR updates

add ticket number to comment

changed inheritence to using

added comment

fix callback ptr from PR realsenseai#9336
@ev-mp ev-mp deleted the ucal branch February 14, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants