A generalized multiclass histogram thresholding approach based on mixture modelling