OpenCV Find Biggest Contour Using C++

Using OpencCV C++ interface it is very easy to processing with contour compared to old c interface. In old interface there are object like CvContourScanner  used to scan through each contour and the contours are stored in OpenCV Sequences. Also using all these things the code look like lengthy and complex. So here we are going to do all these thing using c++ interface.  A contour can be considered as a sequence of points that define a specific object in an image. Here in the below image we are going to extract the largest contour.