The invention discloses a defogging method for an image with few backgrounds containing fog. The defogging method comprises the steps of S1, obtaining an intensity histogram A of a fog-containing image, judging whether the condition of containing little background light is met or not, and determining the coordinates of a termination point of a right boundary; S2, defogging the fog-containing image by utilizing a dark passage apriori algorithm; S3, judging the defogging degree, if the fog is not completely removed, changing parameters and executing the step S2 again; S4, if the fog is completely removed, determining a histogram B of the defogged image, marking the coordinates of a starting point of the right boundary of a peak value, and marking the coordinates of a termination point of the right boundary; S5, stretching the histogram; S6, performing histogram specification on the reconstructed histogram B' and the defogged image. The method is used for performing post-processing on the dark passage apriori algorithm through the histogram, the operation is simple and flexible, and different parameters can be set according to different specific images, so that the condition that a dark passage apriori processing result has difficulty in fine adjustment is avoided; the efficiency of the algorithm is high, and the obtained defogged image is relatively high in quality, and is similar to a real fog-free picture.