We propose a new approach for constructing databases for training and testing similarity metrics for structurally lossless image compression. Our focus is on structural texture similarity (STSIM) metrics and the matched-texture compression (MTC) approach. We first discuss the metric requirements for structurally lossless compression, which differ from those of other applications such as image retrieval, classification, and understanding. We identify “interchangeability” as the key requirement for metric performance, and partition the domain of “identical” textures into three regions, of “highest,” “high,” and “good” similarity. We design two subjective tests for data collection, the first relies on ViSiProG to build a database of “identical” clusters, and the second builds a database of image pairs with the “highest,” “high,” “good,” and “bad” similarity labels. The data for the subjective tests is generated during the MTC encoding process, and consist of pairs of candidate and target image blocks. The context of the surrounding image is critical for training the metrics to detect lighting discontinuities, spatial misalignments, and other border artifacts that have a noticeable effect on perceptual quality. The identical texture clusters are then used for training and testing two STSIM metrics. The labelled image pair database will be used in future research.