Abstract:
The pigpen scene in video frames often suffer from local disproportion luminance, which leads to inconvenience in subsequent images analysis. In this paper, an adaptive local lightness adjusting algorithm(ALLA) is proposed. Firstly,original RGB (red, green, blue) image is converted into YCbCr space (luminance is denoted by Y, Cb and Cr are the blue-difference and red-difference) in order to avoid the interference from chroma in YCbCr space. Secondly, only the Y gray-scale image of YCbCr space is divided into 2 areas of light and dark by adopting Ostu method. Thirdly, a method of nonlinear-reverse adjustment based on sine mode is applied to improving the gray value in the corresponding zones( i.e. the excessive bright or dark ones). Finally, for evaluating the validity of luminance improvement, a method of hypothesis testing is put forward, i.e. the processed image by ALLA is viewed as the testing one, and another processed image by standard graying is viewed as the reference one for the same original pigpen image; paired gradients of each pixel of the same pig’s edge in both them are computed; all paired gradient differences forms a set; the mean of the set as a index of the image quality is judged whether there is a significant change through hypothesis testing. Three types of typical pigpen images as testing samples are chosen in experiments. One of them is that the illumination is gentle to result in the luminance quality is satisfactory. Others are that the evening lighting and sunshine in the pigpen can cause the deviation on nature luminance, i.e. in the Y gray-scale image the low gray value in the zone vs. the high illumination intensity, otherwise, the high gray value in the zone. PSNRs of the testing ones after using ALLA are between 31 and 78, i.e. the quality level of the testing ones don’t decrease significantly. Furthermore, it is verified that the luminance level of the testing one are better than one of the reference one with the significance level α=0.95 based on our method of hypothesis testing. Meanwhile, another experiment shows the converged contour of pig in one other testing one by using same level-set method is more approximated to its actual contour than the reference. The results prove that ALLA is helpful for subsequent works on pig target segmentation.