CN-121981895-A - Microsphere image stitching method and device, terminal equipment and computer program product
Abstract
The application is suitable for the technical field of image processing, and provides a microsphere image splicing method, a device, terminal equipment and a computer program product, which comprise the steps of superposing channel images acquired at the same position of a microsphere in each channel of a designated round to obtain microsphere small images corresponding to each position; the method comprises the steps of setting a preset proportion of overlapping areas of two microsphere minidrawings at any adjacent positions, sequentially splicing the microsphere minidrawings based on a preset sequence and the overlapping areas to obtain a complete image corresponding to a designated round, recording the reference position of the spliced minidrawings in a new canvas after each splicing is completed, and respectively splicing channel images at different positions of each channel of each round based on the reference position of each microsphere minidrawing in the complete image to obtain a composite image of each channel of each round. The application can realize high-precision and high-efficiency alignment of cross-round multi-channel panoramic images and effectively inhibit error propagation.
Inventors
- LUO YANDE
- ZHANG FENG
Assignees
- 利德健康科技(广州)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251225
Claims (10)
- 1. The microsphere image stitching method is characterized by comprising the following steps of: Overlapping channel images acquired at the same position of the microsphere in each channel of a designated round to obtain microsphere small images corresponding to each position; Sequentially splicing the microsphere small images based on a preset sequence and each overlapping area to obtain a complete image corresponding to the appointed round, wherein after each splicing is completed, the reference position of the spliced small image in a new canvas after each splicing is recorded, and the spliced small image refers to the microsphere small image which needs to be spliced when each splicing is completed; and based on the reference positions of the microsphere small images in the complete image, respectively splicing the channel images of different positions of each channel of each round to obtain a composite image of each channel of each round.
- 2. The microsphere image splicing method according to claim 1, wherein the overlapping the channel images acquired at the same position of the microsphere in each channel of the designated round to obtain the microsphere small image corresponding to each position includes: for any position, obtaining a maximum channel combined image of the position based on respective pixel maximum values of different pixel coordinates in each channel image corresponding to the position; performing color space standardization on each maximum channel combined image to obtain each standard image; And linearly stretching each standard image to obtain each microsphere small image.
- 3. The microsphere image splicing method according to claim 1, wherein the splicing each microsphere patch sequentially based on a preset sequence and each overlapping area to obtain a complete image corresponding to the designated round comprises: Determining a reference small image corresponding to the spliced small image when each splicing is carried out based on the preset sequence, wherein the reference small image refers to a microsphere small image which is adjacent to the spliced small image and is spliced; And splicing the spliced small image with an old canvas where the reference small image is positioned based on the reference position of the reference small image and the overlapped area of the spliced small image to obtain the complete image, wherein the old canvas contains all microsphere small images which are spliced before the spliced small image.
- 4. The method of stitching microsphere images according to claim 3, wherein the complete image comprises a first line of images, and stitching the stitched small image with a corresponding old canvas based on a reference position of the reference small image and an overlapping region of the stitched small image comprises: Performing feature matching on the reference small image and the spliced small image subjected to the image mask processing aiming at each splicing of the first row to obtain a feature point combination; calculating and obtaining the splicing offset of the spliced small image relative to the reference small image based on the characteristic point combination; Calculating to obtain a first boundary coordinate set of the old canvas on a first new canvas based on the splicing offset, the image size of the spliced small drawing and the canvas size of the old canvas, and calculating to obtain a second boundary coordinate set of the spliced small drawing on the first new canvas; And based on the first boundary coordinate set and the second boundary coordinate set, placing the old canvas and the spliced small drawing in the first new canvas to obtain the first line image.
- 5. The method of stitching microsphere images according to claim 4, wherein the calculating a first set of boundary coordinates of the old canvas on the first new canvas and a second set of boundary coordinates of the stitched small image on the first new canvas based on the stitching offset, the image size of the stitched small image and the canvas size of the old canvas comprises: Calculating a first offset of the spliced small drawing relative to the old canvas based on the splicing offset and the reference position for each splicing of the other columns in the first row, wherein the other columns are columns except for a first column and a second column; calculating boundary coordinates of the first new canvas based on the first offset, the image size of the spliced small drawing and the canvas size of the old canvas; calculating the canvas size of the first new canvas based on the boundary coordinates; calculating to obtain the first boundary coordinate set based on the canvas size of the first new canvas, the boundary coordinates and the canvas size of the old canvas; And calculating the second boundary coordinate set based on the first offset, the boundary coordinates and the canvas size of the old canvas.
- 6. The microsphere image stitching method according to claim 3, wherein the stitching the stitched small image with the corresponding old canvas based on the reference position of the reference small image and the overlapping region of the stitched small image comprises: Performing feature matching on the reference small image and the spliced small image which are subjected to image mask processing aiming at each splicing of the non-first line to obtain a feature point combination; calculating and obtaining the splicing offset of the spliced small image relative to the reference small image based on the characteristic point combination; Calculating a second offset of the spliced small image relative to the old canvas based on the splicing offset and the reference position; calculating to obtain a third boundary coordinate set of the old canvas on a second new canvas based on the second offset, the image size of the spliced small drawing and the canvas size of the old canvas, and calculating to obtain a fourth boundary coordinate set of the spliced small drawing on the second new canvas; and based on the third boundary coordinate set and the fourth boundary coordinate set, placing the old canvas and the spliced small drawing in the second new canvas to obtain the complete image.
- 7. The microsphere image splicing method according to claim 6, wherein the feature matching is performed on the reference small image and the spliced small image subjected to the image mask processing to obtain a feature point combination, and the feature point combination comprises: For each stitching of the non-first columns of the non-first rows, clipping the old canvas based on the reference position and clipping size to obtain a clipping plot; performing image mask processing on the cut small image and the spliced small image to obtain a mask image, wherein the mask image comprises the overlapping area; and performing feature matching based on the mask image to obtain the feature point combination.
- 8. A microsphere image stitching device, comprising: The overlapping unit is used for overlapping the channel images acquired at the same position of the microsphere in each channel of the designated round to obtain microsphere small images corresponding to each position; The system comprises a first small image splicing unit, a second small image splicing unit and a third small image splicing unit, wherein the first small image splicing unit is used for sequentially splicing all the microsphere small images based on a preset sequence and all the overlapping areas to obtain a complete image corresponding to the appointed round; And the image stitching unit is used for stitching the channel images at different positions of each channel of each round based on the reference positions of the microsphere small images in the complete image, so as to obtain the composite image of each channel of each round.
- 9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the microsphere image stitching method according to any one of claims 1 to 7 when executing the computer program.
- 10. A computer program product comprising a computer program which, when run, implements the microsphere image stitching method according to any one of claims 1 to 7.
Description
Microsphere image stitching method and device, terminal equipment and computer program product Technical Field The application belongs to the technical field of image processing, and particularly relates to a microsphere image splicing method, a microsphere image splicing device, terminal equipment and a computer program product. Background In space transcriptomics studies, bases are usually immobilized on the microsphere surface in order to obtain spatial position information. The microspheres are modified with fluorescent groups and blocking groups, and fluorescent signals can be generated by laser excitation. The experiment was performed using four fluorescence channels (CY 5, FITC, ROX and TRITC) and fluorescence images of the microspheres were captured by a CCD camera. In the study of space transcriptomics, panoramic images acquired by a plurality of channels of a plurality of rounds need to be precisely aligned, so that each microsphere is ensured to realize position matching in different rounds and channels. When displacement deviation generated when the CCD camera shoots in different rounds and different channels is smaller, image stitching can be directly carried out without registration operation. However, the existing image stitching method needs to repeatedly execute feature extraction, feature matching and stitching processes on each small image shot by different rounds and different channels, which is not only time-consuming seriously, but also performs matching operation without actual offset, which may cause error accumulation and affect final alignment accuracy. Disclosure of Invention The embodiment of the application provides a microsphere image splicing method, a device, terminal equipment and a computer program product, which are used for solving the problems that in the prior art, feature extraction, feature matching and splicing processes are required to be repeatedly executed on each small image shot by different rounds and different channels, so that time consumption is serious, matching operation is still carried out under the condition that no actual offset exists, and error accumulation is possibly caused to influence the final alignment precision. In a first aspect, an embodiment of the present application provides a microsphere image stitching method, including: Overlapping channel images acquired at the same position of the microsphere in each channel of a designated round to obtain microsphere small images corresponding to each position; Sequentially splicing the microsphere small images based on a preset sequence and each overlapping area to obtain a complete image corresponding to the appointed round, wherein after each splicing is completed, the reference position of the spliced small image in a new canvas after each splicing is recorded, and the spliced small image refers to the microsphere small image which needs to be spliced when each splicing is completed; and based on the reference positions of the microsphere small images in the complete image, respectively splicing the channel images of different positions of each channel of each round to obtain a composite image of each channel of each round. Optionally, the overlapping the channel images acquired at the same position of the microsphere in each channel of the designated round to obtain a microsphere small image corresponding to each position includes: for any position, obtaining a maximum channel combined image of the position based on respective pixel maximum values of different pixel coordinates in each channel image corresponding to the position; performing color space standardization on each maximum channel combined image to obtain each standard image; And linearly stretching each standard image to obtain each microsphere small image. Optionally, the splicing each microsphere small image sequentially based on a preset sequence and each overlapping area to obtain a complete image corresponding to the designated round includes: Determining a reference small image corresponding to the spliced small image when each splicing is carried out based on the preset sequence, wherein the reference small image refers to a microsphere small image which is adjacent to the spliced small image and is spliced; And splicing the spliced small image with an old canvas where the reference small image is positioned based on the reference position of the reference small image and the overlapped area of the spliced small image to obtain the complete image, wherein the old canvas contains all microsphere small images which are spliced before the spliced small image. Optionally, the whole image comprises a first line image, and the splicing the small image and the corresponding old canvas based on the reference position of the reference small image and the overlapping area of the small spliced image comprises the following steps: Performing feature matching on the reference small image and the spliced small image subjected to the image