Object Size Measurement Method and Related Device, Security Inspection Machine, and Storage Medium

By establishing the target coordinate system and light equation on the security inspection machine, the physical radius of the object is automatically calculated, which solves the difficulty of measuring the radius when the object is tilted during the security inspection process, and achieves an automatic and accurate measurement effect.

CN120063173BActive Publication Date: 2025-08-01IFLYTEK (SUZHOU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510543014.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-01
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

The prior art is difficult to automatically and accurately measure the physical radius of the object to be measured during the security inspection process, especially when the object is inclined to the direction of travel of the security inspection channel, it is particularly difficult to measure the physical radius of the columnar object.

Method used

Through scanning image detection based on security inspection machines, equipment parameters and coordinate differences are obtained, target coordinate systems are established, ray equations are constructed, and physical radius is solved using mathematical modeling, including measurement preparation module, distance measurement module, coordinate construction module, equation construction module and radius solution module, to automatically calculate the physical radius of the object.

Benefits of technology

It realizes automatic and accurate measurement of the physical radius of the object to be measured during the security inspection process, improving the convenience and accuracy of the measurement process without manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120063173B_ABST
    Figure CN120063173B_ABST
Patent Text Reader

Abstract

The present application discloses an object size measurement method, related devices, an X-ray security inspection machine, and a storage medium. The object size measurement method includes: detecting a first scanned image of an object to be measured on an inspection channel by an X-ray security inspection machine to obtain a detection result, and acquiring device parameters including at least a scaling factor when the X-ray security inspection machine forms an image; obtaining a physical distance between a first intersection point of a first light ray on the inspection channel and a second intersection point of a second light ray on the inspection channel based on the scaling factor and a coordinate difference; establishing a target coordinate system with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the horizontal coordinate axis, and the direction of the minor axis of the target ellipse as the vertical coordinate axis; constructing a first equation of the first light ray and a second equation of the second light ray based on the target coordinate system; and solving for a physical radius based on the first equation, the second equation, and the physical distance. The above solution can automatically and accurately measure the physical radius of an object to be measured during the security inspection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of security inspection image processing, and particularly to a method for measuring the size of an object, related devices, an X-ray security inspection machine, and a storage medium. Background Art

[0002] In places such as airports, subways, and logistics, X-ray security inspection machines can help detect the size of objects being inspected, etc., and thus have gradually become one of the standard configurations in the above-mentioned places.

[0003] In some special scenarios, the object to be measured is required to be placed on the security inspection channel parallel to the traveling direction of the security inspection channel, so that relevant personnel can estimate the physical size of the object to be measured through convenient operations such as fixing points and drawing lines on the scanned image. On the one hand, the above measurement method requires manual operation by relevant personnel and it is difficult to automate the measurement of the object size. On the other hand, in daily life scenarios such as commuting, it is usually difficult to require the object to be measured to be placed in the above regular manner before passing through the security inspection, but rather it is randomly placed on the security inspection channel. As a result, the object to be measured inevitably tilts relative to the traveling direction of the security inspection channel, making the above measurement method no longer applicable, especially when measuring the physical radius of a cylindrical object. In view of this, how to automatically and accurately measure the physical radius of the object to be measured during the security inspection process has become an urgent problem to be solved. Summary of the Invention

[0004] The main technical problem to be solved by this application is to provide a method for measuring the size of an object, related devices, an X-ray security inspection machine, and a storage medium, which can automatically and accurately measure the physical radius of the object to be measured during the security inspection process.

[0005] To solve the above technical problems, the first aspect of the present application provides a method for measuring the size of an object, including: detecting a first scanned image of an object to be measured on a security inspection channel based on an X-ray security inspection machine to obtain a detection result, and acquiring device parameters including at least a scaling coefficient during imaging of the X-ray security inspection machine; wherein, the detection result includes: a target angle between the object to be measured and the traveling direction of the security inspection channel, and a coordinate difference between relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction; based on the scaling coefficient and the coordinate difference, obtaining a physical distance between a first intersection point of a first light ray on the security inspection channel and a second intersection point of a second light ray on the security inspection channel; wherein, the first light ray and the second light ray are respectively tangent to the object to be measured and respectively form relative endpoints through imaging, and a cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as a target ellipse; taking the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis, establishing a target coordinate system; wherein, the major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius; based on the target coordinate system, constructing a first equation of the first light ray and a second equation of the second light ray; wherein, the first equation and the second equation take the physical radius as a variable; based on the first equation, the second equation and the physical distance, solving for the physical radius.

[0006] To solve the above technical problems, the second aspect of the present application provides an object size measurement device, including: a measurement preparation module, a distance measurement module, a coordinate establishment module, an equation construction module, and a radius solution module. The measurement preparation module is configured to detect a first scanned image of an object to be measured on a security inspection channel based on an X-ray security inspection machine to obtain a detection result, and acquire device parameters including at least a scaling coefficient during imaging of the X-ray security inspection machine; wherein, the detection result includes: a target angle between the object to be measured and the traveling direction of the security inspection channel, and a coordinate difference between relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction; the distance measurement module is configured to obtain a physical distance between a first intersection point of a first light ray on the security inspection channel and a second intersection point of a second light ray on the security inspection channel based on the scaling coefficient and the coordinate difference; wherein, the first light ray and the second light ray are respectively tangent to the object to be measured and respectively form relative endpoints through imaging, and a cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as a target ellipse; the coordinate establishment module is configured to establish a target coordinate system with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis; wherein, the major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius; the equation construction module is configured to construct a first equation of the first light ray and a second equation of the second light ray based on the target coordinate system; wherein, the first equation and the second equation take the physical radius as a variable; the radius solution module is configured to solve for the physical radius based on the first equation, the second equation and the physical distance.

[0007] To solve the above technical problems, a third aspect of the present application provides an electronic device, which at least includes a memory and a processor coupled to each other. The memory stores at least program instructions, and the processor is configured to execute the program instructions to implement the object size measurement method in the first aspect above.

[0008] To solve the above technical problems, a fourth aspect of the present application provides an X-ray security inspection machine, which at least includes the electronic device in the third aspect above.

[0009] To solve the above technical problems, a fifth aspect of the present application provides a computer-readable storage medium, which stores program instructions that can be run by a processor, and the program instructions are used to implement the object size measurement method in the first aspect above.

[0010] The above solution is based on detecting a first scanned image of an object to be measured on a security inspection channel by an X-ray security inspection machine to obtain a detection result, and obtaining device parameters including at least a zoom factor when the X-ray security inspection machine forms an image. The detection result includes: a target angle between the object to be measured and the traveling direction of the security inspection channel, and a coordinate difference between opposite endpoints of the object edge of the object to be measured in a direction perpendicular to the traveling direction. Then, based on the zoom factor and the coordinate difference, a physical distance between a first intersection point of a first light ray on the security inspection channel and a second intersection point of a second light ray on the security inspection channel is obtained. The first light ray and the second light ray are respectively tangent to the object to be measured and respectively form opposite endpoints when imaging. The cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as a target ellipse. Thus, with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis, a target coordinate system is established. The major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius. Furthermore, based on the target coordinate system, a first equation of the first light ray and a second equation of the second light ray are constructed, and the first equation and the second equation take the physical radius as a variable. Based on the first equation, the second equation, and the physical distance, the physical radius is solved. Therefore, on the one hand, since relevant detections are performed based on the first scanned image and relevant calculations are combined with device parameters, the physical radius of the object to be measured can be obtained without manual operation by relevant personnel on the first scanned image, which can improve the convenience of the measurement process. On the other hand, when the object to be measured is inclined to the traveling direction of the security inspection channel, by using the cross-section of the plane where the light source rays tangent to the object to be measured are located on the object to be measured as the target ellipse, and accordingly establishing the target coordinate system, and the major axis of the target ellipse is obtained from the target angle between the object to be measured and the traveling direction and the physical radius, while the minor axis of the target ellipse is the physical radius, the equations of the aforementioned tangent rays with the physical radius as a variable can be constructed according to the established target coordinate system, and combined with the physical distance between the intersection points of the aforementioned tangent rays on the security inspection channel, the physical radius is solved. Therefore, it can be solved through a series of operations such as mathematical modeling and equation solving, which helps to improve the accuracy of the measurement process. Thus, the physical radius of the object to be measured can be automatically and accurately measured during the security inspection process. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a schematic flowchart of an embodiment of the object size measurement method of the present application;

[0012] Figure 2a is a schematic diagram of the effect of an embodiment of the object size measurement method of the present application;

[0013] Figure 2b is a schematic diagram of the effect of an embodiment of the first scanned image of the present application;

[0014] Figure 2c is a schematic diagram of the effect of another embodiment of the object size measurement method of the present application;

[0015] Figure 3 It is a schematic diagram of the framework of an embodiment of the object size measurement device of the present application;

[0016] Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0017] Figure 5 It is a schematic diagram of the framework of an embodiment of the security inspection machine of the present application;

[0018] Figure 6 It is a schematic diagram of the framework of an embodiment of the computer-readable storage medium of the present application. Detailed implementation manners

[0019] Next, in conjunction with the accompanying drawings of the specification, the solutions of the embodiments of the present application will be described in detail.

[0020] In the following description, specific details such as specific system structures, interfaces, and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the present application.

[0021] In this article, the terms "system" and "network" are often used interchangeably. The term " / and" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the fragment " / " in this article generally represents an "or" relationship between the associated objects before and after. In addition, "multiple" in this article means two or more than two.

[0022] Please refer to Figure 1 , Figure 1 It is a schematic flowchart of an embodiment of the object size measurement method of the present application. Specifically, it may include the following steps:

[0023] Step S11: Detect the first scanned image of the object to be measured on the security inspection channel based on the security inspection machine to obtain a detection result, and obtain device parameters including at least the scaling coefficient when the security inspection machine forms an image.

[0024] In the embodiments of the present disclosure, the detection result includes: the target angle between the object to be measured and the traveling direction of the security inspection channel, and the coordinate difference between the relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction. It should be noted that the target angle can be specifically determined by detecting the axis of the object to be measured in the first scanned image. For example, the axis of the object to be measured can be detected in the first scanned image, and the angle between the axis and the traveling direction is the target angle. In addition, in addition to the scaling coefficient, the device parameters may further include, but are not limited to: the vertical distance from the light source to the security inspection channel, the imaging coordinates of the light source perpendicular to the outgoing light of the security inspection channel, etc. The specific content of the device parameters is not limited herein.

[0025] In one implementation scenario, the device parameters can be provided by the manufacturer during the factory production of the security inspection machine in forms such as being burned into the internal storage of the security inspection machine for subsequent retrieval and use.

[0026] In another implementation scenario, the device parameters can also be obtained by pre-calibrating the second scanned image of the calibration ruler placed on the security inspection channel by the security inspection machine, and the calibration ruler can be perpendicular to the traveling direction of the security inspection channel. More precisely, the extending direction of the calibration ruler can be perpendicular to the traveling direction of the security inspection machine. As a possible example in the actual application process, if the light source of the security inspection machine is an X-ray, then in order to improve the clarity of scanning the calibration ruler as much as possible, the calibration ruler can be a lead ruler, or an X-ray developing ruler such as a radiation-impermeable marking ruler. The specific type of the calibration ruler is not limited herein.

