Magnetic flux detection method and device

By using detection equipment of vision systems, three-dimensional magnetic field cameras and laser displacement sensors, combined with pre-calibrated position relationships, the problems of limitations and low accuracy of magnetic flux detection in the prior art are solved, and efficient and accurate magnetic flux data acquisition is achieved.

CN120161394AActive Publication Date: 2025-06-17SUZHOU JQS INFO TECH CO LTD

Patent Information

Application Number
CN202510637222.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-06-17
Estimated Expiration
2045-05-19

AI Technical Summary

Technical Problem

In the prior art, the magnetic flux detection method has certain limitations, and it is impossible to measure the magnetic flux value of all points in the field of view, and the measurement accuracy and efficiency are low.

Method used

Using a detection device including a vision system, a three-dimensional magnetic field camera and a laser displacement sensor, the measurement position and height of the laser displacement sensor and the three-dimensional magnetic field camera are determined through a pre-calibrated position relationship, thereby realizing the acquisition of magnetic flux data at all points in the field of view.

Benefits of technology

It improves the efficiency and accuracy of magnetic flux detection, and can collect magnetic flux data at all points in the field of view at one time, providing more accurate magnetic flux information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120161394A_ABST
    Figure CN120161394A_ABST
Patent Text Reader

Abstract

The invention discloses a magnetic flux detection method and device. The method comprises the following steps: determining a first position of a target magnet in a to-be-detected product relative to a reference point, a second position of a horizontal axis and a longitudinal axis during measurement of a visual system, and a third position of a magnet center of the target magnet in the visual system relative to the reference point; based on the first position, the second position and the third position, determining a fourth position of the horizontal axis and the longitudinal axis during measurement of the laser displacement sensor; the laser displacement sensor is controlled to move to a fourth position, and a fifth position where the vertical shaft is located and a target reading value of the laser displacement sensor are obtained; based on the fifth position, the target reading value and the target measurement gap, determining a vertical axis position during measurement of the three-dimensional magnetic field camera; based on the first position, the second position and the third position, horizontal axis and longitudinal axis positions during measurement of the three-dimensional magnetic field camera are determined; and acquiring target magnetic flux data at the horizontal axis position, the longitudinal axis position and the vertical axis position. According to the invention, the detection efficiency and detection precision of the magnetic flux can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of magnetic flux detection, and in particular, to a magnetic flux detection method and device. Background Art

[0002] In recent years, magnets have been increasingly used in mobile phones, computers, tablets, new energy vehicles, etc. Parameters such as the magnetic flux intensity and the magnetic pole position of the magnet directly affect the user experience of the product, and some even directly affect the operating efficiency of the product.

[0003] In the related art, the magnetic flux is usually detected by a magnetic flux measurement sensor with a single-point design. However, the related art can only obtain the magnetic flux value at one point. By combining with motion control, the magnetic flux values on a line can be obtained, but the magnetic flux values of all points within the field of view cannot be measured, which makes the magnetic flux detection method have certain limitations. In addition, the magnetic flux is detected by a magnetic flux measurement sensor with a single-point design in the related art, resulting in low measurement accuracy and detection efficiency of the magnetic flux. Summary of the Invention

[0004] To solve the above problems, the present invention provides a magnetic flux detection method and device.

[0005] On the one hand, the present invention provides a magnetic flux detection method, which is applied to a detection device. The detection device includes a vision system, a three-dimensional magnetic field camera, a laser displacement sensor, a horizontal axis, a vertical axis, and a longitudinal axis. A product to be measured is fixed on the detection device. The magnetic flux detection method includes: Obtaining a reference point of the product to be measured based on the vision system; determining a first position of a target magnet relative to the reference point in the product to be measured, a second position where the horizontal and vertical axes are located during the measurement by the vision system, and a third position of the magnet center of the target magnet relative to the reference point in the vision system; Determining a fourth position where the horizontal and vertical axes are located during the measurement by the laser displacement sensor based on a first position relationship between the laser and the vision, the first position, the second position, and the third position; Controlling the laser displacement sensor to move to the fourth position, obtaining a fifth position where the longitudinal axis is located and a target reading value of the laser displacement sensor; Determining the vertical axis position during the measurement by the three-dimensional magnetic field camera based on a second position relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading value, and a target measurement gap; Determining the horizontal and vertical axis positions during the measurement by the three-dimensional magnetic field camera based on a third position relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position, and the third position; Control the three-dimensional magnetic field camera to obtain target magnetic flux data at the horizontal axis and vertical axis positions and the vertical axis position.

[0006] In an optional embodiment, based on the first positional relationship between the laser and the vision, the first position, the second position, and the third position, determining the fourth position where the horizontal axis and the vertical axis are located when the laser displacement sensor measures includes: Obtain the pre-calibrated first positional relationship; the first positional relationship is used to characterize the corresponding relationship between the sum of the first positions and the sum of the second positions. The sum of the first positions is the sum of the position where the horizontal axis and the vertical axis are located when the laser displacement sensor measures and the first fixed deviation, and the sum of the second positions is the sum of the position where the horizontal axis and the vertical axis are located when the vision system measures and the position of the magnet center in the vision system; Based on the first positional relationship, determine that the fourth position is the difference between the first target position and the first fixed deviation; Wherein, the first target position is determined based on the first position, the second position, and the third position.

[0007] In an optional embodiment, based on the second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap, determining the vertical axis position when the three-dimensional magnetic field camera measures includes: Obtain the pre-calibrated second positional relationship; the second positional relationship is used to characterize the corresponding relationship between the sum of the third positions and the sum of the fourth positions. The sum of the third positions is the sum of the vertical axis position, the measurement gap, and the second fixed deviation when the three-dimensional magnetic field camera measures, and the sum of the fourth positions is the sum of the position where the vertical axis is located when the laser displacement sensor measures and the reading of the laser displacement sensor; Based on the second positional relationship, determine that the vertical axis position when the three-dimensional magnetic field camera measures is equal to the difference between the second target position and the third target position; Wherein, the second target position is determined based on the fifth position and the target reading, and the third target position is determined based on the second fixed deviation and the target measurement gap.

[0008] In an optional embodiment, based on the third positional relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position, and the third position, determining the horizontal axis and vertical axis positions when the three-dimensional magnetic field camera measures includes: Obtain the pre-calibrated third position relationship; the third position relationship is used to characterize the correspondence between the sum of the fifth positions and the sum of the sixth positions. The sum of the fifth positions is the sum of the horizontal and vertical axis positions during the measurement of the three-dimensional magnetic field camera, the position of the magnet center in the three-dimensional magnetic field camera, and the third fixed deviation. The sum of the sixth positions is the sum of the horizontal and vertical axis positions during the measurement of the vision system and the position of the magnet center in the vision system; Based on the third position relationship, determine that the horizontal and vertical axis positions where the three-dimensional magnetic field camera performs measurement are the difference between the fourth target position and the fifth target position; Wherein, the fourth target position is determined based on the first position, the second position, and the third position, and the fifth target position is determined based on the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera.

[0009] In an optional embodiment, the method further includes: Calibrate the vision system; Control the vision system to move above the preset magnet, obtain the first preset position where the horizontal and vertical axes are located during the measurement of the vision system, and determine the second preset position of the magnet center of the preset magnet in the vision system; wherein, the preset magnet is fixed on the detection device; Control the laser displacement sensor to move to the central position of the preset magnet, obtain the third preset position where the horizontal and vertical axes are located during the measurement of the laser displacement sensor, the fourth preset position where the vertical axis is located, and the preset reading value of the laser displacement sensor; Control the three-dimensional magnetic field camera to move above the preset magnet, obtain the fifth preset position where the horizontal and vertical axes are located during the measurement of the three-dimensional magnetic field camera, the sixth preset position where the vertical axis is located, and the preset measurement gap of the three-dimensional magnetic field camera; Based on the three-dimensional magnetic field camera, obtain the preset magnetic flux data, and determine the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Set the correspondence between the sum of the third preset position and the first fixed deviation and the sum of the first preset position and the second preset position to obtain the first position relationship; set the correspondence between the sixth preset position, the preset measurement gap, the sum of the second fixed deviation, and the sum of the fourth preset position and the preset reading value to obtain the second position relationship; set the correspondence between the fifth preset position, the seventh preset position, the sum of the third fixed deviation, and the sum of the first preset position and the second preset position to obtain the third position relationship.

[0010] In an alternative embodiment, the obtaining of the first positional relationship by setting the correspondence between the sum of the third preset position and the first fixed deviation and the sum of the first preset position and the second preset position includes: Setting the sum of the third preset position and the first fixed deviation to be equal to the sum of the first preset position and the second preset position to obtain the first positional relationship; The obtaining of the second positional relationship by setting the correspondence between the sum of the sixth preset position, the preset measurement gap, and the second fixed deviation and the sum of the fourth preset position and the preset reading includes: Setting the sum of the sixth preset position, the preset measurement gap, and the second fixed deviation to be equal to the sum of the fourth preset position and the preset reading to obtain the second positional relationship; The obtaining of the third positional relationship by setting the correspondence between the sum of the fifth preset position, the seventh preset position, and the third fixed deviation and the sum of the first preset position and the second preset position includes: Setting the sum of the fifth preset position, the seventh preset position, and the third fixed deviation to be equal to the sum of the first preset position and the second preset position to obtain the third positional relationship.

[0011] In an alternative embodiment, the determining of the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera includes: Determining the first initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Rotating the preset magnet by 90° and determining the second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Continuing to rotate the preset magnet by 90° and determining the third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Continuing to rotate the preset magnet by 90° and determining the fourth initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Determining the mean value of the first initial position, the second initial position, the third initial position, and the fourth initial position to obtain the seventh preset position.

