-
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
Add histogram class and related functionality #499
Conversation
53c6fee
to
6f9be17
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.
I have some objections with the code format(template parameters) I don't find the really appealing to the eyes but I maybe wrong. @mloskot what are your suggestions on it!
* Shifted type traits to gil/concepts/detail/histogram.hpp * Added binning logic for unmutable container * Added missing endline, changed parameter name etc.
I have ideas I would like to share further on the current approach. This approach might ease extending the implementation design in the future to support both multi dimensional histograms and external containers.
So basically the first overloads make sure appropriate type checks are performed on both image and container type. The second overload would choose to call the overload specific to the requirements and the third overload can be easily extended to support higher dimensional containers (of any type). |
A new histogram class proposed with close suuport for gil image constructs. Code Refactor : - Shift current stl implmentation to extension to serve as example for overloading fill_histogram
7a1fa45
to
cb69be7
Compare
29ba68b
to
deb9f0f
Compare
b0963c8
to
6d7697e
Compare
6d7697e
to
4606a17
Compare
3fa0941
to
27c9351
Compare
- Separate histogram fill tests from utilities - Add helper impl tuple limit
27c9351
to
5f10c81
Compare
262d8a7
to
897778d
Compare
@codejaeger Thanks for the update. Something is wrong with the histogram example, see https://ci.appveyor.com/project/stefanseefeld/gil/builds/34407783/job/fw3u0ba7yno9rdui The last build job of AppVeyor is CMake-based which builds examples too. |
Thanks @mloskot for pointing out the bug. I hope it gets fixed with the last commit. |
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 don't have any major issues to report about this PR, so I'm happy to approve it.
The only 'unresolved' comments are about the x<space><space>=<space>y
formatting due to use of the clang-format
and pointed out by @lpranam which I'd consider not a stopper issue that can be addressed after the merge along with other updates or improvements that are applicable post-merge.
@codejaeger Once again, thanks for your contributions
A new histogram class proposed with close suport for gil image constructs. Shift the stl support implmentation to extension to serve as example for overloading fill_histogram. Add cumulative histogram and histogram normalization. Co-authored-by: debabrata1 <debabrata@goodhealthapp.com>
A new histogram class proposed with close suport for gil image constructs. Shift the stl support implmentation to extension to serve as example for overloading fill_histogram. Add cumulative histogram and histogram normalization. Co-authored-by: debabrata1 <debabrata@goodhealthapp.com>
Description
This contains the initial implementation of histogram functionality for STL containers for GIL images. Basic tests checking for correctness of histogram have been provided. Usage syntax and distinction between compatible and incompatible containers have been illustrated in a example file.
There was some dicussion regarding the name of the function (which now is image_histogram) in the mailing thread (link). I chose on 'image_histogram' since the name 'histogram' is used as the class name in Boost.Histogram and might cause problems in namespace mix-up. Another option could be histogram_1d since these functions are meant for that purpose.
Dependency
Optional - Docs for the this implementation are running in a parallel PR #503.
References
Discussions on boost-gil mailing threads.
Tasklist