-
Notifications
You must be signed in to change notification settings - Fork 164
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
Added FAST feature detector by Edward Rosten #604
base: develop
Are you sure you want to change the base?
Conversation
This is the famous Fast feature detector used for detecting feature points in real time videos and images. Reference papers 1.Fusing points and lines for high performance tracking. 2.Machine learning for high-speed corner detection. 3.Faster and better: A machine learning approach to corner detection
Added FAST feature detector by Edward Rosten
test images also included
Would love to have feedback from @lpranam @mloskot @codejaeger if you find time in your busy schedule to review this PR. |
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.
First Thank you for your time and contributions. I am yet to have a look into the actual algorithm had a glace and found problems with code.
- file name fast does not make any sense in absolute context
- we do not use camel case anywhere in the naming
- spaces and newlines are inconsistent
- template parameter names are single later which makes it hard to understand and impossible to review
maybe try formatting code with clang-format from #596 or with the clang-format provided in the example. Most of the styling problem will be solved with it just have to take care of the naming conventions. You may wanna have a look into code base for names
1.Used Clang format 12 to format the header file 2.Single letter template parameters renamed 3.Camelcases removed. 4.Filename changed to a meaningful one
@lpranam I have tried to follow your advice and made the changes .I would request you and @mloskot @codejaeger to kindly review it if you find time amidst your busy schedule. |
The number of code lines increased due to formatting |
@Sayan-Chaudhuri no one cares about number of lines increases due to adding necessary spaces and formatting. when in past I said that no one would require 500K lines that was because it 500K lines of code no one counts while space. White space is needed. |
Actually I mentioned it because initially I was very happy to keep the code concise and readable. But then the lines increased and so I felt bad.. :) . |
@Sayan-Chaudhuri I believe we have discussed the initial issues pointed out by @lpranam above during review of #597 (review) Please, try to avoid similar issues over and over again. This will save time to us all! |
template <typename srcview> | ||
std::ptrdiff_t | ||
calculate_score(srcview& src, int i, int j, std::vector<point_t>& points, int threshold) | ||
{ |
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.
Is this formatting with indented calculate_score
by the clang-format
? /cc @lpranam
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.
@lpranam I will answer myself, no, it is not clang-format
output.
Your .clang-format
generates expected output:
template <typename SrcView>
std::size_t calculate_score(
SrcView const& src,
std::size_t i,
std::size_t j,
std::vector<point_t>& points,
std::size_t threshold)
{
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.
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.
I'd suggest to use clang-format 12 but
I'd also expect clang-format 13 to give output close to clang-format 12
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.
I was initially unable to get clang-format 12 but now I have been able to do so.
@mloskot Yeah, I am noting down every feedback and trying hard so as not to avoid them. The code is entirely written by me because from our discussion , I understand that copied code is wrong due to several factors. Regarding the blank lines as separator, I actually didnt made any changes after i formatted the code with clang. Ok, so I shall surely add the separators. From your feedback of PR#597, I thought it was bad to mix upper/lower case in filenames. Will keep this mistake in mind. Thanks for taking out time to provide the feedback. |
…iable type 1. No mixing of upper and lower cases. all names in lowercase 2. Inserted blank lines between code sections to improve readability 4. Changed all west const to east const 5. Template parameter types changed to camelcase 6.Single variable per line 7.loop variable types changed to std::ptrdiff_t , other integer types changed to std::size_t wherever possible 8. Inserted function description
@mloskot @lpranam Apologies for the mistakes committed in my previous commit. I have reread the contributing guidelines as instructed by you, and have tried to incorporate each and every instruction from the guidelines. I have doubt over the below mentioned points in the contributing guidelines 2)All non-public headers should be placed boost/gil/detail or boost/gil//detail. As per my understanding, all the header files that will not be used by a library user should be put in detail folder. But in the already existing header files in the library, I do not find any such convention being followed e.g histogram_equalization.hpp. Also , there is no detail folder inside the image_processing subfolder of boost/gil. So, if you can kindly advice the course of action for this. I understand repeated mistakes from my side is hindering further course of action from your side regarding the PR. I hqve checked my code several times against the guidelines. I hope that this time, my mistakes will not be hindering the review process. I would kindly request you to have a relook at my code if you find time amidst your busy schedule. |
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.
The chessboard(2).png
file seems not used anywhere.
It should be removed.
Description
This pull request adds the FAST feature detector which is used for corner detection in real time scenarios
References
https://www.edwardrosten.com/work/fast.html
Tasklist