[0012] In an alternative embodiment, after controlling the three-dimensional magnetic field camera to obtain target magnetic flux data at the horizontal axis and vertical axis positions and the vertical axis position, the method further includes: Converting the target magnetic flux data into a magnetic field heat map; Connecting the magnetic flux data that meets the preset conditions in the magnetic field heat map to obtain a connected domain; Take the magnetic flux data greater than the magnetic field data threshold in the connected domain as the magnetic field peak value, and take the average value of all magnetic flux data in the connected domain as the position data of the target magnet.

[0013] In an alternative embodiment, the method further includes: Obtain at least one scanning line segment passing through the target magnet on the magnetic field heat map; Obtain the magnetic flux data located on the at least one scanning line segment in the target magnetic flux data; Analyze the magnetic flux data located on the at least one scanning line segment to obtain the magnetic field peak value and the magnetic pole width of the at least one scanning line segment.

[0014] On the other hand, the present invention provides a magnetic flux detection device, which is applied to a detection device. The detection device includes a vision system, a three-dimensional magnetic field camera, a laser displacement sensor, a horizontal axis, a vertical axis, and a vertical axis. A product to be measured is fixed on the detection device. The magnetic flux detection device includes: A first determination module, configured to obtain a reference point of the product to be measured based on the vision system; determine a first position of the target magnet relative to the reference point in the product to be measured, a second position where the horizontal axis and the vertical axis are located during the measurement of the vision system, and a third position of the magnet center of the target magnet relative to the reference point in the vision system; A first laser positioning module, configured to determine a fourth position where the horizontal axis and the vertical axis are located during the measurement of the laser displacement sensor based on a first position relationship between the laser and the vision, the first position, the second position, and the third position; A second laser positioning module, configured to control the laser displacement sensor to move to the fourth position, and obtain a fifth position where the vertical axis is located and a target reading value of the laser displacement sensor; A first camera positioning module, configured to determine a vertical axis position during the measurement of the three-dimensional magnetic field camera based on a second position relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading value, and a target measurement gap; A second camera positioning module, configured to determine a horizontal axis and vertical axis position during the measurement of the three-dimensional magnetic field camera based on a third position relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position, and the third position; A magnetic flux acquisition module, configured to control the three-dimensional magnetic field camera to acquire target magnetic flux data at the horizontal axis and vertical axis positions and the vertical axis position.

[0015] In an alternative embodiment, the first laser positioning module includes: The first position relationship acquisition module is configured to acquire the pre-calibrated first position relationship; the first position relationship is used to characterize the corresponding relationship between the first position sum and the second position sum, where the first position sum is the sum of the positions of the horizontal and vertical axes during the measurement by the laser displacement sensor and the first fixed deviation, and the second position sum is the sum of the positions of the horizontal and vertical axes during the measurement by the vision system and the position of the magnet center in the vision system; The first difference determination module is configured to determine, based on the first position relationship, that the fourth position is the difference between the first target position and the first fixed deviation; wherein the first target position is determined based on the first position, the second position, and the third position.

[0016] In an alternative embodiment, the first camera positioning module includes: The second position relationship acquisition module is configured to acquire the pre-calibrated second position relationship; the second position relationship is used to characterize the corresponding relationship between the third position sum and the fourth position sum, where the third position sum is the sum of the vertical axis position, the measurement gap, and the second fixed deviation during the measurement by the three-dimensional magnetic field camera, and the fourth position sum is the sum of the vertical axis position during the measurement by the laser displacement sensor and the reading value of the laser displacement sensor; The second difference determination module is configured to determine, based on the second position relationship, that the vertical axis position during the measurement by the three-dimensional magnetic field camera is equal to the difference between the second target position and the third target position; wherein the second target position is determined based on the fifth position and the target reading value, and the third target position is determined based on the second fixed deviation and the target measurement gap.

[0017] In an alternative embodiment, the second camera positioning module includes: The third position relationship acquisition module is configured to acquire the pre-calibrated third position relationship; the third position relationship is used to characterize the corresponding relationship between the fifth position sum and the sixth position sum, where the fifth position sum is the sum of the horizontal and vertical axis positions during the measurement by the three-dimensional magnetic field camera, the position of the magnet center in the three-dimensional magnetic field camera, and the third fixed deviation, and the sixth position sum is the sum of the horizontal and vertical axis positions during the measurement by the vision system and the position of the magnet center in the vision system; The third difference determination module is configured to determine, based on the third position relationship, that the horizontal and vertical axis positions during the measurement by the three-dimensional magnetic field camera are the difference between the fourth target position and the fifth target position; Wherein, the fourth target position is determined based on the first position, the second position and the third position, and the fifth target position is determined based on the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera.

[0018] In an alternative embodiment, the device further includes: A vision system calibration module for calibrating the vision system; A first moving module for controlling the vision system to move above a preset magnet, obtaining a first preset position where the horizontal and vertical axes are located during the measurement of the vision system, and determining a second preset position of the magnet center of the preset magnet in the vision system; wherein, the preset magnet is fixed on the detection device; A second moving module for controlling the laser displacement sensor to move to the center position of the preset magnet, obtaining a third preset position where the horizontal and vertical axes are located during the measurement of the laser displacement sensor, a fourth preset position where the vertical axis is located, and a preset reading value of the laser displacement sensor; A third moving module for controlling the three-dimensional magnetic field camera to move above the preset magnet, obtaining a fifth preset position where the horizontal and vertical axes are located during the measurement of the three-dimensional magnetic field camera, a sixth preset position where the vertical axis is located, and a preset measurement gap of the three-dimensional magnetic field camera; A position determination module for obtaining preset magnetic flux data based on the three-dimensional magnetic field camera and determining a seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A position relationship determination module for setting the correspondence between the sum of the third preset position and the first fixed deviation and the sum of the first preset position and the second preset position to obtain the first position relationship; setting the correspondence between the sum of the sixth preset position, the preset measurement gap, the second fixed deviation and the sum of the fourth preset position and the preset reading value to obtain the second position relationship; setting the correspondence between the sum of the fifth preset position, the seventh preset position, the third fixed deviation and the sum of the first preset position and the second preset position to obtain the third position relationship.

[0019] In an alternative embodiment, the position relationship determination module includes: A first position relationship determination unit for setting the sum of the third preset position and the first fixed deviation to be equal to the sum of the first preset position and the second preset position to obtain the first position relationship; A second position relationship determination unit for setting the sum of the sixth preset position, the preset measurement gap, the second fixed deviation to be equal to the sum of the fourth preset position and the preset reading value to obtain the second position relationship; A third position relationship determining unit, configured to set the sum of the fifth preset position, the seventh preset position, and the third fixed deviation to be equal to the sum of the first preset position and the second preset position, so as to obtain the third position relationship.

[0020] In an optional embodiment, the position determining module includes: A first initial position determining unit, configured to determine a first initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A second initial position determining unit, configured to rotate the preset magnet by 90°, and determine a second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A third initial position determining unit, configured to continue to rotate the preset magnet by 90°, and determine a third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A fourth initial position determining unit, configured to continue to rotate the preset magnet by 90°, and determine a fourth initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A seventh preset position determining unit, configured to determine the average value of the first initial position, the second initial position, the third initial position, and the fourth initial position, so as to obtain the seventh preset position.

[0021] In an optional embodiment, the device further includes: A conversion module, configured to convert the target magnetic flux data into a magnetic field thermal map; A connected domain determining module, configured to connect the magnetic flux data in the magnetic field thermal map that meets a preset condition, so as to obtain a connected domain; A peak position determining module, configured to use the magnetic flux data greater than the magnetic field data threshold in the connected domain as a magnetic field peak, and use the average value of all magnetic flux data in the connected domain as the position data of the target magnet.

[0022] In an optional embodiment, the device further includes: A scanning line segment generating module, configured to obtain at least one scanning line segment passing through the target magnet on the magnetic field thermal map; A scanning line segment data obtaining module, configured to obtain the magnetic flux data located on the at least one scanning line segment in the target magnetic flux data; A peak width determining module, configured to analyze the magnetic flux data located on the at least one scanning line segment, so as to obtain the magnetic field peak and the magnetic pole width of the at least one scanning line segment.

[0023] On the other hand, an electronic device is provided, which includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement the magnetic flux detection method as described above.

[0024] On the other hand, a computer storage medium is provided. The computer storage medium stores at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the magnetic flux detection method as described above.

[0025] On the other hand, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device executes to implement the magnetic flux detection method as described above.

[0026] The magnetic flux detection method and device provided by the present invention have the following technical effects: Based on the first positional relationship between a pre-set laser displacement sensor and a vision system, the first position of the magnet center of the target magnet in the product to be measured, the second position where the horizontal and vertical axes are located during the measurement of the vision system, and the third position of the target magnet in the vision system, the present invention determines the fourth position where the horizontal and vertical axes are located during the measurement of the laser displacement sensor, moves the laser displacement sensor to the fourth position, and obtains the fifth position where the vertical axis is located and the target reading value of the laser displacement sensor; then, based on the second positional relationship between a pre-calibrated three-dimensional magnetic field camera and the laser displacement sensor, the fifth position, the target reading value, and the target measurement gap, the present invention determines the vertical axis position during the measurement of the three-dimensional magnetic field camera, thereby positioning the measurement height of the three-dimensional magnetic field camera through the laser position. Then, based on the third positional relationship between the pre-calibrated three-dimensional magnetic field camera and the vision system, the first position, the second position, and the third position, the present invention determines the horizontal and vertical axis positions during the measurement of the three-dimensional magnetic field camera, thereby realizing the positioning of the measurement position of the three-dimensional magnetic field camera through the vision system, and further enabling the three-dimensional magnetic field camera to collect magnetic flux data of all points within the field of view at one time, improving the measurement efficiency of the magnetic flux; in addition, since the detection of the magnetic flux data is performed using the pre-calibrated first positional relationship, second positional relationship, and third positional relationship, the detection accuracy of the magnetic flux data can be improved. Description of the Drawings

[0027] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application, and do not constitute an improper limitation to the present application.

[0028] To more clearly illustrate the technical solutions and advantages in the embodiments of this specification or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0029] Figure 1 It is a schematic structural diagram of a detection device provided by an embodiment of the present application.