[0027] In a specific implementation scenario, for the "vertical distance" in the device parameters, in order to calibrate the "vertical distance", a first algebraic expression can be constructed based on the physical height of the calibration ruler and the unknown quantity representing the vertical distance. The sum of the unknown quantity representing the vertical distance and the physical height can be obtained as the shortest distance, and then based on the unknown quantity representing the vertical distance and the shortest distance, the first algebraic expression can be obtained. That is to say, after obtaining the shortest distance including the unknown quantity, the first algebraic expression can be constructed based on the ratio of the unknown quantity to the shortest distance. At the same time, based on the vertex coordinates of each vertex of the calibration ruler on the same cross-section in the second scanned image, the distance ratio between the first distance and the second distance can be obtained. Exemplarily, the difference between the vertex coordinates of the vertices on the top edge of the cross-section can be obtained as the top edge coordinate difference, and the difference between the vertex coordinates of the vertices on the bottom edge of the cross-section can be obtained as the bottom edge coordinate difference. On this basis, the distance ratio can be obtained based on the ratio of the top edge coordinate difference to the bottom edge coordinate difference. It should be noted that when the pixel coordinates are represented by (U, V), unless otherwise specified in the embodiments of the present disclosure, when performing relevant calculations on the pixel coordinates, it generally specifically refers to the ordinate (i.e., the V coordinate) among them. On this basis, a second function can be constructed based on the first algebraic expression and the distance ratio, and then the vertical distance can be obtained by solving based on the second function. It should be noted that the first algebraic expression represents the ratio of the vertical distance to the shortest distance from the light source to the plane where the top surface of the calibration ruler is located. The vertex coordinates of each vertex are respectively formed by the imaging of the light source rays passing through the target edges on the calibration ruler. The target edge is perpendicular to the traveling direction. The first distance is the distance between the intersection points of the light source rays on the detector after passing through the target edge on the top surface of the calibration ruler, and the second distance is the distance between the intersection points of the light source rays on the detector after passing through the target edge on the bottom surface of the calibration ruler. For ease of understanding, please refer to Figure 2a , Figure 2a is a schematic diagram of the effect of an embodiment of the object size measurement method of the present application. As shown in Figure 2aAs shown, the three bold straight lines from top to bottom respectively represent the image layer, the detector, and the security inspection channel. It should be noted that the detector is used to sense the light emitted by the light source to form corresponding pixels on the image layer. Since different materials have different light absorption rates, the detector can detect the energy of the received light to determine the differences between the materials through which different lights pass, and then represent them with different grayscales or colors on the image layer. Among them, O represents the light source (i.e., regarded as a point light source), and the rectangle on the security inspection channel represents the cross-section of the calibration ruler. It should be noted that this cross-section is perpendicular to the extension direction of the calibration ruler. Please continue to refer to Figure 2a , A, B, C, and D are the four vertices on the cross-section, then AB represents the physical height of the calibration ruler, OP represents the vertical distance from the light source to the security inspection channel, OP2 represents the shortest distance from the light source to the plane where the top surface of the calibration ruler is located (i.e., the vertical distance from the light source to the plane where the top surface of the calibration ruler is located), and the vertex coordinates of vertex A are V a , the vertex coordinates of vertex B are V b , the vertex coordinates of vertex C are V c , the vertex coordinates of vertex D are V d , the above vertex coordinates are respectively formed by the imaging of the light rays of each light source passing through the target edge on the calibration ruler. For example, the vertex coordinate V a is formed by the imaging of the light ray OA of the light source passing through the target edge at point A (i.e., the edge line perpendicular to the paper surface at point A), and the vertex coordinate V b is formed by the imaging of the light ray OB of the light source passing through the target edge at point B (i.e., the edge line perpendicular to the paper surface at point B), and the vertex coordinate V c is formed by the imaging of the light ray OC of the light source passing through the target edge at point C (i.e., the edge line perpendicular to the paper surface at point C), and the vertex coordinate V d is formed by the imaging of the light ray OD of the light source passing through the target edge at point D (i.e., the edge line perpendicular to the paper surface at point D). The intersection point between the light ray OB and the security inspection channel can be denoted as B0, the intersection point with the detector can be denoted as B1, the intersection point between the light ray OA and the detector can be denoted as A1, the intersection point between the light ray OC and the security inspection channel can be denoted as C0, the intersection point with the detector can be denoted as C1, and the intersection point between the light ray OD and the detector can be denoted as D1. In addition, the scaling factor between the image layer and the detector can be denoted as λ1, and the scaling factor between the detector and the security inspection channel can be denoted as λ2, then the overall scaling factor of the security inspection machine can be denoted as λ = λ1 * λ2. According to the principle of similar triangles, it can be known that:

[0028] B0C0 / B1C1 = OP / OP1

[0029] AD / A1D1 = OP / OP1

[0030] By combining the above two equations, it can be obtained that:

[0031] B0C0 / B1C1 = AD / A1D1

[0032] That is:

[0033] B0C0 / AD = B1C1 / A1D1

[0034] Also, since AD = BC, the above equation can be further transformed into:

[0035] B0C0 / BC = B1C1 / A1D1

[0036] In addition, according to the principle of similar triangles, it can also be known that:

[0037] OP / OP2 = B0C0 / BC

[0038] Combining the above two equations, we can get:

[0039] OP / OP2 = B1C1 / A1D1

[0040] Also, since:

[0041] OP2 = OP + PP2 = OP + AB

[0042] Combining the above two equations, we can get:

[0043] OP / (OP + AB) = B1C1 / A1D1

[0044] Also, since:

[0045] B1C1 = λ1*(V b -V c )

[0046] A1D1 = λ1*(V a -V d )

[0047] Therefore:

[0048] B1C1 / A1D1 = (V b -V c ) / (V a -V d )

[0049] In the above formula, B1C1 is the first distance, A1D1 is the second distance, and B1C1 / A1D1 is the distance ratio between the first distance and the second distance. Among them, V b -V c represents the top - side coordinate difference, and V a -V d represents the bottom - side coordinate difference.

[0050] Substituting the above formula into the formula OP / (OP + AB) = B1C1 / A1D1, we can obtain:

[0051] OP / (OP + AB) = (V b -V c ) / (V a -V d )

[0052] The above formula is the second function. Among them, OP is the unknown quantity representing the vertical distance, and AB represents the physical height. Therefore, OP / (OP + AB) is the first algebraic expression representing the ratio of the vertical distance to the shortest distance from the light source to the plane where the top surface of the calibration scale is located. (V b -V c ) / (V a -V d ) is the distance ratio between the first distance and the second distance. Therefore, by solving the above second function, the vertical distance OP can be obtained:

[0053] OP = (V b -V c ) * AB / (V a -V d + V b -V c )

[0054] In a specific implementation scenario, for the "imaging coordinate" in the device parameters, in order to calibrate the "imaging coordinate", a second algebraic expression can be constructed based on the upper vertex coordinate and the lower vertex coordinate of the calibration scale on the same height line on the target side in the second scan image and the unknown quantity representing the imaging coordinate. Exemplarily, the difference between the upper vertex coordinate and the lower vertex coordinate can be obtained as the height line coordinate difference, and the difference between the upper vertex coordinate and the unknown quantity representing the imaging coordinate can be obtained as the target formula. On this basis, the second algebraic expression can be obtained based on the ratio of the height line coordinate difference to the target formula. At the same time, the numerical ratio between the physical height of the calibration scale and the vertical distance can be obtained. On this basis, a third function can be constructed based on the second algebraic expression and the numerical ratio, and then the imaging coordinate can be obtained by solving the third function. It should be noted that the target side is a side of the calibration scale close to the light source. The second algebraic expression represents the ratio of the third distance to the fourth distance. The upper vertex coordinate and the lower vertex coordinate are respectively formed by the imaging of each light source ray passing through the same height line. The third distance is the distance between the intersection points of the light source rays on the detector of the security inspection machine after passing through the same height line, and the fourth distance is the distance between the intersection point of the light source ray passing through the upper vertex on the same height line on the detector of the security inspection machine and the intersection point of the outgoing ray on the detector of the security inspection machine. For the convenience of understanding, please continue to refer to Figure 2a , P1 is the intersection point of the outgoing ray of the light source O perpendicular to the security inspection channel on the detector, and the imaging coordinate is Vp According to the principle of similar triangles:

[0055] AB0 / A1B1 = OP / OP1

[0056] PB0 / P1B1 = OP / OP1

[0057] By combining the above two equations, we can obtain:

[0058] AB0 / A1B1 = PB0 / P1B1

[0059] The above equation can be transformed into:

[0060] AB0 / PB0 = A1B1 / P1B1

[0061] According to the principle of similar triangles, it can also be known that:

[0062] AB0 / PB0 = AB / OP

[0063] By combining the above two equations, we can obtain:

[0064] A1B1 / P1B1 = AB / OP

[0065] In the above equation, AB / OP represents the numerical ratio between the physical height of the calibration scale and the vertical distance, and A1B1 / P1B1 represents the second algebraic expression. Among them, A1B1 represents the distance between the intersection points of the light source rays on the detector of the security inspection machine after passing through the high line AB, and P1B1 represents the distance between the intersection point B1 of the light source rays on the detector of the security inspection machine after passing through the upper vertex B of the high line AB and the intersection point P1 of the outgoing ray on the detector of the security inspection machine. Further, for the second algebraic expression, since:

[0066] A1B1 = λ1 * (V b -V a )

[0067] P1B1 = λ1 * (V p -V b )

[0068] In the above equation, V b -V a represents the difference between the vertex coordinates and the lower vertex coordinates (i.e., the high line coordinate difference), and V p -V b represents the difference between the upper vertex coordinates and the unknown quantity representing the imaging coordinates (i.e., the target equation). Therefore, the second algebraic expression A1B1 / P1B1 can also be expressed as:

[0069] A1B1 / P1B1 = (V b -V a ) / (V p -Vb )

[0070] That is, the second algebraic expression can also be expressed as the ratio of the difference in altitude coordinates to the target expression. Therefore, the above formula A1B1 / P1B1 = AB / OP can be reconstructed as:

[0071] (V b - V a ) / (V p - V b ) = AB / OP

[0072] The above formula is the third function. Solving the above third function can obtain the imaging coordinate V p :

[0073] V p = (V b - V a ) * OP / AB + V b

[0074] In a specific implementation scenario, for the "scaling factor" in the device parameters, in order to calibrate the "scaling factor", the physical width of the calibration ruler can be obtained, and the difference in vertex coordinates of the two vertices on the bottom edge of the calibration ruler in the same cross-section in the second scanned image can be obtained as the bottom edge coordinate difference. On this basis, the scaling factor can be obtained based on the ratio of the physical width to the bottom edge coordinate difference. It should be noted that the width direction of the calibration ruler is perpendicular to the extension direction of the calibration ruler and perpendicular to the height direction of the calibration ruler. Generally speaking, when the calibration ruler is placed flat, with the scale line side facing, the height direction is the thickness direction of the calibration ruler, and the extension direction is the direction in which the scale index increases or decreases. Subsequently, the width direction is the direction in which the scale lines are engraved. For ease of understanding, please continue to refer to Figure 2a , the physical width of the calibration ruler is AD, and the physical width AD can be obtained by scaling A1D1 with the aforementioned scaling factor λ2:

[0075] AD = λ2 * A1D1

[0076] In addition, as described above:

[0077] A1D1 = λ1 * (V a - V d )

[0078] Combining the above two formulas, we can obtain:

[0079] AD = λ2 * λ1 * (V a - V d )

[0080] And because the scaling factor λ of the security inspection machine is λ = λ2 * λ1, the scaling factor λ of the security inspection machine can be expressed as:

[0081] λ = AD / (V a -V d )

[0082] In the above formula, the two vertices at the bottom edge of the calibration scale in the same cross-section are point A and point D. Therefore, the difference between the vertex coordinates of the two can be expressed as V a -V d . That is to say, the physical width AD and the coordinate difference V of the bottom edge a -V d The ratio of them is denoted as the scaling coefficient λ.

