Skip to content

Conversation

@Myzhar
Copy link
Member

@Myzhar Myzhar commented Sep 13, 2018

No description provided.

@Myzhar Myzhar requested a review from adujardin September 13, 2018 14:35
#pragma parallel for
for (int x = 0; x < depth.getWidth(); x++) {
sl::float1 value;
depth.getValue<sl::float1>(x, y, &value);
Copy link
Member

Choose a reason for hiding this comment

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

getValue is not very efficient and shouldn't be used in a loop. It's better to iterate over a pointer.
Is there a data reorganization? If not it could be converted to an iteration over 1 loop

sl::float1 value;
disparityZEDMat.getValue<sl::float1>(x, y, &value);
value *= -1.0f;
disparityZEDMat.setValue<sl::float1>(x, y, value);
Copy link
Member

Choose a reason for hiding this comment

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

Similarly, if possible this should be a 1 loop iteration over the pointer

confMapFloat, sensor_msgs::image_encodings::TYPE_32FC1,
confidenceOptFrameId, t));

//confMapFloat = sl_tools::toCVMat(confMapZEDMat);
Copy link
Member

Choose a reason for hiding this comment

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

This can be removed

@adujardin adujardin merged commit f9c4b56 into master Sep 13, 2018
@adujardin adujardin deleted the no_opencv branch September 13, 2018 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants