Object detection method, system and control device
By pre-scanning and adjusting scanning parameters, higher detection accuracy and scanning accuracy are achieved in response to inaccuracies in object detection.
Patent Information
- Application Number
- CN202411163188.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-08-23
AI Technical Summary
In the prior art, targeted scanning cannot be performed during object detection, resulting in inaccurate scanning results.
Acquire the initial scan image of the object and the multi-frame intermediate scan image by pre-scanning, determine the position and level of the area of interest, adjust the scanning parameters, including the magnification and acquisition frame rate, and pass The moving object placement device places the area of interest in the center of the scanning.
It improves the accuracy of object detection and scanning accuracy, ensures that the scanned image of the area of interest is more accurate, thereby improving the accuracy of the detection results.
Smart Images

Figure CN118688228B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of object detection, and in particular to an object detection method, system and control device. Background Art
[0002] In the field of physical research, X-ray imaging technology is commonly used to scan and diagnose objects. Specifically, X-rays are irradiated onto the object to be tested, and the X-rays transmitted by the object to be tested are detected, thereby completing the scanning of the object to be tested and generating a scanned image of the object to be tested.
[0003] In the prior art, when scanning the object to be inspected, the scanning is completed once and for all, that is, a scanning parameter is used to perform a complete scan on the object to be inspected. This scanning method cannot perform targeted scanning, resulting in inaccurate scanning results. Summary of the invention
[0004] The purpose of this application is to provide an object detection method, system and control device to improve the accuracy of object detection in view of the deficiencies in the above-mentioned prior art.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides an object detection method, the method comprising:
[0007] If it is determined that there is a region of interest in the object under test according to at least one frame of scanned image obtained by the pre-scan, an initial scanned image is obtained, wherein the initial scanned image includes the region of interest in the object under test, and the initial scanned image is obtained by scanning the detection device according to the initial scan parameters;
[0008] Acquire a first position of the region of interest in the initial scan image and a level of the region of interest, and acquire multiple frames of intermediate scan images, each of which is an image of the object under test at a different rotation angle;
[0009] Determine the maximum size of the object to be measured according to the initial scan image, and determine the target scanning parameters according to the maximum size of the object to be measured, the level of the region of interest and the initial scan parameters;
[0010] Determine at least one target intermediate scanning image from the multiple frames of intermediate scanning images, and determine movement parameters of the object placement device according to the first position and the position or width of the region of interest in each of the target intermediate scanning images;
[0011] The object placement device is moved according to the movement parameters so that the region of interest is located at the target scanning position, the detection device is controlled to scan the object to be measured according to the target scanning parameters to obtain the image to be used, and the object to be measured is detected according to the image to be used.
[0012] Optionally, determining the target scanning parameters according to the maximum size of the object to be measured, the level of the region of interest and the initial scanning parameters includes:
[0013] Determine the target source object distance according to the maximum size of the measured object;
[0014] Determine the target source detection distance according to the target source object distance, the field of view width of the detection device and the maximum size of the object to be detected;
[0015] Determine the target magnification according to the target source object distance and the target source detection distance;
[0016] A target acquisition frame rate is determined according to the initial acquisition frame rate and the level of the region of interest.
[0017] Optionally, determining the target acquisition frame rate according to the initial acquisition frame rate and the level of the region of interest includes:
[0018] Determining a frame rate adjustment multiple according to the level of the region of interest;
[0019] The product of the initial acquisition frame rate and the adjustment multiple is used as the target acquisition frame rate.
[0020] Optionally, determining at least one frame of target intermediate scanning image from the multiple frames of intermediate scanning images includes:
[0021] Determine a first intermediate scanning image, a second intermediate scanning image, and a third intermediate scanning image from the plurality of frames of intermediate scanning images, wherein the first intermediate scanning image is in a mirror image relationship with the initial scanning image, and a difference between a width of the region of interest in the second intermediate scanning image and a width of the region of interest in the third intermediate scanning image is greater than a preset difference;
[0022] Determining the movement parameters of the object placement device according to the first position and the position or width of the region of interest in each of the target intermediate scan images includes:
[0023] The movement parameters of the object placement device are determined according to the first position, the second position of the region of interest in the first intermediate scanning image, the first width of the region of interest in the second intermediate scanning image, and the second width of the region of interest in the third intermediate scanning image.
[0024] Optionally, the object placement device comprises: a placement platform, a horizontal adjustment component, a vertical adjustment component and a scanning turntable, the placement platform is used to place the object to be measured, and the scanning turntable is used to rotate under the control of the control device and drive the placement platform to rotate;
[0025] Determining the movement parameters of the object placement device according to the first position, the second position of the region of interest in the first intermediate scanning image, the first width of the region of interest in the second intermediate scanning image, and the second width of the region of interest in the third intermediate scanning image includes:
[0026] Determining, according to the first position and the second position, whether the region of interest is consistent in the initial scan image and the first intermediate scan image;
[0027] If yes, determine the longitudinal movement parameter of the horizontal adjustment component and the vertical adjustment parameter of the vertical adjustment component according to the first position, the initial source-detection distance and the initial source-object distance in the initial scanning parameters, wherein the longitudinal movement parameter is used to indicate the movement parameter in the y-axis direction on the horizontal adjustment component;
[0028] A lateral movement parameter of the horizontal adjustment component is determined according to the initial source-detection distance, the initial source-object distance, the first width, and the second width, and the lateral movement parameter is used to indicate a movement parameter in the x-axis direction on the horizontal adjustment component.
[0029] Optionally, determining the longitudinal movement parameter of the horizontal adjustment component and the vertical adjustment parameter of the vertical adjustment component according to the first position, the initial source-detection distance and the initial source-object distance in the initial scanning parameters includes:
[0030] Determine the longitudinal movement parameter according to the initial source-detection distance, the initial source-object distance and the horizontal coordinate in the first position, wherein the longitudinal movement parameter is used to indicate the movement parameter in the y-axis direction on the horizontal adjustment component;
[0031] The vertical adjustment parameter is determined according to the initial source-detection distance, the initial source-object distance and the vertical coordinate in the first position, and the vertical adjustment parameter is used to indicate the movement parameter of the vertical adjustment component in the Z-axis direction.
[0032] Optionally, determining the lateral movement parameter of the horizontal adjustment component according to the initial source-detection distance, the initial source-object distance, the first width, and the second width includes:
[0033] The initial source-detection distance, the initial source-object distance, the first width, and the second width are input into the formula And the formula The lateral movement parameter is calculated, where c is the lateral movement parameter, FO is the initial source-object distance, FD is the initial source-detection distance, x1 is the first width, x2 is the second width, and x0 is the width of the region of interest. The lateral movement parameter is used to indicate the movement parameter in the x-axis direction on the horizontal adjustment component.
[0034] Optionally, determining the existence of a region of interest in the object under test according to at least one frame of scanned image obtained by pre-scanning includes:
[0035] Acquire a framed area in a current scanned image, where the framed area is selected by a user based on the current scanned image;
[0036] Acquire each preset region of interest corresponding to the detected object from a preset recognition database;
[0037] Perform feature comparison processing on the selected area and each of the preset regions of interest. If there is a preset region of interest that matches the features of the selected area, determine that there is a region of interest in the object under test and use the current scanned image as the initial scanned image and the position of the selected area in the current scanned image as the first position.
[0038] In a second aspect, an embodiment of the present application further provides a control device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the steps of the object detection method described in the first aspect are implemented.
[0039] In a third aspect, an embodiment of the present application further provides an object detection system, comprising: the control device, the transmitting device, the object placement device, the detection device and the adjustment track described in the second aspect, wherein the transmitting device, the object placement device and the detection device are all arranged on the adjustment track, and the object placement device is located between the transmitting device and the detection device;
[0040] The transmitting device, the object placement device and the detection device are all in communication connection with the control device;
[0041] The control device performs object detection based on the method steps described in the first aspect.
[0042] Optionally, the object placement device includes: a placement platform, a horizontal adjustment component, a vertical adjustment component and a scanning turntable, the placement platform is used to place the object to be measured, and the scanning turntable is used to rotate under the control of the control device and drive the placement platform to rotate.
[0043] The beneficial effects of this application are:
[0044] The present application provides an object detection method, system and control device. After pre-scanning the object to be detected, when it is determined that there is an area of interest in the object to be detected, an initial scan image including the area of interest in the object to be detected and multiple frames of intermediate scan images are obtained. The initial scan image and the intermediate scan images of each frame are images of the object to be detected at different rotation angles, respectively. The first position of the area of interest in the initial scan image and the level of the area of interest are determined. According to the maximum size of the object to be detected, the level of the area of interest and the initial scan parameters, the target magnification and the target acquisition frame rate in the target scan parameters are determined. The acquisition frame rate in the target scan parameters can be determined according to the level of the area of interest. At the same time, the target magnification is obtained by adjusting the distance between the transmitting device, the object placement device and the detector on the adjustment track, so that the scanning accuracy of the object to be detected can be improved. Moreover, the object placement device is moved by the determined moving parameters so that the area of interest on the object to be detected is placed in the scanning center, so that the acquired scan image of the area of interest can be more accurate, and then the detection result of the object to be detected is more accurate according to the obtained accurate scan image of the object to be detected with better scanning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A schematic diagram of the architecture of an object detection system provided in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of the structure of an object placement device provided in an embodiment of the present application;
[0048] Figure 3 A flowchart of an object detection method provided in an embodiment of the present application;
[0049] Figure 4 A schematic diagram of scanning an object under initial scanning parameters provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of a process for determining target scanning parameters provided in an embodiment of the present application;
[0051] Figure 6 A schematic diagram of scanning an object under target scanning parameters provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of a scanned image provided in an embodiment of the present application;
[0053] Figure 8 Another example of a scanned image provided in an embodiment of the present application is shown;
[0054] Fig. 9 A schematic diagram of a process for determining movement parameters provided in an embodiment of the present application;
[0055] Fig.10 A schematic diagram of the structure of a level adjustment assembly provided in an embodiment of the present application;
[0056] Fig.11 A schematic diagram of a process for determining movement parameters provided in an embodiment of the present application;
[0057] Fig.12 A schematic diagram of a process for determining the existence of an area of interest provided in an embodiment of the present application;
[0058] Fig.13 A schematic diagram of another process for determining the existence of an area of interest provided in an embodiment of the present application;
[0059] Fig.14 A structural block diagram of a control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0061] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0062] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0063] Figure 1 A schematic diagram of the architecture of an object detection system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the object detection system may include: a control device, a transmitting device, an object placement device, a detection device and an adjustment track, wherein the transmitting device, the object placement device and the detection device are all arranged on the adjustment track, and the object placement device is located between the transmitting device and the detection device. At the same time, the transmitting device, the object placement device and the detection device are all connected to the control device for communication, and the control device can control the transmitting device to transmit the detection source to the area where the object placement device is located, and control the detection device to scan the object to be detected placed on the object placement device according to the initial scanning parameters, as described below Figure 4 As shown, the projection of the detected object on the detection device is the scanned image. The control device can perform object detection according to the object detection method provided in the embodiment of the present application.
[0064] Figure 2 A schematic diagram of the structure of an object placement device provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the object placement device may include: a placement platform, a horizontal adjustment component, a vertical adjustment component and a scanning turntable, wherein the placement platform can be used to place the object to be measured, and the scanning turntable can be used to rotate under the control of the control device and drive the placement platform to rotate.
[0065] like Figure 2As shown, the placement platform can be set on the top layer, the horizontal adjustment component can be set between the placement platform and the scanning turntable, and the placement platform, the horizontal adjustment component and the scanning turntable are parallel to each other, and the vertical adjustment component can be set vertically with the placement platform, the horizontal adjustment component and the scanning turntable, and is located in the center area of the placement platform, the horizontal adjustment component and the scanning turntable. Among them, the horizontal adjustment component can move left and right and up and down in the horizontal direction, and can move the object to be measured from any position of the placement platform to the center position of the scanning turntable. The vertical adjustment component can be, for example, a lifting track that can move vertically up and down in the Z-axis direction, the scanning turntable can rotate 360° in the horizontal direction, and the scanning turntable can complete a spiral rotation with the vertical adjustment component.
[0066] Figure 3 This is a flow chart of an object detection method provided in an embodiment of the present application, and the execution subject of the method is the aforementioned control device. Figure 3 As shown, the method includes:
[0067] S101: If it is determined that there is a region of interest in the object under test according to at least one frame of scanned image obtained by pre-scanning, an initial scanned image is obtained.
[0068] Among them, the initial scanning image may include the area of interest of the object under test, the initial scanning image is an image of the object under test at a rotation angle, and the initial scanning image is obtained by scanning the detection device according to the initial scanning parameters, and the initial scanning parameters may include the initial scanning magnification and the initial acquisition frame rate. Figure 4 A schematic diagram of scanning an object under initial scanning parameters provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the object to be measured is placed at the center of the placement platform and the scanning turntable, and the object to be measured is scanned using the initial scanning parameters, where magnification = source-detection distance / source-object distance = (source-object distance + physical detection distance) / source-object distance, where the source-object distance is the distance between the transmitting device and the object placement device, and the source-detection distance is the distance between the transmitting device and the detection device. The transmitting device emits a ray source to the object to be measured, so that the object to be measured is projected on the detector, and the projection of the object to be measured on the detection device is the scanned image.
[0069] Optionally, when pre-scanning the object to be measured, the detection device also performs a 360° pre-scan on the object to be measured according to the initial scanning parameters, and scanned images of the object to be measured at different angles can be obtained. When it can be determined that there is a region of interest in the object to be measured based on one frame of the scanned image, an initial scanned image is obtained. The initial scanned image can be a frame of the scanned image at a rotation angle in the pre-scanning. For example, at 0°, the initial scanned image includes the region of interest of the object to be measured, and the scanned image at the 0° position is used as the initial scanned image, such as Figure 7 The scanned image at the 0° position is shown in FIG. If the scanned images between 0° and 10° do not include the region of interest of the object to be measured, and the scanned image at the 15° position scans the region of interest of the object to be measured, then the initial scanned image is the scanned image at the 15° position.
[0070] S102: Acquire a first position of the region of interest in the initial scan image and a level of the region of interest, and acquire multiple frames of intermediate scan images.
[0071] Among them, each intermediate scanning image is an image of the measured object at different rotation angles, and each intermediate scanning image is also obtained by scanning the detection device according to the initial scanning parameters. Specifically, the control device can control the object placement device to rotate and control the detection device to scan the measured object according to the initial scanning parameters, so that multiple frames of intermediate scanning images can be obtained. The rotation angle corresponding to each intermediate scanning image is different from the rotation angle corresponding to the initial scanning image. For example, each intermediate scanning image can be a scanning image at different angles such as 30°, 45°, 50°, 60°, 90°, 145°, 180°, 195°, 270°, etc. Each intermediate scanning image can also be a scanning image in the pre-scanning process.
[0072] Optionally, the first position may be the position coordinate information of the center of the region of interest in the initial scanned image. At the same time, the initial scanned image may be analyzed and processed to determine the level of the region of interest. The level of the region of interest may be divided into a low region of interest, a normal region of interest, and a high region of interest, or may be divided into other levels. The level of the region of interest may be used to characterize the importance of the region of interest, so that the scanning parameters may be adjusted according to the level of the region of interest.
[0073] S103: Determine the maximum size of the object to be measured according to the initial scan image, and determine the target scanning parameters according to the maximum size of the object to be measured, the level of the region of interest and the initial scan parameters.
[0074] Optionally, the maximum size of the object to be measured in the initial scan image can be determined first. , if the size of the object to be measured in the initial scan image is 5cm long and 10cm wide, then the maximum size of the object to be measured in the initial scan image is 10cm. The maximum size in the initial scan image That is, the projection size on the detector, such as Figure 4 In Then, the maximum size L of the object to be measured is obtained according to the magnification in the initial scanning parameters, L= , where FO is the initial source-object distance and FD is the initial source-detection distance.
[0075] Optionally, a preset method can be used to determine target scanning parameters according to the maximum size of the object to be measured, the level of the region of interest, and the initial scanning parameters. The target scanning parameters include a target magnification and a target acquisition frame rate. After the target scanning parameters are determined, the detection device can scan the region of interest in the object to be measured according to the target scanning parameters. The magnification is determined by the source-object distance between the transmitting device and the object placement device and the geophysical distance between the object placement device and the detector. The scanning magnification can be adjusted by adjusting the distance between the transmitting device, the object placement device, and the detector on the adjustment track.
[0076] S104, determining at least one target intermediate scanning image from the multiple frames of intermediate scanning images, and determining movement parameters of the object placement device according to the first position and the position or width of the region of interest in each target intermediate scanning image.
[0077] Optionally, each target intermediate scan image determined from the multiple frames of intermediate scan images includes the region of interest in the object under test, that is, each target intermediate scan image is a scanned image of the object under test containing the region of interest scanned at different rotation angles. Then, the position or width of the region of interest in each target intermediate scan image can be obtained. If each target intermediate scan image is as follows Figure 8 The scanned image at the 90° position and the scanned image at the 270° position shown in , wherein the position also refers to the position coordinate information of the center of the region of interest in the middle scanned image of each target, and the width can be the width of the region of interest in the middle scanned image of each target, such as Figure 8 In the scanning image at the 90° position, x1 and the scanning image at the 270° position, x2, also refer to the width of the width of the region of interest projected on the detector.
[0078] S105, moving the object placement device according to the moving parameters so that the region of interest is located at the target scanning position, controlling the detection device to scan the object to be measured according to the target scanning parameters, obtaining the image to be used, and detecting the object to be measured according to the image to be used.
[0079] Optionally, after determining the movement parameters of the object placement device, the object placement device can be moved according to the movement parameters so that the area of interest can be located at the target scanning position, which can be the center of the horizontal adjustment component, that is, the central area of the scanning turntable, so that the center of the area of interest can be located at the center of the scanning field of view, and then the area of interest in the object under test can be scanned according to the target scanning parameters.
[0080] In this embodiment, when it is determined that there is a region of interest in the object to be measured after the object to be measured is pre-scanned, an initial scan image including the region of interest in the object to be measured and multiple frames of intermediate scan images are obtained, the initial scan image and each frame of intermediate scan image are images of the object to be measured at a rotation angle, respectively, the first position of the region of interest in the initial scan image and the level of the region of interest are determined, and the target magnification and target acquisition frame rate in the target scan parameters are determined according to the maximum size of the object to be measured, the level of the region of interest and the initial scan parameters, and the acquisition frame rate in the target scan parameters can be determined according to the level of the region of interest. At the same time, the target magnification is obtained by adjusting the distance between the transmitting device, the object placement device and the detector on the adjustment track, so that the scanning accuracy of the object to be measured can be improved, and the object placement device is moved by the determined moving parameters, so that the region of interest on the object to be measured is placed in the scanning center, and the region of interest is scanned in a targeted manner, so that the acquired scan image of the region of interest can be more accurate, avoiding the use of the same scan parameter to scan the object to be measured as in the prior art, and then the detection result of the object to be measured is more accurate according to the obtained accurate scan image of the object to be measured with better scanning accuracy.
[0081] Figure 5 A schematic diagram of a process for determining target scanning parameters provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, in the above S103, the maximum size of the object to be measured is determined according to the initial scan image, and the target scanning parameters are determined according to the maximum size of the object to be measured, the level of the region of interest and the initial scanning parameters, which may include:
[0082] S201. Determine the target source object distance according to the maximum size of the object to be measured.
[0083] Specifically, the sum of the maximum size of the object to be measured and a preset value is used as the target source distance. The preset value may be, for example, 2 cm. The target source distance is To express, if Figure 6 In , Figure 6 A schematic diagram of scanning an object under target scanning parameters provided in an embodiment of the present application.
[0084] Optionally, adding a preset value on the basis of the maximum size of the object to be measured can prevent the radiation source from hitting the object to be measured, thereby ensuring the integrity and accuracy of scanning the object to be measured.
[0085] S202: Determine the target source detection distance according to the target source object distance, the field of view width of the detection device, and the maximum size of the object to be detected.
[0086] Specifically, according to the formula Get the target source detection distance, where is the target source detection distance, is the distance between the target source and the object, D is the field of view of the detection device, and L is the maximum size of the object being measured.
[0087] S203, determining a target magnification ratio according to a target source object distance and a target source detection distance.
[0088] Specifically, target magnification = target source detection distance / target source object distance, where, since source detection distance = source object distance + geophysical detection distance, the target geophysical detection distance can be obtained when the target source detection distance and the target source object distance are known. Then, the distance between the transmitting device and the object placement device can be adjusted to the target source object distance, and the distance between the object placement device and the detection device can be adjusted to the target geophysical detection distance.
[0089] S204: Determine a target acquisition frame rate according to the initial acquisition frame rate and the level of the region of interest.
[0090] Specifically, the target acquisition frame rate may be determined using a preset method according to the initial acquisition frame rate and the level of the region of interest.
[0091] In this embodiment, by taking the sum of the maximum size of the measured object and a preset value as the target source-object distance, it is possible to prevent the radiation source from hitting the measured object after the measured object is moved, thereby ensuring the integrity and accuracy of the scan of the measured object. At the same time, the source-detection distance and the target magnification are determined based on the obtained target source-object distance, so that the magnification in the obtained target scanning parameters can be made more accurate and reasonable. The target acquisition frame rate is determined based on the initial acquisition frame rate and the level of the area of interest, so that the obtained target acquisition frame rate can be made more reasonable.
[0092] Optionally, determining the target acquisition frame rate according to the initial acquisition frame rate and the level of the region of interest in S204 may include:
[0093] Optionally, the frame rate adjustment factor may be determined according to the level of the region of interest. Specifically, a frame rate adjustment factor may correspond to each level. For example, the frame rate adjustment factor corresponding to the low region of interest is 0.5, the frame rate adjustment factor corresponding to the normal region of interest is 2, and the frame rate adjustment factor of the high region of interest is 3.
[0094] Optionally, the product of the initial acquisition frame rate and the adjustment factor can be used as the target acquisition frame rate, and the frame rate adjustment factor refers to the multiple of the initial acquisition frame rate in the initial scanning parameters. If the initial acquisition frame rate is n frames / second, the target acquisition frame rate corresponding to the low interest region is 0.5n frames / second, the target acquisition frame rate corresponding to the normal interest region is 2n frames / second, and the target acquisition frame rate corresponding to the high interest region is 3n frames / second.
[0095] In this embodiment, the target acquisition frame rate is determined according to the level of the region of interest. Different acquisition frame rates can be used for regions of interest of different levels to acquire images of the measured object, so that the accuracy of the obtained scanned image is more reasonable.
[0096] Optionally, determining at least one target intermediate scanning image frame from the multiple intermediate scanning image frames in S104 may include:
[0097] Optionally, a first intermediate scanning image, a second intermediate scanning image, and a third intermediate scanning image are determined from the multiple frames of intermediate scanning images as target intermediate scanning images. The first intermediate scanning image is in a mirror image relationship with the initial scanning image. For example, if the initial scanning image is a scanning image at a 0° position, the first intermediate scanning image is a scanning image at a 180° position. Figure 7 A schematic diagram of a scanned image provided in an embodiment of the present application, such as Figure 7 The position of the region of interest in the initial scan image is shown to be in a mirror image relationship with the position of the region of interest in the first intermediate scan image.
[0098] Optionally, a difference between a width of the region of interest in the second intermediate scanning image and a width of the region of interest in the third intermediate scanning image is greater than a preset difference. Figure 8 A schematic diagram of another scanned image provided in an embodiment of the present application, such as Figure 8 As shown, the second intermediate scanning image is, for example, a scanning image at a 90° position, and the third intermediate scanning image is, for example, a scanning image at a 270° position. Figure 8 It can be seen from the figure that the difference between the width x1 of the region of interest in the second intermediate scanning image and the width x2 of the region of interest in the third intermediate scanning image is relatively large.
[0099] Optionally, in the above S104, determining the movement parameters of the object placement device according to the first position and the position or width of the region of interest in the intermediate scanned image of each target may include:
[0100] Optionally, the movement parameters of the object placement device can be determined based on the first position, the second position of the region of interest in the first intermediate scanning image, the first width of the region of interest in the second intermediate scanning image, and the second width of the region of interest in the third intermediate scanning image.
[0101] Fig. 9 A schematic diagram of a flow chart for determining movement parameters provided in an embodiment of the present application, such as Fig. 9 As shown, the above-mentioned determining the movement parameters of the object placement device according to the first position, the second position of the region of interest in the first intermediate scanning image, the first width of the region of interest in the second intermediate scanning image, and the second width of the region of interest in the third intermediate scanning image may include:
[0102] S301: Determine whether a region of interest is consistent in an initial scan image and a first intermediate scan image according to a first position and a second position.
[0103] Specifically, after obtaining the first position of the region of interest in the initial scanning image and the second position of the region of interest in the first intermediate scanning image, it can be determined whether the region of interest is consistent in the initial scanning image and the first intermediate scanning image based on the first position and the second position.
[0104] Optionally, if the horizontal coordinate of the first position is the same as the horizontal coordinate of the second position but in opposite directions, and the vertical coordinate of the first position is the same as the vertical coordinate of the second position and in the same direction, then it is determined that the region of interest is consistent in the initial scan image and the first intermediate scan image, otherwise it is inconsistent.
[0105] Optionally, if the horizontal coordinate of the first position is the same as the horizontal coordinate of the second position but in opposite directions, and the vertical coordinate in the first position is the same as the vertical coordinate in the second position and in the same direction, that is, the region of interest is consistent in the initial scanning image and the first intermediate scanning image. In this case, it can be determined that the magnification of scanning the object to be measured at the first position is the same as the magnification of scanning the object to be measured at the second position, and both are FO / FD. Accordingly, the longitudinal movement parameter and the vertical adjustment parameter can be calculated using formula (1) and formula (2) in the following embodiment.
[0106] For example, Figure 7 In the example, the first position is (-a, b) and the second position is (a, b), then the region of interest is consistent in the initial scan image and the first intermediate scan image.
[0107] Optionally, if the region of interest is consistent in the initial scanning image and the first intermediate scanning image, the following S302 is executed; if not, the initial scanning image and the first intermediate scanning image are re-determined so that the region of interest is consistent in the re-determined initial scanning image and the re-determined first intermediate scanning image.
[0108] S302: Determine longitudinal movement parameters of the horizontal adjustment component and vertical adjustment parameters of the vertical adjustment component according to the first position, an initial source-detection distance and an initial source-object distance in the initial scanning parameters.
[0109] The longitudinal movement parameter may refer to a movement parameter of the horizontal adjustment component in the y-axis direction, and the vertical adjustment parameter may refer to a movement parameter of the vertical adjustment component in the z-axis direction.
[0110] The longitudinal movement parameters of the horizontal adjustment component can make the object to be measured move up and down in the horizontal direction of the placement platform, and the vertical adjustment parameters of the vertical adjustment component can make the object placement device move up and down in the vertical direction. The initial source-object distance is FO, the initial source-detection distance is FD, and the first position is (-a, b). The schematic diagram of the horizontal adjustment component is as follows Fig.10 As shown, the longitudinal movement parameter of the horizontal adjustment component refers to Fig.10 The vertical adjustment component of the cross adjustment component in the embodiment of the present invention is used to move the vertical adjustment component up and down.
[0111] S303: Determine a lateral movement parameter of the horizontal adjustment component according to the initial source-detection distance, the initial source-object distance, the first width, and the second width.
[0112] The lateral movement parameter may refer to the movement parameter of the horizontal adjustment component in the x-axis direction. The lateral movement parameter of the horizontal adjustment component can make the object under test move left and right in the horizontal direction of the placement platform. Fig.10 The cross adjustment component of the cross adjustment component is moved left and right according to the lateral movement parameter through the cross adjustment component.
[0113] Optionally, after determining the longitudinal movement parameters, lateral movement parameters of the horizontal adjustment component and the vertical adjustment parameters of the vertical adjustment component described below, the horizontal adjustment component can be moved up and down and left and right in the horizontal direction according to the longitudinal movement parameters and the lateral movement parameters, and the vertical adjustment component can be moved vertically according to the vertical adjustment parameters, so that the area of interest can be moved to the scanning center.
[0114] Optionally, the embodiments in the aforementioned S301~S303 are for the object placement device in the present application, which includes a placement platform, a horizontal adjustment component, a vertical adjustment component and a scanning turntable. For the object placement platform that does not have such a structure, for example, a combination component in which the horizontal adjustment component and the vertical adjustment component are integrated, the movement parameters of the object placement device are determined according to the first position, the second position of the area of interest in the first intermediate scanning image, the first width of the area of interest in the second intermediate scanning image, and the second width of the area of interest in the third intermediate scanning image, which are the movement parameters of the combination component.
[0115] Fig.11 A schematic diagram of a flow chart for determining movement parameters provided in an embodiment of the present application, such as Fig.11 As shown, in the above S302, according to the first position, the initial source-detection distance and the initial source-object distance in the initial scanning parameters, determining the longitudinal movement parameters of the horizontal adjustment component and the vertical adjustment parameters of the vertical adjustment component may include:
[0116] S401, determining a longitudinal movement parameter according to an initial source-detection distance, an initial source-object distance, and a horizontal coordinate in a first position.
[0117] Specifically, it can be obtained according to formula (1).
[0118] Formula (I)
[0119] Wherein, FD is the initial source-detection distance, FO is the initial source-object distance, m is the longitudinal movement parameter, and a is the absolute value of the horizontal coordinate in the first position.
[0120] S402: Determine a vertical adjustment parameter according to an initial source-detection distance, an initial source-object distance, and a vertical coordinate in the first position.
[0121] Specifically, it can be obtained according to formula (2).
[0122] Formula (II)
[0123] Wherein, FD is the initial source-detection distance, FO is the initial source-object distance, n is the vertical adjustment parameter, and b is the absolute value of the ordinate in the first position.
[0124] Optionally, determining the lateral movement parameter of the horizontal adjustment component according to the initial source-detection distance, the initial source-object distance, the first width, and the second width in S303 may include:
[0125] Optionally, the initial source-detection distance, the initial source-object distance, the first width, and the second width may be input into the following formula (III) and the following formula (IV) to calculate the lateral movement parameters.
[0126] Formula (III)
[0127] Formula (IV)
[0128] Wherein, c is the lateral movement parameter, FO is the initial source-object distance, FD is the initial source-detection distance, x1 is the first width, x2 is the second width, and x0 is the width of the region of interest.
[0129] Optionally, since x1 is the width of the region of interest x0 obtained by adding c to the initial source-object distance, that is, x1 is the width of x0 in the second intermediate scanning image when the magnification is (FO+c) / FD; x2 is the width of x0 obtained by subtracting c from the initial source-object distance, that is, x2 is the width of x0 in the third intermediate scanning image when the magnification is (FO-c) / FD, then, x1=x0* FD / (FO+c), x2=x0* FD / (FO-c), therefore, the lateral movement parameters can be obtained according to the aforementioned formula (iii) and formula (iv).
[0130] Optionally, in the process of determining whether a region of interest exists in a detected object, different determination methods may be selected for different types of detected objects. Different methods for determining whether a region of interest exists in a detected object are described through the following specific embodiments.
[0131] Fig.12 A schematic diagram of a process for determining the existence of an area of interest provided in an embodiment of the present application, such as Fig.12 As shown, determining the existence of the region of interest in the object under test according to at least one frame of scanned image obtained by pre-scanning in the above S101 may include:
[0132] S501, obtaining a framed area in the current scanned image.
[0133] Specifically, each scanned image obtained by the pre-scan is traversed, and for the current scanned image traversed, a framed area in the current scanned image is obtained.
[0134] The framed area is selected by the user based on the current scanned image. Specifically, if the user determines that a certain area in the current scanned image may be an area of interest, the area can be used as the framed area. The framed area refers to the regional image in the current scanned image.
[0135] S502: Acquire preset regions of interest corresponding to the object under test from a preset recognition database.
[0136] Among them, the preset recognition database can be obtained by pre-training with the model. Specifically, for an object, multiple defect images corresponding to the object can be selected. For example, for ore, defect images such as crack images, pinhole images, impurity images, deformation images, and foreign body images can be selected. These defect images are input into the model for fusion training and expansion training, and the preset regions of interest corresponding to the object can be obtained. Each preset region of interest also refers to an image of a region of interest. The model can also be used to classify each preset region of interest.
[0137] Optionally, when performing fusion training and expansion training, defect images of different defect types can be fused to obtain at least one fused defect image, and features can be extracted from defect images of the same defect type to obtain feature information of each defect image, and expansion training can be performed based on each feature information and each defect image to obtain each expanded defect image of the same defect type, based on which each expanded defect image of each defect type can be obtained. Afterwards, each fused defect image, each expanded defect image, and each defect image are used as each preset region of interest corresponding to the object.
[0138] S503: Perform feature comparison processing on the framed area and each preset region of interest to determine whether there is a preset region of interest that matches the feature of the framed area.
[0139] Optionally, if there is a preset region of interest that matches the features of the framed region, the following S504 is executed. If there is no preset region of interest that matches the features of the framed region, S505 is executed.
[0140] S504: Determine whether there is an area of interest in the object under test and use the current scan image as an initial scan image and the position of the framed area in the current scan image as a first position.
[0141] Optionally, the level of a preset region of interest that matches the features of the framed area may also be used as the level of the region of interest in the object under test.
[0142] S505: The user further determines whether the selected area is an area of interest.
[0143] Optionally, if yes, execute S506, determine whether there is an area of interest in the object under test and use the scanned image as the initial scanned image and the position of the selected area in the scanned image as the first position, and add the selected area to a preset recognition database; if no, reselect a frame of the scanned image and return to execute S501 until all scanned images have been traversed, and if all scanned images determine that there is no area of interest in the object under test, then end.
[0144] Optionally, the method in this embodiment can be applicable to various types of objects to be measured.
[0145] Fig.13 Another flow chart of determining the existence of an area of interest provided in an embodiment of the present application is as follows: Fig.13 As shown, the above S101 determines that there is a region of interest in the object under test according to at least one frame of scanned image obtained by pre-scanning, and may also include:
[0146] S601: Divide the current scanned image into regions to obtain multiple image regions.
[0147] For example, the current scanned image may be subdivided into 100 image regions, each image region being a sub-image region of the scanned image, and the current scanned image is any frame of scanned image obtained by pre-scanning.
[0148] S602: Determine the density corresponding to each image region, and calculate the density difference between adjacent image regions.
[0149] Optionally, the density difference between two adjacent image intervals may be determined. For example, if the density of the first image area is h1, the density of the second image area is h2, and image area 1 and image area 2 are adjacent, then the value of h1-h2 is used as the density difference between the first image area h1 and the second image area h2. The density difference between the first image area h1 and the second image area h2 may represent the density difference between the substance corresponding to the first image area h1 and the substance corresponding to the second image area h2.
[0150] S603. If the density difference between the adjacent first image area and the second image area is greater than or equal to the density threshold, it is determined that there is an area of interest in the object under test, and the position of the adjacent area with a preset area between the first image area and the second image area is taken as the first position.
[0151] The density threshold may be, for example, ±10%. The first image region and the second image region are any two image regions in the scanned image.
[0152] S604: If the density differences of adjacent image regions in the current scanned image are all smaller than the density threshold, a new scanned image frame is selected to execute S601 to S603.
[0153] S605: Check whether all scanned images have been traversed.
[0154] If all scanned images have been traversed, the process ends; if not, the process returns to S601. After all scanned images have been traversed, if there is no density difference between adjacent image regions greater than or equal to the density threshold, it means that there is no region of interest in the object under test.
[0155] This embodiment can be used for a detected object with density data, such as ore, to determine whether there is an area of interest in the detected object through the method in this embodiment.
[0156] Optionally, the determining, in S101, that there is a region of interest in the object under test according to at least one frame of scanned image obtained by pre-scanning may further include:
[0157] Optionally, the number of structural lines and intersection information in the current scanned image can be obtained. If the number of structural lines is greater than a preset number and the structural lines are crossed, it is determined that there is an area of interest in the object being measured, and the position of the area where the number of structural lines meets a preset condition is taken as the first position, wherein the preset condition may be that the number of structural lines is greater than a preset number and the structural lines are crossed.
[0158] Optionally, if there is no region satisfying the preset conditions in the current scanned image, a new scanned image is selected until all scanned images obtained by the pre-scan are traversed. If there is no scanned image satisfying the preset conditions after all scanned images are traversed, it means that there is no region of interest in the object under test.
[0159] This embodiment can be used for an object to be detected with a relatively complex structure, and the method in this embodiment can be used to determine whether the object to be detected has a region of interest.
[0160] Fig.14 This is a structural block diagram of a control device provided in an embodiment of the present application. Fig.14 As shown, the electronic device may include: a processor 701 and a memory 702 .
[0161] Optionally, a bus 703 may also be included, wherein the memory 702 is used to store machine-readable instructions executable by the processor 701. When the electronic device 700 is running, the processor 701 communicates with the memory 702 through the bus 703. When the machine-readable instructions are executed by the processor 701, the method steps in the above method embodiment are performed.
[0162] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps in the above-mentioned object detection method embodiment are executed.
[0163] The present application also provides an object detection system. Figure 1 shown.
[0164] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0165] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function 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 is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0166] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. An object detection method, characterized in that: The method comprises: If it is determined that there is a region of interest in the object under test according to at least one frame of scanned image obtained by the pre-scan, an initial scanned image is obtained, wherein the initial scanned image includes the region of interest in the object under test, and the initial scanned image is obtained by scanning the detection device according to the initial scan parameters; Acquire a first position of the region of interest in the initial scan image and a level of the region of interest, and acquire multiple frames of intermediate scan images, each of which is an image of the object under test at a different rotation angle; Determine the maximum size of the object to be measured according to the initial scan image, and determine the target scanning parameters according to the maximum size of the object to be measured, the level of the region of interest and the initial scan parameters; Determine at least one target intermediate scanning image from the multiple frames of intermediate scanning images, and determine movement parameters of the object placement device according to the first position and the position or width of the region of interest in each of the target intermediate scanning images; Move the object placement device according to the movement parameters so that the region of interest is located at a target scanning position, control the detection device to scan the object to be detected according to the target scanning parameters to obtain an image to be used, and detect the object to be detected according to the image to be used; The step of determining at least one target intermediate scanning image from the plurality of intermediate scanning images comprises: Determine a first intermediate scanning image, a second intermediate scanning image, and a third intermediate scanning image from the multiple frames of intermediate scanning images, wherein the first intermediate scanning image is in a mirror image relationship with the initial scanning image, and the second intermediate scanning image is a scanning image of the object under test rotated by 90°, and the third intermediate scanning image is a scanning image of the object under test rotated by 270°; Determining the movement parameters of the object placement device according to the first position and the position or width of the region of interest in each of the target intermediate scan images includes: determining a movement parameter of the object placement device according to the first position, a second position of the region of interest in the first intermediate scanning image, a first width of the region of interest in the second intermediate scanning image, and a second width of the region of interest in the third intermediate scanning image; The step of determining target scanning parameters according to the maximum size of the object to be measured, the level of the region of interest and the initial scanning parameters includes: Determine the target source object distance according to the maximum size of the measured object; Determine the target source detection distance according to the target source object distance, the field of view width of the detection device and the maximum size of the object to be detected; Determine the target magnification according to the target source object distance and the target source detection distance; Determining a target acquisition frame rate according to an initial acquisition frame rate and a level of the region of interest; The object placement device comprises: a placement platform, a horizontal adjustment component, a vertical adjustment component and a scanning turntable, wherein the placement platform is used to place the object to be measured, and the scanning turntable is used to rotate under the control of a control device and drive the placement platform to rotate; The determining of the movement parameters of the object placement device according to the first position, the second position of the region of interest in the first intermediate scanning image, the first width of the region of interest in the second intermediate scanning image, and the second width of the region of interest in the third intermediate scanning image includes: Determining, according to the first position and the second position, whether the region of interest is consistent in the initial scan image and the first intermediate scan image; If yes, determine the longitudinal movement parameter of the horizontal adjustment component and the vertical adjustment parameter of the vertical adjustment component according to the first position, the initial source-detection distance and the initial source-object distance in the initial scanning parameters, wherein the longitudinal movement parameter is used to indicate the movement parameter in the y-axis direction on the horizontal adjustment component; A lateral movement parameter of the horizontal adjustment component is determined according to the initial source-detection distance, the initial source-object distance, the first width, and the second width, and the lateral movement parameter is used to indicate a movement parameter in the x-axis direction on the horizontal adjustment component.
2. The object detection method according to claim 1, characterized in that: The step of determining a target acquisition frame rate according to the initial acquisition frame rate and the level of the region of interest includes: Determining a frame rate adjustment multiple according to the level of the region of interest; The product of the initial acquisition frame rate and the adjustment multiple is used as the target acquisition frame rate.
3. The object detection method according to claim 1, characterized in that: The determining of the longitudinal movement parameter of the horizontal adjustment component and the vertical adjustment parameter of the vertical adjustment component according to the first position, the initial source-detection distance and the initial source-object distance in the initial scanning parameters includes: Determining the longitudinal movement parameter according to the initial source-detection distance, the initial source-object distance, and the horizontal coordinate in the first position; The vertical adjustment parameter is determined according to the initial source-detection distance, the initial source-object distance and the vertical coordinate in the first position, and the vertical adjustment parameter is used to indicate the movement parameter of the vertical adjustment component in the Z-axis direction.
4. The object detection method according to claim 1, characterized in that: The step of determining the lateral movement parameter of the horizontal adjustment component according to the initial source-detection distance, the initial source-object distance, the first width, and the second width includes: The initial source-detection distance, the initial source-object distance, the first width, and the second width are input into the formula And the formula The lateral movement parameter is calculated, where c is the lateral movement parameter, FO is the initial source-object distance, FD is the initial source-detection distance, x1 is the first width, x2 is the second width, and x0 is the width of the region of interest.
5. The object detection method according to any one of claims 1 to 4, characterized in that: The step of determining the existence of a region of interest in the object under test according to at least one frame of scanned image obtained by pre-scanning includes: Acquire a framed area in a current scanned image, where the framed area is selected by a user based on the current scanned image; Acquire each preset region of interest corresponding to the detected object from a preset recognition database; Perform feature comparison processing on the selected area and each of the preset regions of interest. If there is a preset region of interest that matches the features of the selected area, determine that there is a region of interest in the object under test and use the current scanned image as the initial scanned image and the position of the selected area in the current scanned image as the first position.
6. A control device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor implements the steps of the object detection method according to any one of claims 1 to 5 when executing the computer program.
7. An object detection system, characterized in that: include: The control device, the transmitting device, the object placement device, the detection device and the adjustment track described in claim 6 above, wherein the transmitting device, the object placement device and the detection device are all arranged on the adjustment track, and the object placement device is located between the transmitting device and the detection device; The transmitting device, the object placement device and the detection device are all in communication connection with the control device; The control device performs object detection based on the object detection method steps described in any one of claims 1-5.
8. The object detection system according to claim 7, characterized in that: The object placement device comprises: a placement platform, a horizontal adjustment component, a vertical adjustment component and a scanning turntable. The placement platform is used to place the object to be measured, and the scanning turntable is used to rotate under the control of the control device and drive the placement platform to rotate.
Citation Information
Patent Citations
Image scanning triggering method and system, electronic equipment and medium
CN115644905A
Active scanning three-dimensional reconstruction method and system with region selection function
CN116168161A