[0083] In a specific implementation scenario, for the "scaling coefficient" in the device parameters, different from the aforementioned calibration method, in order to calibrate the scaling coefficient when the security inspection machine images the object to be measured, the first pixel coordinates of the upper boundary point of the object to be measured in the first scanned image can be detected. Exemplarily, the boundary points may include: in the target direction of the first scanned image, the first boundary point and the second boundary point on the object to be measured. The target direction is the placement direction of the calibration scale on the security inspection channel, that is, the direction perpendicular to the traveling direction. It should be noted that after obtaining the first scanned image, target detection can be performed on the first scanned image to obtain the target area of the object to be measured in the first scanned image (such as the minimum bounding rectangle of the object to be measured). On this basis, the pixel points located on the boundary of the target area in the target direction can be selected, which are the first boundary point and the second boundary point. That is to say, the first boundary point and the second boundary point should satisfy being located on the target area (such as on the rectangle frame of the minimum bounding rectangle), and also satisfy forming a boundary in the target direction. Please refer to Figure 2b , Figure 2b which is a schematic diagram of the effect of an embodiment of the first scanned image of this application. As Figure 2b shown, the dashed box is the target area, and P1 and P2 are the first boundary point and the second boundary point respectively. Of course, Figure 2bThe illustration shown is merely a possible example in the actual application process, and other possible cases will not be exemplified one by one here. In addition, for the first scale index corresponding to any boundary point, the second pixel coordinate of the scale line to which the first scale index belongs is not greater than the first pixel coordinate of the boundary point, and the scale line to which the first scale index belongs is closest to the boundary point. At the same time, the scale line sequence of the calibration ruler in the second scanned image can be detected, and the scale line sequence can include the second pixel coordinates of the scale lines on the calibration ruler, so that the scale line adjacent to the boundary point can be found in the scale line sequence based on the first pixel coordinate and the second pixel coordinate, and the first scale index can be obtained. Furthermore, based on the first scale index, the physical distance between adjacent scale lines on the calibration ruler, and the pixel distance between boundary points, the scaling factor when the security inspection machine images the object to be inspected can be obtained. Before the security inspection machine inspects the object to be inspected, the calibration ruler can be placed on the security inspection machine first to obtain the second scanned image of the calibration ruler by the security inspection machine, and then detection (such as edge detection of the second scanned image) can be performed based on the second scanned image to obtain the scale line sequence. It should be noted that after the scale line sequence is detected, the security inspection machine can save the scale line sequence. Then, when an object to be inspected passes through and its size needs to be measured by the scanned image of the object to be inspected, the saved scale line sequence can be loaded. Of course, during this process, the calibration ruler does not need to be placed on the security inspection machine anymore to avoid affecting the security inspection due to the placement of the calibration ruler on the security inspection machine. As a possible implementation manner, when the accuracy requirement for the scaling factor is relatively loose, the product of the absolute difference of the first scale index and the physical distance can be obtained as the first distance, and then the ratio of the first distance to the pixel distance can be obtained as the scaling factor. It should be noted that the absolute difference of the first scale index is the absolute difference of the first scale indices of the aforementioned first boundary point and the second boundary point, and the pixel distance between boundary points is the pixel distance between the aforementioned first boundary point and the second boundary point (more precisely, the pixel distance in the target direction). Or, as another possible implementation manner, when the accuracy requirement for the scaling factor is relatively strict, after the first scale index is obtained, the difference between the first pixel coordinate and the second pixel coordinate of the first scale index can be obtained as the first difference, and the difference between the second pixel coordinate of the reference scale index and the second pixel coordinate of the first scale index can be obtained as the second difference, and the reference scale index is the scale index after the first scale index. On this basis, the ratio of the first difference to the second difference can be obtained as the additional scale index of the first scale index. It should be noted that the additional scale index is a floating-point value. After the additional scale index is obtained, the scaling factor when the security inspection machine images the object to be inspected can be obtained based on the first scale index, the additional scale index, the physical distance, and the pixel distance. For example, the second scale index can be obtained based on the first scale index and the additional scale index of the first scale index.Generally speaking, based on the first scale index, an additional scale index of the first scale index can be added to obtain the second scale index. On this basis, the product of the absolute difference of the second scale index and the physical distance can be obtained as the second distance, and the ratio of the second distance to the pixel pitch can be obtained as the scaling factor.

[0084] It should be noted that the above examples are only several possible ways to obtain device parameters, and the ways to obtain device parameters are not limited here. That is to say, whether the device parameters are obtained by reading the internal storage of the security inspection machine, by calibration, or even by other possible ways not mentioned in the embodiments of the present disclosure, they can all be applied to the embodiments of the present disclosure to measure the physical radius of the object to be measured accordingly.

[0085] In an implementation scenario, as described above, after obtaining the first scanned image, the first scanned image can be subjected to target detection to obtain the target area of the object to be measured in the first scanned image (such as the minimum bounding rectangle of the object to be measured). On this basis, the axis of the object to be measured can be determined with the assistance of the target area, so that the angle between the axis and the traveling direction can be obtained as the target angle. Please continue to refer to Figure 2b , Figure 2b The dashed box in is the target area, and the midline of the target area (such as Figure 2b the dashed line without an arrow in ) is the axis of the object to be measured, and the target angle is Figure 2b θ in. Of course, Figure 2b The illustration shown is only a possible example in the actual application process, and other possible situations will not be exemplified one by one here.

[0086] In an implementation scenario, as described above, after obtaining the first scanned image, the first scanned image can be subjected to target detection to obtain the target area of the object to be measured in the first scanned image (such as the minimum bounding rectangle of the object to be measured). On this basis, further edge detection can be performed in the target area to obtain the object edge of the object to be measured in the first scanned image. That is, in the direction perpendicular to the traveling direction, relative endpoints can be selected on the object edge of the object to be measured, and the coordinate difference between the relative endpoints can be obtained. It should be noted that the coordinate difference between the relative endpoints is more precisely the coordinate difference of the relative endpoints on the ordinate (i.e., the V coordinate difference). Please continue to refer to Figure 2b , Figure 2b The dashed box in is the target area. In the direction perpendicular to the traveling direction (such as Figure 2b the dashed line with an arrow in ), relative endpoints P3 and P4 can be selected on the object edge of the object to be measured, and the difference between them in the ordinate (V coordinate) can be obtained as the coordinate difference between the relative endpoints. It should be noted that the object to be measured may not be a regular shape, such as Figure 2bThe object to be measured has a narrow neck and a thick body. To make the physical radius obtained by the final measurement more valuable for reference, a regular area (such as Figure 2b the bottle body area, rather than the neck area) that occupies a relatively larger area can be determined on the object to be measured in the first scanned image, and then relative endpoints are selected on the edge of the object in the regular area in the direction perpendicular to the traveling direction to obtain the coordinate difference between the relative endpoints. Of course, Figure 2b The example shown is only one possible example in the actual application process, and other possible situations will not be exemplified one by one here.

[0087] Step S12: Based on the scaling coefficient and the coordinate difference, obtain the physical distance between the first intersection point of the first light ray on the security inspection channel and the second intersection point of the second light ray on the security inspection channel.

[0088] In the embodiment of the present disclosure, the first light ray and the second light ray are respectively tangent to the object to be measured and respectively form relative endpoints by imaging. The cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as the target ellipse. It should be noted that since the object to be measured is inclined to the traveling direction of the security inspection channel, when the security inspection machine light source scans the object to be measured, the fan-shaped light beam on the cross-section of the object to be measured is elliptical. Therefore, when measuring the physical radius, the cross-section of the fan-shaped light beam where the two light rays that form the relative endpoints in the first scanned image are located on the object to be measured can be used as the target ellipse.

[0089] In an implementation scenario, the coordinate difference can be scaled based on the scaling coefficient, and the physical distance between the first corner point of the first light ray on the security inspection channel and the second corner point of the second light ray on the security inspection channel can be obtained. For example, since the scaling coefficient during the imaging of the security inspection machine essentially represents the mapping relationship between the image layer and the security inspection channel, the scaling coefficient can be directly multiplied by the coordinate difference to obtain the above physical distance.

[0090] In an implementation scenario, for the convenience of understanding, please refer to Figure 2c , Figure 2c which is a schematic diagram of the effect of another embodiment of the object size measurement method of the present application. As Figure 2c shown, the three thick lines from top to bottom respectively represent the image layer, the detector, and the security inspection channel. The light source of the security inspection machine is usually located below its security inspection channel, denoted as O. In addition, the coordinate difference between the relative endpoints in the first scanned image is V c -V b , and the physical distance BC between the first intersection point B between the first light ray OB that forms the endpoint coordinate V b and the security inspection channel and the second intersection point C between the second light ray OC that forms the endpoint coordinate V c and the security inspection channel can be expressed as:

[0091] BC=(V c -Vb )*λ

[0092] In addition, the fan-shaped light beams where the first light ray OB and the second light ray OC are located form an ellipse as shown in Figure 2c on the cross-section of the object to be measured, and this ellipse can be used as the target ellipse for subsequent analysis. Of course, Figure 2c the situation shown is only one possible example in the actual application process, and other possible situations will not be exemplified one by one here.

[0093] Step S13: Establish a target coordinate system with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the horizontal coordinate axis, and the direction of the minor axis of the target ellipse as the vertical coordinate axis.

[0094] In the embodiments of the present disclosure, the major axis can be obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius. Please continue to refer to Figure 2c . For the convenience of description, the major axis of the target ellipse can be denoted as a, and the minor axis can be denoted as b. Then the two can be respectively expressed as:

[0095] a = r / cos(θ)

[0096] b = r

[0097] In the above formula, θ represents the target angle, and r represents the physical radius, that is, the major axis of the target ellipse can be expressed as the ratio of the minor axis to the cosine value of the target angle. In addition, Figure 2c in, O1 represents both the center of the target ellipse and the origin of the target coordinate system, so its coordinates are (0, 0). B’ is the tangent point of the first light ray OB and the target ellipse, C’ is the tangent point of the second light ray OC and the target ellipse, B2C2 is a virtual plane passing through the center of the target ellipse and parallel to the security inspection passage, and the intersection point of the outgoing light ray of the light source O perpendicular to the security inspection passage on the virtual plane is P2. Among them, B2 is the intersection point of the first light ray OB on the virtual plane, and C2 is the intersection point of the second light ray OC on the virtual plane.

[0098] Step S14: Based on the target coordinate system, construct the first equation of the first light ray and the second equation of the second light ray.

[0099] In the embodiments of the present disclosure, the first equation and the second equation take the physical radius as a variable. That is to say, both the first equation and the second equation are essentially expressed as equations with the abscissa x as the independent variable and the ordinate y as the dependent variable, and the equations also contain the variable: physical radius r.

[0100] In one implementation scenario, as a possible implementation, to construct the first and second equations, a coordinate expression for the light source coordinates in the target coordinate system can be obtained based on the imaging coordinates, vertical distance, endpoint coordinates, and scaling factor, with the physical radius as the variable in the coordinate expression. Based on this, a first constraint equation satisfied by the ellipse tangent passing through the light source coordinates can be obtained based on the ellipse equation and the coordinate expression for the light source coordinates, with the light source coordinates as the variable in the first constraint equation. Thus, based on the ellipse equation and the first constraint equation, a first expression for the coordinates of the tangent point of the first ray on the target ellipse and a second expression for the coordinates of the tangent point of the second ray on the target ellipse can be obtained, with both the first and second expressions containing the light source coordinates. Furthermore, the first equation can be obtained based on the first expression and the second constraint equation for the tangent line on the target ellipse, and the second equation can be obtained based on the second expression and the second constraint equation for the tangent line on the target ellipse. It should be noted that device parameters may also include the vertical distance from the light source to the security inspection channel and the imaging coordinates of the light source emitted perpendicular to the security inspection channel. Their specific meanings and acquisition methods can be found in the aforementioned related descriptions and will not be elaborated upon here. In the above method, by establishing the coordinate expression of the light source coordinates and the first expression of the coordinates of the tangent point of the first ray on the target ellipse and the second expression of the coordinates of the tangent point of the second ray on the target ellipse, the constraint equations of the tangent on the target ellipse can be combined to obtain the first equation of the first ray and the second equation of the second ray, that is, the ray equation can be determined from the perspective of combining the light source coordinates and the tangent point coordinates.