[0030] Figure 2 It is a schematic flowchart of a magnetic flux detection method provided by an embodiment of the present application.

[0031] Figure 3 It is a schematic flowchart of a calibration process provided by an embodiment of the present application.

[0032] Figure 4 It is a schematic flowchart of a process for determining the fourth position of the horizontal and vertical axes during the measurement of a laser displacement sensor provided by an embodiment of the present application.

[0033] Figure 5 It is a schematic flowchart of a process for determining the vertical axis position during the measurement of a three-dimensional magnetic field camera provided by an embodiment of the present application.

[0034] Figure 6 It is a schematic flowchart of a process for determining the horizontal and vertical axis positions during the measurement of a three-dimensional magnetic field camera provided by an embodiment of the present application.

[0035] Figure 7 It is a structural block diagram of a magnetic flux detection device provided by an embodiment of the present application.

[0036] Among them, the reference numerals in the figure are as follows: 1 - Vision system, 2 - Three-dimensional magnetic field camera, 3 - Laser displacement sensor, 4 - Horizontal axis, 5 - Vertical axis, 6 - Vertical axis. Detailed implementation manners

[0037] The following will clearly and completely describe the technical solutions in the embodiments of this specification with reference to the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0038] It should be noted that the terms "first", "second", etc. in the description, claims and the above drawings of the present invention are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0039] Please refer to Figure 1 , Figure 1 which is a schematic structural diagram of a detection device provided by an embodiment of the present application. As Figure 1 shown, the detection device may at least include a vision system 1, a three-dimensional magnetic field camera 2, a laser displacement sensor 3, a horizontal axis (X-axis) 4, a vertical axis (Y-axis) 5, and a vertical axis (Z-axis) 6. Among them, the vision system 1 may be a CCD vision system.

[0040] It should be noted that the embodiment of the present application does not limit the positional relationship among the vision system 1, the three-dimensional magnetic field camera 2, the laser displacement sensor 3, the horizontal axis 4, the vertical axis 5, and the vertical axis 6, as long as it can fix the product to be measured and the preset magnet, move the vision system 1 above the magnet, move the laser displacement sensor 3 above the magnet, and move the three-dimensional magnetic field camera 2 above the magnet, so as to measure the target magnetic flux data.

[0041] For example, continuing as Figure 1 shown, the vision system 1 is arranged above the three-dimensional magnetic field camera 2 and the laser displacement sensor 3, and the laser displacement sensor 3 is arranged on the side of the three-dimensional magnetic field camera 2.

[0042] The magnetic flux detection method provided by the embodiment of the present application includes a calibration process and a measurement process. In the calibration process, the preset magnet is fixed on the detection device. In the measurement process, the product to be measured is fixed on the detection device, and the fixed position of the product to be measured on the detection device is the same as the fixed position of the preset magnet on the detection device.

[0043] The following introduces a magnetic flux detection method of the present invention. Figure 2It is a schematic flowchart of a magnetic flux detection method provided by an embodiment of the present application. This specification provides the method operation steps as described in the embodiment or flowchart, but based on routine or non-creative labor, it may include more or fewer operation steps. The step sequence listed in the embodiment is only one of the execution sequences of numerous steps and does not represent the only execution sequence. When the actual system or server product is executed, it can be executed in the method sequence shown in the embodiment or the accompanying drawings or executed in parallel (for example, in an environment of parallel processors or multi-threaded processing). Specifically, as Figure 2 shown, the method may include: S101. Obtain the reference point of the product to be measured based on the vision system; determine the first position of the target magnet relative to the reference point in the product to be measured, the second position where the horizontal and vertical axes are located during the measurement by the vision system, and the third position of the magnet center of the target magnet relative to the reference point in the vision system.

[0044] In the embodiment of the present application, during the actual measurement of the magnetic flux data of the product to be measured, the product to be measured can be fixed on the detection device, and the vision system can be controlled to move above the product to be measured, and the reference point of the product to be measured can be photographed through the vision system. Among them, the reference point of the product to be measured usually refers to the core reference origin for positioning, measuring, and dimensioning in product design and manufacturing in the engineering drawing, which is equivalent to the "zero point" in the three-dimensional coordinate system.

[0045] Since the reference point can be considered as the "zero point" of the three-dimensional coordinate system, the first position PM(Mx1, My1) of the target magnet in the product to be measured relative to the reference point can be obtained. At the same time, the second position PV1(VX1, VY1) where the horizontal and vertical axes are located when the vision system is positioned can be recorded, where VX1 refers to the position of the horizontal axis located by the vision system, and VY1 refers to the position of the vertical axis located by the vision system. In addition. After determining the reference point, the third position PV2(VX2, VY2) of the target magnet relative to the reference point in the vision system can be determined with the reference point as the reference point.

[0046] Optionally, the process of determining the third position of the magnet center of the target magnet relative to the reference point in the vision system can be: photograph an image of the target magnet through the vision system, crop the magnet area from the image, determine the centroid of the magnet area, and use the position of the centroid relative to the reference point as the third position of the magnet center relative to the reference point in the vision system.

[0047] S103. Determine the fourth position where the horizontal and vertical axes are located when the laser displacement sensor measures based on the first position relationship between the laser and the vision, the first position, the second position, and the third position.

[0048] S105. Control the laser displacement sensor to move to the fourth position, and obtain the fifth position where the vertical axis is located and the target reading value of the laser displacement sensor.

[0049] In the embodiments of the present application, the first positional relationship between the laser displacement sensor and the vision system can be pre-calibrated. Since the second position and the third position are both features associated with the vision system, and the first position is the position of the target magnet relative to the reference point in the product to be measured, therefore, according to the pre-calibrated first positional relationship, combined with the first position, the second position, and the third position, the fourth position (LX1, LY1) where the horizontal axis and the vertical axis are located during the measurement of the laser displacement sensor can be accurately determined. LX1 refers to the position of the horizontal axis during the measurement of the laser displacement sensor, and LY1 refers to the position of the vertical axis during the measurement of the laser displacement sensor. Among them, the fourth position where the horizontal axis and the vertical axis are located during the measurement of the laser displacement sensor can refer to: the positions of the horizontal axis and the vertical axis located by the laser displacement sensor during operation.

[0050] After determining the working position of the laser displacement sensor, the laser displacement sensor can be moved to the fourth position. Since the laser displacement sensor can locate the measurement height (i.e., the vertical axis position) of the three-dimensional magnetic field camera, after moving the laser displacement sensor to the fourth position, the fifth position (LZ1) where the current vertical axis is located can be located, and at the same time, the target reading value (LV1) of the laser displacement sensor is read. Among them, the target reading value can include the distance from the upper surface of the target magnet to the light outlet of the laser displacement sensor.

[0051] S107. Based on the second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading value, and the target measurement gap, determine the vertical axis position during the measurement of the three-dimensional magnetic field camera.

[0052] Among them, the target measurement gap (SG) is a preset value, which refers to the distance from the upper surface of the target magnet to the measurement surface of the three-dimensional magnetic field camera.

[0053] In the embodiments of the present application, the second positional relationship between the three-dimensional magnetic field camera and the laser displacement sensor can be pre-calibrated. Since the fifth position, the target reading value, and the target measurement gap are all features associated with the laser displacement sensor, therefore, according to the second positional relationship and the above-mentioned features associated with the laser displacement sensor, the position of the three-dimensional magnetic field camera can be determined. Also, since the laser displacement sensor can locate the measurement height (i.e., the vertical axis position) of the three-dimensional magnetic field camera, therefore, according to the second positional relationship and the above-mentioned features associated with the laser displacement sensor, the vertical axis position during the measurement of the three-dimensional magnetic field camera, that is, the vertical axis position (SZ) where the three-dimensional magnetic field camera is located during operation, can be obtained quickly and accurately.

[0054] S109. Determine the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement based on the third positional relationship between the three-dimensional magnetic field camera and vision, and the first, second, and third positions.

[0055] In the embodiments of the present application, the third positional relationship between the three-dimensional magnetic field camera and the vision system can also be pre-calibrated. Since the first, second, and third positions are all parameters associated with the vision system, therefore, based on this third positional relationship and the above-mentioned parameters associated with the vision system, the position of the three-dimensional magnetic field camera during measurement can be obtained quickly and accurately. Also, since the vision system can locate the measurement position of the three-dimensional magnetic field camera, therefore, based on this third positional relationship and the above-mentioned parameters associated with the vision system, the horizontal axis position and the vertical axis position of the three-dimensional magnetic field camera during measurement can be obtained quickly and accurately.

[0056] S1011. Control the three-dimensional magnetic field camera to obtain target magnetic flux data at the horizontal and vertical axis positions and the vertical axis position.

[0057] In the embodiments of the present application, after obtaining the horizontal and vertical axis positions and the vertical axis position where the three-dimensional magnetic field camera is located during measurement, the three-dimensional magnetic field camera can be moved to the position where these horizontal and vertical axis positions and the vertical axis position are located, and the three-dimensional magnetic field camera is controlled to obtain target magnetic flux data at this position.

[0058] It should be noted that for different target magnets, the above steps S101 - S1011 can be executed, so that the target magnetic flux data corresponding to different target magnets can be obtained.

[0059] In the embodiments of the present application, through the above solution, the measurement position of the three-dimensional magnetic field camera is located by the vision system, and the height of the three-dimensional magnetic field camera is located by the laser displacement sensor. Furthermore, the three-dimensional magnetic field camera can collect the magnetic flux data (Bx, By, Bz) of all points within the field of view at one time, and the X and Y intervals of each collection point are known, improving the measurement efficiency of the magnetic flux. In addition, since the detection of the magnetic flux data is performed using the pre-calibrated first, second, and third positional relationships, the detection accuracy of the magnetic flux data can be improved.

[0060] First, the calibration processes of the above first, second, and third positional relationships are described. Figure 3 It is a schematic flowchart of a calibration process provided by the embodiments of the present application. As Figure 3 shown, this calibration process includes: S201. Calibrate the vision system.

