It is difficult to detect the target area of the image which has complex gray scale information in the field of industrial detection. So in order to improve the accuracy of detection, this paper proposed improved image segmentation method based on the region of interest. In the proposed method, the authors extracted regions of interest from the detected image that remove the effects of the complex environmental condition. In addition, dynamic threshold algorithm is used which is appropriate for extracting the target area from the region of interest. To make the algorithm more precise, the paper use mathematical morphology method to process the result which is segmented by dynamic threshold algorithm. The experimental results show that target area of the image can be extracted very accurately across a large number of test-cases. This method can overcome the limitations of traditional segmentation algorithm effectively, and it has advantages of fast detection speed, stable robustness and high efficiency.