Fixing problems and progress

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.

Input;

Test3.png

Example of the combined contours;

combIso.png

 

 

 

 

 

 

 

 

 

Output;

output.png

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.

 

Advertisements

First Pebbles

 

Test2

This is a sample image that I have been using for extracting the regions by colour.

After I extract each region, I can use the boundary as a polygon, and find the normalized representation. Here are the results from all 4 regions.

normImg

normImg2

normImg3normImg4

Intro

My name is Forest Anderson, and this will be a blog concentrated on updates from my research at Carleton University, under the watch of Dr. David Mould. The project is in the field of image processing, in which we are converting digital images to pebble mosaics. Every several days, I will make a post about my progress.