Skip to content

Occlusion bug fix - #7131

Merged
ev-mp merged 5 commits into
realsenseai:developmentfrom
nohayassin:occlusion_bug_fix
Aug 20, 2020
Merged

Occlusion bug fix#7131
ev-mp merged 5 commits into
realsenseai:developmentfrom
nohayassin:occlusion_bug_fix

Conversation

@nohayassin

@nohayassin nohayassin commented Aug 19, 2020

Copy link
Copy Markdown
Contributor

Tracked on: RS5-8522
Fixes #6990

@dorodnic
dorodnic changed the base branch from master to development August 19, 2020 15:01

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For review

Comment thread src/proc/occlusion-filter.cpp Outdated
for (int i = 0; i < height; i = i + ROTATION_BUFFER_SIZE)
auto buffer_size = maxDivisorRange(height, width, 1, ROTATION_BUFFER_SIZE);

byte *buffer = new byte[buffer_size * buffer_size * SIZE];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't see delete[]...
Here managed (RAII) memory is preferred, so please switch to std::vector

Comment thread src/proc/occlusion-filter.cpp Outdated
return a;
return gcd(b, a % b);
}
// Return the gretest common divisor of a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

greatest

@dorodnic

Copy link
Copy Markdown
Contributor

impact on performance?

{
int g = gcd(a, b);
int res = g;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add check low<high

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@nohayassin

Copy link
Copy Markdown
Contributor Author

impact on performance?

Only GCD function could impact performance, but it is not significant.

@ev-mp
ev-mp merged commit 98740d9 into realsenseai:development Aug 20, 2020
@dorodnic

Copy link
Copy Markdown
Contributor

impact on performance?

Only GCD function could impact performance, but it is not significant.

Have you measured it?

@nohayassin

nohayassin commented Aug 23, 2020

Copy link
Copy Markdown
Contributor Author

impact on performance?

Only GCD function could impact performance, but it is not significant.

Have you measured it?

yes, these are some prints:

With GCD:
Vertical Scan ..................................... 2,523 usec, 31 Hz
Vertical Scan ..................................... 2,620 usec, 31 Hz
Vertical Scan ..................................... 2,471 usec, 31 Hz
Vertical Scan ..................................... 2,492 usec, 30 Hz
Vertical Scan ..................................... 2,488 usec, 32 Hz

NO GCD:
Vertical Scan ..................................... 2,449 usec, 31 Hz
Vertical Scan ..................................... 2,490 usec, 31 Hz
Vertical Scan ..................................... 2,408 usec, 31 Hz
Vertical Scan ..................................... 2,351 usec, 31 Hz
Vertical Scan ..................................... 2,291 usec, 30 Hz

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