how to get freeman chain code in opencv?

I am trying to get chain code using this function but unable to understand its parameters and explanation is not given for each parameter on opencv documentation.
C: CvSeq* cvApproxChains(CvSeq* src_seq, CvMemStorage* storage, int method=CV_CHAIN_APPROX_SIMPLE, double parameter=0, int minimal_perimeter=0, int recursive=0 )
this function takng chaincode as input, is there any way to retrieve the chaincode?

if any one come across same problem earlier and having solution for that then plz reply
thankyou!!