The invention belongs to the field of photography, and discloses an anti-glare method for a street lamp camera. The method comprises the following steps: according to a lamp structure, the location relationship between LED modules and a camera to be detected, and the distance between a light-emitting center of each LED module and the camera to be detected, selecting a structure type of lens hoods, so as to obtain a 3D model of the lens hoods; obtaining a scattering model of the camera to be detected; carrying out scattering simulation to calculate the intensity of illumination on an image-sensitive element of the camera to be detected, the total integrated scattering (TIS), and the image contrast or a PST value of the camera; according to the intensity of illumination, the TIS, and the image contrast or the PST value of the camera obtained through the scattering simulation, judging whether the structure type, the heights and the inclinations which are selected for the lens hoods meet the requirements or not; and according to the structure type, the heights and the inclinations which are selected for the lens hoods, determining the structure type, the heights and the inclinations of the lens hoods, and carrying out productization of the lens hoods. The anti-glare method provided by the invention can be widely applied in the fields of designing and manufacturing of various security street lamps.