[0101] In a specific implementation scenario, in order to obtain the coordinate expression of the light source coordinates, the coordinate difference between the endpoint coordinates and the imaging coordinates can be scaled based on the scaling factor to obtain the actual distance between the intersection of the light source light and the outgoing light at the security inspection channel. The endpoint coordinates can be formed by the imaging of the light source light. Then, based on the actual distance and the vertical distance, the horizontal coordinate expression with the physical radius as the variable in the coordinate expression is obtained, and based on the vertical distance, the vertical coordinate expression with the physical radius as the variable in the coordinate expression is obtained. For easier understanding, please continue to refer to Figure 2c , the scaling factor λ can be used to adjust the endpoint coordinates V b and imaging coordinates V p The coordinate difference between them is scaled to obtain the actual distance BP between the intersection points B and P of the light source ray OB and the outgoing ray OP on the security inspection channel:

[0102] BP=(V b -V p )*λ

[0103] According to the principle of similar triangles:

[0104] B2P2 / BP=OP2 / OP=(OP+PP2) / OP

[0105] Also, because:

[0106] PP2 = b = r

[0107] Therefore, it can be obtained that:

[0108] B2P2 = BP * (OP + PP2) / OP = (V b -V p ) * λ * (OP + r) / OP

[0109] In addition, the elliptic equation of the target ellipse can be expressed as:

[0110]

[0111] Therefore, for any point (x’, y’) on the target ellipse, the constraint equation (i.e., the aforementioned second constraint equation) of the tangent line passing through this point on the target ellipse can be expressed as:

[0112]

[0113] The abscissa of the intersection point between the above constraint condition and the x-axis of the target coordinate system is O1B2. Therefore, y = 0 can be substituted into the above constraint equation to obtain O1B2:

[0114] O1B2 = a 2 / x’ = (r / cosθ) 2 / x’

[0115] Therefore, the expression of the abscissa in the light source coordinates can be obtained: [[ID=4l]]

[0116] x0 = O1B2 + B2P2 = (r / cosθ) 2 / x’+(V b -V p ) * λ * (OP + r) / OP

[0117] And the expression of the ordinate in the light source coordinates:

[0118] y0 = -OP - PP2 = -OP - r

[0119] In a specific implementation scenario, please continue to refer to Figure 2c , since the coordinate expressions of the light source coordinates and the elliptic equation are both known, the constraint equation (i.e., the first constraint equation) that the elliptic tangent line of the target ellipse passing through the light source coordinates needs to satisfy can be obtained by combining the two:

[0120]

[0121] It can be seen that the first constraint equation is more stringent than the aforementioned second constraint equation. That is, the second constraint equation only represents the constraint equation of the tangent line on the target ellipse, while the first constraint equation not only represents the constraint equation of the tangent line on the target ellipse, but also requires that the tangent line passes through the light source coordinates. It should be noted that in order to make the expression of the first constraint equation relatively concise, the coordinate expression of the aforementioned light source coordinates is not reflected in the first constraint equation to avoid overly complex equation expressions. The same applies in subsequent similar situations.

[0122] In a specific implementation scenario, after obtaining the first constraint equation, based on the ellipse equation and the first constraint equation, the ordinate equation of the tangent point coordinates can be obtained by combining them. The ordinate equation can contain the light source coordinates and take the physical radius and the abscissa of the tangent point coordinates as variables. Thus, based on the ordinate equation of the tangent point coordinates and the coordinate expression of the light source coordinates, the abscissa expression of the tangent point coordinates of the first light ray and the second light ray on the target ellipse can be solved. Furthermore, the ordinate expression of the tangent point coordinates of the first light ray on the target ellipse can be obtained by substituting the abscissa expression of the tangent point coordinates of the first light ray on the target ellipse into the ordinate equation, and the ordinate expression of the tangent point coordinates of the second light ray on the target ellipse can be obtained by substituting the abscissa expression of the tangent point coordinates of the second light ray on the target ellipse into the ordinate equation. It should be noted that the first expression of the tangent point coordinates of the first light ray on the target ellipse can include the abscissa expression and the ordinate expression of the tangent point coordinates of the first light ray on the target ellipse, and the second expression of the tangent point coordinates of the second light ray on the target ellipse can include the abscissa expression and the ordinate expression of the tangent point coordinates of the second light ray on the target ellipse. For ease of understanding, please continue to refer to Figure 2c Combining the aforementioned ellipse equation and the first constraint equation, the ordinate equation of the tangent point coordinates can be obtained:

[0123]

