Image quality assessment can provide important prior knowledge for subsequent picture processing, but it may be challenged by foggy distortion under a foggy weather condition, and there is no effective solution for the distorted images. In this paper, an effective image quality assessment method under foggy condition was proposed, with the purpose of giving image quality scores and their changes under different foggy density. Based on 29 reference images in LIVE image database, different image samples in a foggy day were generated. On the basis of analyzing foggy influences on image quality, this paper extracted features representing image scene characteristics in foggy day, used a method based on codebook to encode features, and trained features after using pooling strategy to encode, and, finally acquired image quality scores through the regression mode. Experimental results showed that, the higher accuracy, subjective and objective consistency, and higher identification on image quality under different foggy density can be obtained by the codebook-based method rather than other normal algorithms. The algorithm in this paper can solve the problem of image quality assessment under foggy condition.