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

Synchronize cpp examples with python #110

Merged
merged 39 commits into from
May 19, 2021
Merged

Conversation

csaba-luxonis
Copy link
Contributor

This PR is WIP, will be updated once it's ready to review.

@csaba-luxonis csaba-luxonis marked this pull request as draft April 14, 2021 15:54
@Luxonis-Brandon
Copy link
Contributor

Thanks for making these. These will be great to have! Will be so nice to have full Python and C++ examples for folks.

@Luxonis-Brandon
Copy link
Contributor

Oh and once these are done @csaba-luxonis - we should do the switcher on our docs so folks can switch between the Python code sample and the C++ code sample on the same page.

@csaba-luxonis
Copy link
Contributor Author

Yeah, that would be amazing.

@themarpe
Copy link
Collaborator

I think we should do this in other direction:
Remove example numbers from python examples and leave these here as is.

Documentation should mark examples (code samples) with numbers but just as an easier overview

@Luxonis-Brandon
Copy link
Contributor

Oh, yes. Sorry I didn't meant to say that we should have the numbers on these. I agree we should remove the numbers from the Python examples. And just have the documentation designate the order of the code samples.

examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
examples/src/04_rgb_encoding.cpp Outdated Show resolved Hide resolved
@csaba-luxonis
Copy link
Contributor Author

I will remove the example numbers once im done with all

@themarpe
Copy link
Collaborator

Also one thing I was thinking, if we allow passing the output file as parameter (as well as the default), to be able to set it to /dev/null / nul for testing case. (Same applies to Python side)

Copy link
Collaborator

@themarpe themarpe left a comment

Choose a reason for hiding this comment

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

Throughout examples: use ImgFrame::Type alias instead of Raw*

manip->initialConfig.setFrameType(dai::ImgFrame::Type::BGR888p);

Copy link
Collaborator

@themarpe themarpe left a comment

Choose a reason for hiding this comment

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

LGTM apart from:

Style - either same line or with curly braces (in a couple of cases)

if(syncNN) {
    ...
} else {
    ...
}

@csaba-luxonis csaba-luxonis marked this pull request as ready for review May 18, 2021 00:44
Copy link
Collaborator

@SzabolcsGergely SzabolcsGergely left a comment

Choose a reason for hiding this comment

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

LGTM

@csaba-luxonis csaba-luxonis merged commit 7ac3b20 into develop May 19, 2021
@csaba-luxonis csaba-luxonis deleted the renamed_and_new_examples branch May 19, 2021 14:31
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.

None yet

4 participants