A method of spatial analysis of analytes comprising: A) obtaining a data structure in electronic form comprising (i) an image of a sample on a substrate and (ii) a substrate identifier unique to the substrate, wherein: the substrate includes a plurality of fiducial markers, the substrate includes a set of capture spots, wherein the set of capture spots comprises at least 1000 capture spots; and the image comprises an array of pixel values, wherein the array of pixel values comprises at least 100,000 pixel values; B) analyzing the array of pixel values to identify a plurality of derived fiducial spots of the image; C) using the substrate identifier of the data structure to select a first template in a plurality of templates, wherein each template in the plurality of templates comprises reference positions for a corresponding plurality of reference fiducial spots and a corresponding coordinate system; D) aligning the plurality of derived fiducial spots of the image with the corresponding plurality of reference fiducial spots of the first template using an alignment algorithm to obtain a transformation between the plurality of derived fiducial spots of the image and the corresponding plurality of reference fiducial spots of the first template; E) using the transformation and the coordinate system of the first template to register the image to the set of capture spots; and F) analyzing the image after the using E) in conjunction with spatial analyte data associated with each capture spot, thereby performing spatial analysis of analytes; wherein the B) analyzing comprises: identifying a plurality of candidate derived fiducial spots by thresholding the array of pixel values into a plurality of threshold images and identifying, within the plurality of threshold images, groups of pixels having white values, clustering the plurality of candidate derived fiducial spots based on spot size, thereby distributing the plurality of candidate derived fiducial spots into a plurality of subsets of candidate derived fiducial spots, wherein each respective subset of candidate derived fiducial spots in the plurality of subsets of candidate derived fiducial spots has a characteristic size, and selecting the subset of candidate derived fiducial spots in the plurality of subsets of candidate derived fiducial spots that has the largest characteristic size as the plurality of derived fiducial spots of the image. A) obtaining a data structure in electronic form comprising (i) an image of a sample on a substrate and (ii) a substrate identifier unique to the substrate, wherein: the substrate includes a plurality of fiducial markers, the substrate includes a set of capture spots, wherein the set of capture spots comprises at least 1000 capture spots; and the image comprises an array of pixel values, wherein the array of pixel values comprises at least 100,000 pixel values; the substrate includes a plurality of fiducial markers, the substrate includes a set of capture spots, wherein the set of capture spots comprises at least 1000 capture spots; and the image comprises an array of pixel values, wherein the array of pixel values comprises at least 100,000 pixel values; B) analyzing the array of pixel values to identify a plurality of derived fiducial spots of the image; C) using the substrate identifier of the data structure to select a first template in a plurality of templates, wherein each template in the plurality of templates comprises reference positions for a corresponding plurality of reference fiducial spots and a corresponding coordinate system; D) aligning the plurality of derived fiducial spots of the image with the corresponding plurality of reference fiducial spots of the first template using an alignment algorithm to obtain a transformation between the plurality of derived fiducial spots of the image and the corresponding plurality of reference fiducial spots of the first template; E) using the transformation and the coordinate system of the first template to register the image to the set of capture spots; and F) analyzing the image after the using E) in conjunction with spatial analyte data associated with each capture spot, thereby performing spatial analysis of analytes; identifying a plurality of candidate derived fiducial spots by thresholding the array of pixel values into a plurality of threshold images and identifying, within the plurality of threshold images, groups of pixels having white values, clustering the plurality of candidate derived fiducial spots based on spot size, thereby distributing the plurality of candidate derived fiducial spots into a plurality of subsets of candidate derived fiducial spots, wherein each respective subset of candidate derived fiducial spots in the plurality of subsets of candidate derived fiducial spots has a characteristic size, and selecting the subset of candidate derived fiducial spots in the plurality of subsets of candidate derived fiducial spots that has the largest characteristic size as the plurality of derived fiducial spots of the image.