A novel local threshold algorithm for images with poor illumination and complex texture surface is presented in this paper. This algorithm improves segmentation quality by selecting local thresholds according to object level information incorporating prior knowledge, specifically the solidity features. Local thresholds are searched by maximizing the probability of solidity, and fragments with lower segmentation quality are filtered by the stability of solidity. Since thresholding results are produced with object level information, our algorithm is robust in dealing with images of poor quality. Experiments on oil sand images show the proposed algorithm has superior performance to existing local threshold approaches in terms of segmentation quality.