Context. The new generation of broad-band radio continuum surveys will provide large data sets with polarization information. New algorithms need to be developed to extract reliable catalogs of linearly polarized sources that can be used to characterize those sources and produce a dense rotation measure (RM) grid to probe magneto-ionized structures along the line of sight via Faraday rotation.Aims. The aim of the paper is to develop a computationally efficient and rigorously defined source-finding algorithm for linearly polarized sources.Methods. We used a calibrated data set from the LOw Frequency ARray (LOFAR) at 150 MHz centered on the nearby galaxy M51 to search for polarized background sources. With a new imaging software, we re-imaged...