-
-
Notifications
You must be signed in to change notification settings - Fork 829
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
[keyframeselection] Algorithms are rewritten #1213
Conversation
|
e54f2a4
to
85db23e
Compare
Do we really need highgui here? |
85db23e
to
e70ca45
Compare
e70ca45
to
a5d4d57
Compare
|
std::mt19937 randomTwEngine(rd()); // standard mersenne_twister_engine seeded with rd() | ||
std::uniform_int_distribution<> randomDist(0, std::numeric_limits<int>::max()); | ||
return randomDist(randomTwEngine); | ||
std::random_device rd; // will be used to obtain a seed for the random number engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make testing unreliable. It's best to supply the source of randomness as a parameter so that in tests fake implementation can be used.
3105cab
to
8665463
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In simple mode, if maxNbOutFrame is set, the number of extracted frames is always equal to maxNbOutFrame+1.
The "smart" mode seems to be working correctly!
Tested simple and advanced mode on windows, seems to work as intended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
724a040
to
3a988db
Compare
8969a23
to
7b2f0d1
Compare
{ | ||
ALICEVISION_LOG_ERROR("Cannot initialize the FeedProvider with " << path); | ||
throw std::invalid_argument("Cannot while initialize the FeedProvider with " + path); | ||
maxstd = std::max(maxstd, std_2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, with the max here, one pixel will give the score for the whole image? If that's the case, this does not sound reliable.
…er but works. Still to be tested carefully.
Address PR reviews: - give more explicit names to some variables - harmonize coding style - avoid some useless computations
- If _maxOutFrame is not 0 and _minFrameStep is superior to 1, stop ignoring _minFrameStep, take it into account and always enforce it - Ensure that there will be no more than _maxOutFrame selected frames when _maxOutFrame is not 0
Use the same indentation (4 spaces) for both the KeyframeSelector header and source files.
90e18ab
to
fdbd567
Compare
Replaced by #1343. |
Keyframe selection was not working previously.
This PR tries a new set of algorithms to replace the previous one