A classification prediction image stitching method based on pixel intersection voting
By using the classification prediction map stitching method of pixel handover voting in remote sensing image stitching, the image mask conversion, overlay and gradient processing operators are used to solve the problem of gaps at the image connection of the stitching result, and more efficient and continuous image stitching is achieved.
Patent Information
- Application Number
- CN202510169479.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-02-17
AI Technical Summary
The existing remote sensing image stitching method has gaps at the connection of the image result of the stitching, making it difficult to perform subsequent applications.
The classification prediction map splicing method based on pixel handover voting is adopted. Through the image mask conversion operator, the image cover operator and the pixel gradient processing operator, the image efficient splicing of the image is achieved and the discontinuity of the splicing edge is reduced.
It improves the connectivity between the stitching edge and the image, obtains a smoother classification prediction map, reduces the impact of shear preprocessing on the results, and avoids gaps at the stitching result image connection, which is suitable for subsequent applications.
Smart Images

Figure CN119671848B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a classification prediction image splicing method based on pixel intersection voting. Background Art
[0002] In remote sensing technology, image stitching technology is one of the key links. It can combine multiple local remote sensing images into a complete, high-resolution large image, which is widely used in various important tasks. Therefore, it is necessary to develop and study efficient and accurate remote sensing image stitching methods.
[0003] At present, there are three main methods for remote sensing image stitching: the first is a remote sensing image stitching method based on feature point matching. First, the feature points in the remote sensing image are detected (such as: scale-invariant feature transformation algorithm, accelerated robust feature algorithm). After detecting the feature points, the image is stitched by calculating the descriptor of the feature points for matching; this method can find the corresponding feature points in the image more accurately, and has a good stitching effect for images with obvious features. However, the problem with this method is that the amount of calculation is large during the feature point extraction and matching process, especially for high-resolution remote sensing images, the processing time is long, resulting in low efficiency of remote sensing image stitching. The second is a remote sensing image stitching method based on template matching. First, a template is set in advance, and then the area most similar to the template is searched in the image to be stitched for stitching. However, the selection of templates in this method is often subjective, and when the objects in the image are more complex or deformed, it is difficult to find a suitable template, which limits the scope of application of this method. Therefore, the second method cannot stitch remote sensing images of complex terrain. Another problem with this method is that the search process is time-consuming, especially for large-scale remote sensing image prediction map stitching, which requires comparison of a large number of areas, resulting in low efficiency of remote sensing image stitching. The third category is the remote sensing image stitching method based on overlay stitching. By directly overlaying the new image on the corresponding position of the existing large image, this method has high image stitching efficiency and can also stitch remote sensing images of complex terrain, but the resulting stitching results have gaps at the joints, making it difficult to apply them later. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that the existing remote sensing image stitching method still has gaps at the connection of the stitching result images, which makes it difficult to perform subsequent applications, and proposes a classification prediction image stitching method based on pixel intersection voting.
[0005] A classification prediction image splicing method based on pixel intersection voting is specifically as follows:
[0006] S1. Establish an image mask conversion operator ImageToMask, the input of ImageToMask is the color conversion table Convert and the path Imagefile where the files storing multiple cut classification prediction images are located, and the output is the image mask list ImageMaskList;
[0007] S2. Establish an image coverage operator ImageCoverage. The input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset stitching middle coverage value Middle and the image mask list ImageMaskList. The output of ImageCoverage is the image stack list ImageStackList.
[0008] S3, establish a pixel gradient processing operator PixelGradient, the input of PixelGradient is the image stack list ImageStackList and the total number of categories Category, and the output of PixelGradient is the splicing mask image MaskEnd;
[0009] S4. Use the stitching mask image MaskEnd obtained in S3 to obtain the final stitching result RgbEnd.
[0010] Furthermore, the image mask conversion operator ImageToMask is established in S1, and the input of ImageToMask is the color conversion table Convert and the path Imagefile where the files storing the multiple cut classification prediction images are located, and the output is the image mask list ImageMaskList, which is specifically:
[0011] S101, establishing an image mask conversion operator ImageToMask, wherein the input of ImageToMask is the path Imagefile where a plurality of cut classification prediction images are stored, and a color conversion table Convert;
[0012] The color conversion table Convert stores the RGB value of each category in the cut classification prediction map;
[0013] S102, initialize the image mask list ImageMaskList = create a blank list;
[0014] S103, initialize the counter ImageCounter=1;
[0015] S104, obtaining the cut classification prediction image CImage=the ImageCounterth cut classification prediction image stored in the path Imagefile where the file storing the multiple cut classification prediction images is located;
[0016] S105, using CImage and color conversion table Convert to obtain the mask processing image CMImage;
[0017] S106, adding CMImage to the image mask list ImageMaskList;
[0018] S107. Let ImageCounter= ImageCounter+1;
[0019] S108, if ImageCounter is less than or equal to the total number of cut classification prediction images in the path Imagefile where the file storing the multiple cut classification prediction images is located, go to S104, otherwise go to S109;
[0020] S109, output the image mask list ImageMaskList.
[0021] Furthermore, the image coverage operator ImageCoverage is established in S2, and the input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset splicing middle coverage value Middle and the image mask list ImageMaskList, and the output of ImageCoverage is the image stack list ImageStackList, specifically:
[0022] S201, establishing an image coverage operator ImageCoverage, where the input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset splicing middle coverage value Middle and the image mask list ImageMaskList;
[0023] S202, create an image stack list ImageStackList = a three-dimensional list with dimensions of Widthmax, Heightmax, and category list;
[0024] The category list is a list containing Category elements, and the values of all elements in the category list are 0;
[0025] S203, initialize the operator counter MaskCounter=1;
[0026] S204, operator image MImage=the MaskCounterth mask-processed image stored in the image mask list ImageMaskList;
[0027] S205, obtaining the width ImageWidth of the operator image MImage, and obtaining the height ImageHeight of the operator image MImage;
[0028] S206, obtaining the row number ImageRow where the operator image MImage is located, and obtaining the column number ImageCol where the operator image MImage is located;
[0029] S207, using ImageRow, ImageHeight and a preset splicing middle coverage value Middle to establish an operator row counter RowCounter;
[0030] S208, if RowCounter is greater than Heightmax, go to S209, otherwise go to S210;
[0031] S209, set RowCounter=Heightmax, and then execute S210;
[0032] S210. Let RowCounter=RowCounter-ImageHeight;
[0033] S211, operator row overflow variable RowCountLoss=RowCounter;
[0034] S212, using ImageCol, ImageWidth and a preset splicing middle coverage value Middle to establish an operator column counter ColCounter;
[0035] S213, if ColCounter is greater than Widthmax, go to S214, otherwise go to S215;
[0036] S214, set ColCounter=Widthmax, and then execute S215;
[0037] S215. Let ColCounter=ColCounter-ImageWidth;
[0038] S216, set the operator column overflow variable ColCountLoss=ColCounter;
[0039] S217, using the operator row overflow variable RowCountLoss, the operator column overflow variable ColCountLoss, the operator image MImage, the operator row counter RowCounter and the operator column counter ColCounter to obtain the operator pixel category MetaCategory;
[0040] S218, Order
[0041] ImageStackList[RowCounter][ColCounter][MetaCategory]=ImageStack[RowCounter][ColCounter][MetaCategory]+1
[0042] Where ImageStackList[RowCounter][ColCounter][MetaCategory] is the value of the MetaCategory element in the RowCounterth row and the ColCounterth column of the image stack list;
[0043] S219, let ColCounter=ColCounter+1;
[0044] S220, if ColCounter-ColCountLoss is less than ImageWidth, go to S217, otherwise go to S221;
[0045] S221, let RowCounter=RowCounter+1;
[0046] S222, if RowCounter-RowCountLoss is less than ImageHeight, go to S212, otherwise go to S223;
[0047] S223, set MaskCounter=MaskCounter+1;
[0048] S224, if MaskCounter is less than or equal to the total number of masked images in the image mask list ImageMaskList, go to S204, otherwise go to S225;
[0049] S225. Output the image mask list ImageStackList.
[0050] Furthermore, the operator row counter RowCounter is established by using ImageRow, ImageHeight and the preset splicing middle coverage value Middle in S207, specifically:
[0051] RowCounter=(ImageRow-1)*(ImageHeight-Middle)+ImageHeight.
[0052] Furthermore, the operator column counter ColCounter is established by using ImageCol, ImageWidth and the preset splicing middle coverage value Middle in S212, specifically:
[0053] ColCounter=(ImageCol-1)*(ImageWidth-Middle)+ImageWidth.
[0054] Furthermore, the operation in S217 uses the operator row overflow variable RowCountLoss, the operator column overflow variable ColCountLoss, the operator image MImage, the operator row counter RowCounter, and the operator column counter ColCounter to obtain the operator pixel category MetaCategory, specifically:
[0055] MetaCategory=MImage[RowCounter-RowCountLoss][ColCounter-ColCountLoss]
[0056] Among them, MImage[RowCounter-RowCountLoss][ColCounter-ColCountLoss] is the pixel value of the RowCounter-RowCountLossth row and the ColCounter-ColCountLossth column in MImage.
[0057] Furthermore, the pixel gradient processing operator PixelGradient is established in S3, the input of PixelGradient is the image stack list ImageStackList and the total number of categories Category, and the output of PixelGradient is the splicing mask map MaskEnd, specifically:
[0058] S301, establishing a pixel gradient processing operator PixelGradient, where the input of PixelGradient is the total number of categories Category and the image stack list ImageStackList;
[0059] S302, establish a splicing mask image MaskEnd=establish a two-dimensional list with a width equal to the width of ImageStackList and a height equal to the height of ImageStackList, and all element values of the list are 0;
[0060] S303, operator row counter RowCount=height of image stack list ImageStackList;
[0061] S304, operator column counter ColCount=width of image stack list ImageStackList;
[0062] S305, if RowCount is less than or equal to 0, go to S322, otherwise go to S306;
[0063] S306, if ColCount is less than or equal to 0, go to S321, otherwise go to S307;
[0064] S307, operator temporary storage list TemporaryList = a list consisting of the maximum value index in ImageStackList [RowCount][ColCount];
[0065] S308, if TemporaryList is a list type, go to S309, otherwise go to S319;
[0066] S309, establish an operator gradient list GradientList = a list containing Category elements, and all element values in the list are 0;
[0067] S310, establishing an operator gradient storage list GStorageList;
[0068] S311, operator storage counter GSCount=the total number of elements stored in GStorageList;
[0069] S312, if GSCount is greater than 0, go to S313, otherwise go to S316;
[0070] S313, if GStorageList[GSCount] exists in TemporaryList, go to S314, otherwise go to S315;
[0071] Among them, GStorageList[GSCount] is the GSCount-th element in GStorageList;
[0072] S314. Let GradientList[GStorageList[GSCount]]=GradientList[GStorageList[GSCount]]+1;
[0073] Among them, GradientList[GStorageList[GSCount]] is the value of the GStorageList[GSCount]th element in GradientList;
[0074] S315, set GSCount=GSCount-1, and go to S312;
[0075] S316, if the maximum value in GradientList is not unique, go to S317, otherwise go to S318;
[0076] S317, set MaskEnd[RowCount][ColCount]=GradientList[0], and go to S320;
[0077] S318, set MaskEnd[RowCount][ColCount]=GradientList, and go to S320;
[0078] S319. Let MaskEnd[RowCount][ColCount]=TemporaryList;
[0079] S320, set ColCount=ColCount-1, and go to S306;
[0080] S321, set RowCount=RowCount-1, and go to S305;
[0081] S322. Use MaskEnd as the output of PixelGradient.
[0082] Furthermore, the operator temporary storage list TemporaryList in S307 = a list consisting of the maximum value index in ImageStackList[RowCount][ColCount], specifically:
[0083] If the maximum value in ImageStackList [RowCount][ColCount] is unique, the operator temporary list TemporaryList has only one value; if the maximum value is not unique, the operator temporary list TemporaryList stores all the corresponding indexes of the maximum values.
[0084] Furthermore, the establishment of the operator gradient storage list GStorageList in S310 is specifically as follows:
[0085] Get the values of ImageMaskList [RowCount][ColCount-1], ImageMaskList [RowCount-1][ColCount], ImageMaskList [RowCount][ColCount+1], ImageMaskList [RowCount+1][ColCount]. If the current value does not exist or is a list, it will not be used. The used value will be stored in the operator gradient storage list GStorageList.
[0086] The beneficial effects of the present invention are:
[0087] The present invention provides a classification prediction image splicing method based on pixel intersection voting. The present invention improves the existing image splicing method, can support overlay splicing and enhance the connectivity between the splicing edge and the image, thereby obtaining a smoother classification prediction image. The present invention uses an image overlay operator and a pixel gradient processing operator to obtain a spliced image of the classification prediction image. The present invention reduces the impact of shearing preprocessing and image overlay splicing on the classification prediction result, uses the continuity of the picture and pixel approximate calculation to accurately blur the splicing coverage edge of the prediction image, and avoids the appearance of gaps at the connection of the splicing result image. The present invention uses the continuity feature to improve the accuracy of classification after the prediction image is spliced, and is more suitable for subsequent applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 Predict graphs for multiple cut classifications;
[0089] Figure 2 The stitching result image. DETAILED DESCRIPTION
[0090] Specific implementation method 1: The specific process of the classification prediction image splicing method based on pixel handover voting in this implementation method is as follows:
[0091] S1. Establish an image mask conversion operator ImageToMask. The input of ImageToMask is the color conversion table Convert and the path Imagefile where the files storing multiple cut classification prediction images are located. The output is the image mask list ImageMaskList. Specifically:
[0092] S101, establishing an image mask conversion operator ImageToMask, wherein the input of ImageToMask is the path Imagefile where a plurality of cut classification prediction images are stored, and a color conversion table Convert;
[0093] The color conversion table Convert stores the RGB value of each category in the cut classification prediction map;
[0094] S102, initialize the image mask list ImageMaskList = create a blank list;
[0095] S103, initialize the counter ImageCounter=1;
[0096] S104, obtaining a cut classification prediction image CImage=the ImageCounterth cut classification prediction image stored in the path Imagefile where the file storing the multiple cut classification prediction images is located;
[0097] S105, using CImage and color conversion table Convert to obtain the mask processing image CMImage;
[0098] S106, adding CMImage to the image mask list ImageMaskList;
[0099] S107. Let ImageCounter= ImageCounter+1;
[0100] S108, if ImageCounter is less than or equal to the total number of cut classification prediction images in the path Imagefile where the file storing the multiple cut classification prediction images is located, go to S104, otherwise go to S109;
[0101] S109, output the image mask list ImageMaskList.
[0102] S2. Establish an image coverage operator ImageCoverage. The input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset stitching middle coverage value Middle and the image mask list ImageMaskList. The output of ImageCoverage is the image stack list ImageStackList, specifically:
[0103] S201, establishing an image coverage operator ImageCoverage, where the input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset splicing middle coverage value Middle and the image mask list ImageMaskList;
[0104] S202, create an image stack list ImageStackList = a three-dimensional list with dimensions of Widthmax, Heightmax, and category list;
[0105] The category list is a list containing Category elements, and the values of all elements in the category list are 0;
[0106] S203, initialize the operator counter MaskCounter=1;
[0107] S204, operator image MImage=the MaskCounterth mask-processed image stored in the image mask list ImageMaskList;
[0108] S205, obtaining the width ImageWidth of the operator image MImage, and obtaining the height ImageHeight of the operator image MImage;
[0109] S206, obtaining the row number ImageRow where the operator image MImage is located, and obtaining the column number ImageCol where the operator image MImage is located;
[0110] S207, operator row counter RowCounter=(ImageRow-1)*(ImageHeight-Middle)+ImageHeight;
[0111] S208, if RowCounter is greater than Heightmax, go to S209, otherwise go to S210;
[0112] S209, set RowCounter=Heightmax, and then execute S210;
[0113] S210. Let RowCounter=RowCounter-ImageHeight;
[0114] S211, operator row overflow variable RowCountLoss=RowCounter;
[0115] S212, operator column counter ColCounter=(ImageCol-1)*(ImageWidth-Middle)+ImageWidth;
[0116] S213, if ColCounter is greater than Widthmax, go to S214, otherwise go to S215;
[0117] S214, set ColCounter=Widthmax, and then execute S215;
[0118] S215, ColCounter=ColCounter-ImageWidth;
[0119] S216, operator column overflow variable ColCountLoss=ColCounter;
[0120] S217, obtain the operator pixel category MetaCategory:
[0121] MetaCategory=MImage[RowCounter-RowCountLoss][ColCounter-ColCountLoss]
[0122] Where MImage[RowCounter-RowCountLoss][ColCounter-ColCountLoss] is the pixel value of the RowCounter-RowCountLossth row and the ColCounter-ColCountLossth column in MImage;
[0123] S218, Order
[0124] ImageStackList[RowCounter][ColCounter][MetaCategory]=ImageStack[RowCounter][ColCounter][MetaCategory]+1
[0125] Where ImageStackList[RowCounter][ColCounter][MetaCategory] is the value of the MetaCategory element in the RowCounterth row and the ColCounterth column of the image stack list;
[0126] S219, let ColCounter=ColCounter+1;
[0127] S220, if ColCounter-ColCountLoss is less than ImageWidth, go to S217, otherwise go to S221;
[0128] S221, let RowCounter=RowCounter+1;
[0129] S222, if RowCounter-RowCountLoss is less than ImageHeight, go to S212, otherwise go to S223;
[0130] S223, set MaskCounter=MaskCounter+1;
[0131] S224, if MaskCounter is less than or equal to the total number of masked images in the image mask list ImageMaskList, go to S204, otherwise go to S225;
[0132] S225. Output the image mask list ImageStackList.
[0133] S3. Establish a pixel gradient processing operator PixelGradient. The input of PixelGradient is the image stack list ImageStackList and the total number of categories Category. The output of PixelGradient is the splicing mask map MaskEnd. Specifically:
[0134] S301, establishing a pixel gradient processing operator PixelGradient, where the input of PixelGradient is the total number of categories Category and the image stack list ImageStackList;
[0135] S302, establish a splicing mask image MaskEnd=establish a two-dimensional list with a width equal to the width of ImageStackList and a height equal to the height of ImageStackList, and all element values of the list are 0;
[0136] S303, operator row counter RowCount=height of image stack list ImageStackList;
[0137] S304, operator column counter ColCount=width of image stack list ImageStackList;
[0138] S305, if RowCount is less than or equal to 0, go to S322, otherwise go to S306;
[0139] S306, if ColCount is less than or equal to 0, go to S321, otherwise go to S307;
[0140] S307, operator temporary storage list TemporaryList = a list consisting of the maximum value index in ImageStackList [RowCount][ColCount];
[0141] If the maximum value in ImageStackList [RowCount][ColCount] is unique, the operator temporary storage list TemporaryList only has one value; if the maximum value is not unique, the operator temporary storage list TemporaryList stores all the corresponding indexes of the maximum value;
[0142] S308, if TemporaryList is a list type, go to S309, otherwise go to S319;
[0143] S309, establish an operator gradient list GradientList = a list containing Category elements, and all element values in the list are 0;
[0144] S310, establishing an operator gradient storage list GStorageList;
[0145] Get the variable values of ImageMaskList [RowCount][ColCount-1], ImageMaskList [RowCount-1][ColCount], ImageMaskList [RowCount][ColCount+1], ImageMaskList [RowCount+1][ColCount]. If the variable value does not exist or is a list, it will not be used. The used variable value will be stored in the operator gradient storage list GStorageList;
[0146] Among them, ImageMaskList [RowCount][ColCount-1] is the RowCount row and ColCount-1 column in ImageMaskList, ImageMaskList [RowCount-1][ColCount] is the RowCount-1 row and ColCount column in ImageMaskList, ImageMaskList [RowCount][ColCount+1] is the RowCount row and ColCount+1 column in ImageMaskList, and ImageMaskList [RowCount+1][ColCount] is the RowCount+1 row and ColCount column in ImageMaskList;
[0147] S311, operator storage counter GSCount=the total number of elements stored in GStorageList;
[0148] S312, if GSCount is greater than 0, go to S313, otherwise go to S316;
[0149] S313, if GStorageList[GSCount] exists in TemporaryList, go to S314, otherwise go to S315;
[0150] Among them, GStorageList[GSCount] is the GSCount-th element in GStorageList;
[0151] S314. Let GradientList[GStorageList[GSCount]]=GradientList[GStorageList[GSCount]]+1;
[0152] Among them, GradientList[GStorageList[GSCount]] is the value of the GStorageList[GSCount]th element in GradientList;
[0153] S315, set GSCount=GSCount-1, and go to S312;
[0154] S316, if the maximum value in GradientList is not unique, go to S317, otherwise go to S318;
[0155] S317, MaskEnd[RowCount][ColCount]=GradientList[0], go to S320;
[0156] S318, MaskEnd[RowCount][ColCount]=GradientList, go to S320;
[0157] S319. MaskEnd[RowCount][ColCount]=TemporaryList;
[0158] S320, set ColCount=ColCount-1, and go to S306;
[0159] S321, set RowCount=RowCount-1, and go to S305;
[0160] S322. Use MaskEnd as the output of PixelGradient.
[0161] S4. Use the stitching mask image MaskEnd obtained in S3 to obtain the final stitching result RgbEnd.
[0162] Embodiment: In order to verify the beneficial effects of the present invention, the present invention carried out the following experiments:
[0163] Get the file path Imagefile where multiple cut classification prediction images are stored. Multiple cut classification prediction images are as follows Figure 1 As shown; input color conversion table Convert, as shown in Table 1:
[0164]
[0165] Use the image mask conversion operator ImageToMask to obtain the image mask list ImageMaskList;
[0166] Input uncut original image data, as shown in Table 2:
[0167]
[0168] Enter the preset stitching middle coverage value EMiddle=20, and use the image coverage operator ImageCoverage and the pixel gradient processing operator PixelGradient to obtain the final stitching result RgbEnd, such as Figure 2 As shown, Figure 2 The horizontal and vertical coordinates are both the number of pixels.
Claims
1. A classification prediction image splicing method based on pixel handover voting, characterized by: The specific process of the method is: S1. Establish an image mask conversion operator ImageToMask, the input of ImageToMask is the color conversion table Convert and the path Imagefile where the files storing multiple cut classification prediction images are located, and the output is the image mask list ImageMaskList; S2. Establish an image coverage operator ImageCoverage. The input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset stitching middle coverage value Middle and the image mask list ImageMaskList. The output of ImageCoverage is the image stack list ImageStackList. S3, establish a pixel gradient processing operator PixelGradient, the input of PixelGradient is the image stack list ImageStackList and the total number of categories Category, and the output of PixelGradient is the splicing mask image MaskEnd; S4. Use the stitching mask image MaskEnd obtained in S3 to obtain the final stitching result RgbEnd.
2. The classification prediction image splicing method based on pixel intersection voting according to claim 1 is characterized in that: The image mask conversion operator ImageToMask is established in S1, and the input of ImageToMask is the color conversion table Convert and the path Imagefile where the files storing the multiple cut classification prediction images are located, and the output is the image mask list ImageMaskList, which is specifically: S101, establishing an image mask conversion operator ImageToMask, wherein the input of ImageToMask is the path Imagefile where the files storing the multiple cut classification prediction images are located and the color conversion table Convert; The color conversion table Convert stores the RGB value of each category in the cut classification prediction map; S102, initialize the image mask list ImageMaskList = create a blank list; S103, initialize the counter ImageCounter=1; S104, obtaining the cut classification prediction image CImage=the ImageCounterth cut classification prediction image stored in the path Imagefile where the file storing the multiple cut classification prediction images is located; S105, using CImage and color conversion table Convert to obtain the mask processing image CMImage; S106, adding CMImage to the image mask list ImageMaskList; S107. Let ImageCounter= ImageCounter+1; S108, if ImageCounter is less than or equal to the total number of cut classification prediction images in the path Imagefile where the file storing the multiple cut classification prediction images is located, go to S104, otherwise go to S109; S109, output the image mask list ImageMaskList.
3. The classification prediction image splicing method based on pixel intersection voting according to claim 2 is characterized in that: The image coverage operator ImageCoverage is established in S2. The input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset splicing middle coverage value Middle and the image mask list ImageMaskList. The output of ImageCoverage is the image stack list ImageStackList, which is specifically: S201, establishing an image coverage operator ImageCoverage, where the input of ImageCoverage is the total number of categories Category, the width of the uncut original image Widthmax, the height of the uncut original image Heightmax, the preset splicing middle coverage value Middle and the image mask list ImageMaskList; S202, create an image stack list ImageStackList = a three-dimensional list with dimensions of Widthmax, Heightmax, and category list; The category list is a list containing Category elements, and the values of all elements in the category list are 0; S203, initialize the operator counter MaskCounter=1; S204, operator image MImage=the MaskCounterth mask-processed image stored in the image mask list ImageMaskList; S205, obtaining the width ImageWidth of the operator image MImage, and obtaining the height ImageHeight of the operator image MImage; S206, obtaining the row number ImageRow where the operator image MImage is located, and obtaining the column number ImageCol where the operator image MImage is located; S207, using ImageRow, ImageHeight and a preset splicing middle coverage value Middle to establish an operator row counter RowCounter; S208, if RowCounter is greater than Heightmax, go to S209, otherwise go to S210; S209, set RowCounter=Heightmax, and then execute S210; S210. Let RowCounter=RowCounter-ImageHeight; S211, operator row overflow variable RowCountLoss=RowCounter; S212, using ImageCol, ImageWidth and a preset splicing middle coverage value Middle to establish an operator column counter ColCounter; S213, if ColCounter is greater than Widthmax, go to S214, otherwise go to S215; S214, set ColCounter=Widthmax, and then execute S215; S215. Let ColCounter=ColCounter-ImageWidth; S216, set the operator column overflow variable ColCountLoss=ColCounter; S217, using the operator row overflow variable RowCountLoss, the operator column overflow variable ColCountLoss, the operator image MImage, the operator row counter RowCounter and the operator column counter ColCounter to obtain the operator pixel category MetaCategory; S218, Order ImageStackList[RowCounter][ColCounter][MetaCategory]=ImageStack[RowCounter][ColCounter][MetaCategory]+1; Where ImageStackList[RowCounter][ColCounter][MetaCategory] is the value of the MetaCategory element in the RowCounterth row and the ColCounterth column of the image stack list; S219, let ColCounter=ColCounter+1; S220, if ColCounter-ColCountLoss is less than ImageWidth, go to S217, otherwise go to S221; S221, let RowCounter=RowCounter+1; S222, if RowCounter-RowCountLoss is less than ImageHeight, go to S212, otherwise go to S223; S223, set MaskCounter=MaskCounter+1; S224, if MaskCounter is less than or equal to the total number of masked images in the image mask list ImageMaskList, go to S204, otherwise go to S225; S225. Output the image mask list ImageStackList.
4. The classification prediction image splicing method based on pixel intersection voting according to claim 3 is characterized in that: The operation in S207 uses ImageRow, ImageHeight and the preset splicing middle coverage value Middle to establish the operator row counter RowCounter, specifically: RowCounter=(ImageRow-1)*(ImageHeight-Middle)+ImageHeight.
5. The classification prediction image splicing method based on pixel intersection voting according to claim 4 is characterized in that: The operator column counter ColCounter is established by using ImageCol, ImageWidth and the preset splicing middle coverage value Middle in S212, specifically: ColCounter=(ImageCol-1)*(ImageWidth-Middle)+ImageWidth.
6. The classification prediction image splicing method based on pixel intersection voting according to claim 5 is characterized in that: The operation in S217 uses the operator row overflow variable RowCountLoss, the operator column overflow variable ColCountLoss, the operator image MImage, the operator row counter RowCounter and the operator column counter ColCounter to obtain the operator pixel category MetaCategory, specifically: MetaCategory=MImage[RowCounter-RowCountLoss][ColCounter-ColCountLoss]; Among them, MImage[RowCounter-RowCountLoss][ColCounter-ColCountLoss] is the pixel value of the RowCounter-RowCountLossth row and the ColCounter-ColCountLossth column in MImage.
7. The classification prediction image splicing method based on pixel intersection voting according to claim 6 is characterized in that: The pixel gradient processing operator PixelGradient is established in S3. The input of PixelGradient is the image stack list ImageStackList and the total number of categories Category. The output of PixelGradient is the splicing mask map MaskEnd. Specifically: S301, establishing a pixel gradient processing operator PixelGradient, where the input of PixelGradient is the total number of categories Category and the image stack list ImageStackList; S302, establish a splicing mask image MaskEnd=establish a two-dimensional list with a width equal to the width of ImageStackList and a height equal to the height of ImageStackList, and all element values of the list are 0; S303, operator row counter RowCount=height of image stack list ImageStackList; S304, operator column counter ColCount=width of image stack list ImageStackList; S305, if RowCount is less than or equal to 0, go to S322, otherwise go to S306; S306, if ColCount is less than or equal to 0, go to S321, otherwise go to S307; S307, operator temporary storage list TemporaryList = a list consisting of the maximum value index in ImageStackList [RowCount][ColCount]; S308, if TemporaryList is a list type, go to S309, otherwise go to S319; S309, establish an operator gradient list GradientList = a list containing Category elements, and all element values in the list are 0; S310, establishing an operator gradient storage list GStorageList; S311, operator storage counter GSCount=the total number of elements stored in GStorageList; S312, if GSCount is greater than 0, go to S313, otherwise go to S316; S313, if GStorageList[GSCount] exists in TemporaryList, go to S314, otherwise go to S315; Among them, GStorageList[GSCount] is the GSCount-th element in GStorageList; S314. Let GradientList[GStorageList[GSCount]]=GradientList[GStorageList[GSCount]]+1; Among them, GradientList[GStorageList[GSCount]] is the value of the GStorageList[GSCount]th element in GradientList; S315, set GSCount=GSCount-1, and go to S312; S316, if the maximum value in GradientList is not unique, go to S317, otherwise go to S318; S317, set MaskEnd[RowCount][ColCount]=GradientList[0], and go to S320; S318, set MaskEnd[RowCount][ColCount]=GradientList, and go to S320; S319. Let MaskEnd[RowCount][ColCount]=TemporaryList; S320, set ColCount=ColCount-1, and go to S306; S321, set RowCount=RowCount-1, and go to S305; S322. Use MaskEnd as the output of PixelGradient.
8. The classification prediction image splicing method based on pixel intersection voting according to claim 7 is characterized in that: The operator temporary storage list TemporaryList in S307 is a list consisting of the maximum value index in ImageStackList [RowCount][ColCount], specifically: If the maximum value in ImageStackList [RowCount][ColCount] is unique, the operator temporary list TemporaryList has only one value; if the maximum value is not unique, the operator temporary list TemporaryList stores all the corresponding indexes of the maximum values.
9. The classification prediction image splicing method based on pixel intersection voting according to claim 8 is characterized in that: The establishment of the operator gradient storage list GStorageList in S310 is specifically as follows: Get the values of ImageMaskList [RowCount][ColCount-1], ImageMaskList [RowCount-1][ColCount], ImageMaskList [RowCount][ColCount+1], ImageMaskList [RowCount+1][ColCount]. If the current value does not exist or is a list, it will not be used. The used value will be stored in the operator gradient storage list GStorageList.
Citation Information
Patent Citations
Pathological image IHC staining membrane slurry expression cell classification device and method
CN116386037A
Human body image segmentation method and device, computer equipment and readable storage medium
CN117934495A