[0061] Optionally, the motion axes (horizontal axis, vertical axis, and vertical axis) can be moved by 9 points through the 9-point calibration algorithm for visual calibration. Among them, the 9-point calibration algorithm calibrates the internal and external parameters of the vision system through a set of known points, that is, determines the rotation and translation matrices of the vision system. Specifically, 9 non-collinear points can be taken on a plane, and a linear equation system containing multiple unknowns is established using the mapping relationship between the projected points of these 9 points visually and the actual world coordinates, and then this equation system is solved to obtain the rotation and translation matrices of the vision system.

[0062] S203. Control the vision system to move above the preset magnet, obtain the first preset position where the horizontal and vertical axes are located during the measurement of the vision system, and determine the second preset position of the magnet center of the preset magnet in the vision system; wherein, the preset magnet is fixed on the detection device.

[0063] In the embodiments of the present application, a square preset magnet with axial magnetization and uniform magnetic flux distribution can be taken, and this preset magnet is fixed on the detection device to calibrate the positions of the vision system, laser displacement sensor, and three-dimensional magnetic field camera with this preset magnet. It should be noted that the position of this preset magnet on the detection device is the same as the position on the detection device during the measurement of the target magnet.

[0064] Next, control the vision system to move above this preset magnet, record the first preset position Pv1(Vx1, Vy1) where the horizontal and vertical axes are located when the vision system performs measurement, and at the same time calculate the second preset position Pv2(Vx2, Vy2) of the magnet center of the preset magnet in the vision system.

[0065] Optionally, calculating the second preset position of the magnet center of the preset magnet in the vision system may include: taking a picture of the preset magnet through the vision system, cropping out the magnet area from this picture, determining the centroid of this magnet area, and taking this centroid as the second preset position of the magnet center of the preset magnet in the vision system.

[0066] S205. Control the laser displacement sensor to move to the center position of the preset magnet, obtain the third preset position where the horizontal and vertical axes are located when the laser displacement sensor measures, the fourth preset position where the vertical axis is located, and the preset reading value of the laser displacement sensor.

[0067] Next, control the laser displacement sensor to move to the center position of this preset magnet, record the third preset position Pl1(Lx1, Ly1) where the horizontal and vertical axes are located when the laser position sensor measures at this time, the fourth preset position (Lz1) where the vertical axis is located, and the preset reading value Lv1 of the laser displacement sensor.

[0068] Among them, the preset reading value of the laser displacement sensor may include: the distance from the upper surface of the preset magnet to the light outlet of the laser displacement sensor.

[0069] S207. Control the three-dimensional magnetic field camera to move above the preset magnet, and obtain the fifth preset position where the horizontal axis and the vertical axis are located during the measurement of the three-dimensional magnetic field camera, the sixth preset position where the vertical axis is located, and the preset measurement gap of the three-dimensional magnetic field camera.

[0070] In the embodiment of the present application, the three-dimensional magnetic field camera can be moved above the preset magnet, and the fifth preset position Ps1(Sx1, Sy1) where the horizontal axis and the vertical axis are located during the operation of the three-dimensional magnetic field camera, the sixth preset position (Sz) where the vertical axis is located, and the current preset measurement gap (Sg) of the three-dimensional magnetic field camera are recorded. Among them, the preset measurement gap refers to: the distance from the upper surface of the preset magnet to the measurement surface of the three-dimensional magnetic field camera.

[0071] S209. Obtain the preset magnetic flux data based on the three-dimensional magnetic field camera, and determine the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.

[0072] In the embodiment of the present application, the three-dimensional magnetic field camera can be controlled to read the current preset magnetic flux data, and the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera is calculated. Among them, calculating the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera may include: taking a picture of the preset magnet through the three-dimensional magnetic field camera, cropping out the magnet area from the picture, determining the centroid of the magnet area, and taking the centroid as the seventh preset position Pv(Sx, Sy) of the magnet center of the preset magnet in the three-dimensional magnetic field camera.

[0073] S2011. Set the corresponding relationship between the sum of the third preset position and the first fixed deviation and the sum of the first preset position and the second preset position to obtain the first position relationship; set the corresponding relationship between the sum of the sixth preset position, the preset measurement gap, the second fixed deviation, and the sum of the fourth preset position and the preset reading value to obtain the second position relationship; set the corresponding relationship between the sum of the fifth preset position, the seventh preset position, the third fixed deviation, and the sum of the first preset position and the second preset position to obtain the third position relationship.

[0074] Optionally, for the first positional relationship: The corresponding relationship between the sum of the third preset position and the first fixed deviation and the sum of the first preset position and the second preset position can be set to obtain the first positional relationship. Since the first preset position includes the horizontal axis and vertical axis positions, the second preset position also includes the horizontal axis and vertical axis positions, and the third preset position also includes the horizontal axis and vertical axis positions, the sum of the horizontal axis position (Lx1) in the third preset position and the first fixed deviation corresponding to the horizontal axis ( ), and the sum of the horizontal axis position (Vx1) in the first preset position and the horizontal axis position (Vx2) in the second preset position can be set to obtain the first positional relationship corresponding to the horizontal axis; the sum of the vertical axis position (Ly1) in the third preset position and the first fixed deviation corresponding to the vertical axis ( ), and the sum of the vertical axis position (Vy1) in the first preset position and the vertical axis position (Vy2) in the second preset position can be set to obtain the first positional relationship corresponding to the vertical axis.

[0075] In one embodiment, the sum of the third preset position and the first fixed deviation can be set to be equal to the sum of the first preset position and the second preset position to obtain the first positional relationship. Since the first preset position includes the horizontal axis and vertical axis positions, the second preset position also includes the horizontal axis and vertical axis positions, and the third preset position also includes the horizontal axis and vertical axis positions, the sum of the horizontal axis position in the third preset position and the first fixed deviation corresponding to the horizontal axis ( ), and the sum of the horizontal axis position in the first preset position and the horizontal axis position in the second preset position can be set to be equal to obtain the first positional relationship corresponding to the horizontal axis; the sum of the vertical axis position in the third preset position and the first fixed deviation corresponding to the vertical axis ( ), and the sum of the vertical axis position in the first preset position and the vertical axis position in the second preset position can be set to be equal to obtain the first positional relationship corresponding to the vertical axis. Specifically, the first positional relationship can be as follows: Lx1 + = Vx1 + Vx2; Ly1 + = Vy1 + Vy2.

