Aiming at the response with 12bit pixel depth outputted by the infrared detector, while the digital image displayed on the screen is usually 8 bit, a nonuniformity correction algorithm of infrared image based on Gamma compression is proposed. This algorithm uses adaptive Gamma curves to compress the response of detector, and then corrects the medium-low temperature images and high temperature images with different calibration coefficients by using two-points correction. The experimental results show that the algorithm obtains good effect for nonuniformity correction, which can reduce the nonuniformity of the images corrected by traditional two-points correction by about 20%, and the medium-low temperature image after correction has rich detail information and good layering.