Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In order to better understand the technical solution provided by the embodiments of the present application and make the above objects, features and advantages of the embodiments of the present application more obvious, the technical solution in the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flowchart of a method provided in an embodiment of the present application. The method is applied to electronic equipment such as the X-ray security inspection equipment.
As shown in fig. 3, the process may include the steps of:
step 301, obtaining a current strip detected by a detection board when a package enters a security inspection channel, and determining the current strip as a first confidence level of the strip for indicating the package.
Taking an X-ray security inspection device as an example, after a package is judged to enter, an X-ray tube in a generator in the X-ray security inspection device emits an X-ray source, and each detection unit on a detection board can acquire data of the package (here, high-energy and low-energy detection units on the detection board can acquire high-energy and low-energy original data respectively), so as to obtain a strip.
Alternatively, in this embodiment, any one of the strips may consist of a t1 column digital signal value. Here, t1 represents the number of consecutive integration times. Taking t1 as 32 as an example, it means that a single stripe may consist of 32 columns of digital signal values.
In this embodiment, any one of the digital signal values consists of n1 digital signal values. n1 represents the total number of detection units. That is, any one of the digital signal values is composed of digital signal values measured by different detection units at the same integration time. Taking n1 as 640 as an example, any one of the digital signal values is composed of 640 rows, and each row has only one digital signal value, and the digital signal values in the 640 rows are respectively digital signal values measured by 640 detection units at the same integration time.
Alternatively, in this embodiment, the first confidence that the current strip is a strip for indicating a package may be determined based on the characteristic value, such as a gray value, of each pixel on the current strip and the characteristic value, such as a gray value, of each pixel in the maintained air template strip. Hereinafter, the description will be given by way of example, and the description will be omitted.
If it is determined that the current stripe trend indicates a parcel based on the first confidence, the current stripe is processed 302.
Alternatively, in the present embodiment, the higher the first confidence, the more prone the indication of the package and vice versa. When the first confidence level is greater than or equal to the set confidence level, determining that the current banding tendency indicates a package.
Alternatively, in this embodiment, the current strip may be processed according to an image morphology processing manner, so as to facilitate searching the contour boundary point set from the processed current strip, which will be described below. The processing of the current stripe according to the image morphology processing manner will be described below by way of example, and will not be described in detail herein.
And 303, searching out a contour boundary point set from the current strip, wherein the contour boundary point set is used for determining the contour boundary in the current strip.
In this embodiment, the profile is searched by means of deep search, which will be described by way of example and will not be described in detail herein.
Step 304, further determining a target confidence of the current strip based on the geometry between the contour boundary and the probe plate boundary and the number of pixels within the contour boundary that meet the parcel requirement, the target confidence of the current strip being used to indicate whether to update the existing air template strip based on the current strip.
In this embodiment, the first confidence coefficient is adjusted by means of the geometric structure between the contour and the detection plate and the number of pixel points meeting the package requirement in the contour boundary, so as to obtain the target confidence coefficient of the current strip.
As an example, the geometry between the contour and the probe plate may include whether the contour boundary is flush with the probe plate boundary, such as whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the probe plate, and/or whether the left and right boundaries of the contour are flush with the left and right boundaries of the probe plate.
Optionally, whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the probe plate is based on the slope of the upper and lower boundaries of the contour. Here, the slope of the upper and lower boundaries of the contour is determined based on the positions of the boundary pixels of the upper and lower boundaries in the contour boundary point set, for example, the slope is a quotient between a difference between an ordinate and a difference between abscissas in the positions of any two boundary pixels on the upper and lower boundaries.
Optionally, whether the left and right boundaries of the contour are flush with the left and right boundaries of the probe plate is based on a slope of the left and right boundaries of the contour. Here, the slopes of the left and right boundaries of the contour are determined based on the positions of the boundary pixel points of the left and right boundaries in the contour boundary point set. For example, the slope is the quotient between the difference between the ordinate and the difference between the abscissa in the positions of any two boundary pixel points on the left and right boundaries.
Considering the geometrical law of the flatness of the edges of the probe card, if the slope is 0 or infinity (+infinity), then it is considered flush.
In addition, in the present embodiment, the number of pixels meeting the wrapping requirement within the contour boundary may be counted based on the histogram. For example, for each pixel within the contour boundary, a mapped pixel (the mapped pixel has a mapping relationship with the pixel) with the same position can be found on the existing air mold strip based on the position of the pixel. And then, calculating the difference between the characteristic value of the pixel point and the characteristic value of the mapping pixel point with the mapping relation with the pixel point on the existing air model strip, and counting in the corresponding histogram range according to the difference.
Here, the existing air template strip, initially, may be in a condition that ensures no packages within the security screening tunnel
Under the condition, after the radiation source and the detector are simultaneously started, an air template is generated according to full-load data acquired by the detector.
In this embodiment, if the geometry between the contour boundary and the probe plate boundary is that the contour boundary is flush with the probe plate boundary, and the number of pixels within the contour boundary that satisfy the package requirement satisfies the set number requirement (e.g., less than or equal to the set number threshold), then the higher the target confidence, and vice versa. Based on this principle, the present embodiment can determine the target confidence.
Step 305, if it is determined that the existing air template strip is updated based on the current strip according to the target confidence, the existing air template strip is updated based on the current strip and in proportion, and the updated air template strip is used for correcting the strip detected by the detection board, so as to realize security inspection image correction.
As one example, determining to update the existing air template strip based on the current strip based on the target confidence level may include determining to update the existing air template strip based on the current strip if the target confidence level is greater than or equal to a set confidence threshold. Here, the confidence threshold may be set according to actual needs and experience. Otherwise, when the target confidence is smaller than the set confidence threshold, the fact that the existing air template strip is not updated by the current strip is determined, the current strip is a package strip, and full-load correction can be directly carried out on the current strip detected by the detection plate when the package enters the security inspection channel based on the existing air template strip, so that security inspection image correction is achieved.
As an embodiment, when it is determined that the existing air template strip is updated based on the current strip according to the target confidence, the present embodiment may update the existing air template strip proportionally based on the target confidence to eliminate the cross-stripe dirty map caused by signal fluctuations. Alternatively, the scale herein may be determined according to the confidence level, and the present embodiment is not particularly limited. In this embodiment, the updating of the existing air template strip according to the proportion may be, for example, determining the weight of the current strip and the weight of the existing air template strip, multiplying the characteristic value, such as the gray value, of the pixel at the position on the current strip with the weight of the current strip to obtain a first product, multiplying the characteristic value, such as the gray value, of the pixel at the position on the existing air template strip with the weight of the existing air template strip to obtain a second product, and taking the sum of the first product and the second product as the characteristic value of the pixel at the position on the existing air template strip. And so on.
It can be seen that, in this embodiment, when updating an existing air template strip based on the current strip, instead of directly replacing, for each location, the characteristic value of the pixel at the location in the existing air template strip with the characteristic value of the pixel at the location in the current strip, the characteristic value of the pixel at the location in the existing air template strip is updated proportionally by using the characteristic value of the pixel at the location in the current strip in the manner described above. Compared with the method that the characteristic value of the pixel point at the position in the existing air template strip is directly replaced by the characteristic value of the pixel point at the position in the current strip, the dirty image phenomenon caused by signal fluctuation is effectively removed.
After updating the air template strip, full-load correction can be performed on the current strip detected by the detection plate when the package enters the security inspection channel based on the updated air template strip, so that security inspection image correction is realized.
Thus, the flow shown in fig. 3 is completed.
As can be seen from the flow shown in fig. 3, in this embodiment, for each single stripe, whether to update the existing air template stripe is determined based on the single stripe, so as to update the existing air template stripe in time, effectively remove the dirty image caused by the signal fluctuation and other phenomena in time, effectively improve the image quality of the security inspection device, improve the subsequent substance identification and the image effect, and avoid the dirty image problem caused by the signal fluctuation caused by the reasons of hardware and the like.
Further, when judging a single strip, the embodiment further judges whether the current strip is a wrapping strip or an air strip from the angles of the outline boundary and the established geometric rule of the detection plate (geometric structure between the outline boundary and the detection plate boundary), so that the problem that other thin wrapping strips and the like are easy to be used as air data to update can be further avoided.
Further, the existing air template strips are updated proportionally, so that dirty image phenomena caused by signal fluctuation can be effectively removed.
Furthermore, the method of judging whether to update the existing air template strip by using each strip can process dirty images caused by target spot deviation phenomenon in security inspection equipment in the security inspection field, dirty images caused by signal fluctuation caused by other interferences such as temperature, voltage and electromagnetic and dirty images caused by signal fluctuation in other fields such as remote sensing detection and industrial detection, and has certain popularization.
How to determine the current stripe as a first confidence level for indicating a wrapped stripe is described below:
Referring to fig. 4, fig. 4 is a flowchart of step 301 provided in an embodiment of the present application. As shown in fig. 4, the process may include the steps of:
Step 401, for each pixel point on the current strip, calculating a difference between the characteristic value of the pixel point and the characteristic value of the mapped pixel point on the existing air pattern strip having a mapping relation with the pixel point.
As described above, the mapped pixel points on the existing air mold strip, which have a mapping relationship with the pixel points on the current strip, refer to the pixel points with the same positions as the pixel points on the current strip.
Optionally, in this embodiment, for each pixel point on the current stripe, a difference is made between the pixel point and a feature value, such as a gray value, of the pixel point (i.e., a mapped pixel point) at a corresponding position in the maintained air template stripe, and the difference is recorded to a corresponding histogram according to the magnitude of the difference.
And step 402, if the number of the pixel points meeting the requirements in the current strip exceeds a first threshold value, determining a second confidence that the current strip is a suspected package strip based on the target confidence of the previous strip, wherein the difference between the characteristic value of the pixel point meeting the requirements in the current strip and the characteristic value of the mapping pixel point with a mapping relation with the pixel point on the air mould strip is larger than a set difference.
Optionally, the statistics is performed on each difference value in the histogram, and the number of pixels meeting the requirement in the current band (the difference value between the characteristic value, such as the gray value, of the pixel point and the characteristic value, such as the gray value, of the mapping pixel point of the pixel point in the air template band is greater than the set difference value) is counted, if the number exceeds the first threshold, the second confidence that the current band is a suspected package band is determined based on the target confidence of the previous band. Here, the target confidence of the last band and the number may be weighted to obtain the second confidence.
It should be noted that, the setting of the difference value, the first threshold value may be set according to actual requirements, and the embodiment is not particularly limited.
And step 403, if it is determined that the current stripe tends to be a suspected wrapping stripe based on the second confidence, determining the first confidence based on the fluctuation condition of the feature value of each pixel point in the current stripe in the time direction.
Alternatively, if the second confidence is greater, the current strip is considered to be prone to be a suspected parcel strip, step 403 is performed. If the second confidence is smaller, for example, smaller than the set confidence value, the current strip is considered to be prone to be suspected air, and the existing air template strip can be updated directly based on the second confidence and in proportion. The update is described in step 305, and will not be described in detail here.
As to how to determine the first confidence based on the fluctuation condition of the feature values of the pixel points in the current stripe in the time direction, there are various implementation manners when the embodiment is specifically implemented, and one of the implementation manners is described below by way of example:
referring to fig. 5, fig. 5 is a flowchart illustrating implementation of step 403 provided in an embodiment of the present application. As shown in fig. 5, the process may include the steps of:
step 501, for each line in the current strip, calculating the standard deviation of the line according to the characteristic value of each pixel point in the line, wherein the standard deviation of any line is the standard deviation of the characteristic value of each pixel point in the line.
The standard deviation is only an example, and is not limited thereto.
For example, the mean value of each row is first calculated (noted as):. Then calculate the standard deviation of each row:. Wherein N is the number of pixel points in each row,The characteristic value of the pixel point is represented.
Step 502, if the standard deviation of each row is smaller than the set standard deviation threshold and the difference between the current strip and the existing air template strip meets the set difference requirement, determining the first confidence based on the second confidence, wherein the first confidence is used for tending to indicate a package with uniform texture. If the standard deviation of each row is smaller than the set standard deviation threshold and the difference between the current strip and the existing air template strip does not meet the set difference requirement, the first confidence is directly determined to be the confidence for tending to indicate air, or if the standard deviation of at least one row in the current strip is larger than the set standard deviation threshold and the difference between the current strip and the existing air template strip meets the set difference requirement, the current strip is skipped.
If the current strip is an air strip or a thin package with uniform texture, the characteristic value fluctuation of the pixel points in the direction of the time axis in the current strip is smaller, namely the standard deviation of each row is smaller. Based on this, if the standard deviation of each row is smaller (for example, both standard deviations are smaller than the set standard deviation threshold value), and the difference between the current strip and the existing air template strip does not meet the set difference requirement (for example, the difference of the standard deviations of the rows corresponding to the same row identifier (for example, row number) in the current strip and the air template strip is smaller than or equal to the set difference), the first confidence is directly determined to be the confidence for tending to indicate air. When it is determined that the first confidence is a confidence for tending to indicate air, the existing air template strip may be updated directly based on the first confidence and in proportion. The update is described in step 305, and will not be described in detail here.
If the standard deviation of each row is smaller (e.g., both are smaller than the set standard deviation threshold), and the difference between the current strip and the existing air template strip meets the set difference requirement (e.g., the difference in standard deviations of rows corresponding to the same row identification (e.g., row number) in the current strip and the air template strip is smaller than or equal to the set difference), then the current strip may indicate a uniform-quality parcel, and then the first confidence may be determined to be a confidence for tending to indicate a uniform-quality parcel.
Of course, if the standard deviation of at least one line in the current strip is greater than the set standard deviation threshold, the current strip is directly considered to be a package strip, and full-load correction is directly performed on the current strip detected by the detection plate when the package enters the security inspection channel based on the existing air template strip, so that security inspection image correction is realized.
Thus, the flow shown in fig. 5 is completed.
As can be seen from the above description, in this embodiment, the dimensions of the difference value on the statistical histogram (the difference value between the characteristic value, such as the gray value, of the pixel point in the current stripe and the characteristic value, such as the gray value, of the mapped pixel point of the pixel point in the air template stripe) and the standard deviation, morphology (air, thin package with uniform texture, or package) and the like of the characteristic values of each pixel point in the current stripe in the time direction are calculated to participate in deciding whether to update the existing air template stripe based on the current stripe, so as to avoid other problems that the thin package is easy to be regarded as air data update.
Step 302 is described below:
Referring to fig. 6, fig. 6 is a flowchart illustrating implementation of step 302 according to an embodiment of the present application. As shown in fig. 6, the process may include the steps of:
In step 601, binarization is performed on the feature value of the pixel in the current stripe, so that if the feature value of any pixel in the second stripe is smaller than the set threshold, the feature value is set to be a first value, and if the feature value is greater than or equal to the set threshold, the feature value is set to be a second value.
For example, taking the feature value as a gray value as an example, the first value may be 0 and the second value may be 255.
Step 602, performing corrosion operation on the current strip to eliminate isolated noise interference, and performing expansion operation on the current strip after the corrosion operation to fill gaps and profile discontinuities.
In this embodiment, the erosion operation is intended to eliminate isolated, discontinuous pixels in the current stripe where the contour is still intact. The specific implementation of the corrosion operation is similar to the existing corrosion operation treatment mode and is not repeated.
In this embodiment, the expansion operation is to fill the void (also called blank area) in the current strip and smooth the profile to avoid discontinuities in the profile. The specific implementation of the expansion operation is similar to the existing expansion operation processing mode, and will not be repeated. The void may be an original void in the current strip or a void introduced by a corrosion operation, and the embodiment is not particularly limited.
Thus, the flow shown in fig. 6 is completed.
The current strip is processed according to the image form processing mode by the flow shown in fig. 6.
Step 303 is described by way of example below:
Referring to fig. 7, fig. 7 is a flowchart of step 303 provided in an embodiment of the present application. As shown in fig. 7, the process may include the steps of:
step 701, traversing pixel points according to sequence from the appointed position of the current strip, taking the traversed pixel points as the current pixel points, and executing step 702 if the current pixel points do not meet the boundary pixel point requirements. If the current pixel meets the boundary pixel requirement, step 704 is performed.
The specified location may be determined based on the structure of the following neighborhood, such as if the neighborhood is an 8 neighborhood, then the specified location is typically the location where the third row of the third column begins. To ensure that the pixel at that location has 8 adjacent pixels. The 8 neighborhood of any one pixel point is a matrix structure of 3*3 formed centering on the pixel point. The 8 neighborhood of one pixel point comprises eight adjacent pixel points of upper, lower, left and right, and upper left, upper right, lower left and lower right.
Here, the fact that the current pixel does not meet the boundary pixel requirement means that the characteristic value, such as the gray value, of the current pixel is not the characteristic value, such as the gray value, required by the boundary pixel. Likewise, the fact that the current pixel meets the boundary pixel requirement means that the characteristic value, such as the gray value, of the current pixel is the characteristic value, such as the gray value, required by the boundary pixel. Taking the gray value as an example, the required feature value of the boundary pixel point is 255 (0 xFF), for example. In view of the above binarization, if the gray value of the current pixel is 0, the current pixel is considered to be not in accordance with the boundary pixel requirement.
Step 702, searching a neighborhood centered on a current pixel in a current band. Step 703 is then performed.
For example, the current band is searched for 8 neighbors centered on the current pixel.
Step 703, traversing each pixel point in the neighborhood according to the set direction sequence, if the pixel point meets the boundary pixel point requirement, recording the pixel point as a boundary pixel point, if the pixel point does not meet the boundary pixel point requirement, taking the pixel point as a current pixel point, and returning to the step of searching the neighborhood with the current pixel point as the center in the current strip. Step 705 is then performed.
For example, the set direction sequence is left- > upper left..A. traversing the left pixel point first, if the pixel point meets the boundary pixel point requirement, recording the pixel point as a boundary pixel point, if the pixel point does not meet the non-boundary pixel point requirement, taking the pixel point as a current pixel point, and returning to the step of searching the neighborhood taking the current pixel point as the center in the current strip until the pixel point is traversed to the boundary pixel point or all the pixel points are traversed. Other directions are similar and will not be described in detail.
Step 704, record the current pixel as the boundary pixel. Step 705 is then performed.
Step 705, generating a set of contour boundary points based on the recorded boundary pixel points.
Thus, the flow shown in fig. 7 is completed.
By the flow shown in fig. 7, the searching of the contour boundary point set from the current band is finally realized.
The method provided by the embodiment of the application is described above.
It should be noted that the detecting units are important components of the detecting board, and differences exist among the detecting units on the detecting board, and the response values of the detecting units to the X-rays are inconsistent due to different positions and irradiation angles. To eliminate this error, background data and full data correction is often required for the high and low energy data in each stripe. Full data correction is based on the air template strip, and background data correction is based on the background template strip. Background template stripes refer to stripes acquired on the premise that the radiation source is not turned on.
In addition, in this embodiment, the normalization correction may be performed after the air template strip is updated. In addition, for the model with smaller partial size, due to inconsistent distance of the radiation source from the object to the detector, the deformation of the object in the security check is serious, and therefore, geometric correction may be further performed on the correction result after normalization correction.
After correcting each single strip, the method can further execute other special operations such as enhancement, noise reduction, super enhancement and the like, pseudo-coloring and the like, and then splice the processed strips into a package image in sequence, send the package image to a display for display according to a set frame rate, refresh frequency and the like, repeat the process until package scanning is finished, and output the spliced package image.
The following describes a device provided by an embodiment of the present application:
referring to fig. 8, fig. 8 is a block diagram of an apparatus according to an embodiment of the present application. The apparatus may include:
The strip unit is used for obtaining the current strip detected by the detection plate when the package enters the security inspection channel;
A processing unit for determining the current strip as a first confidence level for indicating the strip of the package, and
If the current strip trend indication package is determined based on the first confidence coefficient, processing the current strip to search out a contour boundary point set from the current strip, wherein the contour boundary point set is used for determining a contour boundary in the current strip;
further determining a target confidence of the current strip based on the geometry between the contour boundary and the probe plate boundary and the number of pixels within the contour boundary that meet the parcel requirement;
And the updating unit is used for updating the existing air template strip based on the current strip if the existing air template strip is determined to be updated based on the target confidence, and updating the existing air template strip based on the current strip according to the proportion, wherein the updated air template strip is used for correcting the strip detected by the detection board so as to realize security inspection image correction.
As one embodiment, the determining the first confidence that the current stripe is a stripe for indicating a package includes:
for each pixel point on the current strip, calculating a difference value between the characteristic value of the pixel point and the characteristic value of a mapping pixel point with a mapping relation with the pixel point on the existing air mould strip;
If the number of the pixel points meeting the requirements in the current strip exceeds a first threshold, determining a second confidence that the current strip is a suspected wrapping strip based on the target confidence of the last strip, wherein the difference between the characteristic value of the pixel points meeting the requirements in the current strip and the characteristic value of the mapping pixel points with a mapping relation with the pixel points on the air mould strip is larger than a set difference;
And if the current strip tends to be the suspected package strip based on the second confidence, determining the first confidence based on the fluctuation condition of the characteristic value of each pixel point in the current strip in the time direction.
As one embodiment, the determining the first confidence based on the fluctuation condition of the eigenvalues of the pixels in the current stripe in the time direction includes:
for each row in the current strip, calculating the standard deviation of the row according to the characteristic value of each pixel point in the rowThe standard deviation of any row is the standard deviation of the characteristic value of each pixel point in the row;
If the standard deviation of each row is smaller than a set standard deviation threshold and the difference between the current strip and the existing air template strip meets the set difference requirement, determining the first confidence on the basis of the second confidence, wherein the first confidence is used for tending to indicate uniform-quality packages;
if the standard deviation of each row is smaller than the set standard deviation threshold and the difference between the current strip and the existing air template strip does not meet the set difference requirement, the first confidence is directly determined to be the confidence for tending to indicate air.
As an embodiment, the processing the current stripe includes:
performing binarization processing on the characteristic value of the pixel point in the current strip, so that if the characteristic value of any pixel point in the second strip is smaller than a set threshold value, the characteristic value is set to be a first value, and if the characteristic value is larger than or equal to the set threshold value, the characteristic value is set to be a second value;
The current strip is subjected to corrosion operation to eliminate isolated noise interference, and the current strip after the corrosion operation is subjected to expansion operation to fill gaps and smooth contours.
As one embodiment, the searching the contour boundary point set from the current band includes:
Traversing pixel points according to sequence from the appointed position of the current strip, and taking the traversed pixel points as the current pixel points;
If the current pixel point meets the boundary pixel point requirement, recording the current pixel point as the boundary pixel point;
Traversing each pixel point in the neighborhood according to the set direction sequence, recording the pixel point as a boundary pixel point if the pixel point meets the boundary pixel point requirement, taking the pixel point as the current pixel point if the pixel point does not meet the boundary pixel point requirement, and returning to the step of searching the neighborhood taking the current pixel point as the center in the current band;
Wherein each recorded boundary pixel point forms the contour boundary point set.
As an embodiment, the fact that the current pixel does not meet the boundary pixel requirement means that the feature value of the current pixel is not the feature value required by the boundary pixel;
The fact that the current pixel meets the boundary pixel requirement means that the characteristic value of the current pixel is the required characteristic value of the boundary pixel.
As one embodiment, the geometry between the contour boundary and the probe plate boundary comprises whether the contour boundary and probe plate boundary are flush;
whether the contour boundary is flush with the boundary of the detection plate or not comprises whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the detection plate or not and/or whether the left and right boundaries of the contour are flush with the left and right boundaries of the detection plate or not;
Whether the upper and lower boundaries of the outline are flush with the upper and lower boundaries of the detection plate is based on the slope of the upper and lower boundaries of the outline, wherein the slope of the upper and lower boundaries of the outline is determined based on the positions of boundary pixel points of the upper and lower boundaries in the outline boundary point set;
Whether the left and right boundaries of the outline are flush with the left and right boundaries of the detection plate is based on the slope of the left and right boundaries of the outline, and the slope of the left and right boundaries of the outline is determined based on the positions of boundary pixel points of the left and right boundaries in the outline boundary point set.
As one embodiment, the pixel points meeting the wrapping requirement in the contour boundary refers to determining that the pixel points meet the wrapping requirement if the difference between the characteristic value of the pixel point in the contour boundary and the characteristic value of the mapping pixel point having a mapping relation with the pixel point on the existing air mold strip is larger than the set difference.
As one embodiment, said further determining the target confidence of the current strip based on the geometry between the contour boundary and the probe plate boundary, and the number of pixels within the contour boundary that meet the parcel requirement comprises:
Adjusting the first confidence coefficient according to the geometric structure between the outline boundary and the detection plate boundary and the number of pixel points meeting the package requirement in the outline boundary so as to obtain the target confidence coefficient;
And if the geometric structure between the contour boundary and the detection plate boundary is that the contour boundary is flush with the detection plate boundary, and the number of the pixel points meeting the package requirement in the contour boundary meets the set number requirement, the target confidence is higher.
As one embodiment, if it is determined that the current strip tends to be an air strip based on the second confidence, the processing unit further includes updating the existing air template strip based on the second confidence and proportionally using the current strip;
If the first confidence is a confidence for tending to indicate air, the processing unit further includes updating an existing air template strip using the current strip based on the first confidence and in proportion.
The structural description of the apparatus shown in fig. 8 is thus completed.
Based on the same application concept as the above method, the embodiment of the present application further provides a hardware structure of the apparatus shown in fig. 8. As shown in fig. 9, the hardware architecture includes a processor and a machine-readable storage medium. The machine-readable storage medium has stored thereon computer instructions which, when executed by a processor, enable the method disclosed in the above examples of the application to be carried out.
Based on the same application concept as the above method, the embodiment of the present application further provides a machine-readable storage medium, where a number of computer instructions are stored, where the computer instructions can implement the method disclosed in the above example of the present application when the computer instructions are executed by a processor.
By way of example, the machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., hard drive), a solid state disk, any type of storage disk (e.g., optical disk, dvd, etc.), or a similar storage medium, or a combination thereof.
The system, apparatus, template, or unit illustrated in the above embodiments may be implemented by a computer or an entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Moreover, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.