[0124] Then substitute the abscissa expression \(x_0 = a 2 / x'+d\) in the aforementioned light source coordinates into the above ordinate expression:

[0125]

[0126] It should be noted that as mentioned above, for ease of expression, relevant expressions are simplified. In this example, \(d = BP(b + OP) / OP\), and specific details can be referred to the aforementioned relevant descriptions and will not be elaborated here.

[0127] Also, since any point \((x',y')\) on the target ellipse must satisfy the ellipse equation, that is:

[0128]

[0129] Substituting the obtained \(y'\) into the above equation, we can get:

[0130]

[0131] After simplification, we can get:

[0132]

[0133] By solving, we can obtain the expression of the abscissa of the tangent point coordinates of the first light ray and the second light ray on the target ellipse:

[0134]

[0135] The above abscissa expression is the abscissa expression of the tangent point \(B'\) of the first light ray \(OB\) on the target ellipse and the tangent point \(C'\) of the second light ray \(OC\) on the target ellipse:

[0136]

[0137]

[0138] Substituting the above abscissa expressions into the aforementioned ordinate equation respectively, we can obtain the ordinate expression of the tangent point coordinates of the first light ray on the target ellipse and the ordinate expression of the tangent point coordinates of the second light ray on the target ellipse:

[0139]

[0140] Thus, the first expression of the tangent point coordinates of the first light ray \(OB\) on the target ellipse can be obtained and the second expression of the tangent point coordinates of the second light ray \(OC\) on the target ellipse . Of course, the above example is only one possible example of the situation shown by Figure 2c . Other possible situations will not be exemplified one by one here.

[0141] In a specific implementation scenario, after obtaining the first expression, the first expression can be substituted into the second constraint equation to obtain the first equation of the first light ray; similarly, the second expression can be substituted into the second constraint equation to obtain the second equation of the second light ray. Please continue to refer to Figure 2c , the first expression can be substituted into the second constraint equation to obtain the first equation of the first light ray:

[0142]

[0143] and the second expression can be substituted into the second constraint equation to obtain the second equation of the second light ray:

[0144]

[0145] In another implementation scenario, as another possible implementation, in order to construct the first equation and the second equation, it is also possible to obtain the first slope of the first light ray in the target coordinate system based on the pixel coordinates, imaging coordinates, scaling factor, and vertical distance of the first endpoint, and obtain the second slope of the second light ray in the target coordinate system based on the pixel coordinates, imaging coordinates, scaling factor, and vertical distance of the second endpoint. The pixel coordinates of the first endpoint are formed by the imaging of the first light ray, and the pixel coordinates of the second endpoint are formed by the imaging of the second light ray. It should be noted that the device parameters also include the vertical distance from the light source to the security inspection channel and the imaging coordinates of the light ray emitted perpendicular to the security inspection channel by the light source, and the relative endpoints include the first endpoint and the second endpoint. For specific details, please refer to the relevant descriptions above and will not be elaborated here. In addition, based on the elliptic equation of the target ellipse in the target coordinate system, the first intercept and the second intercept of the tangent equation of the target ellipse at the target slope can be analyzed. The first intercept is a positive number, the second intercept is a negative number, and both the first intercept and the second intercept are expressions represented by the target slope and the physical radius as variables. On this basis, based on the magnitude relationship between the first slope and the second slope, one of the first intercept and the second intercept can be selected for the first slope to form the first equation, and the other of the first intercept and the second intercept can be selected for the second slope to form the second equation. In the above manner, by obtaining the first slope and the second slope of the first light ray and the second light ray respectively in the target coordinate system and analyzing the elliptic equation, the first intercept and the second intercept of the tangent equation of the target ellipse at the target slope are obtained, so as to combine the first slope and the first intercept and the second slope and the second intercept to form the first equation of the first light ray and the second equation of the second light ray. Therefore, different from the previous method of determining the light ray equation from the perspective of the light source coordinates and the tangent point coordinates, this implementation can determine the light ray equation from the perspective of combining the slope and the intercept.

[0146] In a specific implementation scenario, in order to obtain the first slope, the coordinate difference between the pixel coordinates and the imaging coordinates of the first endpoint can be scaled based on the scaling factor to obtain the first distance between the intersection point of the outgoing light ray and the security inspection channel and the first intersection point, and the first slope can be obtained based on the ratio of the vertical distance to the first distance. Please continue to refer to Figure 2c , the first distance BP between the intersection point of the outgoing light ray OP and the security inspection channel and the first intersection point B can be expressed as:

[0147] BP=(V b -V p )*λ

[0148] In the above formula, V b represents the pixel coordinates of the first endpoint, V pLet \((x,y)\) represent the imaging coordinates and \(\lambda\) represent the scaling factor. Based on this, the first slope of the first ray \(OB\) in the target coordinate system can be obtained as follows:

[0149] \(k_1 = -\frac{OP}{BP}=-\frac{OP}{\{(V b -V p )\times\lambda\}}\)

[0150] In a specific implementation scenario, to obtain the second slope, the coordinate difference between the pixel coordinates of the second endpoint and the imaging coordinates can be scaled based on the scaling factor to obtain the second distance between the intersection point of the outgoing ray and the security inspection channel and the second intersection point, and the second slope can be obtained based on the ratio of the vertical distance to the second distance. Please continue to refer to Figure 2c , the second distance \(CP\) between the intersection point \(P\) of the outgoing ray \(OP\) and the security inspection channel and the second intersection point \(C\) can be expressed as:

[0151] \(CP=(V c -V p )\times\lambda\)

[0152] In the above formula, \(V c represents the pixel coordinates of the second endpoint, \(V p represents the imaging coordinates, and \(\lambda\) represents the scaling factor. Based on this, the second slope of the second ray \(OC\) in the target coordinate system can be obtained as follows:

[0153] \(K_2 = -\frac{OP}{CP}=-\frac{OP}{\{(V c -V p )\times\lambda\}}\)

[0154] In a specific implementation scenario, to obtain the first intercept and the second intercept of the tangent equation of the target ellipse at the target slope, the ellipse equation of the target ellipse in the target coordinate system can be analyzed. For ease of understanding, please refer to Figure 2c , as mentioned above, the ellipse equation of the target ellipse in the target coordinate system can be expressed as:

[0155]

[0156] Assume that the tangent equation of the target ellipse has a target slope of \(k\), then the tangent equation can be expressed as:

[0157] \(y = kx + m\)

[0158] Substituting the above tangent equation into the aforementioned ellipse equation, we can obtain:

[0159]

[0160] After simplification, we can obtain:

[0161]

[0162] Let \(A = a\) 2 k 2 + b 2 , \(B = 2akm\), \(C = a(m - b)\). Since any tangent line to the target ellipse has exactly one intersection point (i.e., the tangent point) with the target ellipse, the above quadratic equation in one variable has exactly one solution, that is, the discriminant \(B^2 - 4AC = 0\) of the above quadratic equation in one variable. That is: 2 km, C = a 2 (m 2 - b 2 ) 2 - 4AC = 0, that is:

[0163] (2akm)^2 - 4(a(k + b))(a(m - b)) = 0 2 km) 2 - 4*(a 2 k 2 + b 2 )*(a<s 2 (m 2 - b 2 )) = 0

[0164] Simplifying gives:

[0165] 4a^2b^2 + 4a^2bk^2 = 4a^2bm^2 2 b 4 + 4a 4 b 2 k 2 = 4a 2 b 2 m 2

[0166] Therefore, two solutions for the intercept \(m\) at the target slope \(k\) can be obtained, namely the first intercept and the second intercept:

[0167]

[0168]

[0169] In a specific implementation scenario, after obtaining the first slope, the second slope, the first intercept, and the second intercept, based on the magnitude relationship between the first slope and the second slope, one of the first intercept and the second intercept can be selected for the first slope to form a first equation, and the other of the first intercept and the second intercept can be selected for the second slope to form a second equation. Specifically, in response to the magnitude relationship indicating that the first ray is steeper than the second ray, the first intercept is selected for the first slope to form a first equation, and the second intercept is selected for the second slope to form a second equation. While if the slope is selected for the second intercept to form a first equation, and the first intercept is selected for the second slope to form a second equation. It should be noted that the equation can be obtained by substituting the slope into the intercept and further combining the slope after substitution. For example, when the magnitude relationship indicates that the first ray is steeper than the second ray, the first slope can be substituted into the expression of the first intercept and combined with the first slope to form a first equation, and the second slope can be substituted into the expression of the second intercept and combined with the second slope to form a second equation; or when the magnitude relationship indicates that the second ray is steeper than the first ray, the first slope can be substituted into the expression of the second intercept and combined with the first slope to form a first equation, and the second slope can be substituted into the expression of the first intercept and combined with the second slope to form a second equation. For the sake of understanding, please continue to refer to Figure 2c , in Figure 2c the example shown, since the magnitude relationship between the first slope k1 and the second slope k2 indicates that the first ray is steeper than the second ray, the first slope k1 can be substituted into the first intercept m1:

[0170]

[0171] and combined with the first slope k1 to form the first equation of the first ray:

[0172] y = k1 * x + m1

[0173] Similarly, the first slope k2 can be substituted into the first intercept m2:

[0174]

[0175] and combined with the second slope k2 to form the second equation of the second ray:

[0176] y = k2 * x + m2

[0177] So far, in combination with the relevant expressions of the major axis a and the minor axis b (specifically, the relevant descriptions above can be referred to), both the first equation and the second equation can be expressed as equations with the physical radius r as the variable.

[0178] It should be noted that the above examples are only two possible examples for constructing the first equation and the second equation. Appropriate adjustments can also be made based on the above two examples to obtain other possible implementation manners, and the first equation and the second equation can also be constructed. Other possible implementation manners are not limited herein, and no further examples will be given one by one.

[0179] Step S15: Solve for the physical radius based on the first equation, the second equation, and the physical distance.

[0180] Specifically, based on the first equation and the straight-line equation of the security inspection channel in the target coordinate system, the first abscissa of the first intersection point in the target coordinate system can be obtained, and based on the second equation and the equation of the security inspection channel in the target coordinate system, the second abscissa of the second intersection point in the target coordinate system can be obtained, and both the first abscissa and the second abscissa are variables with the physical radius. On this basis, the first function constructed based on the first abscissa, the second abscissa, and the physical distance can be solved to obtain the physical radius. For example, the difference between the first abscissa and the second abscissa can be obtained as the target expression representing the physical distance, so as to construct the first function based on the target expression and the physical distance, and then the physical radius can be solved based on the first function. For the convenience of understanding, the following will give examples respectively according to the above two ways of obtaining the tangent equation:

[0181] As a possible implementation example, after obtaining the tangent equation in the above first way, for the first equation of the first light ray:

[0182]

[0183] It can be jointly solved with the straight-line equation y = -b of the security inspection channel in the target coordinate system to obtain the first abscissa of the first intersection point B in the target coordinate system:

[0184]

[0185] Similarly, for the second equation of the second light ray:

[0186]

[0187] It can be jointly solved with the straight-line equation y = -b of the security inspection channel in the target coordinate system to obtain the second abscissa of the second intersection point C in the target coordinate system:

[0188]

[0189] On this basis, the difference between the first abscissa and the second abscissa can be obtained as the target expression representing the physical distance:

[0190]

[0191] and combine it with the previously obtained physical distance BC = (V c - V b ) * λ to jointly construct the first function:

[0192]

[0193] Since in the above first function, a, b, x’ B , x’ C , y’ B , y’ C are essentially all expressions with the physical radius r as a variable, so by solving the above first function, the physical radius r can be obtained, and the solving process will not be deduced in detail here.

[0194] As another possible implementation example, after obtaining the tangent equation in the aforementioned second way, for the first equation of the first light ray:

[0195] y = k1 * x + m1

[0196] it can be jointly solved with the straight line equation y = -b of the security inspection channel in the target coordinate system to obtain the first abscissa of the first intersection point B in the target coordinate system:

[0197]

[0198] Similarly, for the second equation of the second light ray:

[0199] y = k2 * x + m2

[0200] it can be jointly solved with the straight line equation y = -b of the security inspection channel in the target coordinate system to obtain the second abscissa of the second intersection point C in the target coordinate system:

[0201]

[0202] On this basis, the difference between the first abscissa and the second abscissa can be obtained as the target expression representing the physical distance:

[0203]

[0204] and combine it with the previously obtained physical distance BC = (V c - V b ) * λ to jointly construct the first function:

[0205]

[0206] Since in the above first function, b, m1, m2 are essentially all expressions with the physical radius r as a variable, so by solving the above first function, the physical radius r can be obtained, and the solving process will not be deduced in detail here.

[0207] In one implementation scenario, after determining the physical radius, the actual thickness of the object to be measured can also be detected as the third light ray, which forms an image of a pixel on the object to be measured, passes through the object to be measured. Specifically, based on the first equation, the second equation, and the physical radius, the light source coordinates in the target coordinate system can be obtained in response to the point to be measured on the object to be measured in the first scanned image. Furthermore, the third slope of the third light ray can be obtained based on the pixel coordinates, imaging coordinates, scaling factor, and vertical distance of the point to be measured. It should be noted that the pixel coordinates of the point to be measured are formed by imaging the third light ray, and the point to be measured is located on the line connecting the opposite endpoints. Of course, the "opposite endpoint" in this example is not limited to the opposite endpoint determined when calculating the physical radius above; it only needs to satisfy the constraint of being perpendicular to the direction of travel and located at the edge of the object to be measured. Furthermore, when the object to be measured is irregular in shape, the "opposite endpoint" can preferably further satisfy the constraint of being located in a regular area on the object to be measured that occupies a relatively large area (the specific meaning of this can be found in the relevant description above and will not be elaborated here). On this basis, the actual thickness of the object to be measured when the third light passes through it can be obtained based on the final equation of the third light obtained from the light source coordinates and the third slope and the final equation of the target ellipse obtained from the physical radius.

[0208] In a specific implementation scenario, as mentioned above, the first equation and the second equation are essentially expressions with the physical radius as the variable (with x as the independent variable and y as the dependent variable). Therefore, after solving the physical radius, they can be substituted into the first equation and the second equation respectively to obtain the linear equation of the first light ray and the linear equation of the second light ray. The two can be connected to obtain the coordinates of the light source in the target coordinate system.

[0209] In a specific implementation scenario, for the point to be measured, the difference between the pixel coordinates of the point to be measured and the imaging coordinates can be scaled using a scaling factor to obtain the actual distance between the third intersection point of the third ray between the security inspection channels and the intersection point of the outgoing ray on the security inspection channel. Based on the ratio of the vertical distance to the actual distance, the third slope of the third ray in the target coordinate system can be obtained. For easier understanding, please continue to refer to Figure 2c , the pixel coordinates of the point to be measured are V d , the third ray is OD, point D is the third intersection point, and the intersection point between the outgoing ray OP and the security inspection channel is P, so the actual distance DP between the two can be expressed as:

[0210] DP=(V d -V p )*λ

[0211] On this basis, the third slope k3 of the third light OD in the target coordinate system can be obtained:

[0212] k3=-OP / DP=-OP / {(V d -V p )*λ}

[0213] In a specific implementation scenario, after obtaining the third slope and the light source coordinates, the final equation of the third light in the target coordinate system can be determined. Since the elliptical equation of the target ellipse is essentially an equation with the physical radius as a variable, after obtaining the physical radius, the physical radius is substituted into the elliptical equation to obtain the final equation of the target ellipse in the target coordinate system. On this basis, the final equation of the third light and the final equation of the target ellipse can be solved together to obtain the coordinates of the two intersection points of the third light in the target ellipse. Based on this, the actual distance between the two intersection points can be obtained, which is the actual thickness of the object to be measured when the third light passes through it. Please continue to refer to Figure 2c After obtaining the final equation of the third ray OD in the target coordinate system and the final equation of the target ellipse in the target coordinate system, the two can be combined to obtain the intersection coordinates of the two intersection points D' and D'1. According to the intersection coordinates, the actual thickness D'D'1 of the object to be measured when the third ray OD passes through can be calculated. Of course, the above example is only used in actual application. Figure 2c The example shown is only one possible scenario of actual thickness, and other possible scenarios will not be given one by one here.

[0214] Based on the above solution, the first scanned image of the object to be measured on the security inspection channel by the security inspection machine is detected to obtain the detection result, and the device parameters including at least the zoom factor when the security inspection machine forms an image are obtained. The detection result includes: the target angle between the object to be measured and the traveling direction of the security inspection channel, and the coordinate difference between the relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction. Then, based on the zoom factor and the coordinate difference, the physical distance between the first intersection point of the first light ray on the security inspection channel and the second intersection point of the second light ray on the security inspection channel is obtained. The first light ray and the second light ray are respectively tangent to the object to be measured and form relative endpoints when imaging respectively. The cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as the target ellipse. Thus, with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis, a target coordinate system is established. The major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius. Furthermore, based on the target coordinate system, the first equation of the first light ray and the second equation of the second light ray are constructed, and the first equation and the second equation take the physical radius as a variable. Based on the first equation, the second equation, and the physical distance, the physical radius is solved. Therefore, on the one hand, since relevant detections are performed based on the first scanned image and relevant calculations are combined with device parameters, the physical radius of the object to be measured can be obtained without manual operations by relevant personnel on the first scanned image, which can improve the convenience of the measurement process. On the other hand, when the object to be measured is inclined to the traveling direction of the security inspection channel, by using the cross-section of the plane where the light source rays tangent to the object to be measured are located on the object to be measured as the target ellipse, and accordingly establishing the target coordinate system, and the major axis of the target ellipse is obtained from the target angle between the object to be measured and the traveling direction and the physical radius, while the minor axis of the target ellipse is the physical radius, the equations of the aforementioned tangent rays with the physical radius as a variable can be constructed according to the established target coordinate system, and by combining the physical distance between the intersection points of the aforementioned tangent rays on the security inspection channel, the physical radius can be solved. Therefore, it can be solved through a series of operations such as mathematical modeling and equation solving, which helps to improve the accuracy of the measurement process. Thus, the physical radius of the object to be measured can be automatically and accurately measured during the security inspection process.

[0215] Please refer to Figure 3 , Figure 3It is a schematic diagram of the framework of an embodiment of the object size measurement device of the present application. The object size measurement device 30 includes: a measurement preparation module 31, a distance measurement module 32, a coordinate establishment module 33, an equation construction module 34, and a radius solution module 35. The measurement preparation module 31 is configured to detect a first scanned image of a to-be-measured object on a security inspection channel by a security inspection machine to obtain a detection result, and acquire device parameters including at least a scaling factor when the security inspection machine forms an image; wherein, the detection result includes: a target angle between the to-be-measured object and the traveling direction of the security inspection channel, and a coordinate difference between opposite endpoints of the object edge of the to-be-measured object in the direction perpendicular to the traveling direction. The distance measurement module 32 is configured to obtain a physical distance between a first intersection point of a first light ray on the security inspection channel and a second intersection point of a second light ray on the security inspection channel based on the scaling factor and the coordinate difference; wherein, the first light ray and the second light ray are respectively tangent to the to-be-measured object and respectively form opposite endpoints by imaging, and a cross-section of the plane where the first light ray and the second light ray are located on the to-be-measured object is used as a target ellipse. The coordinate establishment module 33 is configured to establish a target coordinate system with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis; wherein, the major axis is obtained based on the target angle and the physical radius of the to-be-measured object, and the minor axis is the physical radius. The equation construction module 34 is configured to construct a first equation of the first light ray and a second equation of the second light ray based on the target coordinate system; wherein, the first equation and the second equation take the physical radius as a variable. The radius solution module 35 is configured to solve the physical radius based on the first equation, the second equation, and the physical distance.

[0216] In the above solution, the object size measurement device 30 detects a first scanned image of an object to be measured on the security inspection channel by the security inspection machine to obtain a detection result, and obtains device parameters including at least the scaling factor when the security inspection machine forms an image. The detection result includes: the target angle between the object to be measured and the traveling direction of the security inspection channel, and the coordinate difference between the relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction. Then, based on the scaling factor and the coordinate difference, the physical distance between the first intersection point of the first light ray on the security inspection channel and the second intersection point of the second light ray on the security inspection channel is obtained. The first light ray and the second light ray are respectively tangent to the object to be measured and respectively form images of the relative endpoints. The cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as the target ellipse. Thus, with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis, a target coordinate system is established. The major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius. Furthermore, based on the target coordinate system, the first equation of the first light ray and the second equation of the second light ray are constructed, and the first equation and the second equation take the physical radius as a variable. Based on the first equation, the second equation, and the physical distance, the physical radius is solved. Therefore, on the one hand, since relevant detections are performed based on the first scanned image and relevant calculations are combined with device parameters, the physical radius of the object to be measured can be obtained without manual operations by relevant personnel on the first scanned image, which can improve the convenience of the measurement process. On the other hand, when the object to be measured is inclined to the traveling direction of the security inspection channel, the cross-section of the plane where the light source rays tangent to the object to be measured are located on the object to be measured is used as the target ellipse, and based on this, a target coordinate system is established. The major axis of the target ellipse is obtained from the target angle between the object to be measured and the traveling direction and the physical radius, and the minor axis of the target ellipse is the physical radius. Then, according to the established target coordinate system, equations of the aforementioned tangent rays with the physical radius as a variable can be constructed, and combined with the physical distance between the intersection points of the aforementioned tangent rays on the security inspection channel, the physical radius is solved. Therefore, it is possible to perform a series of operations such as mathematical modeling and equation solving to obtain the solution, which helps to improve the accuracy of the measurement process. Therefore, it is possible to automatically and accurately measure the physical radius of the object to be measured during the security inspection process.

[0217] In some disclosed embodiments, the radius solving module 35 includes an intersection coordinate solving sub-module for obtaining the first abscissa of the first intersection point in the target coordinate system based on the first equation and the straight line equation of the security inspection channel in the target coordinate system, and obtaining the second abscissa of the second intersection point in the target coordinate system based on the second equation and the equation of the security inspection channel in the target coordinate system; wherein, the first abscissa and the second abscissa take the physical radius as a variable; the radius solving module 35 includes a first function solving sub-module for solving based on the first function constructed from the first abscissa, the second abscissa, and the physical distance to obtain the physical radius.

[0218] In some disclosed embodiments, the first function solving sub-module includes a distance expression obtaining unit configured to obtain the difference between the first abscissa and the second abscissa as a target expression characterizing the physical distance; the first function solving sub-module includes a first function constructing unit configured to construct a first function based on the target expression and the physical distance; the first function solving sub-module includes a physical radius solving unit configured to solve based on the first function to obtain the physical radius.

[0219] In some disclosed embodiments, the device parameters further include the vertical distance from the light source to the security inspection channel and the imaging coordinates of the light ray emitted perpendicularly to the security inspection channel by the light source. Based on the target coordinate system, the equation construction module 34 includes a light source coordinate expression sub-module configured to obtain a coordinate expression of the light source coordinates on the target coordinate system based on the imaging coordinates, the vertical distance, the endpoint coordinates, and the scaling factor; wherein the coordinate expression takes the physical radius as a variable; the equation construction module 34 includes a tangent constraint obtaining sub-module configured to obtain a first constraint equation satisfied by the ellipse tangent passing through the light source coordinates based on the ellipse equation and the coordinate expression of the light source coordinates; wherein the first constraint equation takes the light source coordinates as variables; the equation construction module 34 includes a tangent point coordinate expression sub-module configured to obtain a first expression of the tangent point coordinates of the first light ray on the target ellipse and a second expression of the tangent point coordinates of the second light ray on the target ellipse based on the ellipse equation and the first constraint equation; wherein both the first expression and the second expression contain the light source coordinates; the equation construction module 34 includes a light ray equation construction sub-module configured to obtain a first equation based on the first expression and a second constraint equation of the tangent on the target ellipse, and obtain a second equation based on the second expression and the second constraint equation of the tangent on the target ellipse.

[0220] In some disclosed embodiments, the light source coordinate expression sub-module includes an actual distance obtaining unit configured to scale the coordinate difference between the endpoint coordinates and the imaging coordinates based on the scaling factor to obtain the actual distance between the intersection points of the light source ray and the outgoing ray on the security inspection channel; wherein the endpoint coordinates are formed by the imaging of the light source ray; the light source coordinate expression sub-module includes a light source abscissa expression unit configured to obtain an abscissa expression taking the physical radius as a variable in the coordinate expression based on the actual distance and the vertical distance; the light source coordinate expression sub-module includes a light source ordinate expression unit configured to obtain an ordinate expression taking the physical radius as a variable in the coordinate expression based on the vertical distance.

[0221] In some disclosed embodiments, the tangent point coordinate expression sub-module includes a tangent point abscissa expression unit, which is used to solve and obtain the abscissa expression of the tangent point coordinates of the first light ray and the second light ray on the target ellipse based on the ordinate equation of the tangent point coordinates and the coordinate expression of the light source coordinates; the tangent point coordinate expression sub-module includes a tangent point ordinate expression unit, which is used to substitute the abscissa expression of the tangent point coordinates of the first light ray on the target ellipse into the ordinate equation to obtain the ordinate expression of the tangent point coordinates of the first light ray on the target ellipse, and substitute the abscissa expression of the tangent point coordinates of the second light ray on the target ellipse into the ordinate equation to obtain the ordinate expression of the tangent point coordinates of the second light ray on the target ellipse; wherein, the first expression includes the abscissa expression and the ordinate expression of the tangent point coordinates of the first light ray on the target ellipse, and the second expression includes the abscissa expression and the ordinate expression of the tangent point coordinates of the second light ray on the target ellipse.

[0222] In some disclosed embodiments, the light ray equation construction sub-module includes a first construction unit, which is used to substitute the first expression into the second constraint equation to obtain a first equation; the light ray equation construction sub-module includes a second construction unit, which is used to substitute the second expression into the second constraint equation to obtain a second equation.

[0223] In some disclosed embodiments, the device parameters further include the vertical distance from the light source to the security inspection channel and the imaging coordinates of the light ray emitted perpendicularly to the security inspection channel by the light source, and the relative endpoints include a first endpoint and a second endpoint. The equation construction module 34 includes a slope solving sub-module, which is used to obtain the first slope of the first light ray in the target coordinate system based on the pixel coordinates, imaging coordinates, scaling factor, and vertical distance of the first endpoint, and obtain the second slope of the second light ray in the target coordinate system based on the pixel coordinates, imaging coordinates, scaling factor, and vertical distance of the second endpoint; wherein, the pixel coordinates of the first endpoint are formed by the imaging of the first light ray, and the pixel coordinates of the second endpoint are formed by the imaging of the second light ray; the equation construction module 34 includes an intercept solving sub-module, which is used to analyze based on the ellipse equation of the target ellipse in the target coordinate system to obtain the first intercept and the second intercept of the tangent equation of the target ellipse at the target slope; wherein, the first intercept is a positive number, the second intercept is a negative number, and both the first intercept and the second intercept are expressions represented by the target slope and the physical radius as variables; the equation construction module 34 includes a parameter selection sub-module, which is used to select one of the first intercept and the second intercept for the first slope to form a first equation based on the magnitude relationship between the first slope and the second slope, and select the other of the first intercept and the second intercept for the second slope to form a second equation.

[0224] In some disclosed embodiments, the slope solving sub-module includes a first scaling unit configured to scale the coordinate difference between the pixel coordinates and the imaging coordinates of the first endpoint based on a scaling coefficient to obtain a first distance between the intersection point between the outgoing light ray and the security inspection channel and the first intersection point; the slope solving sub-module includes a first slope unit configured to obtain a first slope based on the ratio of the vertical distance to the first distance; the slope solving sub-module includes a second scaling unit configured to scale the coordinate difference between the pixel coordinates and the imaging coordinates of the second endpoint based on the scaling coefficient to obtain a second distance between the intersection point between the outgoing light ray and the security inspection channel and the second intersection point; the slope solving sub-module includes a second slope unit configured to obtain a second slope based on the ratio of the vertical distance to the second distance.

[0225] In some disclosed embodiments, the parameter selection sub-module includes a first response unit configured to, in response to the size relationship indicating that the first light ray is steeper than the second light ray, select a first intercept for the first slope to form a first equation and select a second intercept for the second slope to form a second equation; the parameter selection sub-module includes a second response unit configured to, in response to the size relationship indicating that the second light ray is steeper than the first light ray, select a second intercept for the first slope to form a first equation and select a first intercept for the second slope to form a second equation.

[0226] In some disclosed embodiments, the first response unit is specifically configured to substitute the first slope into the expression of the first intercept and form a first equation with the first slope; substitute the second slope into the expression of the second intercept and form a second equation with the second slope.

[0227] In some disclosed embodiments, the second response unit is specifically configured to substitute the first slope into the expression of the second intercept and form a first equation with the first slope; substitute the second slope into the expression of the first intercept and form a second equation with the second slope.

[0228] In some disclosed embodiments, the device parameters further include the vertical distance from the light source to the security inspection channel and the imaging coordinates of the outgoing light ray perpendicular to the security inspection channel of the light source. The object size measuring device 30 includes a light ray slope calculation module configured to, in response to a point to be measured on the object to be measured in the first scanned image, obtain the light source coordinates in the target coordinate system based on the first equation, the second equation, and the physical radius, and obtain the third slope of the third light ray based on the pixel coordinates, the imaging coordinates, the scaling coefficient, and the vertical distance of the point to be measured; wherein, the pixel coordinates of the point to be measured are formed by the imaging of the third light ray, and the point to be measured is located on the line connecting the relative endpoints; the object size measuring device 30 includes an actual thickness measurement module configured to obtain the actual thickness of the third light ray passing through the object to be measured based on the final equation of the third light ray obtained from the light source coordinates and the third slope and the final equation of the target ellipse obtained from the physical radius.

[0229] In some disclosed embodiments, the device parameters are pre-obtained by calibrating a second scanned image of a calibration ruler placed on the security inspection channel by the security inspection machine, and the calibration ruler is perpendicular to the traveling direction of the security inspection channel.

[0230] In some disclosed embodiments, the object size measurement device 30 includes a boundary detection module for detecting the first pixel coordinates of the upper boundary points of the object to be measured in the first scanned image, and the object size measurement device 30 includes a sequence detection module for detecting the scale line sequence of the calibration ruler in the second scanned image; wherein, the scale line sequence includes the second pixel coordinates of the scale lines on the calibration ruler; the object size measurement device 30 includes a scale search module for searching for the scale line adjacent to the boundary point in the scale line sequence based on the first pixel coordinates and the second pixel coordinates to obtain a first scale index; the object size measurement device 30 includes a scaling determination module for obtaining the scaling coefficient when the security inspection machine images at the object to be measured based on the first scale index, the physical distance between adjacent scale lines on the calibration ruler, and the pixel distance between the boundary points.

[0231] In some disclosed embodiments, the object size measurement device 30 includes a coordinate difference module for obtaining the difference between the first pixel coordinates and the second pixel coordinates of the first scale index as a first difference, and obtaining the difference between the second pixel coordinates of the reference scale index and the second pixel coordinates of the first scale index as a second difference; wherein, the reference scale index is the next scale index of the first scale index; the object size measurement device 30 includes an additional index module for obtaining the ratio of the first difference to the second difference as the additional scale index of the first scale index; the scaling determination module is specifically configured to obtain the scaling coefficient when the security inspection machine images at the object to be measured based on the first scale index, the additional scale index, the physical distance, and the pixel distance.

[0232] In some disclosed embodiments, the major axis is represented as the ratio of the minor axis to the cosine value of the target angle; and / or, the target angle is determined by detecting the axis of the object to be measured in the first scanned image.

[0233] Please refer to Figure 4 , Figure 4 is a schematic framework diagram of an embodiment of an electronic device according to the present application. The electronic device 40 at least includes a memory 41 and a processor 42 that are coupled to each other. At least program instructions are stored in the memory 41, and the processor 42 is configured to execute the program instructions to implement the steps in any of the above-described object size measurement method embodiments. Specifically, reference can be made to the foregoing disclosed embodiments, which will not be elaborated herein.

[0234] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above embodiments of the object size measurement method. The processor 42 may also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Additionally, the processor 42 may be implemented jointly by integrated circuit chips.

[0235] In the above solution, the electronic device 40 detects a first scanned image of an object to be measured on the security inspection channel by the security inspection machine, obtains a detection result, and acquires device parameters including at least the zoom factor when the security inspection machine forms an image. The detection result includes: the target angle between the object to be measured and the traveling direction of the security inspection channel, and the coordinate difference between the relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction. Then, based on the zoom factor and the coordinate difference, the physical distance between the first intersection point of the first light ray on the security inspection channel and the second intersection point of the second light ray on the security inspection channel is obtained. The first light ray and the second light ray are respectively tangent to the object to be measured and form relative endpoints through imaging. The cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as the target ellipse. Thus, with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis, a target coordinate system is established. The major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius. Furthermore, based on the target coordinate system, the first equation of the first light ray and the second equation of the second light ray are constructed, and the first equation and the second equation use the physical radius as a variable. Based on the first equation, the second equation, and the physical distance, the physical radius is solved. Therefore, on the one hand, since relevant detections are performed based on the first scanned image and relevant calculations are combined with device parameters, the physical radius of the object to be measured can be obtained without manual operation by relevant personnel on the first scanned image, which can improve the convenience of the measurement process. On the other hand, when the object to be measured is inclined to the traveling direction of the security inspection channel, the cross-section of the plane where the light source rays tangent to the object to be measured are located on the object to be measured is used as the target ellipse, and based on this, a target coordinate system is established. The major axis of the target ellipse is obtained from the target angle between the object to be measured and the traveling direction and the physical radius, and the minor axis of the target ellipse is the physical radius. Then, according to the established target coordinate system, the equations of the aforementioned tangent light rays with the physical radius as a variable can be constructed, and combined with the physical distance between the intersection points of the aforementioned tangent light rays on the security inspection channel, the physical radius can be solved. Therefore, it can be solved through a series of operations such as mathematical modeling and equation solving, which helps to improve the accuracy of the measurement process. Therefore, the physical radius of the object to be measured can be automatically and accurately measured during the security inspection process.

[0236] Please refer to Figure 5 , Figure 5 FIG. is a schematic framework diagram of an embodiment of the security inspection machine of the present application. The security inspection machine 50 at least includes the electronic device 40 in the above embodiment. Of course, in addition to this, the security inspection machine 50 may further include other component devices, such as a light source (not shown), a security inspection channel such as a belt (not shown), an outer frame (not shown), a detector (not shown), etc. The specific structure of the security inspection machine 50 can refer to the relevant technical details in the art, and the specific structure of the security inspection machine will not be elaborated here.

[0237] In the above solution, the electronic device 40 in the security inspection machine 50 detects a first scanned image of an object to be measured on the security inspection channel of the security inspection machine 50 to obtain a detection result, and obtains device parameters including at least the scaling factor when the security inspection machine 50 forms an image. The detection result includes: the target angle between the object to be measured and the traveling direction of the security inspection channel, and the coordinate difference between the relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction. Then, based on the scaling factor and the coordinate difference, the physical distance between the first intersection point of the first light ray on the security inspection channel and the second intersection point of the second light ray on the security inspection channel is obtained. The first light ray and the second light ray are respectively tangent to the object to be measured and respectively form images of the relative endpoints. The cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as the target ellipse. Thus, with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis, a target coordinate system is established. The major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius. Furthermore, based on the target coordinate system, the first equation of the first light ray and the second equation of the second light ray are constructed, and the first equation and the second equation take the physical radius as a variable. Based on the first equation, the second equation, and the physical distance, the physical radius is solved. Therefore, on the one hand, since relevant detections are performed based on the first scanned image and relevant calculations are combined with device parameters, the physical radius of the object to be measured can be obtained without manual operation by relevant personnel on the first scanned image, which can improve the convenience of the measurement process. On the other hand, when the object to be measured is inclined to the traveling direction of the security inspection channel, by using the cross-section of the plane where the light source rays tangent to the object to be measured are located on the object to be measured as the target ellipse, and accordingly establishing a target coordinate system, and the major axis of the target ellipse is obtained from the target angle between the object to be measured and the traveling direction and the physical radius, while the minor axis of the target ellipse is the physical radius, the equations of the aforementioned tangent rays with the physical radius as a variable can be constructed according to the established target coordinate system, and combined with the physical distance between the intersection points of the aforementioned tangent rays on the security inspection channel, the physical radius is solved. Therefore, it can be solved through a series of operations such as mathematical modeling and equation solving, which helps to improve the accuracy of the measurement process. Therefore, the physical radius of the object to be measured can be automatically and accurately measured during the security inspection process.

[0238] Please refer to Figure 6 , Figure 6 is a schematic framework diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 60 stores program instructions 61 that can be run by a processor, and the program instructions 61 are used to implement the steps in any of the embodiments of the above object size measurement method.

[0239] In the above solution, the computer-readable storage medium 60 detects a first scanned image of an object to be measured on a security inspection channel by a security inspection machine to obtain a detection result, and obtains device parameters including at least a scaling factor when the security inspection machine forms an image. The detection result includes: a target angle between the object to be measured and the traveling direction of the security inspection channel, and a coordinate difference between opposite endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction. Then, based on the scaling factor and the coordinate difference, the physical distance between a first intersection point of a first light ray on the security inspection channel and a second intersection point of a second light ray on the security inspection channel is obtained. The first light ray and the second light ray are respectively tangent to the object to be measured and respectively form opposite endpoints when imaging. The cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as a target ellipse. Thus, with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis, a target coordinate system is established. The major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius. Furthermore, based on the target coordinate system, a first equation of the first light ray and a second equation of the second light ray are constructed. The first equation and the second equation use the physical radius as a variable. Based on the first equation, the second equation, and the physical distance, the physical radius is solved. Therefore, on the one hand, since relevant detections are performed based on the first scanned image and relevant calculations are combined with device parameters, the physical radius of the object to be measured can be obtained without manual operations by relevant personnel on the first scanned image, which can improve the convenience of the measurement process. On the other hand, when the object to be measured is inclined to the traveling direction of the security inspection channel, by using the cross-section of the plane where the light source rays tangent to the object to be measured are located on the object to be measured as the target ellipse, and accordingly establishing the target coordinate system, and the major axis of the target ellipse is obtained from the target angle between the object to be measured and the traveling direction and the physical radius, while the minor axis of the target ellipse is the physical radius, the equations of the aforementioned tangent rays with the physical radius as a variable can be constructed according to the established target coordinate system, and the physical radius can be solved by combining the physical distance between the intersection points of the aforementioned tangent rays on the security inspection channel. Therefore, it is possible to perform a series of operations such as mathematical modeling and equation solving to solve, which helps to improve the accuracy of the measurement process. Thus, it is possible to automatically and accurately measure the physical radius of the object to be measured during the security inspection process.

[0240] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0241] The descriptions of the above embodiments tend to emphasize the differences between the embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated in this article.

[0242] In several embodiments provided by the present application, it should be understood that the disclosed methods and apparatuses can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the apparatuses or units can be in electrical, mechanical or other forms.

[0243] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0244] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0245] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application. And the aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical discs and other various media that can store program codes.