[0076] In other embodiments, a weight can also be set for the sum of the horizontal axis position in the third preset position and the first fixed deviation corresponding to the horizontal axis ( ), the product of the weight and the sum is calculated to obtain the first product, a weight is set for the sum of the horizontal axis position in the first preset position and the horizontal axis position in the second preset position, the product of the weight and the sum is calculated to obtain the second product, and the first product is set to be equal to the second product to obtain the first positional relationship. At the same time, for the sum of the vertical axis position in the third preset position and the first fixed deviation corresponding to the vertical axis ( Set a weight for the sum, calculate the product of the weight and the sum to obtain a third product. Set a weight for the sum of the vertical axis position in the first preset position and the vertical axis position in the second preset position, calculate the product of the weight and the sum to obtain a fourth product, set the third product equal to the fourth product, and obtain the first position relationship corresponding to the vertical axis.

[0077] Optionally, for the second position relationship: The sum of the sixth preset position (Sz), the preset measurement gap (Sg), and the second fixed deviation ( ), and the sum of the fourth preset position (Lz1) and the preset reading value (Lv1) can be set to obtain the second position relationship. In one implementation, the sum of the sixth preset position (Sz), the preset measurement gap (Sg), and the second fixed deviation ( ), can be set equal to the sum of the fourth preset position (Lz1) and the preset reading value (Lv1) to obtain the second position relationship. The specific calculation formula can be as follows: Sz + Sg + = Lz1 + Lv1.

[0078] In another implementation, a weight can be set for the sum of the sixth preset position (Sz), the preset measurement gap (Sg), and the second fixed deviation ( ), calculate the product of the weight and the sum to obtain a fifth product; a weight can be set for the sum of the fourth preset position (Lz1) and the preset reading value (Lv1), calculate the product of the weight and the sum to obtain a sixth product, set the fifth product equal to the sixth product, and obtain the second position relationship.

[0079] Optionally, for the third position relationship: The sum of the fifth preset position Ps1(Sx1,Sy1), the seventh preset position Pv(Sx,Sy), and the third fixed deviation, and the sum of the first preset position Pv1(Vx1,Vy1) and the second preset position Pv2(Vx2,Vy2) can be set to obtain the third position relationship.

[0080] Since the fifth preset position, the seventh preset position, the first preset position, and the second preset position all include horizontal and vertical axis positions, the sum of the horizontal axis position in the fifth preset position, the horizontal axis position in the seventh preset position, and the third fixed deviation corresponding to the horizontal axis ( ), and the sum of the horizontal axis position in the first preset position and the horizontal axis position in the second preset position can be set to obtain the third position relationship corresponding to the horizontal axis; the sum of the vertical axis position in the fifth preset position, the vertical axis position in the seventh preset position, and the third fixed deviation corresponding to the vertical axis ( The correspondence relationship between the sum of the vertical axis positions in the first preset position and the sum of the vertical axis positions in the second preset position, to obtain the third position relationship corresponding to the vertical axis.

[0081] In one embodiment, it can be set that the sum of the fifth preset position Ps1(Sx1,Sy1), the seventh preset position Pv(Sx,Sy) and the third fixed deviation is equal to the sum of the first preset position Pv1(Vx1,Vy1) and the second preset position Pv2(Vx2,Vy2). Since the fifth preset position, the seventh preset position, the first preset position, and the second preset position all include the horizontal axis and vertical axis positions, it can be set that the sum of the horizontal axis position in the fifth preset position, the horizontal axis position in the seventh preset position and the third fixed deviation corresponding to the horizontal axis ( ), is equal to the sum of the horizontal axis position in the first preset position and the horizontal axis position in the second preset position, to obtain the third position relationship corresponding to the horizontal axis; and set the sum of the vertical axis position in the fifth preset position, the vertical axis position in the seventh preset position and the third fixed deviation corresponding to the vertical axis ( ), is equal to the sum of the vertical axis position in the first preset position and the vertical axis position in the second preset position, to obtain the third position relationship corresponding to the vertical axis. Correspondingly, the third position relationship can be as follows: Sx1 + Sx + = Vx1 + Vx2; Sy1 + Sy + = Vy1 + Vy2.

[0082] In other embodiments, a weight can also be set for the sum of the horizontal axis position in the fifth preset position, the horizontal axis position in the seventh preset position and the third fixed deviation corresponding to the horizontal axis ( ), calculate the product of the weight and the sum to obtain the seventh product, set a weight for the sum of the horizontal axis position in the first preset position and the horizontal axis position in the second preset position, calculate the product of the weight and the sum to obtain the eighth product, set the seventh product equal to the eighth product, to obtain the third position relationship. At the same time, set a weight for the sum of the vertical axis position in the fifth preset position, the vertical axis position in the seventh preset position and the third fixed deviation corresponding to the vertical axis ( ), calculate the product of the weight and the sum to obtain the ninth product, set a weight for the sum of the vertical axis position in the first preset position and the vertical axis position in the second preset position, calculate the product of the weight and the sum to obtain the tenth product, set the ninth product equal to the tenth product, to obtain the third position relationship corresponding to the vertical axis.

[0083] In the calibration process of the embodiments of the present application, the first positional relationship, the second positional relationship, and the third positional relationship are accurately calibrated in advance, so that in the subsequent measurement process, based on these three positional relationships, the measurement position and the measurement height of the three-dimensional magnetic field camera can be accurately located, enabling the calibrated three-dimensional magnetic field camera to collect the magnetic flux data of all points within the field of view at one time during the measurement process, improving the measurement efficiency and detection accuracy of the magnetic flux. In addition, setting the sum of the third preset position and the first fixed deviation to be equal to the sum of the first preset position and the second preset position can improve the calibration accuracy of the first positional relationship. Setting the sum of the sixth preset position, the preset measurement gap, and the second fixed deviation to be equal to the sum of the fourth preset position and the preset reading value can improve the calibration accuracy of the second positional relationship. Setting the sum of the fifth preset position, the seventh preset position, and the third fixed deviation to be equal to the sum of the first preset position and the second preset position can improve the calibration accuracy of the third positional relationship.

[0084] In an alternative embodiment, in step S209 above, obtaining the preset magnetic flux data based on the three-dimensional magnetic field camera and determining the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera includes: Determine the first initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.

[0085] Rotate the preset magnet by 90°, and determine the second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.

[0086] Continue to rotate the preset magnet by 90°, and determine the third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.

[0087] Continue to rotate the preset magnet by 90°, and determine the fourth initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.

[0088] Determine the mean value of the first initial position, the second initial position, the third initial position, and the fourth initial position to obtain the seventh preset position.

[0089] In the embodiments of the present application, the first initial position Pv1 (SVx1, SVy1) of the magnet center of the preset magnet in the three-dimensional magnetic field camera can be calculated first. Rotate the preset magnet by 90°, and then determine the second initial position Pv2 (SVx2, SVy2) of the magnet center of the preset magnet in the three-dimensional magnetic field camera. Continue to rotate the magnet by 90°, and then determine the third initial position Pv3 (SVx3, SVy3) of the magnet center of the preset magnet in the three-dimensional magnetic field camera. Continue to rotate the magnet by 90°, and determine the fourth initial position Pv4 (SVx4, SVy4) of the magnet center of the preset magnet in the three-dimensional magnetic field camera. Finally, calculate the average value or weighted average value of the first initial position, the second initial position, the third initial position, and the fourth initial position to obtain the seventh preset position Pv(Sx, Sy). Taking the calculation of the average value as an example, the calculation formula can be as follows: Pv(Sx,Sy) = ((SVx1 + SVx2 + SVx3 + SVx4) / 4,(SVy1 + SVy2+ SVy3 +SVy4) / 4).

[0090] Optionally, determining the first initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera may include: taking an image of the preset magnet through the three-dimensional magnetic field camera, cropping out the magnet area from the image, determining the centroid of the magnet area, and taking the centroid as the first initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera. The calculation methods of the second initial position, the third initial position, and the fourth initial position are the same as that of the first initial position.

[0091] Since the preset magnet is axially magnetized, but there may be slight deviations during magnetization. By rotating 90 degrees in the above manner to obtain four initial positions and taking the average value of the four initial positions, the seventh preset position can be obtained. Thereby, the determination accuracy of the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera can be improved, so as to improve the calibration accuracy, and further improve the magnetic flux detection accuracy.

[0092] It should be noted that the above step S103 can be implemented in various ways, and no specific limitation is made thereto.

[0093] Figure 4 is a schematic flowchart of a process for determining the fourth position of the horizontal and vertical axes during the measurement of the laser displacement sensor provided by the embodiments of the present application. As Figure 4 shown, in one implementation, based on the first position relationship between the laser and the vision, the first position, the second position, and the third position, determining the fourth position of the horizontal and vertical axes during the measurement of the laser displacement sensor may include: S1031. Obtain the pre-calibrated first position relationship; the first position relationship is used to characterize the correspondence between the first position sum and the second position sum, where the first position sum is the sum of the positions of the horizontal and vertical axes during the measurement by the laser displacement sensor and the first fixed deviation, and the second position sum is the sum of the positions of the horizontal and vertical axes during the measurement by the vision system and the position of the magnet center in the vision system.

[0094] S1033. Based on the first position relationship, determine the fourth position as the difference between the first target position and the first fixed deviation; wherein, the first target position is determined based on the first position, the second position, and the third position.

[0095] In this embodiment, the pre-calibrated first position relationship can be obtained. The first position relationship is used to characterize the correspondence between the first position sum and the second position sum. The first position sum is the sum of the positions of the horizontal and vertical axes during the measurement by the laser displacement sensor and the first fixed deviation, and the second position sum is the sum of the positions of the horizontal and vertical axes during the measurement by the vision system and the position of the magnet center in the vision system. More specifically, the first position relationship can be used to characterize that the first position sum is equal to the second position sum.

[0096] According to the first position relationship, the fourth position (LX1, LY1) can be determined as the difference between the first target position and the first fixed deviation. In one way, the first target position is the sum of the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2). In other ways, the first target position can be obtained by assigning different weights to the first position, the second position, and the third position.

[0097] Taking the first target position as the sum of the first position, the second position, and the third position as an example, the horizontal axis position in the fourth position (LX1, LY1) can be the difference between the sum of the horizontal axis positions of the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2), and the first fixed deviation of the horizontal axis ( ) The vertical axis position in the fourth position (LX1, LY1) can be the difference between the sum of the vertical axis positions of the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2), and the first fixed deviation of the vertical axis ( ). The specific calculation formula can be as follows: LX1 = VX1 + VX2 - + Mx1; LY1 = VY1 + VY2 - + My1。

[0098] Since the first position relationship is used to characterize the correspondence between the sum of the positions of the horizontal and vertical axes during the measurement of the laser displacement sensor and the first fixed deviation, and the sum of the positions of the horizontal and vertical axes during the measurement of the vision system and the position of the magnet center in the vision system, and since the second position and the third position are both features associated with the vision system, and the first position is the position of the target magnet relative to the reference point in the product to be measured, therefore, according to the pre-calibrated first position relationship, combined with the first position, the second position, and the third position, the fourth position of the horizontal and vertical axes during the measurement of the laser displacement sensor can be accurately determined, improving the determination accuracy of the position during the measurement of the laser displacement sensor, thereby improving the position determination accuracy during the measurement of the three-dimensional magnetic field camera, and further improving the detection accuracy of the target magnetic flux data.

[0099] It should be noted that the above step S107 can be implemented in various ways, and no specific limitation is made thereto.

[0100] Figure 5 is a schematic flowchart of a process for determining the vertical axis position during the measurement of a three-dimensional magnetic field camera provided by an embodiment of the present application. As Figure 5 shown, in an alternative embodiment, in the above step S107, the determining the vertical axis position during the measurement of the three-dimensional magnetic field camera based on the second position relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap includes: S1071. Obtain the pre-calibrated second position relationship; the second position relationship is used to characterize the correspondence between the sum of the third positions and the sum of the fourth positions, and the sum of the third positions is the sum of the vertical axis position, the measurement gap, and the second fixed deviation during the measurement of the three-dimensional magnetic field camera, and the sum of the fourth positions is the sum of the position of the vertical axis where the laser displacement sensor performs the measurement and the reading of the laser displacement sensor.

[0101] S1073. Based on the second position relationship, determine that the vertical axis position during the measurement of the three-dimensional magnetic field camera is equal to the difference between the second target position and the third target position; wherein, the second target position is determined based on the fifth position and the target reading, and the third target position is determined based on the second fixed deviation and the target measurement gap.

[0102] In this embodiment, the pre-calibrated second position relationship can be obtained, and the second position relationship is used to characterize the correspondence between the sum of the third positions and the sum of the fourth positions. More specifically, the second position relationship can be that the sum of the third positions is equal to the sum of the fourth positions.

[0103] According to this second positional relationship, it can be determined that the vertical axis position (SZ) during the measurement by the three-dimensional magnetic field camera is equal to the difference between the second target position and the third target position. The second target position is determined based on the fifth position (LZ1) and the target reading (LV1), and the third target position is determined based on the second fixed deviation ( ), and the target measurement gap (SG). In one way, the second target position is the sum of the fifth position (LZ1) and the target reading (LV1), and the third target position is the sum of the second fixed deviation ( ), and the target measurement gap (SG). In other ways, the second target position can be obtained by assigning different weights to the fifth position (LZ1) and the target reading (LV1), and the third target position can be obtained by assigning different weights to the second fixed deviation ( ), and the target measurement gap (SG).

