plstcharles / litiv

C++ implementation pool for computer vision R&D projects.
http://www.polymtl.ca/litiv/en/
Other
101 stars 30 forks source link

Removing code duplication #2

Closed medyakovvit closed 8 years ago

medyakovvit commented 8 years ago

Hi! I want to offer you some code changes. I can inspect code for more such changes, of course if you think it's needed.

In function refreshModel() delete branching for different count of image channels.

plstcharles commented 8 years ago

Hello!

Sorry about the late reply, I am at a conference, and the wifi here is not great. The changeset you proposed could be useful in the framework! There are still many duplicate code blocks in there for different algo configs, as I wanted to avoid non-static variables in very low-level, computation-heavy loops. I'll merge this changeset (in the next few days) on a new branch, and I'll patch it for formatting myself (I won't bother you with my cleanliness crazyness). Then, I'll merge it directly into the master branch.

Thanks for contributing, and don't hesitate to create more PR's!