[0246] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

Claims

1. A method for measuring the size of an object, characterized in that, Including: Detecting a first scanned image of an object to be measured on a security inspection passage by a security inspection machine to obtain a detection result, and acquiring device parameters including at least a scaling factor when the security inspection machine forms an image; wherein, the detection result includes: a target angle between the object to be measured and the traveling direction of the security inspection passage, and a coordinate difference between opposite endpoints of the object edge of the object to be measured in a direction perpendicular to the traveling direction; Based on the scaling factor and the coordinate difference, obtaining a physical distance between a first intersection point of a first light ray on the security inspection passage and a second intersection point of a second light ray on the security inspection passage; wherein, the first light ray and the second light ray are respectively tangent to the object to be measured and respectively form images to form the opposite endpoints, and a cross-section of a plane where the first light ray and the second light ray are located on the object to be measured is used as a target ellipse; Establishing a target coordinate system with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the horizontal coordinate axis, and the direction of the minor axis of the target ellipse as the vertical coordinate axis; wherein, the major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius; Based on the target coordinate system, constructing a first equation of the first light ray and a second equation of the second light ray; wherein, the first equation and the second equation take the physical radius as a variable; Based on the first equation, the second equation, and the physical distance, solving for the physical radius.

2. The method according to claim 1, wherein The solving for the physical radius based on the first equation, the second equation, and the physical distance includes: Based on the first equation and the straight-line equation of the security inspection passage in the target coordinate system, obtaining a first abscissa of the first intersection point in the target coordinate system, and based on the second equation and the straight-line equation of the security inspection passage in the target coordinate system, obtaining a second abscissa of the second intersection point in the target coordinate system; wherein, the first abscissa and the second abscissa take the physical radius as a variable; Solving based on a first function constructed based on the first abscissa, the second abscissa, and the physical distance to obtain the physical radius.