[0104] Taking the second target position as the sum of the fifth position (LZ1) and the target reading (LV1), and the third target position as the sum of the second fixed deviation ( ), and the target measurement gap (SG) as an example, the vertical axis position (SZ) during the measurement by the three-dimensional magnetic field camera can be the difference between the sum of the fifth position (LZ1) and the target reading (LV1), and the sum of the second fixed deviation ( ), and the target measurement gap (SG). The specific calculation formula can be as follows: SZ = LZ1 + LV1 - - SG.

[0105] Since the second positional relationship is used to characterize the corresponding relationship between the sum of the third positions and the sum of the fourth positions, and since the fifth position, the target reading, and the target measurement gap are all characteristics associated with the laser displacement sensor, based on the second positional relationship and the above-mentioned characteristics associated with the laser displacement sensor, the vertical axis position during the measurement by the three-dimensional magnetic field camera can be obtained quickly and accurately, improving the position determination accuracy during the measurement by the three-dimensional magnetic field camera, and further improving the detection accuracy of the target magnetic flux data.

[0106] It should be noted that the above step S109 can be implemented in various ways, and no specific limitation is made thereto.

[0107] Figure 6 is a schematic flowchart of a process for determining the horizontal and vertical axis positions during the measurement by the three-dimensional magnetic field camera provided by an embodiment of the present application. As Figure 6As shown, in one embodiment, in the above step S109, based on the third positional relationship between the three-dimensional magnetic field camera and vision, the first position, the second position, and the third position, determining the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement includes: S1091. Obtain the pre-calibrated third positional relationship.

[0108] S1093. Based on the third positional relationship, determine that the position where the horizontal and vertical axes of the three-dimensional magnetic field camera are located during measurement is the difference between the fourth target position and the fifth target position; wherein, the fourth target position is determined based on the first position, the second position, and the third position, and the fifth target position is determined based on the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera.

[0109] In this embodiment, the pre-calibrated third positional relationship can be obtained, and this third positional relationship is used to represent the corresponding relationship between the sum of the fifth position and the sum of the sixth position. More specifically, this third positional relationship can be used to represent that the sum of the fifth position is equal to the sum of the sixth position.

[0110] According to this third positional relationship, it can be determined that the position (SX, SY) where the horizontal and vertical axes of the three-dimensional magnetic field camera are located during measurement is the difference between the fourth target position and the fifth target position. In one way, the fourth target position is the sum of the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2), and the fifth target position is the sum of the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera. In other ways, the fourth target position can be obtained by assigning different weights to the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2), and the fifth target position can be obtained by assigning different weights to the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera.

[0111] Taking the fourth target position as the sum of the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2), and the fifth target position as the sum of the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera as an example, the horizontal axis position in the position (SX, SY) where the horizontal and vertical axes of the three-dimensional magnetic field camera are located during measurement can be the sum of the horizontal axis positions of the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2), and the horizontal axis third fixed deviation ( ), the difference between the sum of the positions of the magnet centers in the three-dimensional magnetic field camera, where the vertical axis position in the horizontal and vertical axes (SX, SY) when the three-dimensional magnetic field camera performs measurements can be the sum of the vertical axis positions of the first position PM(Mx1, My1), the second position PV1(VX1, VY1), and the third position PV2(VX2, VY2), and the third fixed deviation of the vertical axis ( ), and the difference between the sum of the positions of the magnet centers in the three-dimensional magnetic field camera. The specific calculation formula can be as follows: SX = VX1 + VX2 - -6.4 + Mx1; SY = VY1 + VY2 - -6.4 + My1.

[0112] Among them, the position of the magnet center in the three-dimensional magnetic field camera is 6.4.

[0113] Since the third position relationship is used to characterize the corresponding relationship between the sum of the fifth position and the sum of the sixth position, and since the first position, the second position, and the third position are all parameters associated with the vision system, therefore, according to the third position relationship and the above parameters associated with the vision system, the position when the three-dimensional magnetic field camera performs measurements can be obtained quickly and accurately. Also, since the vision system can locate the measurement position of the three-dimensional magnetic field camera, therefore, according to the third position relationship and the above parameters associated with the vision system, the horizontal axis position and the vertical axis position when the three-dimensional magnetic field camera performs measurements can be obtained quickly and accurately, thereby improving the accuracy of determining the position when the three-dimensional magnetic field camera performs measurements, and further improving the detection accuracy of the target magnetic flux data.

[0114] In an optional embodiment, after controlling the three-dimensional magnetic field camera to obtain target magnetic flux data at the horizontal axis, vertical axis, and vertical axis positions, the above method further includes: Converting the target magnetic flux data into a magnetic field heat map.

[0115] Connecting the magnetic flux data that meets the preset conditions in the magnetic field heat map to obtain a connected domain.

[0116] Taking the magnetic flux data greater than the magnetic field data threshold in the connected domain as the magnetic field peak value, and taking the average value of all the magnetic flux data in the connected domain as the position data of the target magnet.

[0117] In the embodiments of the present application, the target magnetic flux data can be converted into a magnetic field heat map, and connected component analysis is performed on the magnetic field heat map to obtain the magnetic field peak and position data. Specifically: The magnetic flux data satisfying a preset condition in the magnetic field heat map can be connected to obtain the connected component of the target magnet. Among them, the magnetic flux data satisfying the preset condition can be the same magnetic flux data or the magnetic flux data greater than a certain threshold. Then, the magnetic flux data greater than the magnetic field data threshold in the connected component is used as the magnetic field peak of the target magnet. Among them, the magnetic flux data greater than the magnetic field data threshold can refer to the largest magnetic flux data. At the same time, the average value of the magnetic flux data in the connected component is used as the position data of the target magnet. For example, the average value of the magnetic flux data satisfying a certain threshold condition in the connected component can be calculated to obtain the position data of the target magnet.

[0118] Thus, through the three-dimensional magnetic field camera, the magnetic flux values of all points within the field of view can be collected at one time and converted into a planar heat map, so that the distribution of the magnetic flux can be seen more intuitively. After performing connected component analysis on the heat map, the magnetic flux peak and two-dimensional position can be obtained quickly and accurately, and the actual peak and position of the magnetic flux can be represented more precisely.

[0119] In an alternative embodiment, the above method further includes: Obtain at least one scanning line segment passing through the target magnet on the magnetic field heat map.

[0120] Obtain the magnetic flux data in the target magnetic flux data that is located on the at least one scanning line segment.

[0121] Analyze the magnetic flux data located on the at least one scanning line segment to obtain the magnetic field peak and pole width of the at least one scanning line segment.

[0122] In this embodiment, at least one scanning line segment passing through the target magnet can be drawn on the magnetic flux heat map, the magnetic flux data located on the at least one scanning line segment is obtained, and the magnetic flux data on each scanning line segment is analyzed. The largest magnetic flux data on each scanning line segment is used as the magnetic field peak of each scanning line segment. Based on the magnetic field peak, a magnetic field threshold is defined, and searching from the magnetic field peak to both sides, the point positions where the magnetic field strength is first lower than the magnetic field threshold are found to obtain two boundary points, and the distance between the two boundary points is used as the pole width on the scanning line segment. Thus, by lifting the scanning line segment on the magnetic flux heat map, the pole width and magnetic field peak at multiple positions can be accurately, quickly, and effectively obtained after data analysis.

[0123] In other embodiments, data obtained by the moving three-dimensional magnetic field camera multiple times can be stitched into a large magnetic field distribution map, and after being converted into a picture and visually analyzed, magnet characteristics can be obtained. For example, the pole radius of a circular magnet, the center of the magnetic pole, etc.

[0124] It should be noted that since the above steps S101 - S1011 can be executed for different target magnets in this application, target magnetic flux data corresponding to different target magnets can be obtained. Therefore, for different target magnets, their magnetic field peaks, position data, and pole widths can be calculated in the above manner.

[0125] The following is an overall description of the above magnetic flux detection process: Calibration process: 1) Move 9 points during motion extraction for visual calibration.

[0126] 2) Take a square preset magnet with axial magnetization and uniform magnetic flux distribution, fix it on the detection device, and perform position calibration on the visual system, laser displacement sensor, and three-dimensional magnetic field camera with this preset magnet.

[0127] 3) Control the visual system to move above the preset magnet, obtain the first preset position where the horizontal and vertical axes are located during the measurement of the visual system, and determine the second preset position of the magnet center of the preset magnet in the visual system.

[0128] 4) Control the laser displacement sensor to move to the center position of the preset magnet, obtain the third preset position where the horizontal and vertical axes are located during the measurement of the laser displacement sensor, the fourth preset position where the vertical axis is located, and the preset reading value of the laser displacement sensor.

[0129] 5) Control the three-dimensional magnetic field camera to move above the preset magnet, obtain the fifth preset position where the horizontal and vertical axes are located during the measurement of the three-dimensional magnetic field camera, the sixth preset position where the vertical axis is located, and the preset measurement gap of the three-dimensional magnetic field camera.

[0130] 6) Obtain preset magnetic flux data based on the three-dimensional magnetic field camera, and determine the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.

[0131] 7) Set the sum of the third preset position and the first fixed deviation to be equal to the sum of the first preset position and the second preset position to obtain the first position relationship; set the sum of the sixth preset position, the preset measurement gap, and the second fixed deviation to be equal to the sum of the fourth preset position and the preset reading value to obtain the second position relationship; set the sum of the fifth preset position, the seventh preset position, and the third fixed deviation to be equal to the sum of the first preset position and the second preset position to obtain the third position relationship.

[0132] Detection process: 1) Obtain the reference points of the product to be measured based on the visual system; determine the first position of the target magnet relative to the reference points in the product to be measured, the second position where the horizontal and vertical axes are located during the measurement by the visual system, and the third position of the magnet center of the target magnet relative to the reference points in the visual system.

[0133] 2) Based on the first position relationship between the laser and the vision, the first position, the second position, and the third position, determine the fourth position where the horizontal and vertical axes are located during the measurement by the laser displacement sensor.

