Scanning image verification method and device, computer equipment and storage medium
By calculating the spacing vectors between multi-phase scan images and performing verification, the problem of inaccurate verification of spatial information of multi-phase scan images in traditional methods is solved, and more accurate image page missing and alignment verification is achieved.
Patent Information
- Application Number
- CN202311075916.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-02-25
AI Technical Summary
Traditional methods have inaccurate problems when performing spatial information verification on multi-phase scanned images, especially when judging the image page missing and alignment conditions, it is easy to cause misjudgment.
By obtaining the set of scanned images to be checked, the spacing vectors between each adjacent scanned image are calculated, and spatial information verification is performed using a preset alignment verification algorithm, including alignment checksum page-missing verification.
The accuracy of the verification of the information of the scanned image space is improved, and it can accurately identify the phases of the same period and the phases of the different periods, determine whether the image spacing is consistent, and effectively identify image page missing and alignment abnormalities.
Smart Images

Figure CN119515762A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical image verification, and in particular to a scanning image verification method, device, computer equipment and storage medium. Background Art
[0002] With the development of medical imaging technology, there are more and more types of medical images, such as single-phase scanning images and multi-phase scanning images; wherein, a phase refers to a collection of scanning images generated by scanning a scanning part once.
[0003] For single-phase scanned images or multi-phase scanned images, it is usually necessary to perform spatial information verification on the scanned images to determine whether the scanned images have spatial information anomalies. Spatial information anomalies are mainly reflected in the presence of missing pages and misaligned images in the collection of scanned images.
[0004] However, when the conventional method verifies the spatial information of the scanned image, especially the spatial information of the multi-phase scanned image, there is a problem of inaccurate spatial information verification. Summary of the invention
[0005] Based on this, it is necessary to provide a scanning image verification method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of spatial information verification of scanned images in order to address the above technical problems.
[0006] In a first aspect, the present application provides a scanning image verification method. The method comprises:
[0007] Obtaining a scan image set to be verified; the scan image set includes multiple scan images;
[0008] For a plurality of scanned images, determining a spacing vector between adjacent scanned images;
[0009] According to the spacing vectors between adjacent scanned images, spatial information verification is performed on multiple scanned images to obtain a verification result of the scanned image set.
[0010] In one embodiment, for a plurality of scanned images, determining a spacing vector between adjacent scanned images includes:
[0011] For each scanned image, coordinate information of a target point on the scanned image and coordinate information of a target point on an adjacent scanned image of the scanned image are obtained; the adjacent scanned image is a scanned image that is adjacent to the scanned image along a preset direction;
[0012] The spacing vector between the scanned image and the adjacent scanned image is calculated according to the coordinate information of the target point on the scanned image and the coordinate information of the target point on the adjacent scanned image.
[0013] In one embodiment, the verification result includes an alignment verification result; based on the spacing vectors between adjacent scanned images, a plurality of scanned images are verified for spatial information to obtain a verification result of the scanned image set, including:
[0014] Determine adjacent spacing vectors from each spacing vector, input the adjacent spacing vectors into a preset alignment verification algorithm for alignment verification, and obtain an alignment verification result of the adjacent spacing vectors; the preset alignment verification algorithm is used to perform alignment verification on the scanned images corresponding to the adjacent spacing vectors;
[0015] According to the alignment verification results of the adjacent spacing vectors, the alignment verification results of the target scanned images corresponding to the adjacent spacing vectors are obtained;
[0016] Based on the alignment verification results of each target scan image, the alignment verification result of the scan image set is obtained.
[0017] In one of the embodiments, the preset alignment verification algorithm includes a first preset alignment verification algorithm and a second preset alignment verification algorithm; the first preset alignment verification algorithm is used to determine whether adjacent spacing vectors are co-linear vectors; the second preset alignment verification algorithm is used to determine whether adjacent spacing vectors are reverse collinear vectors;
[0018] The adjacent spacing vectors are input into a preset alignment check algorithm for alignment check, and the alignment check results of the adjacent spacing vectors are obtained, including:
[0019] Inputting adjacent spacing vectors into a first preset alignment verification algorithm for alignment verification to obtain a first verification result;
[0020] If the first verification result indicates that the adjacent spacing vectors are co-directional collinear vectors, the first verification result is used as an alignment verification result of the adjacent spacing vectors;
[0021] If the first verification result indicates that adjacent spacing vectors are not co-linear vectors in the same direction, the adjacent spacing vectors are input into a second preset alignment verification algorithm for alignment verification to obtain a second verification result, and the second verification result is used as the alignment verification result of the adjacent spacing vectors.
[0022] In one embodiment, obtaining alignment verification results of target scanned images corresponding to adjacent spacing vectors according to alignment verification results of adjacent spacing vectors includes:
[0023] If the alignment check result of the adjacent spacing vectors is a first check result, and the first check result indicates that the adjacent spacing vectors are collinear vectors in the same direction, or the alignment check result of the adjacent spacing vectors is a second check result, and the second check result indicates that the adjacent spacing vectors are collinear vectors in opposite directions, then the alignment check result of the target scan images corresponding to the adjacent spacing vectors is that the target scan images are aligned with each other;
[0024] If the alignment check result of adjacent spacing vectors is a first check result, and the first check result indicates that the adjacent spacing vectors are non-collinear vectors in the same direction, or the alignment check result of adjacent spacing vectors is a second check result, and the second check result indicates that the adjacent spacing vectors are non-collinear vectors in opposite directions, then the alignment check result of the target scan images corresponding to the adjacent spacing vectors is that the target scan images are not aligned.
[0025] In one embodiment, the scanned image set is a multi-phase scanned image set, and the verification result of the scanned image set includes a missing page verification result; according to the spacing vector between each adjacent scanned image, the multiple scanned images are verified for spatial information to obtain the verification result of the scanned image set, including:
[0026] For each spacing vector, the modulus of the spacing vector is calculated; the modulus of the spacing vector is used to represent the spatial distance between adjacent scanned images corresponding to the spacing vector;
[0027] Determine the phase types of adjacent scanned images corresponding to the spacing vector; the phase type includes whether the adjacent scanned images are in the same phase or out of phase;
[0028] According to the modulus of the spacing vector and the phase type corresponding to the spacing vector, a page missing check is performed on the adjacent scanned images corresponding to the spacing vector to obtain a page missing check result of the adjacent scanned images corresponding to the spacing vector;
[0029] The page missing check result of the scanned image set is determined according to the page missing check results of the adjacent scanned images corresponding to each spacing vector.
[0030] In one embodiment, determining the phase type of the adjacent scanned images corresponding to the spacing vector includes:
[0031] Determine whether the angle between the spacing vector and the reference vector is within a preset range; the reference vector is a spacing vector between a first scanned image and a second scanned image that are adjacent to each other and meet a preset condition among the plurality of scanned images; the preset condition includes that the first scanned image and the second scanned image are in the same phase, and the first scanned image and the second scanned image are aligned with each other;
[0032] If yes, then determine that the phase type of the adjacent scanned images corresponding to the spacing vector is the same phase;
[0033] If not, it is determined that the phase types of the adjacent scanned images corresponding to the spacing vector are out of phase.
[0034] In a second aspect, the present application also provides a scanning image verification device. The device comprises:
[0035] An acquisition module is used to acquire a set of scanned images to be verified; the scanned image set includes multiple scanned images;
[0036] A determination module, used for determining a spacing vector between adjacent scanned images for a plurality of scanned images;
[0037] The verification module is used to verify the spatial information of multiple scanned images according to the spacing vectors between adjacent scanned images to obtain the verification result of the scanned image set.
[0038] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the scanning image verification method in the first aspect when executing the computer program.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the scanning image verification method in the first aspect are implemented.
[0040] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the scanning image verification method in the first aspect are implemented.
[0041] The above-mentioned scan image verification method, device, computer equipment, storage medium and computer program product, the computer equipment can obtain a set of scan images to be verified; wherein, the scan image set includes multiple scan images; then, for the multiple scan images, determine the spacing vector between each adjacent scan image; and according to the spacing vector between each adjacent scan image, perform spatial information verification on the multiple scan images to obtain the verification result of the scan image set. Since the vector has direction information and distance information, therefore, through the spacing vector between adjacent scan images, on the one hand, it can be effectively identified whether the adjacent scan images belong to the same phase or different phase; and then combined with the spatial distance between adjacent scan images, it can be accurately judged whether there is a page missing anomaly between adjacent scan images; on the other hand, through the spacing vector between adjacent scan images, it can also effectively judge whether each scan image is aligned with each other, that is, judge whether the image direction of each scan image is consistent; that is, in the embodiment of the present application, by introducing a vector model, with the help of the direction information and distance information of the vector model, the scan images are comprehensively analyzed. direction information and distance information between phases; through vectorized information, accurate judgment of spatial information anomalies of multi-phase scanning images can be realized, including judgment of various complex abnormal situations including unequal spacing and image direction anomalies; adopting this method, it is not only compatible with the judgment of various abnormal spatial information, but also compatible with single-phase scanning images and multi-phase scanning images, and for any multi-phase scanning images, there will be no misjudgment due to different phase sizes; therefore, adopting the method proposed in the embodiment of the present application can not only improve the accuracy of spatial information verification, but also improve the comprehensiveness and universality of spatial information verification, and its robustness and stability are stronger. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram for comparing the scanning images of a single-phase scanning sequence and a multi-phase scanning sequence;
[0043] Figure 2 This is a schematic diagram of the structure for observing multi-phase scanning images in the time dimension;
[0044] Figure 3 A schematic diagram of the structure for observing multi-phase scanning images in the spatial dimension;
[0045] Figure 4 A diagram of an application environment of a scanning image verification method in an embodiment;
[0046] Figure 5 A schematic diagram of a scanning image verification method according to an embodiment of the present invention;
[0047] Figure 6 is a schematic diagram of the structure of the spacing vector between adjacent scanned images;
[0048] Figure 7 is a flow chart of a scanning image verification method in another embodiment;
[0049] Figure 8 is a flow chart of a scanning image verification method in another embodiment;
[0050] Fig. 9 It is a schematic diagram of the structure of the abnormal alignment scan image in the same phase;
[0051] Fig.10 is a curve schematic diagram for judging the same direction and collinearity based on the first function;
[0052] Fig.11 It is a structural schematic diagram of the scanned images of normal adjacent phases;
[0053] Fig.12 is a curve schematic diagram of reverse collinearity judgment based on the second function;
[0054] Fig.13 This is a schematic diagram of collinearity judgment based on a vector model;
[0055] Fig.14 is a flow chart of a scanning image verification method in another embodiment;
[0056] Fig.15 is a flow chart of a scanning image verification method in another embodiment;
[0057] Fig.16 is a structural block diagram of a scanning image verification device in an embodiment;
[0058] Fig.17 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] With the development of medical imaging technology, there are more and more types of medical images, such as single-phase scanning images and multi-phase scanning images; wherein, a phase refers to a collection of scanning images generated by scanning a scanning part once.
[0061] Usually, a scan examination of a certain part of a patient is called a sequence. The sequence contains multiple medical scan images based on the Digital Imaging and Communications in Medicine (DICOM) protocol, referred to as DICOM medical scan images. The scan images in this sequence can be called single-phase scan images.
[0062] Compared with single-phase scan images, that is, compared with common structural sequence scans, lesion tissue sequence scans, etc., multi-phase scan images have an additional time dimension on the basis of spatial dimension. Figure 1 As shown, ordinary MR scan data is as follows Figure 1 As shown on the left, the scan ends when the entire head is scanned, and the generated DICOM data is saved in a folder to form a complete scan sequence. Figure 1 As shown on the right, the scanning device will scan the part repeatedly. The image data set generated after each scan is called a "phase". The number of scans in each phase is equal. A complete sequence of scan images is composed of images from multiple scan phases. Scan images from different phases are arranged in the order of scanning time and stored in a folder to form a complete scan sequence. The scan sequence structure of multi-phase scan images is as follows: Figure 2 shown.
[0063] The scanning types of multi-phase scanning images may include blood oxygen level dependent imaging (Blood Oxygenation Level Dependent, BOLD), diffusion tensor imaging (Diffusion Tensor Imaging, DTI), and the like.
[0064] In conventional DICOM medical image processing software, there is usually a link to verify the image data of CT or MR scans. Its main function is to identify medical image data with abnormal spatial information and prompt users that the data used does not meet the specifications. Among them, the abnormal spatial information is mainly reflected in the appearance of missing pages, misaligned images, inconsistent image sizes, inconsistent image layer thicknesses, and inconsistent image scanning directions in the scanned image sequence.
[0065] Under normal circumstances, each DICOM medical scan image in the same sequence should have the same layer thickness, adjacent spacing between the previous and next images, length and width, and scanning direction. If a sequence does not meet any of the above properties, it may indicate that the image data of the scan sequence is abnormal.
[0066] For multi-phase scanned images, in addition to verifying the inherent properties of each image such as layer thickness, length, width, scanning direction, etc., it is also necessary to observe and verify the spatial position properties such as whether the spacing is equal, whether there are missing pages, and whether they are aligned. At this time, it is necessary to further consider whether two adjacent scanned images are in the same phase or between adjacent phases.
[0067] Refer to the above Figure 2 , the black thin layer is regarded as the first page image of a certain phase (i.e. the first page of the phase), and the gray thin layer is regarded as the last page image of the phase (i.e. the last page of the phase). Observe the scanned images of the entire sequence in the time dimension, such as Figure 2 The repeated scan of the human head shown in . Assuming that there is a missing page at time t1-t2, under normal circumstances, as long as it is judged that the spacing between the two images at time t1 and time t2 is different from the spacing between two images at other different times, it can be considered that there is a missing or uneven spacing in this sequence data. However, for multi-phase scan images, if the judgment is still made only based on whether the spacing is the same, the normal data between different phases will be misjudged.
[0068] Take the time t3-t4 as an example. The gray layer at time t3 is the last page of the previous phase, that is, the scan reaches the back of the head. At this time, the scanning device will start scanning the next phase from the nose tip, which corresponds to the black layer at time t4. Note that even though the black and gray scanned images are adjacent in the time dimension, in the space dimension, the distance between the two scanned images is too different. Figure 3 As shown, in terms of spatial position, there is actually a distance difference from the front to the back of the entire phase between the black and gray scanned images, but this distance difference cannot be judged as erroneous data. This is the problem that exists when checking the abnormal spacing (i.e. missing pages) of multi-phase scanned images.
[0069] In addition, when judging whether the images in the sequence are aligned, it is usually judged based on the image orientation patient (IOP) parameters of each image; if the IOP parameters of each image are equal, it means that the image directions of the images in the sequence are consistent and the images are aligned with each other; if the IOP parameters of at least one image are different from the IOP parameters of other images, it means that the images in the sequence are not aligned. However, the traditional method of checking whether the images are aligned still has the possibility of verification errors.
[0070] Based on this, the present application proposes a scanning image verification method, which is not limited to simply using spatial distance or scanning period to perform page missing verification on the spatial position information of multi-phase scanning images, and simply using IOP parameters to perform alignment verification on the scanning images; by introducing a vector model, it can accurately identify abnormal situations of the spatial position information of multi-phase data, and can be compatible with data verification of ordinary scanning sequences, thereby improving the accuracy of spatial information verification.
[0071] The scanning image verification method provided in the embodiment of the present application can be applied to Figure 4 In the application environment shown, the computer device 102 may be a terminal or a server; the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.; the server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0072] The computer device 102 can obtain a set of scanned images to be verified, and perform spatial information verification on the scanned image set; illustratively, the computer device 102 can be installed with DICOM medical image processing software, through which the spatial information anomaly verification of the scanned image set can be implemented, and the verification result can be fed back to the user.
[0073] In one embodiment, Figure 5 As shown, a scanning image verification method is provided, which is applied to Figure 4 The computer device in the example is used to illustrate, including the following steps:
[0074] Step 502: Obtain a set of scanned images to be verified.
[0075] The scanning image set includes a plurality of scanning images, and the scanning image set may be a single-phase scanning image set or a multi-phase scanning image set.
[0076] Exemplarily, the computer device may obtain a set of scanned images to be verified from a medical imaging scanning device; the set of scanned images may be obtained after the medical imaging scanning device performs a medical imaging scan on a part to be tested of the object to be tested.
[0077] For example, the computer device may also obtain the scanned image set to be checked from a Picture Archiving and Communication System (PACS), wherein the PACS system is used to store the scanned image set scanned by the medical image scanning device. Of course, the computer device may also obtain the scanned image set to be checked from other devices storing scanned images.
[0078] Exemplarily, the computer device can obtain a set of scanned images corresponding to the identification of the target object from a medical imaging scanning device or a PACS system based on the identification of the target object, and use the set of scanned images as the set of scanned images to be checked; that is, the computer device can perform a spatial information anomaly check on the scanned image set of the object when a user accesses, calls or uses the scanned image of a certain object.
[0079] For example, the computer device may also perform spatial information anomaly verification on a single or batch scanned image set to be verified according to a preset instruction; the preset instruction may be a user-triggered instruction or an instruction triggered based on a preset verification condition, etc. For example, starting the spatial information anomaly verification on one or more scanned image sets at a preset time.
[0080] Step 504, for the plurality of scanned images, determining the spacing vector between each adjacent scanned image.
[0081] Exemplarily, for multiple scanned images in a scanned image set, the spacing vector between two adjacent scanned images can be determined in sequence; for the spacing vector between two adjacent scanned images, the spacing vector between the two adjacent scanned images can be calculated based on two coordinate information of the same pixel coordinate points on the two adjacent scanned images.
[0082] Based on this, the computer device can obtain the coordinate information of the target point on the scanned image and the coordinate information of the target point on the adjacent scanned image of the scanned image for each scanned image; wherein the adjacent scanned image is a scanned image adjacent to the scanned image along a preset direction; then, the spacing vector between the scanned image and the adjacent scanned image can be calculated based on the coordinate information of the target point on the scanned image and the coordinate information of the target point on the adjacent scanned image. It should be noted that the target point can be any pixel coordinate point on the scanned image; for example, the center point coordinate information of each of the two adjacent scanned images can be taken to calculate the spacing vector between the two adjacent scanned images; the coordinate information of the upper left corner endpoint position on each of the two adjacent scanned images can also be taken to calculate the spacing vector between the two adjacent scanned images, etc.
[0083] refer to Figure 6 As shown, the computer device can calculate the spacing vector between two adjacent scanned images in sequence according to the preset direction; assuming that Figure 6The scanned images in the scanned image set shown are arranged from right to left in the order of scanning time; based on this, the computer device can calculate the spacing vector from the first scanned image to the last scanned image in sequence; that is, according to the difference in coordinate information of the corresponding target points of the first scanned image and the second scanned image, the spacing vector pointing from the second scanned image to the first scanned image can be calculated; then, according to the difference in coordinate information of the corresponding target points of the second scanned image and the third scanned image, the spacing vector pointing from the third scanned image to the second scanned image can be calculated; and so on, until the spacing vector pointing from the nth scanned image to the n-1th scanned image is calculated, thereby obtaining n-1 spacing vectors corresponding to the n scanned images.
[0084] It should be noted that when determining the spacing vector between two adjacent scanned images, the spacing vector between the two adjacent scanned images needs to be determined sequentially in the same direction; it can be calculated sequentially from front to back in chronological order, or from back to front.
[0085] Step 506 , performing spatial information verification on the plurality of scanned images according to the spacing vectors between adjacent scanned images, and obtaining verification results of the scanned image set.
[0086] refer to Figure 2 and Figure 3 As shown, it can be seen that for multiple scan images in the same phase, since they are scanned layer by layer along a scanning direction, the spacing vectors corresponding to the multiple scan images in the same phase are all spacing vectors in the same direction; and for two adjacent scan images in different phases, after completing the scan of the last layer (such as the back of the brain) of the previous phase, the scanning device will start scanning the next phase from the tip of the nose again, that is, to obtain the scan image of the first layer of the next phase; therefore, the spacing vector between the last layer of the scan image of the previous phase and the first layer of the scan image of the next phase is opposite to the spacing vector between the two adjacent scan images in the same phase.
[0087] Based on this, it is possible to determine whether the scan images in the scan image set are aligned based on whether the two adjacent spacing vectors are collinear; wherein, collinearity may include collinearity in the same direction or collinearity in the opposite direction. If they are collinear in the same direction, it means that the three scan images corresponding to the two adjacent spacing vectors belong to the scan images in the same phase, and the three scan images are aligned with each other; if they are collinear in the opposite direction, it means that there are two scan images in different phases among the three scan images corresponding to the two adjacent spacing vectors, but the three scan images are aligned with each other. In other words, if the two adjacent spacing vectors are collinear in the same direction or collinear in the opposite direction, it means that the scan images corresponding to the two adjacent spacing vectors are aligned with each other; if the two adjacent spacing vectors are neither collinear in the same direction nor collinear in the opposite direction, that is, there is a certain angle between the two adjacent spacing vectors, it means that the scan images corresponding to the two adjacent spacing vectors are not aligned.
[0088] Exemplarily, the computer device may first determine two adjacent spacing vectors; then, determine whether the two adjacent spacing vectors are in the same direction or in opposite directions, and then determine whether the two adjacent spacing vectors are collinear; or, after determining the two adjacent spacing vectors, the computer device may directly input the two adjacent spacing vectors into a judgment algorithm for collinearity in the same direction and / or collinearity in opposite directions to obtain an alignment judgment result corresponding to the two adjacent spacing vectors.
[0089] For example, in the process of determining whether two adjacent spacing vectors are collinear, if it is determined that the two adjacent spacing vectors are not collinear, it can be explained that there are unaligned scanning images in the scanning image set, and further it can be determined that there is an alignment anomaly in the scanning image set.
[0090] In addition, according to the modulus of each spacing vector, it can also be used to determine whether there is an image missing page between two adjacent scan images; through the above analysis, it can be seen that for each scan image in the same phase, if the two adjacent scan images are two tomographic scan images that are adjacent in time and space, then the spatial distance between the two scan images should be close to the tomographic spacing threshold; and for two scan images in different phases, if the two adjacent scan images are two tomographic scan images that are adjacent in time, then the spatial distance between the two scan images should be close to the spacing threshold between the first and last tomographic scan images of a phase.
[0091] Therefore, when judging the page missing anomaly of the scan image set, it can be judged whether the two scan images corresponding to each spacing vector are scan images of the same phase or scan images of different phases according to the direction of each spacing vector; then, the modulus of each spacing vector is calculated to obtain the spatial distance between two adjacent spacing vectors; if the two scan images are scan images of the same phase, the relationship between the spatial distance between the two scan images and the spacing threshold of the tomographic scan is judged to judge whether there is a page missing between the two scan images; if the two scan images are scan images of different phases, the relationship between the spatial distance between the two scan images and the spacing threshold between the first and last tomographic scan images of a phase is judged to judge whether there is a page missing between the two scan images.
[0092] For example, during the process of performing missing page determination, if it is determined that there is a missing page between two adjacent scanned images, it can be determined that there is a missing page anomaly in the scanned image set.
[0093] Furthermore, when the scanned image set is judged for spatial information anomaly, if any spatial information anomaly is detected in the scanned image set, the abnormal spatial information may be fed back to the user to prompt the user that the scanned image set does not meet the image specification.
[0094] In the above-mentioned scan image verification method, the computer device can obtain a set of scan images to be verified; wherein, the scan image set includes multiple scan images; then, for the multiple scan images, the spacing vector between each adjacent scan image is determined; and according to the spacing vector between each adjacent scan image, the multiple scan images are subjected to spatial information verification to obtain the verification result of the scan image set. Since the vector has direction information and distance information, therefore, through the spacing vector between adjacent scan images, on the one hand, it can be effectively identified whether the adjacent scan images belong to the same phase or different phase; and then combined with the spatial distance between adjacent scan images, it can be accurately judged whether there is a page missing anomaly between adjacent scan images; on the other hand, through the spacing vector between adjacent scan images, it can also be effectively judged whether each scan image is aligned with each other, that is, whether the image direction of each scan image is consistent; that is, in the embodiment of the present application, by introducing a vector model, with the help of the direction information and distance information of the vector model, the scan images are comprehensively analyzed. direction information and distance information between phases; through vectorized information, accurate judgment of spatial information anomalies of multi-phase scanning images can be realized, including judgment of various complex abnormal situations including unequal spacing and image direction anomalies; adopting this method, it is not only compatible with the judgment of various abnormal spatial information, but also compatible with single-phase scanning images and multi-phase scanning images, and for any multi-phase scanning images, there will be no misjudgment due to different phase sizes; therefore, adopting the method proposed in the embodiment of the present application can not only improve the accuracy of spatial information verification, but also improve the comprehensiveness and universality of spatial information verification, and its robustness and stability are stronger.
[0095] Figure 7 FIG. 2 is a flow chart of a scan image verification method in another embodiment. This embodiment relates to an optional implementation process of performing alignment verification on a scan image set. Based on the above embodiment, Figure 7 As shown, the above step 506 includes:
[0096] Step 702 , determining adjacent spacing vectors from each spacing vector, inputting the adjacent spacing vectors into a preset alignment check algorithm for alignment check, and obtaining an alignment check result of the adjacent spacing vectors.
[0097] Exemplarily, after determining the spacing vectors between two adjacent scanned images in sequence, the computer device can then determine two adjacent spacing vectors in sequence from all the spacing vectors to perform an alignment check on the three adjacent scanned images corresponding to the two adjacent spacing vectors, i.e., to determine whether the three adjacent scanned images are aligned with each other.
[0098] The preset alignment check algorithm can be used to perform alignment check on the scanned images corresponding to the adjacent spacing vectors. Exemplarily, the preset alignment check algorithm can be used to determine whether the adjacent spacing vectors are collinear vectors, so as to obtain the alignment check result of the adjacent spacing vectors; and then, based on the alignment check result of the adjacent spacing vectors, the alignment check of the scanned images corresponding to the adjacent spacing vectors is obtained.
[0099] Exemplarily, the preset alignment verification algorithm can calculate the angle between two adjacent spacing vectors. If it is determined that the angle between the two adjacent spacing vectors approaches 0°, or approaches 180°, then the alignment verification result of the two adjacent spacing vectors as collinear vectors can be output; and the alignment verification result of collinear vectors can indicate that the three adjacent scanned images corresponding to the two adjacent spacing vectors are aligned with each other. On the contrary, if the angle between the two adjacent spacing vectors is neither approaching 0° nor approaching 180°, then the alignment verification result of the two adjacent spacing vectors as non-collinear vectors can be output; and the alignment verification result of non-collinear vectors can indicate that the three adjacent scanned images corresponding to the two adjacent spacing vectors are not aligned, or, it can indicate that there are non-aligned scanned images in the three adjacent scanned images corresponding to the two adjacent spacing vectors.
[0100] Step 704 , obtaining alignment verification results of the target scanned images corresponding to the adjacent spacing vectors according to the alignment verification results of the adjacent spacing vectors.
[0101] The target scanned images corresponding to the adjacent spacing vectors include: three adjacent scanned images corresponding to the adjacent spacing vectors in the scanned image set.
[0102] That is to say, if the alignment check result of adjacent spacing vectors indicates that the adjacent spacing vectors are aligned (such as if the adjacent spacing vectors are collinear vectors, it indicates that the adjacent spacing vectors are aligned), then it can be said that the target scanning images corresponding to the adjacent spacing vectors are aligned; if the alignment check result of adjacent spacing vectors indicates that the adjacent spacing vectors are not aligned, then it can be said that the target scanning images corresponding to the adjacent spacing vectors are also not aligned.
[0103] Step 706 , obtaining an alignment verification result of the scan image set based on the alignment verification result of each target scan image.
[0104] Exemplarily, if the alignment verification result of at least one target scanned image among the alignment verification results of each target scanned image is misaligned, it can be determined that the alignment verification result of the scanned image set is misaligned.
[0105] In this embodiment, adjacent spacing vectors are determined from each spacing vector, and the adjacent spacing vectors are input into a preset alignment verification algorithm for alignment verification to obtain the alignment verification results of the adjacent spacing vectors; then, based on the alignment verification results of the adjacent spacing vectors, the alignment verification results of the target scanned images corresponding to the adjacent spacing vectors are obtained; and then, based on the alignment verification results of each target scanned image, the alignment verification results of the scanned image set can be obtained. That is, in this embodiment, by presetting an alignment verification algorithm for alignment verification of the spacing vectors, alignment verification of the spacing vectors is performed to achieve alignment verification of the scanned images; because the spatial direction of the spacing vector can not only characterize whether the scanned image belongs to the same phase or different phase, but also characterize whether the scanned image is aligned in each spatial direction, a multi-directional alignment detection of the scanned image is achieved to adapt to the alignment verification of the scanned image in a variety of spatial postures; thereby improving the accuracy of the alignment verification.
[0106] In one embodiment, the preset alignment verification algorithm may further include a first preset alignment verification algorithm and a second preset alignment verification algorithm; wherein the first preset alignment verification algorithm may be used to determine whether adjacent spacing vectors are co-directional collinear vectors; the second preset alignment verification algorithm may be used to determine whether adjacent spacing vectors are reverse collinear vectors; based on this, Figure 8 As shown, the above step 702 may include:
[0107] Step 802: input adjacent spacing vectors into a first preset alignment check algorithm for alignment check to obtain a first check result.
[0108] The first verification result may include that the adjacent spacing vectors are collinear vectors in the same direction, or that the adjacent spacing vectors are not collinear vectors in the same direction. The vectors that are not collinear in the same direction include non-collinear vectors in the same direction, collinear vectors in opposite directions, and non-collinear vectors in opposite directions.
[0109] refer to Fig. 9 As shown, when adjacent spacing vectors are co-linear vectors, the angle θ between the adjacent spacing vectors approaches 0°, as shown in Fig. 9 The two adjacent thin solid line vectors shown in ; and for Fig. 9 The angle between the two adjacent thick solid line vectors shown in is obviously much larger than the angle between the two adjacent thin solid line vectors, which can be considered as data anomaly, that is, there is a misaligned scan image.
[0110] In other words, when the angle θ between adjacent spacing vectors approaches 0°, the cosine value cosθ of the angle between the adjacent spacing vectors approaches 1. Then, on this basis, not only can we determine whether the angle θ between the adjacent spacing vectors is less than the preset angle threshold, if the angle θ is less than the preset angle threshold, it can be said that the adjacent spacing vectors are collinear vectors in the same direction. Moreover, we can also determine whether the absolute value of the difference between the cosine value cosθ of the angle between the adjacent spacing vectors and 1 is less than the preset difference threshold; if the absolute value of the difference is less than the preset difference threshold, it can be said that the adjacent spacing vectors are collinear vectors in the same direction.
[0111] Exemplarily, the first preset alignment verification algorithm can be represented by the following function, that is, based on the characteristics of co-directional collinear vectors, a first function f(θ) is constructed.
[0112] f(θ)=1-cosθ
[0113] Among them, θ or cosθ can be calculated for two adjacent spacing vectors through the scalar product formula.
[0114] refer to Fig.10 As shown, when two adjacent spacing vectors tend to be collinear, the angle between them θ→0. More importantly, the first function f(θ)≈θ, so f(θ)→0 (as shown in Fig.10 Based on this, a suitable boundary value, such as 0.01, can be set for the first function f(Δ) to determine whether two adjacent spacing vectors are co-linear vectors in the same direction.
[0115] Step 804: If the first verification result indicates that the adjacent spacing vectors are co-directional collinear vectors, the first verification result is used as an alignment verification result of the adjacent spacing vectors.
[0116] Step 806: If the first verification result indicates that the adjacent spacing vectors are not co-linear vectors, the adjacent spacing vectors are input into a second preset alignment verification algorithm for alignment verification to obtain a second verification result, and the second verification result is used as the alignment verification result of the adjacent spacing vectors.
[0117] Exemplarily, when the first preset alignment verification algorithm is used to determine that adjacent spacing vectors are not co-linear vectors, if the value of the first verification result is greater than 0.01, that is, Fig.10 In the case of a non-gray area as shown in , at this time, the adjacent spacing vectors may be in the same direction but not collinear, may be collinear in opposite directions, or may be in opposite directions but not collinear.
[0118] In this case, the computer device may input the adjacent spacing vectors into a second preset alignment verification algorithm to perform an alignment verification, that is, determine whether the adjacent spacing vectors are reverse collinear vectors to obtain a second verification result.
[0119] refer to Fig.11 As shown, it shows the situation of normal adjacent scan images of different phases. In terms of scanning time, it is assumed that phase B is the next phase of phase A. The thick solid line vector between the black thin layer of phase B and the gray thin layer of phase A is the spacing vector of adjacent phases. In order to accurately determine that this situation is a normal spacing situation, a second function y(θ) can be constructed, that is, y(θ)=1+cosθ, where θ still represents the angle between adjacent spacing vectors, which is used to represent the second preset alignment verification algorithm.
[0120] Continue to refer Fig.11 As shown in the figure, although the modulus lengths of the thick solid line vector and the thin solid line vector are very different, it is still worth noting that they are collinear and in opposite directions; this can be used as a criterion for determining normal adjacent scan images in different phases. Fig.11 It can be seen from the figure that the angle between the two collinear and opposite spacing vectors θ→π, the cosine value of the angle cosθ approaches -1, at this time the second function y(θ) approaches 0, that is, y(θ)→0 (as shown in Fig.12 Therefore, the second function y(θ) can also be set with an appropriate boundary value, such as 0.01, to determine whether the scanned images are adjacent to each other in different phases.
[0121] That is to say, when the value of the first function f(θ) corresponding to two adjacent spacing vectors judged based on the above-mentioned first function f(θ) is less than or equal to 0.01, it means that the two adjacent spacing vectors are collinear vectors in the same direction; when the value of the first function f(θ) is greater than 0.01, the two adjacent spacing vectors can be input into the second function y(θ) to obtain the value of the second function y(θ); if the value of the second function y(θ) is less than or equal to 0.01, it can be said that the two adjacent spacing vectors are collinear vectors in opposite directions; otherwise, it means that the two adjacent spacing vectors are non-collinear vectors.
[0122] refer to Fig.13 As shown, it shows the case where the vector model is used to determine whether the adjacent spacing vectors are collinear in the same direction, collinear in the opposite direction, or non-collinear (including non-collinear in the same direction and non-collinear in the opposite direction). It can be seen that the scanned images where the spacing vector angles converge to the two square grid areas below are normal scanned images, while the scanned images of other areas except the two square grid areas are abnormal scanned images; the above method can be applied to the spatial information abnormality verification of scanned images of any phase.
[0123] Exemplarily, when the value of the first function f(θ) is greater than 0.01, the angle θ between the two adjacent spacing vectors can also be calculated by the inverse trigonometric cosine, and it can be determined whether the angle θ is close to π; if the angle θ is close to π, the second function y(θ) is used to determine whether the two adjacent spacing vectors are opposite collinear vectors. In addition, if the angle θ is greater than π / 2, it can be said that the two adjacent spacing vectors are opposite to each other; furthermore, if the value of the second function y(θ) is greater than 0.01, it can be said that the two adjacent spacing vectors are opposite to each other and the two are not collinear; if the angle θ is less than π / 2, it can be said that the two adjacent spacing vectors are in the same direction and the two are not collinear.
[0124] In another example, when the value of the first function f(θ) is greater than 0.01, it is also possible to determine whether the cosine value of the angle cosθ between two adjacent spacing vectors is less than 0. If cosθ is less than 0, it can be said that the two adjacent spacing vectors are opposite to each other; at this time, the two adjacent spacing vectors can be input into the second function y(θ) to determine whether the two adjacent spacing vectors are opposite collinear vectors. If cosθ is greater than 0, it can be said that the two adjacent spacing vectors are in the same direction and are not collinear; thus, the first verification result that the two adjacent spacing vectors are in the same direction but not collinear can be directly obtained. In this case, it is also unnecessary to input the two adjacent spacing vectors into the second function y(θ) for verification.
[0125] In this embodiment, the computer device can first input the adjacent spacing vectors into the first preset alignment verification algorithm for alignment verification, and obtain a first verification result for characterizing whether the adjacent spacing vectors are co-directional collinear vectors; when the first verification result characterizes that the adjacent spacing vectors are co-directional collinear vectors, the first verification result is used as the alignment verification result of the adjacent spacing vectors; and when the first verification result characterizes that the adjacent spacing vectors are not co-directional collinear vectors, the adjacent spacing vectors are input into the second preset alignment verification algorithm for alignment verification, and a second verification result is obtained, and the second verification result is used as the alignment verification result of the adjacent spacing vectors. That is, in this embodiment, by introducing the first preset alignment verification algorithm for co-directional collinearity and the second preset alignment verification algorithm for reverse collinearity, it is possible to determine whether two adjacent spacing vectors are co-linear, thereby realizing the verification of whether there is an alignment anomaly between the scanned images; the use of this method can improve the accuracy of the alignment verification.
[0126] In addition, for a multi-phase scan image set, since it includes multiple single-phase scan image subsets, and the spacing vectors between adjacent scan images in each single-phase scan image subset are spacing vectors in the same direction; only between adjacent single-phase scan image subsets, that is, the last page image of the previous phase and the first page image of the next phase, are two adjacent scan images belonging to different phases; in other words, for a multi-phase scan image set, most of the adjacent scan images belong to the same phase, and only a few adjacent scan images belong to different phases; therefore, when performing alignment detection, the first preset alignment verification algorithm for co-directional collinearity can be first used to judge the adjacent spacing vectors; if it is judged that the adjacent spacing vectors are not co-directionally collinear, then the second preset alignment verification algorithm for reverse collinearity is used to judge whether the adjacent spacing vectors are reversely collinear; using this verification process, the alignment verification rate of the multi-phase scan images can be accelerated, thereby improving the efficiency of spatial information verification of the scan image set.
[0127] Based on the above embodiment, after the adjacent spacing vectors are aligned and checked by the first preset alignment check algorithm and the second preset alignment check algorithm, correspondingly, the above step 704 may include: when the alignment check result of the adjacent spacing vectors is the first check result, and the first check result indicates that the adjacent spacing vectors are co-linear vectors in the same direction, or when the alignment check result of the adjacent spacing vectors is the second check result, and the second check result indicates that the adjacent spacing vectors are co-linear vectors in the opposite direction, the alignment check result of the target scanned images corresponding to the adjacent spacing vectors can be obtained as the mutual alignment between the target scanned images. Thus, by means of the first preset alignment check algorithm for the same direction judgment and the second preset alignment check algorithm for the reverse judgment, the alignment check process of the multi-phase scanned images can be realized, which can improve the accuracy of the alignment check. And this method is also applicable to the alignment check process of the single-phase scanned images, and has high universality.
[0128] Exemplarily, if the alignment check result of adjacent spacing vectors is a first check result, and the first check result indicates that the adjacent spacing vectors are non-collinear vectors in the same direction, or the alignment check result of adjacent spacing vectors is a second check result, and the second check result indicates that the adjacent spacing vectors are non-collinear vectors in the opposite direction, then the alignment check result of the target scanned images corresponding to the adjacent spacing vectors can be obtained as misalignment between the target scanned images. At this point, it can be determined that there are misaligned scanned images in the scanned image set, and the scanned image set has alignment anomalies.
[0129] In actual use, if a scan image set with alignment anomalies is used, the image data rendered in the display interface of the computer device will be different from the actual condition of the patient; and when the abnormal scan image set is used for subsequent image detection and recognition, the prepared recognition results will not be obtained, and the actual clinical significance reflected will also be distorted; therefore, for a scan image set with spatial information anomalies, the user can be prompted that the scan image set has failed the verification, and the user can be prompted to reselect the scan image set, or re-scan the patient, etc.
[0130] Fig.14 FIG. 2 is a flow chart of a scan image verification method in another embodiment. This embodiment relates to an optional implementation process of performing missing page verification on a multi-phase scan image set. Based on the above embodiment, Fig.14 As shown, the above step 506 may include:
[0131] Step 1402, for each spacing vector, calculate the modulus of the spacing vector.
[0132] The modulus of the spacing vector is used to represent the spatial distance between adjacent scanned images corresponding to the spacing vector.
[0133] When the spacing vector is a space vector, the spacing vector can be expressed as Then the magnitude of the spacing vector can be expressed as:
[0134] Step 1404, determining the phase types of adjacent scanned images corresponding to the spacing vector.
[0135] The phase type includes whether adjacent scanned images are in the same phase or out of phase.
[0136] Exemplarily, the computer device can determine whether the two adjacent scanned images corresponding to the spacing vector are in the same phase or out of phase according to the direction of each spacing vector; or, the angle or cosine value of the angle between adjacent spacing vectors can be calculated to determine whether the two adjacent scanned images corresponding to the spacing vector are in the same phase or out of phase. For example: based on the above alignment check, when the adjacent spacing vectors are aligned in sequence, if the adjacent spacing vectors are judged to be in the same direction in the previous judgment, and the adjacent spacing vectors are judged to be in the opposite direction in the next judgment, it can be explained that among the two adjacent spacing vectors judged next time, the adjacent scanned images corresponding to the later spacing vector are in out of phase.
[0137] For example: when it is judged that the i-1th spacing vector and the i-th spacing vector are in the same direction, it means that the adjacent scan images corresponding to the i-1th spacing vector are in the same phase, and the adjacent scan images corresponding to the i-th spacing vector are also in the same phase, and it can even be said that the three adjacent scan images corresponding to the i-1th spacing vector and the i-th spacing vector are all in the same phase; then, if it is judged that the i-th spacing vector and the i+1th spacing vector are in opposite directions, at this time, it can be said that the adjacent scan images corresponding to the i+1th spacing vector are two scan images in different phases.
[0138] Step 1406, performing page missing check on the adjacent scanned images corresponding to the spacing vector according to the modulus of the spacing vector and the phase type corresponding to the spacing vector, and obtaining the page missing check result of the adjacent scanned images corresponding to the spacing vector.
[0139] Exemplarily, a first distance threshold and a second distance threshold can be pre-set, wherein the first distance threshold can be used to characterize the spacing threshold between two adjacent tomographic images in the same phase; the second distance threshold can be used to characterize the spacing threshold between two adjacent tomographic images in different phases, that is, the spacing threshold between the first and last tomographic images of a phase.
[0140] Based on this, when it is determined that the phase type corresponding to the spacing vector is that the adjacent scanned images corresponding to the spacing vector are in the same phase, the size relationship between the modulus of the spacing vector and the first distance threshold can be compared; when the modulus of the spacing vector is less than or equal to the first distance threshold, it can be determined that there is no page missing anomaly between the adjacent scanned images corresponding to the spacing vector; when the modulus of the spacing vector is greater than the first distance threshold, it can be determined that there is a page missing anomaly between the adjacent scanned images corresponding to the spacing vector.
[0141] Similarly, when it is determined that the phase type corresponding to the spacing vector is that the adjacent scanned images corresponding to the spacing vector are out-of-phase, the size relationship between the modulus of the spacing vector and the second distance threshold can be compared; when the modulus of the spacing vector is less than or equal to the second distance threshold, it can be determined that there is no page missing anomaly between the adjacent scanned images corresponding to the spacing vector, and they are two normal scanned images with out-of-phase phases; when the modulus of the spacing vector is greater than the second distance threshold, it can be determined that there is a page missing anomaly between the adjacent scanned images corresponding to the spacing vector.
[0142] Step 1408 , determining the page missing check result of the scanned image set according to the page missing check results of the adjacent scanned images corresponding to each spacing vector.
[0143] Exemplarily, when there is a page missing check result of adjacent scanned images corresponding to at least one spacing vector, and a page missing anomaly exists between adjacent scanned images, it can be determined that the page missing check result of the scanned image set is that a page missing anomaly exists.
[0144] In this embodiment, when performing page defect check on a scanned image set, the computer device can calculate the modulus of the spacing vector for each spacing vector, thereby obtaining the spatial distance between adjacent scanned images corresponding to the spacing vector; and determine the phase type of the adjacent scanned images corresponding to the spacing vector; that is, determine whether the adjacent scanned images corresponding to the spacing vector are in the same phase or in different phases; then, based on the modulus of the spacing vector and the phase type corresponding to the spacing vector, perform page defect check on the adjacent scanned images corresponding to the spacing vector to obtain the page defect check results of the adjacent scanned images corresponding to the spacing vector; and determine the page defect check results of the scanned image set based on the page defect check results of the adjacent scanned images corresponding to each spacing vector. That is, in this embodiment, the spacing vector between adjacent scanned images is used to determine whether the adjacent scanned images are in the same phase or in different phases; then, for the adjacent scanned images in the same phase and the adjacent scanned images in different phases, the page missing conditions between the adjacent scanned images are checked according to the modulus of the spacing vector respectively; the spacing vector method can be used not only to determine the scanned images in different phases, but also to determine the spatial distance between the scanned images; thereby, the traditional method of misjudging normal scanned images in different phases due to only considering the spacing can be solved, and the accuracy of checking for page missing anomalies can be improved.
[0145] Fig.15 FIG. 1 is a flow chart of a scanning image verification method in another embodiment. This embodiment relates to an optional implementation process of a computer device determining the phase type of adjacent scanning images corresponding to a spacing vector. Based on the above embodiment, Fig.15 As shown, the above step 1404 includes:
[0146] Step 1502, determining whether the angle between the spacing vector and the reference vector is within a preset range.
[0147] Step 1504, when it is determined that the angle between the spacing vector and the reference vector is within a preset range, the phase type of the adjacent scanned images corresponding to the spacing vector is determined to be the same phase.
[0148] Step 1506, when it is determined that the angle between the spacing vector and the reference vector is not within the preset range, determining that the phase type of the adjacent scanned images corresponding to the spacing vector is out of phase.
[0149] The reference vector may be a spacing vector between adjacent first scanned images and second scanned images that meets preset conditions; the preset conditions include that the first scanned image and the second scanned image are in the same phase, and the first scanned image and the second scanned image are aligned with each other.
[0150] Exemplarily, the method for determining the reference vector may also include: selecting a target coordinate axis (such as Figure 2 and determining the target direction of the target coordinate axis based on the direction of the spacing vector between adjacent scanned images in the same phase, thereby obtaining a reference vector parallel to the target coordinate axis.
[0151] Exemplarily, for each spacing vector, the angle between the spacing vector and the reference vector is When the angle between the spacing vector and the reference vector is not within the range, the spacing vector and the reference vector are considered to be in the same direction, and the phase type of the adjacent scanned images corresponding to the spacing vector is determined to be the same phase; when the angle between the spacing vector and the reference vector is not within the range When the range is, or, determine the angle between the spacing vector and the reference vector is When the interval vector is within the range, it can be considered that the interval vector is opposite to the reference vector, and the phase type of the adjacent scanned image corresponding to the interval vector is determined to be out of phase.
[0152] In this embodiment, the direction of the spacing vector is determined by judging the angle between each spacing vector and the reference vector, and thereby determining whether the two adjacent scan images corresponding to the spacing vector are in the same phase or out of phase; using this method, with the help of the features between the vectors, adjacent out-of-phase scan images in the multi-phase scan images can be accurately identified; thereby achieving spatial information verification of the multi-phase scan images, which can improve the accuracy of spatial information verification.
[0153] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0154] Based on the same inventive concept, the embodiment of the present application also provides a scanning image verification device for implementing the scanning image verification method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more scanning image verification device embodiments provided below can refer to the limitations of the scanning image verification method above, and will not be repeated here.
[0155] In one embodiment, Fig.16 As shown, a scanning image verification device is provided, including: an acquisition module 1602, a determination module 1604 and a verification module 1606, wherein:
[0156] The acquisition module 1602 is used to acquire a set of scanned images to be verified; the scanned image set includes multiple scanned images.
[0157] The determination module 1604 is used to determine the spacing vector between each adjacent scanned image for a plurality of scanned images.
[0158] The verification module 1606 is used to verify the spatial information of the plurality of scanned images according to the spacing vectors between adjacent scanned images, and obtain the verification result of the scanned image set.
[0159] In one embodiment, the determining module 1604 includes:
[0160] The acquisition submodule is used to acquire, for each scanned image, the coordinate information of the target point on the scanned image and the coordinate information of the target point on the adjacent scanned image of the scanned image; the adjacent scanned image is a scanned image adjacent to the scanned image along a preset direction;
[0161] The first calculation submodule is used to calculate the spacing vector between the scanned image and the adjacent scanned image according to the coordinate information of the target point on the scanned image and the coordinate information of the target point on the adjacent scanned image.
[0162] In one embodiment, the verification result includes an alignment verification result; the verification module 1606 includes:
[0163] A first check submodule is used to determine adjacent spacing vectors from each spacing vector, input the adjacent spacing vectors into a preset alignment check algorithm for alignment check, and obtain an alignment check result of the adjacent spacing vectors; the preset alignment check algorithm is used to perform alignment check on the scanned images corresponding to the adjacent spacing vectors;
[0164] A first determination submodule is used to obtain alignment verification results of target scanned images corresponding to adjacent spacing vectors according to alignment verification results of adjacent spacing vectors;
[0165] The second determination submodule is used to obtain the alignment verification result of the scan image set based on the alignment verification result of each target scan image.
[0166] In one embodiment, the preset alignment verification algorithm includes a first preset alignment verification algorithm and a second preset alignment verification algorithm; the first preset alignment verification algorithm is used to determine whether adjacent spacing vectors are co-directional collinear vectors; the second preset alignment verification algorithm is used to determine whether adjacent spacing vectors are reverse collinear vectors; the first verification submodule includes:
[0167] A first verification unit, used for inputting adjacent spacing vectors into a first preset alignment verification algorithm for alignment verification to obtain a first verification result;
[0168] A determination unit, configured to use the first verification result as an alignment verification result of the adjacent spacing vectors if the first verification result indicates that the adjacent spacing vectors are co-directional collinear vectors;
[0169] The second verification unit is used to input the adjacent spacing vectors into a second preset alignment verification algorithm for alignment verification if the first verification result indicates that the adjacent spacing vectors are not co-linear vectors, to obtain a second verification result, and use the second verification result as the alignment verification result of the adjacent spacing vectors.
[0170] In one embodiment, the first determination submodule includes:
[0171] A first determining unit is used to obtain an alignment check result of the target scan images corresponding to the adjacent spacing vectors, that is, the target scan images are aligned with each other, when the alignment check result of the adjacent spacing vectors is a first check result and the first check result indicates that the adjacent spacing vectors are co-linear vectors, or when the alignment check result of the adjacent spacing vectors is a second check result and the second check result indicates that the adjacent spacing vectors are co-linear vectors in the opposite direction;
[0172] The second determination unit is used to obtain the alignment check result of the target scan images corresponding to the adjacent spacing vectors as misalignment between the target scan images when the alignment check result of the adjacent spacing vectors is the first check result and the first check result represents that the adjacent spacing vectors are non-collinear vectors in the same direction, or when the alignment check result of the adjacent spacing vectors is the second check result and the second check result represents that the adjacent spacing vectors are non-collinear vectors in opposite directions.
[0173] In one embodiment, the scanned image set is a multi-phase scanned image set, and the verification result of the scanned image set includes a missing page verification result; the verification module 1606 further includes:
[0174] A second calculation submodule is used to calculate the modulus of the spacing vector for each spacing vector; the modulus of the spacing vector is used to represent the spatial distance between adjacent scanned images corresponding to the spacing vector;
[0175] The third determination submodule is used to determine the phase type of the adjacent scanned images corresponding to the spacing vector; the phase type includes the same phase or different phase;
[0176] A second check submodule is used to perform page missing check on adjacent scanned images corresponding to the spacing vector according to the modulus of the spacing vector and the phase type corresponding to the spacing vector, so as to obtain page missing check results of the adjacent scanned images corresponding to the spacing vector;
[0177] The fourth determination submodule is used to determine the page missing check result of the scanned image set according to the page missing check results of the adjacent scanned images corresponding to each spacing vector.
[0178] In one embodiment, the third determining submodule includes:
[0179] A judging unit, used to judge whether the angle between the spacing vector and the reference vector is within a preset range; the reference vector is a spacing vector between adjacent first scanned images and second scanned images that meets preset conditions; the preset conditions include that the first scanned image and the second scanned image are in the same phase, and the first scanned image and the second scanned image are aligned with each other;
[0180] A third determining unit, configured to determine that the phase type of the adjacent scanned images corresponding to the spacing vector is a synchronous phase when it is determined that the angle between the spacing vector and the reference vector is within a preset range;
[0181] The fourth determining unit is used to determine that the phase type of the adjacent scanned images corresponding to the spacing vector is out of phase when it is determined that the angle between the spacing vector and the reference vector is not within a preset range.
[0182] Each module in the above scanning image verification device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0183] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. When the computer device is a terminal, its internal structure diagram may be as follows: Fig.17As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a scanning image verification method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0184] Those skilled in the art will understand that Fig.17 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0185] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the scanning image verification method in any of the above embodiments when executing the computer program.
[0186] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the scanning image verification method in any of the above embodiments are implemented.
[0187] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the scanning image verification method in any of the above embodiments when executed by a processor.
[0188] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0189] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0190] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0191] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A scanning image verification method, characterized in that: The method comprises: Acquire a scan image set to be verified; the scan image set includes a plurality of scan images; For the plurality of scanned images, determining a spacing vector between adjacent scanned images; According to the spacing vectors between the adjacent scanned images, the spatial information of the plurality of scanned images is verified to obtain a verification result of the scanned image set.
2. The method according to claim 1, characterized in that: The step of determining the spacing vector between adjacent scanned images for the plurality of scanned images includes: For each of the scanned images, obtaining coordinate information of a target point on the scanned image and coordinate information of a target point on an adjacent scanned image of the scanned image; the adjacent scanned image is a scanned image adjacent to the scanned image along a preset direction; The distance vector between the scanned image and the adjacent scanned image is calculated according to the coordinate information of the target point on the scanned image and the coordinate information of the target point on the adjacent scanned image.
3. The method according to claim 1 or 2, characterized in that: The verification result includes an alignment verification result; the verification of the spatial information of the plurality of scanned images is performed according to the spacing vectors between the adjacent scanned images to obtain the verification result of the scanned image set, including: Determine adjacent spacing vectors from each of the spacing vectors, input the adjacent spacing vectors into a preset alignment verification algorithm for alignment verification, and obtain alignment verification results of the adjacent spacing vectors; the preset alignment verification algorithm is used to perform alignment verification on scanned images corresponding to adjacent spacing vectors; According to the alignment verification results of the adjacent spacing vectors, obtaining the alignment verification results of the target scanned images corresponding to the adjacent spacing vectors; Based on the alignment verification results of each of the target scanned images, an alignment verification result of the scanned image set is obtained.
4. The method according to claim 3, characterized in that: The preset alignment verification algorithm includes a first preset alignment verification algorithm and a second preset alignment verification algorithm; The first preset alignment verification algorithm is used to determine whether adjacent spacing vectors are co-directional collinear vectors; The second preset alignment check algorithm is used to determine whether adjacent spacing vectors are reverse collinear vectors; The step of inputting the adjacent spacing vectors into a preset alignment check algorithm for alignment check to obtain an alignment check result of the adjacent spacing vectors includes: Inputting the adjacent spacing vectors into the first preset alignment verification algorithm for alignment verification to obtain a first verification result; If the first verification result indicates that the adjacent spacing vectors are co-directional collinear vectors, taking the first verification result as an alignment verification result of the adjacent spacing vectors; If the first verification result indicates that the adjacent spacing vectors are not co-linear vectors in the same direction, the adjacent spacing vectors are input into the second preset alignment verification algorithm for alignment verification to obtain a second verification result, and the second verification result is used as the alignment verification result of the adjacent spacing vectors.
5. The method according to claim 4, characterized in that The step of obtaining the alignment verification result of the target scanned image corresponding to the adjacent spacing vectors according to the alignment verification result of the adjacent spacing vectors includes: If the alignment check result of the adjacent spacing vectors is the first check result, and the first check result indicates that the adjacent spacing vectors are co-linear vectors in the same direction, or the alignment check result of the adjacent spacing vectors is the second check result, and the second check result indicates that the adjacent spacing vectors are co-linear vectors in the opposite direction, then the alignment check result of the target scan images corresponding to the adjacent spacing vectors is that the target scan images are aligned with each other; If the alignment check result of the adjacent spacing vectors is the first check result, and the first check result represents that the adjacent spacing vectors are non-collinear vectors in the same direction, or the alignment check result of the adjacent spacing vectors is the second check result, and the second check result represents that the adjacent spacing vectors are non-collinear vectors in opposite directions, then the alignment check result of the target scanned images corresponding to the adjacent spacing vectors is that the target scanned images are not aligned.
6. The method according to claim 1 or 2, characterized in that: The scanned image set is a multi-phase scanned image set, and the verification result of the scanned image set includes a page missing verification result; the verification of the spatial information of the multiple scanned images is performed according to the spacing vectors between the adjacent scanned images to obtain the verification result of the scanned image set, including: For each of the spacing vectors, calculating the modulus of the spacing vector; the modulus of the spacing vector is used to represent the spatial distance between adjacent scanned images corresponding to the spacing vector; Determine the phase type of the adjacent scanned images corresponding to the spacing vector; the phase type includes whether the adjacent scanned images are in the same phase or out of phase; According to the modulus of the spacing vector and the phase type corresponding to the spacing vector, a page missing check is performed on the adjacent scanned images corresponding to the spacing vector to obtain a page missing check result of the adjacent scanned images corresponding to the spacing vector; The page missing check result of the scanned image set is determined according to the page missing check results of the adjacent scanned images corresponding to each of the spacing vectors.
7. The method according to claim 6, characterized in that The determining of the phase types of adjacent scanned images corresponding to the spacing vector comprises: Determine whether the angle between the spacing vector and the reference vector is within a preset range; the reference vector is a spacing vector between adjacent first scanned images and second scanned images that meet preset conditions among the multiple scanned images; the preset conditions include that the first scanned image and the second scanned image are in the same phase, and the first scanned image and the second scanned image are aligned with each other; If yes, then determining that the phase type of the adjacent scanned images corresponding to the spacing vector is the same phase; If not, it is determined that the phase types of the adjacent scan images corresponding to the spacing vector are out of phase.
8. A scanning image verification device, characterized in that: The device comprises: An acquisition module, used to acquire a set of scanned images to be verified; the scanned image set includes a plurality of scanned images; A determination module, configured to determine, for the plurality of scanned images, a spacing vector between adjacent scanned images; The verification module is used to verify the spatial information of the plurality of scanned images according to the spacing vectors between the adjacent scanned images, so as to obtain the verification result of the scanned image set.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.