The growth monitoring of edible mushroom based on machine vision is an important part of the production and management of industrial edible mushroom. In order to solve the problem of serious uneven illumination of straw mushroom image in closed and no light straw mushroom room environment, this paper establishes the gray level calculation formula of mushroom bed image under multiple LED light sources, and construct a reasonable mask background image used to enhance the straw mushroom image. The processed image result showed the average, deviation and range of gray scale of mushroom image decreased by 58.2%, 65.81% and 45.28% respectively, the mean, deviation and range of background gray decreased by 97.8 %, 81.69 % and 61.02 % respectively. Compared with Multi-Scale Retinex and Homomorphic Filtering, the algorithm in this paper performs better in concentrating of gray distribution and increasing the image gray level difference of straw mushroom and culture material, which is helpful for the subsequent segmentation and recognition of the mushroom image.