[0134] 3) Control the laser displacement sensor to move to the fourth position, and obtain the fifth position where the vertical axis is located and the target reading value of the laser displacement sensor.

[0135] 4) Based on the second position relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading value, and the target measurement gap, determine the vertical axis position during the measurement by the three-dimensional magnetic field camera.

[0136] 5) Based on the third position relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position, and the third position, determine the horizontal and vertical axis positions during the measurement by the three-dimensional magnetic field camera.

[0137] 6) Control the three-dimensional magnetic field camera to obtain the target magnetic flux data at the horizontal and vertical axis positions and the vertical axis position.

[0138] 7) Repeat steps 1)-6) in the above detection process, and multiple target magnetic flux data of the target magnets can be obtained.

[0139] 8) Convert the magnetic field data obtained above into a magnetic field heat map, and the magnetic field distribution can be visually observed.

[0140] 9) Convert the target magnetic flux data into a magnetic field heat map; connect the magnetic flux data in the magnetic field heat map that meet the preset conditions to obtain a connected domain; take the magnetic flux data greater than the magnetic field data threshold in the connected domain as the magnetic field peak value, and take the average value of the magnetic flux data in the connected domain as the position data of the target magnet.

[0141] 10) Obtain at least one scanning line segment passing through the target magnet on the magnetic field heat map; obtain the magnetic flux data located on the at least one scanning line segment in the target magnetic flux data; analyze the magnetic flux data located on the at least one scanning line segment to obtain the magnetic field peak value and the pole width of the at least one scanning line segment.

[0142] Figure 7It is a structural block diagram of a magnetic flux detection device provided by an embodiment of the present application. The magnetic flux detection device is applied to a detection device, and the detection device includes a vision system, a three-dimensional magnetic field camera, a laser displacement sensor, a horizontal axis, a vertical axis, and a longitudinal axis. A product to be measured is fixed on the detection device, such as Figure 7 as shown, the device includes: A first determination module 301, configured to obtain a reference point of the product to be measured based on the vision system; determine a first position of the target magnet relative to the reference point in the product to be measured, a second position where the horizontal and vertical axes are located during the measurement of the vision system, and a third position of the magnet center of the target magnet relative to the reference point in the vision system; A first laser positioning module 303, configured to determine a fourth position where the horizontal and vertical axes are located during the measurement of the laser displacement sensor based on a first position relationship between the laser and the vision, the first position, the second position, and the third position; A second laser positioning module 305, configured to control the laser displacement sensor to move to the fourth position, and obtain a fifth position where the vertical axis is located and a target reading value of the laser displacement sensor; A first camera positioning module 307, configured to determine a vertical axis position during the measurement of the three-dimensional magnetic field camera based on a second position relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading value, and a target measurement gap; A second camera positioning module 309, configured to determine a horizontal and vertical axis position during the measurement of the three-dimensional magnetic field camera based on a third position relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position, and the third position; A magnetic flux acquisition module 3011, configured to control the three-dimensional magnetic field camera to acquire target magnetic flux data at the horizontal and vertical axis positions and the vertical axis position.

[0143] In an optional embodiment, the first laser positioning module includes: A first position relationship acquisition module, configured to acquire the pre-calibrated first position relationship; the first position relationship is used to represent the corresponding relationship between the sum of the first positions and the sum of the second positions. The sum of the first positions is the sum of the position where the horizontal and vertical axes are located during the measurement of the laser displacement sensor and a first fixed deviation, and the sum of the second positions is the sum of the position where the horizontal and vertical axes are located during the measurement of the vision system and the position of the magnet center in the vision system; A first difference determination module, configured to determine, based on the first position relationship, that the fourth position is the difference between the first target position and the first fixed deviation; wherein, the first target position is determined based on the first position, the second position, and the third position.

[0144] In an optional embodiment, the first camera positioning module includes: A second position relationship obtaining module, configured to obtain the pre-calibrated second position relationship; the second position relationship is used to represent the corresponding relationship between the third position sum and the fourth position sum, where the third position sum is the sum of the vertical axis position, the measurement gap, and the second fixed deviation during the measurement by the three-dimensional magnetic field camera, and the fourth position sum is the sum of the position of the vertical axis where the laser displacement sensor performs the measurement and the reading value of the laser displacement sensor; A second difference determination module, configured to determine, based on the second position relationship, that the vertical axis position during the measurement by the three-dimensional magnetic field camera is equal to the difference between the second target position and the third target position; Wherein, the second target position is determined based on the fifth position and the target reading value, and the third target position is determined based on the second fixed deviation and the target measurement gap.

[0145] In an optional embodiment, the second camera positioning module includes: A third position relationship obtaining module, configured to obtain the pre-calibrated third position relationship; the third position relationship is used to represent the corresponding relationship between the fifth position sum and the sixth position sum, where the fifth position sum is the sum of the horizontal axis and vertical axis positions, the position of the magnet center in the three-dimensional magnetic field camera, and the third fixed deviation during the measurement by the three-dimensional magnetic field camera, and the sixth position sum is the sum of the horizontal axis and vertical axis positions where the vision system performs the measurement and the position of the magnet center in the vision system; A third difference determination module, configured to determine, based on the third position relationship, that the position of the horizontal axis and vertical axis during the measurement by the three-dimensional magnetic field camera is the difference between the fourth target position and the fifth target position; Wherein, the fourth target position is determined based on the first position, the second position, and the third position, and the fifth target position is determined based on the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera.

[0146] In an optional embodiment, the device further includes: A vision system calibration module, configured to calibrate the vision system; A first moving module, configured to control the vision system to move above a preset magnet, obtain the first preset position of the horizontal axis and vertical axis where the vision system performs the measurement, and determine the second preset position of the magnet center of the preset magnet in the vision system; wherein, the preset magnet is fixed on the detection device; A second moving module, configured to control the laser displacement sensor to move to the central position of the preset magnet, and obtain a third preset position where the horizontal axis and the vertical axis are located during measurement of the laser displacement sensor, a fourth preset position where the vertical axis is located, and a preset reading value of the laser displacement sensor; A third moving module, configured to control the three-dimensional magnetic field camera to move above the preset magnet, and obtain a fifth preset position where the horizontal axis and the vertical axis are located during measurement of the three-dimensional magnetic field camera, a sixth preset position where the vertical axis is located, and a preset measurement gap of the three-dimensional magnetic field camera; A position determination module, configured to obtain preset magnetic flux data based on the three-dimensional magnetic field camera, and determine a seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A position relationship determination module, configured to set a correspondence relationship between the sum of the third preset position and a first fixed deviation and the sum of the first preset position and the second preset position to obtain the first position relationship; set a correspondence relationship between the sum of the sixth preset position, the preset measurement gap, and a second fixed deviation and the sum of the fourth preset position and the preset reading value to obtain the second position relationship; set a correspondence relationship between the sum of the fifth preset position, the seventh preset position, and a third fixed deviation and the sum of the first preset position and the second preset position to obtain the third position relationship.

[0147] In an alternative embodiment, the position relationship determination module includes: A first position relationship determination unit, configured to set the sum of the third preset position and a first fixed deviation to be equal to the sum of the first preset position and the second preset position to obtain the first position relationship; A second position relationship determination unit, configured to set the sum of the sixth preset position, the preset measurement gap, and a second fixed deviation to be equal to the sum of the fourth preset position and the preset reading value to obtain the second position relationship; A third position relationship determination unit, configured to set the sum of the fifth preset position, the seventh preset position, and a third fixed deviation to be equal to the sum of the first preset position and the second preset position to obtain the third position relationship.

[0148] In an alternative embodiment, the position determination module includes: A first initial position determination unit, configured to determine a first initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A second initial position determination unit, configured to rotate the preset magnet by 90°, and determine a second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A third initial position determination unit, configured to continue to rotate the preset magnet by 90°, and determine a third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A fourth initial position determination unit, configured to continue to rotate the preset magnet by 90°, and determine a fourth initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; A seventh preset position determination unit, configured to determine the average value of the first initial position, the second initial position, the third initial position, and the fourth initial position to obtain the seventh preset position.

[0149] In an alternative embodiment, the device further includes: A conversion module, configured to convert the target magnetic flux data into a magnetic field heat map; A connected region determination module, configured to connect the magnetic flux data in the magnetic field heat map that meets a preset condition to obtain a connected region; A peak position determination module, configured to use the magnetic flux data greater than the magnetic field data threshold in the connected region as the magnetic field peak, and use the average value of all the magnetic flux data in the connected region as the position data of the target magnet.

[0150] In an alternative embodiment, the device further includes: A scanning line segment generation module, configured to obtain at least one scanning line segment passing through the target magnet on the magnetic field heat map; A scanning line segment data acquisition module, configured to acquire the magnetic flux data located on the at least one scanning line segment in the target magnetic flux data; A peak width determination module, configured to analyze the magnetic flux data located on the at least one scanning line segment to obtain the magnetic field peak and the magnetic pole width of the at least one scanning line segment.

[0151] The device in the device embodiment and the method embodiment are based on the same inventive concept.

[0152] An embodiment of the present application provides an electronic device, which includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or at least one program segment is loaded and executed by the processor to implement the magnetic flux detection method provided in the above method embodiment.

[0153] An embodiment of the present invention further provides a computer storage medium, which can be set in a terminal to store at least one instruction or at least one program segment related to implementing a magnetic flux detection method in a method embodiment. The at least one instruction or at least one program segment is loaded and executed by the processor to implement the magnetic flux detection method provided in the above method embodiment.

[0154] Embodiments of the present invention also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to enable the computer device to execute and implement the magnetic flux detection method provided in the above method embodiments.

[0155] Optionally, in the embodiments of this specification, the storage medium may be located in at least one of multiple network servers in a computer network. Optionally, in this embodiment, the above storage medium may include, but is not limited to: various media that can store program codes such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.

[0156] The memory described in the embodiments of this specification can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. Correspondingly, the memory may also include a memory controller to provide the processor with access to the memory.

