While looking back at some of my base code, as well as the classes I’ve created for this project, I found an abundance of C++ malpractices that I was not aware of at the time of writing. The list includes;
-Implementing functions in the header file
-Initializing variables in the header file
-Multiple classes in a single .cpp file
-Overwrote Ehren’s main function and added my own functions to his code instead of calling his functions
-Had no function prototypes in the header file, all inside the .cpp
-Included a .cpp file from a header
-Not using OOP when it was a much better option
This lead to me re-witing a lot of my code base, as well as upgrading to a new version of Ehren’s library. This fixed all of the OpenCV and Boost related problems I was having, and allowed me to use a point as the interior contour rather than a polygon. Here are some results.
Example of the combined contours;
As you can see in the output, the regions are not representing the full shapes that they should be. Another problem is when the regions overlap, they have no way of taking an average between what the edges should be.