3. The method according to claim 2, wherein The solving for the physical radius based on a target equation constructed based on the first abscissa, the second abscissa, and the physical distance includes: Obtaining a difference between the first abscissa and the second abscissa as a target expression representing the physical distance; Based on the target expression and the physical distance, constructing the first function; Solving based on the first function to obtain the physical radius.

4. The method according to claim 1, wherein The device parameters further include a vertical distance from a light source to the security inspection passage and an imaging coordinate of a light ray emitted perpendicularly to the security inspection passage by the light source. The constructing the first equation of the first light ray and the second equation of the second light ray based on the target coordinate system includes: Based on the imaging coordinate, the vertical distance, endpoint coordinates, and the scaling factor, obtaining a coordinate expression of the light source coordinate on the target coordinate system; wherein, the coordinate expression takes the physical radius as a variable; Based on the ellipse equation and the coordinate expression of the light source coordinates, a first constraint equation satisfied by the ellipse tangent passing through the light source coordinates is obtained; wherein the first constraint equation uses the light source coordinates as a variable; Based on the ellipse equation and the first constraint equation, a first expression for the coordinates of the tangent point of the first light ray on the target ellipse and a second expression for the coordinates of the tangent point of the second light ray on the target ellipse are obtained; wherein both the first expression and the second expression contain the light source coordinates; The first equation is obtained based on the first expression and the second constraint equation of the tangent line on the target ellipse, and the second equation is obtained based on the second expression and the second constraint equation of the tangent line on the target ellipse.

