After preliminary results Ifound that the area we would calculate was always lacking by half of the contours length. I speculated that the follow function traced the inner contour of the ROI, thus decreasing the area enclosed by some value. M. Sison proposed that to correct the calculated area, we simply add half the length of the contour. After testing the method over various shapes, both regular and irregular, we found the the proposed correction was indeed valid.
Sample Results
Analytical: 32071 pixels
Pixel count: 32701 pixels
Program: 32071 pixels
Shape 3: Irregular
Analytical: N/A
Pixel count: 26526 pixels
Program: 26526 pixels
For this experiment, I give myself a score of 10/10 because I was able to implement the method properly and the results attest to the accuracy of the program.