Contrast enhancement is often used as preprocessing in computer vision, image processing, and pattern recognition. The contrast enhancement method using a 2D histogram is superior to the 1D histogram-based contrast enhancement because it enhances contrast using contextual information between adjacent pixels. In the 2D histogram-based algorithm, the kernel, which weights according to the difference in pixel values between adjacent pixels in the 2D histogram, is used. Since the kernel is fixed for every image, it can not provide the desired contrast adaptively to image contents. Thus, we propose an adaptive weight kernel based on the statistical information of the 2D histogram through linear regression. Once the kernel is obtained, it is used to strengthen the contrast efficiently through optimization techniques. Also, by using only the partial contextual information of the image, we drastically reduce the computational time which is a disadvantage of the conventional 2D histogram-based algorithms. Experimental results show that the proposed method is superior to conventional algorithms in terms of contrast enhancement performance.