The thresholding technique was then used for all of corrected sample images. A muscle region selection step was applied for
thresholded images that have more than one muscle region. The region having the largest area of muscle, i.e. the maximum number of pixels open, was selected as ROI. The contours of the ROI of sample images were obtained by using the Sobel edge detector and the corresponding masks were created by shrinking the extracted contour as described in Eq. (1).