5. The method according to claim 4, wherein The step of obtaining a coordinate expression of the light source coordinates in the target coordinate system based on the imaging coordinates, the vertical distance, the endpoint coordinates, and the scaling factor includes: The coordinate difference between the endpoint coordinates and the imaging coordinates is scaled based on the scaling factor to obtain the actual distance between the intersection points of the light source light and the outgoing light on the security inspection channel; wherein the endpoint coordinates are formed by imaging the light source light; Based on the actual distance and the vertical distance, the horizontal coordinate expression with the physical radius as the variable in the coordinate expression is obtained, and based on the vertical distance, the vertical coordinate expression with the physical radius as the variable in the coordinate expression is obtained.

6. The method according to claim 4, wherein The obtaining, based on the ellipse equation and the first constraint equation, a first expression for the coordinates of the tangent point of the first light ray on the target ellipse and a second expression for the coordinates of the tangent point of the second light ray on the target ellipse comprises: Based on the ellipse equation and the first constraint equation, a ordinate equation of the tangent point coordinates is obtained; wherein the ordinate equation contains the light source coordinates and takes the physical radius and the abscissa of the tangent point coordinates as variables; Based on the ordinate equation of the tangent point coordinates and the coordinate expression of the light source coordinates, solving to obtain the abscissa expression of the tangent point coordinates of the first light ray and the second light ray on the target ellipse; Substituting the abscissa expression of the coordinates of the tangent point of the first ray on the target ellipse into the ordinate equation to obtain the ordinate expression of the coordinates of the tangent point of the first ray on the target ellipse, and substituting the abscissa expression of the coordinates of the tangent point of the second ray on the target ellipse into the ordinate equation to obtain the ordinate expression of the coordinates of the tangent point of the second ray on the target ellipse; The first expression includes the horizontal coordinate expression and the vertical coordinate expression of the tangent point coordinates of the first light on the target ellipse, and the second expression includes the horizontal coordinate expression and the vertical coordinate expression of the tangent point coordinates of the second light on the target ellipse.

7. The method according to claim 4, wherein The first equation is obtained based on the first expression and the second constraint equation of the tangent line on the target ellipse, including: Substituting the first expression into the second constraint equation to obtain the first equation; And / or, obtaining the second equation based on the second expression and the second constraint equation of the tangent line on the target ellipse includes: Substituting the second expression into the second constraint equation to obtain the second equation.

8. The method according to claim 1, wherein The device parameters further include the vertical distance from the light source to the security inspection channel and the imaging coordinates of the light emitted perpendicularly to the security inspection channel by the light source, and the relative endpoints include a first endpoint and a second endpoint. Constructing the first equation of the first light ray and the second equation of the second light ray based on the target coordinate system includes: Obtaining a first slope of the first light ray in the target coordinate system based on the pixel coordinates of the first endpoint, the imaging coordinates, the scaling factor, and the vertical distance, and obtaining a second slope of the second light ray in the target coordinate system based on the pixel coordinates of the second endpoint, the imaging coordinates, the scaling factor, and the vertical distance; wherein, the pixel coordinates of the first endpoint are formed by imaging of the first light ray, and the pixel coordinates of the second endpoint are formed by imaging of the second light ray; Analyzing based on the ellipse equation of the target ellipse in the target coordinate system to obtain a first intercept and a second intercept of the tangent equation of the target ellipse at the target slope; wherein, the first intercept is a positive number, the second intercept is a negative number, and both the first intercept and the second intercept are expressions represented by the target slope and the physical radius as variables; Based on the magnitude relationship between the first slope and the second slope, selecting one of the first intercept and the second intercept for the first slope to form the first equation, and selecting the other of the first intercept and the second intercept for the second slope to form the second equation.

9. The method according to claim 8, wherein The obtaining the first slope of the first light ray in the target coordinate system based on the pixel coordinates of the first endpoint, the imaging coordinates, the scaling factor, and the vertical distance includes: Scaling the coordinate difference between the pixel coordinates of the first endpoint and the imaging coordinates based on the scaling factor to obtain a first distance between the intersection point between the emitted light ray and the security inspection channel and the first intersection point; Obtaining the first slope based on the ratio of the vertical distance to the first distance; And / or, the obtaining the second slope of the second light ray in the target coordinate system based on the pixel coordinates of the second endpoint, the imaging coordinates, the scaling factor, and the vertical distance includes: Scaling the coordinate difference between the pixel coordinates of the second endpoint and the imaging coordinates based on the scaling factor to obtain a second distance between the intersection point between the emitted light ray and the security inspection channel and the second intersection point; Obtaining the second slope based on the ratio of the vertical distance to the second distance.

10. The method according to claim 8, wherein The based on the magnitude relationship between the first slope and the second slope, selecting one of the first intercept and the second intercept for the first slope to form the first equation, and selecting the other of the first intercept and the second intercept for the second slope to form the second equation includes: In response to the size relationship indicating that the first light ray is steeper than the second light ray, select the first intercept for the first slope to form the first equation, and select the second intercept for the second slope to form the second equation; In response to the size relationship indicating that the second light ray is steeper than the first light ray, select the second intercept for the first slope to form the first equation, and select the first intercept for the second slope to form the second equation.

11. The method according to claim 10, wherein The step of selecting the first intercept for the first slope to form the first equation includes: substituting the first slope into the expression of the first intercept and forming the first equation with the first slope; the step of selecting the second intercept for the second slope to form the second equation includes: substituting the second slope into the expression of the second intercept and forming the second equation with the second slope; Alternatively, the step of selecting the second intercept for the first slope to form the first equation includes: substituting the first slope into the representation of the second intercept and forming the first equation with the first slope; the step of selecting the first intercept for the second slope to form the second equation includes: substituting the second slope into the expression of the first intercept and forming the second equation with the second slope.

12. The method according to claim 1, wherein The device parameters further include the vertical distance from the light source to the security inspection channel and the imaging coordinates of the light ray emitted by the light source perpendicular to the security inspection channel. After solving the physical radius based on the first equation, the second equation, and the physical distance, the method further includes: In response to a point to be measured on the object to be measured in the first scanned image, based on the first equation, the second equation, and the physical radius, obtain the light source coordinates in the target coordinate system, and based on the pixel coordinates of the point to be measured, the imaging coordinates, the scaling factor, and the vertical distance, obtain the third slope of the third light ray; wherein, the pixel coordinates of the point to be measured are formed by imaging of the third light ray, and the point to be measured is located on the line connecting the relative endpoints; Based on the final equation of the third light ray obtained from the light source coordinates and the third slope and the final equation of the target ellipse obtained from the physical radius, obtain the actual thickness of the object to be measured through which the third light ray passes.

13. The method according to claim 1, wherein The device parameters are pre-obtained by calibrating a second scanned image of a calibration ruler placed on the security inspection channel by the security inspection machine, and the calibration ruler is perpendicular to the traveling direction of the security inspection channel.

14. The method according to claim 13, wherein The calibration steps of the scaling factor include: Detect the first pixel coordinates of the upper boundary point of the object to be measured in the first scanned image, and detect the scale line sequence of the calibration ruler in the second scanned image; wherein, the scale line sequence includes the second pixel coordinates of the scale lines on the calibration ruler; Based on the first pixel coordinates and the second pixel coordinates, search for the scale line adjacent to the boundary point in the scale line sequence to obtain the first scale index; Based on the first scale index, the physical distance between adjacent scale lines on the calibration ruler, and the pixel distance between the boundary points, obtain the scaling factor when the security inspection machine images the object to be measured.

15. The method according to claim 14, wherein After finding the scale line adjacent to the boundary point in the scale line sequence based on the first pixel coordinate and the second pixel coordinate to obtain the first scale index, and before obtaining the scaling factor when the security inspection machine images the object to be measured based on the first scale index, the physical distance between adjacent scale lines on the calibration ruler, and the pixel distance between the boundary points, the method further includes: Obtain the difference between the second pixel coordinate of the first pixel coordinate and the first scale index as the first difference, and obtain the difference between the second pixel coordinate of the reference scale index and the second pixel coordinate of the first scale index as the second difference; wherein, the reference scale index is the scale index after the first scale index; Obtain the ratio of the first difference to the second difference as the additional scale index of the first scale index; The obtaining the scaling factor when the security inspection machine images the object to be measured based on the first scale index, the physical distance between adjacent scale lines on the calibration ruler, and the pixel distance between the boundary points includes: Based on the first scale index, the additional scale index, the physical distance, and the pixel distance, obtain the scaling factor when the security inspection machine images the object to be measured.

16. The method according to any one of claims 1 to 15, characterized in that, The major axis is expressed as the ratio of the minor axis to the cosine value of the target angle; And / or, the target angle is determined by detecting the axis of the object to be measured in the first scanned image.

17. An object size measuring device, characterized in that, Including: A measurement preparation module, configured to detect a first scanned image of an object to be measured on a security inspection channel by a security inspection machine to obtain a detection result, and obtain device parameters including at least the scaling factor when the security inspection machine images; wherein, the detection result includes: the target angle between the object to be measured and the traveling direction of the security inspection channel, and the coordinate difference between the relative endpoints of the object edge of the object to be measured in the vertical direction of the traveling direction; A distance measurement module, configured to obtain the physical distance between a first intersection point of a first light ray on the security inspection channel and a second intersection point of a second light ray on the security inspection channel based on the scaling factor and the coordinate difference; wherein, the first light ray and the second light ray are respectively tangent to the object to be measured and respectively form the relative endpoints through imaging, and the cross-section of the plane where the first light ray and the second light ray are located on the object to be measured is used as a target ellipse; A coordinate establishment module, configured to establish a target coordinate system with the center of the target ellipse as the origin, the direction of the major axis of the target ellipse as the coordinate horizontal axis, and the direction of the minor axis of the target ellipse as the coordinate vertical axis; wherein, the major axis is obtained based on the target angle and the physical radius of the object to be measured, and the minor axis is the physical radius; An equation construction module, configured to construct a first equation of the first light ray and a second equation of the second light ray based on the target coordinate system; wherein the first equation and the second equation take the physical radius as a variable; A radius solving module, configured to solve the physical radius based on the first equation, the second equation, and the physical distance.

18. An electronic device, characterized in that, It includes at least a memory and a processor coupled to each other. At least program instructions are stored in the memory, and the processor is configured to execute the program instructions to implement the object size measurement method according to any one of claims 1 to 16.

19. An X-ray security inspection device, characterized in that, It includes at least the electronic device according to claim 18.

20. A computer-readable storage medium, characterized in that, Program instructions that can be run by a processor are stored, and the program instructions are configured to implement the object size measurement method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Online detection method for size of moving steel pipe

    CN118602978A

  • Revolving body size measurement method and system based on binocular vision

    CN119879721A