Abstract : Inspired by the a contrario approach this paper proposes a way of setting the threshold when using parsimonious path filters to detect thin curvilinear structures in images. The a contrario approach, instead of modeling the structures to detect, models the noise to detect structures deviating from the model. In this scope, we assume noise composed of pixels that are independent random variables. Henceforth, cracks that are curvilinear sequences of bright pixels (not necessarily connected) are detected as abnormal sequences of bright pixels. In the second part, a fast approximation of the solution based on parsimonious path openings is shown.