Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line detector documentation #16

Merged
merged 12 commits into from
Jun 2, 2021

Conversation

iharwell
Copy link
Contributor

Nothing too involved here. I went through and added XML documentation to nearly everything in the LineDetector project. This should make it a bit easier to work on moving forward.

There's a little bit left to do, though. In particular, some classes don't have class-level documentation yet.

There are also a couple of TODOs in the comments regarding some methods that should probably be replaced with properties, some interface members that could use some reorganizing, etc.

@ghost
Copy link

ghost commented May 22, 2021

CLA assistant check
All CLA requirements met.

Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

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

Submitting partial review comments

src/VAP/LineDetector/CascadedLinesDetector.cs Outdated Show resolved Hide resolved
src/VAP/LineDetector/CascadedLinesDetector.cs Outdated Show resolved Hide resolved
src/VAP/LineDetector/CascadedLinesDetector.cs Outdated Show resolved Hide resolved
src/VAP/LineDetector/CascadedLinesDetector.cs Outdated Show resolved Hide resolved
src/VAP/LineDetector/DetectionLine.cs Outdated Show resolved Hide resolved
bool notifyOccupancy(int frameNo, bool occupancy);

//TODO(isaach): Should be a property.
Copy link
Member

Choose a reason for hiding this comment

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

💡 If you do have a TODO with this form, consider matching the username form you use on GitHub

Suggested change
//TODO(isaach): Should be a property.
//TODO(iharwell): Should be a property.

/// <summary>
/// The first point of the line.
/// </summary>
public Point p1 { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

❔ While the fields were not marked readonly, it's not clear that was intentional. Is it possible to make these properties readonly?

Suggested change
public Point p1 { get; set; }
public Point p1 { get; }

Comment on lines 33 to 36
/// <summary>
/// The overlap threshold used to determine occupancy.
/// </summary>
public double overlapFractionThreshold { get; set; } = DEFAULT_OCCUPANCY_THRESHOLD;
Copy link
Member

Choose a reason for hiding this comment

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

💡 Consider removing this default value assignment, and updating the constructor to chain like this:

: this(a, b, c, d, DEFAULT_OCCUPANCY_THRESHOLD)

src/VAP/LineDetector/DetectionLine.cs Outdated Show resolved Hide resolved
src/VAP/LineDetector/DetectionLine.cs Outdated Show resolved Hide resolved
Minor changes to the documentation comments to ensure everything works as expected.

Minor refactoring removed to place in a separate branch.
@ycshu086 ycshu086 merged commit 3a1f12f into microsoft:master Jun 2, 2021
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