The coordinates of your circle are stored in
px
and
py
. So you can simply use these coordinates to draw a line with the
line[
^] function.
You should also consider using the new openCV API. You are working with the older C version of openCV. There exists a new C++ version for quite some time now which makes many tasks easier to implement, understand and also less error prone.