penguingV Enhancement. Deploy

Sending PR

    Big game, big play, big problems, big solutions. Here we came to the point when "good-first-issue" is not good enough for us, and working on something of higher scale looks much more intimidating exciting! 
    In my last post I described the issue I was working on, so let's jump to the solution. 


    The above is the screenshot of the proposed solution to templating the EdgeDetection class. Previously, the class was using "Point"s  based on "double" values (double x, double y). The proposed solution uses "T" as a generic type instead of hardcoded "double" and "PointBase2D<>" template instead of "Point2d" type based on "double".


    Previously, the class' implementation was separated among ".h" and ".cpp" files, and because implementation code for some of the functions was relatively long, I decided to keep the way of things as they were and don't write everything into one ".h" file (which is possible thanks to template explicit instantiation to get rid of unresolved linker issues). 
    The trick in this feature implementation was to not "go out of the boundaries" - the project is relatively big and templating one class might cause the need in templating another one, so it can use the first one, and then templating the third one so it can use the second etc. I was trying my best to keep the changes in reasonable boundaries and only applied template to EdgeDetection class and modified a tiny math file by adding a few getters.

Issue can be found here.
Pull request can be found here.

Comments

Popular posts from this blog

Node.js: fs.open()

Two Different Frames of Same VidioCapture

Good friend penguinV