[ A ] = ContourArea( C )
C is a 2*n matrix corresponding to the output of the low-level contourc function. A is a 2*m matrix, the first line corresponding to the m heights specified in C and the second line corresponding to the output of Polyarea of each contour.
This function is straight forward and is no rocket science. Could be improved by adding as input the number of contours for vectorization.