We reassess the relationship between the photospheric magnetic field strength and the Ca II K intensity for a variety of surface features as a function of the position on the disc and the solar activity level. This relationship can be used to recover the unsigned photospheric magnetic field from images recorded in the core of Ca II K line. We have analysed 131 pairs of high-quality, full-disc, near-co-temporal observations from SDO/HMI and Rome/PSPT spanning half a solar cycle. To analytically describe the observationally-determined relation, we considered three different functions: a power law with an offset, a logarithmic function, and a power law function of the logarithm of the magnetic flux density. We used the obtained relations to reconstruct maps of the line-of-sight component of the unsigned magnetic field (unsigned magnetograms) from Ca II K observations, which were then compared to the original magnetograms. We find that both power-law functions represent the data well, while the logarithmic function is good only for quiet periods. We see no significant variation over the solar cycle or over the disc in the derived fit parameters, independently of the function used. We find that errors in the independent variable, usually not accounted for, introduce attenuation bias. To address this, we binned the data with respect to the magnetic field strength and Ca II K contrast separately and derived the relation for the bisector of the two binned curves. The reconstructed unsigned magnetograms show good agreement with the original ones. RMS differences are less than 90 G. The results were unaffected by the stray-light correction of the SDO/HMI and Rome/PSPT data. Our results imply that Ca~II~K observations, accurately processed and calibrated, can be used to reconstruct unsigned magnetograms by using the relations derived in our study.