The quality and safety of bridges are related to the national economy and people's livelihood, and to thousands of families. The reason for bridge collapse is often due to the lack of scientific and timely bridge disease detection. However, when the bridge is completed and put into use, it will be repeatedly crushed by external forces and affected by natural factors such as rain, snow, flood, freezing and earthquake. As one of the most important bridge diseases, cracks seriously affect the safe operation of bridges, and even lead to accidents of bridge destruction and death. In view of this situation, this paper studies the bridge crack detection based on wireless sensor network. By setting appropriate threshold, the background and target are divided and the relevant feature information of cracks is extracted. It is composed of an off-line data processing system and a data acquisition vehicle. Finally, through the evaluation and comparison, the favorable rate of this algorithm is higher than the other two algorithms, and the favorable rate will be as high as 88.42%. In the test of running time, the running time of this algorithm is shorter than that of the other two algorithms, and the average running time is only 6.02 seconds. It can be seen that this algorithm is more suitable for bridge crack detection.