[0157] It should be noted that: the above sequence of the embodiments of this specification is only for description and does not represent the superiority or inferiority of the embodiments. And the above specific embodiments of this specification have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order from that in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0158] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments. In particular, for the embodiments of the device, equipment, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0159] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer storage medium, and the above-mentioned storage medium can be a read-only memory, a disk, an optical disc, etc.

[0160] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

Claims

1. A magnetic flux detection method, characterized in that: The magnetic flux detection method is applied to a detection device, the detection device includes a visual system, a three-dimensional magnetic field camera, a laser displacement sensor, a horizontal axis, a longitudinal axis and a vertical axis, and a product to be tested is fixed on the detection device. The magnetic flux detection method includes: Acquire the reference point of the product to be tested based on the visual system; determine a first position of the target magnet in the product to be tested relative to the reference point, a second position of the horizontal axis and the vertical axis when the visual system is measuring, and a third position of the magnet center of the target magnet in the visual system relative to the reference point; Based on the first position relationship between the laser and the vision, the first position, the second position and the third position, determine the fourth position where the horizontal axis and the vertical axis of the laser displacement sensor are located during measurement; Controlling the laser displacement sensor to move to the fourth position, acquiring the fifth position where the vertical axis is located and the target reading value of the laser displacement sensor; Determine the vertical axis position of the three-dimensional magnetic field camera during measurement based on the second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap; Based on the third position relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position and the third position, determine the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement; The three-dimensional magnetic field camera is controlled to acquire target magnetic flux data at the horizontal axis, longitudinal axis position and vertical axis position.

2. The magnetic flux detection method according to claim 1, characterized in that: The method of determining a fourth position of the horizontal axis and the vertical axis when the laser displacement sensor is measuring based on the first position relationship between the laser and the vision, the first position, the second position and the third position, comprises: Acquire the first pre-calibrated position relationship; the first position relationship is used to characterize the corresponding relationship between the first position sum and the second position sum, the first position sum is the sum of the position of the horizontal axis and the vertical axis when the laser displacement sensor is measured and the first fixed deviation, and the second position sum is the sum of the position of the horizontal axis and the vertical axis when the visual system is measured and the position of the center of the magnet in the visual system; Based on the first position relationship, determining the fourth position as a difference between the first target position and the first fixed deviation; The first target position is determined based on the first position, the second position and the third position.

3. The magnetic flux detection method according to claim 1, characterized in that: The determining of the vertical axis position of the three-dimensional magnetic field camera during measurement based on the second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap comprises: Acquire the pre-calibrated second position relationship; the second position relationship is used to characterize the corresponding relationship between the third position sum and the fourth position sum, the third position sum is the sum of the vertical axis position, the measurement gap, and the second fixed deviation during measurement by the three-dimensional magnetic field camera, and the fourth position sum is the sum of the position of the vertical axis measured by the laser displacement sensor and the reading of the laser displacement sensor; Based on the second position relationship, determining that the vertical axis position of the three-dimensional magnetic field camera during measurement is equal to the difference between the second target position and the third target position; The second target position is determined based on the fifth position and the target reading value, and the third target position is determined based on the second fixed deviation and the target measurement gap.

4. The magnetic flux detection method according to claim 1, characterized in that: The determining of the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement based on the third position relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position and the third position, comprises: Acquire the pre-calibrated third position relationship; the third position relationship is used to characterize the corresponding relationship between the fifth position sum and the sixth position sum, the fifth position sum is the sum of the horizontal and vertical axis positions when the three-dimensional magnetic field camera is measured, the position of the magnet center in the three-dimensional magnetic field camera, and the third fixed deviation, and the sixth position sum is the sum of the horizontal and vertical axis positions when the visual system is measured, and the position of the magnet center in the visual system; Based on the third position relationship, determining that the position of the horizontal axis and the vertical axis when the three-dimensional magnetic field camera performs measurement is the difference between the fourth target position and the fifth target position; The fourth target position is determined based on the first position, the second position and the third position, and the fifth target position is determined based on the third fixed deviation and the position of the magnet center in the three-dimensional magnetic field camera.

5. The magnetic flux detection method according to claim 1, characterized in that: The method further comprises: Calibrate the visual system; Control the visual system to move to the top of the preset magnet, obtain the first preset position of the horizontal axis and the vertical axis when the visual system is measuring, and determine the second preset position of the magnet center of the preset magnet in the visual system; wherein the preset magnet is fixed on the detection device; Control the laser displacement sensor to move to the center position of the preset magnet, obtain the third preset position of the horizontal axis and the vertical axis, the fourth preset position of the vertical axis, and the preset reading value of the laser displacement sensor during measurement by the laser displacement sensor; Control the three-dimensional magnetic field camera to move to above the preset magnet, and obtain the fifth preset position of the horizontal axis and the vertical axis, the sixth preset position of the vertical axis, and the preset measurement gap of the three-dimensional magnetic field camera during measurement by the three-dimensional magnetic field camera; Acquire preset magnetic flux data based on the three-dimensional magnetic field camera, and determine a seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; The first position relationship is obtained by setting the sum of the third preset position and the first fixed deviation, and the corresponding relationship between the first preset position and the sum of the second preset position; the second position relationship is obtained by setting the sixth preset position, the preset measurement gap, the sum of the second fixed deviation, and the corresponding relationship between the fourth preset position and the sum of the preset readings; the third position relationship is obtained by setting the fifth preset position, the seventh preset position, the sum of the third fixed deviation, and the corresponding relationship between the first preset position and the sum of the second preset position.

6. The magnetic flux detection method according to claim 5, characterized in that: The setting of the correspondence between the sum of the third preset position and the first fixed deviation, and the sum of the first preset position and the second preset position to obtain the first position relationship includes: Setting the sum of the third preset position and the first fixed deviation equal to the sum of the first preset position and the second preset position to obtain the first position relationship; The setting of the sixth preset position, the preset measurement gap, the sum of the second fixed deviation, and the corresponding relationship between the fourth preset position and the sum of the preset readings to obtain the second position relationship includes: The sum of the sixth preset position, the preset measurement gap, and the second fixed deviation is set to be equal to the sum of the fourth preset position and the preset reading value, to obtain the second position relationship; The setting of the fifth preset position, the seventh preset position, the sum of the third fixed deviation, and the correspondence between the sum of the first preset position and the second preset position to obtain the third position relationship includes: The sum of the fifth preset position, the seventh preset position, and the third fixed deviation is set to be equal to the sum of the first preset position and the second preset position to obtain the third position relationship.

7. The magnetic flux detection method according to claim 5, characterized in that: The step of determining a seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera includes: Determining a first initial position of a magnet center of the preset magnet in the three-dimensional magnetic field camera; Rotate the preset magnet by 90° to determine a second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Continue to rotate the preset magnet by 90° to determine a third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Continue to rotate the preset magnet by 90° to determine a fourth initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; An average of the first initial position, the second initial position, the third initial position, and the fourth initial position is determined to obtain the seventh preset position.

8. The magnetic flux detection method according to any one of claims 1 to 7, characterized in that: After controlling the three-dimensional magnetic field camera to acquire target magnetic flux data at the horizontal axis, longitudinal axis position and vertical axis position, the method further includes: Converting the target magnetic flux data into a magnetic field thermal map; Connecting the magnetic flux data satisfying the preset conditions in the magnetic field thermodynamic map to obtain a connected domain; The magnetic flux data in the connected domain that is greater than the magnetic field data threshold is taken as the magnetic field peak value, and the average value of the magnetic flux data in the connected domain is taken as the position data of the target magnet.

9. The magnetic flux detection method according to claim 8, characterized in that: The method further comprises: Acquire at least one scanning line segment passing through the target magnet on the magnetic field thermal map; Acquire magnetic flux data located on the at least one scanning line segment in the target magnetic flux data; The magnetic flux data located on the at least one scanning line segment is analyzed to obtain the magnetic field peak value and the magnetic pole width of the at least one scanning line segment.

10. A magnetic flux detection device, characterized in that: The magnetic flux detection device is applied to a detection device, the detection device includes a visual system, a three-dimensional magnetic field camera, a laser displacement sensor, a horizontal axis, a longitudinal axis and a vertical axis, a product to be tested is fixed on the detection device, and the magnetic flux detection device includes: A first determination module is used to obtain a reference point of the product to be tested based on the visual system; determine a first position of the target magnet relative to the reference point in the product to be tested, a second position of the horizontal axis and the vertical axis when the visual system is measuring, and a third position of the magnet center of the target magnet relative to the reference point in the visual system; A first laser positioning module, used for determining a fourth position of the horizontal axis and the vertical axis when the laser displacement sensor is measuring based on a first position relationship between the laser and the vision, the first position, the second position and the third position; A second laser positioning module is used to control the laser displacement sensor to move to the fourth position, and obtain a fifth position where the vertical axis is located and a target reading value of the laser displacement sensor; A first camera positioning module, used to determine the vertical axis position of the three-dimensional magnetic field camera during measurement based on the second position relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading and the target measurement gap; A second camera positioning module is used to determine the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement based on the third position relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position and the third position; The magnetic flux acquisition module is used to control the three-dimensional magnetic field camera to acquire target magnetic flux data at the horizontal axis, longitudinal axis position and vertical axis position.

Citation Information

Patent Citations

  • Single working station magnetic flux measuring device

    CN108445430A

  • Multi-station magnetic flux measurement device

    CN108828474A

  • Method and system for fusing coordinates of point laser displacement sensor and binocular camera

    CN112212784A

  • Three-dimensional attitude and position measuring device based on infrared visual guidance and laser ranging

    CN113029124A

  • Automatic positioning device and method for harmonic coil magnetic field measurement

    CN114295051A

Cited By

  • Magnetic flux measurement method and device, electronic equipment and storage medium

    CN120559544A

  • A magnetic flux measurement method and device, electronic equipment and storage medium

    CN120559544B