As you have not shared how you have traced object boundary, it is a bit difficult to answer you question efficiently.
Anyways, I can tell you a simple approach to do this task.
Convert your image to grayscale and pass it to a high pass filter. This will remove all points except the boundary of object.
It will store all the corner points in an array C.