Magnetic flux detection method and device
By combining a visual system and a three-dimensional magnetic field camera with a laser displacement sensor and utilizing pre-calibrated positional relationships, magnetic flux data collection for all points within the field of view is achieved, solving the problems of low efficiency and accuracy in magnetic flux detection in existing technologies and achieving efficient and accurate magnetic flux measurement.
Patent Information
- Application Number
- CN202510637222.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-05-19
AI Technical Summary
In the prior art, the magnetic flux detection method can only obtain the magnetic flux value at a single point or a line, and cannot measure the magnetic flux values of all points within the field of view, and the measurement accuracy and efficiency are low.
A combination of a visual system, a three-dimensional magnetic field camera, and a laser displacement sensor is used. The measurement positions of the laser displacement sensor and the three-dimensional magnetic field camera are determined through a pre-calibrated positional relationship to realize the collection of magnetic flux data for all points within the field of view.
The efficiency and accuracy of magnetic flux detection are improved, and the magnetic flux data of all points within the field of view can be collected at one time, which improves the accuracy of measurement.
Smart Images

Figure CN120161394B_ABST
Abstract
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 magnetic pole position of magnets directly affect the product experience, and some even directly affect the operating efficiency of the product.
[0003] In the related art, magnetic flux is usually detected by a single-point designed magnetic flux measurement sensor. However, the related art can only obtain the magnetic flux value of one point. Combined with motion control, the magnetic flux value on a line can be obtained. It is impossible to measure the magnetic flux values of all points in the field of view, which makes the magnetic flux detection method have certain limitations. In addition, the related art uses a single-point designed magnetic flux measurement sensor to detect magnetic flux, which makes the measurement accuracy and detection efficiency of the magnetic flux low. Summary of the Invention
[0004] In order to solve the above problems, the present invention provides a magnetic flux detection method and device.
[0005] In one aspect, the present invention provides a magnetic flux detection method, which is applied to a detection device, the detection device including a visual 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 tested is fixed on the detection device, and the magnetic flux detection method includes:
[0006] Acquiring 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 of a horizontal axis and a vertical axis during measurement by the vision system, and a third position of a magnet center of the target magnet relative to the reference point in the vision system;
[0007] 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 when the laser displacement sensor is measuring;
[0008] Controlling the laser displacement sensor to move to the fourth position, obtaining a fifth position of the vertical axis and a target reading of the laser displacement sensor;
[0009] Determining a vertical axis position of the three-dimensional magnetic field camera during measurement based on a second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap;
[0010] 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 and vertical axis positions of the three-dimensional magnetic field camera during measurement;
[0011] 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.
[0012] In an optional embodiment, determining the fourth position of the horizontal and vertical axes during measurement by the laser displacement sensor based on the first positional relationship between the laser and the vision, the first position, the second position, and the third position, includes:
[0013] Obtaining the pre-calibrated first position relationship; the first position relationship is used to represent the corresponding relationship between the first position sum and the second position sum, the first position sum being the sum of the positions of the horizontal and vertical axes when measured by the laser displacement sensor and a first fixed deviation, and the second position sum being the sum of the positions of the horizontal and vertical axes when measured by the vision system and the position of the center of the magnet in the vision system;
[0014] Based on the first position relationship, determining the fourth position as a difference between the first target position and the first fixed deviation;
[0015] The first target position is determined based on the first position, the second position and the third position.
[0016] In an optional embodiment, determining 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 includes:
[0017] Obtaining a pre-calibrated second position relationship; the second position relationship is used to represent a correspondence between a third position sum and a 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 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 a reading of the laser displacement sensor.
[0018] 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;
[0019] 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.
[0020] In an optional embodiment, the determining of 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 the vision, the first position, the second position, and the third position, includes:
[0021] Obtaining the pre-calibrated third position relationship; the third position relationship is used to characterize the correspondence between the fifth position sum and the sixth position sum, the fifth position sum being the sum of the horizontal and vertical axis positions during measurement by the three-dimensional magnetic field camera, the position of the magnet center in the three-dimensional magnetic field camera, and a third fixed deviation; and the sixth position sum being the sum of the horizontal and vertical axis positions during measurement by the visual system and the position of the magnet center in the visual system;
[0022] Based on the third positional relationship, determining that the positions of the horizontal and vertical axes of the three-dimensional magnetic field camera during measurement are the differences between the fourth target position and the fifth target position;
[0023] 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.
[0024] In an optional embodiment, the method further includes:
[0025] calibrating the visual system;
[0026] Controlling the visual system to move above a preset magnet, obtaining a first preset position of a horizontal axis and a vertical axis during measurement by the visual system, and determining a second preset position of a magnet center of the preset magnet in the visual system; wherein the preset magnet is fixed to the detection device;
[0027] Controlling the laser displacement sensor to move to the center position of the preset magnet, obtaining a third preset position of the horizontal and vertical axes, a fourth preset position of the vertical axis, and a preset reading of the laser displacement sensor during measurement by the laser displacement sensor;
[0028] Controlling the three-dimensional magnetic field camera to move above the preset magnet, obtaining a fifth preset position of the horizontal and vertical axes, a sixth preset position of the vertical axis, and a preset measurement gap of the three-dimensional magnetic field camera during measurement by the three-dimensional magnetic field camera;
[0029] Acquiring 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;
[0030] 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 corresponding relationship between the sixth preset position, the preset measurement gap, the sum of the second fixed deviation, and the fourth preset position and the sum of the preset readings; the third position relationship is obtained by setting the corresponding relationship 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.
[0031] In an optional embodiment, setting a 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:
[0032] 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;
[0033] The setting of the correspondence between the sixth preset position, the preset measurement gap, the sum of the second fixed deviation, and the fourth preset position and the sum of the preset readings to obtain the second position relationship includes:
[0034] 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 position relationship;
[0035] The setting of 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 includes:
[0036] 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.
[0037] In an optional embodiment, determining the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera includes:
[0038] Determining a first initial position of a magnet center of the preset magnet in the three-dimensional magnetic field camera;
[0039] Rotating the preset magnet 90° to determine a second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera;
[0040] Continue rotating the preset magnet 90° to determine a third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera;
[0041] Continue rotating the preset magnet 90° to determine a fourth initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera;
[0042] 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.
[0043] In an optional embodiment, 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:
[0044] Converting the target magnetic flux data into a magnetic field thermal map;
[0045] Connecting magnetic flux data that meet preset conditions in the magnetic field thermodynamic map to obtain a connected domain;
[0046] The magnetic flux data in the connected domain that is greater than the magnetic field data threshold is used as the magnetic field peak value, and the average value of all the magnetic flux data in the connected domain is used as the position data of the target magnet.
[0047] In an optional embodiment, the method further includes:
[0048] Acquire at least one scanning line segment passing through the target magnet on the magnetic field thermodynamic map;
[0049] Acquire magnetic flux data located on the at least one scanning line segment in the target magnetic flux data;
[0050] Analyze the magnetic flux data on the at least one scanning line segment to obtain the magnetic field peak value and magnetic pole width of the at least one scanning line segment.
[0051] In another aspect, the present invention provides a magnetic flux detection device, which 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. The magnetic flux detection device includes:
[0052] a first determination module configured to obtain a reference point of the product to be tested based on the visual system; determine a first position of a target magnet relative to the reference point in the product to be tested, a second position of a horizontal axis and a vertical axis during measurement by the visual system, and a third position of a magnet center of the target magnet relative to the reference point in the visual system;
[0053] A first laser positioning module is configured to determine a fourth position of the horizontal and vertical axes of the laser displacement sensor during measurement based on a first positional relationship between the laser and the visual sense, the first position, the second position, and the third position;
[0054] a second laser positioning module, configured to control the laser displacement sensor to move to the fourth position, and obtain a fifth position of the vertical axis and a target reading of the laser displacement sensor;
[0055] a first camera positioning module, configured to determine a vertical axis position of the three-dimensional magnetic field camera during measurement based on a second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap;
[0056] A second camera positioning module is configured to determine the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement based on a third positional relationship between the three-dimensional magnetic field camera and the vision, the first position, the second position, and the third position;
[0057] 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 and vertical axis positions.
[0058] In an optional embodiment, the first laser positioning module includes:
[0059] a first position relationship acquisition module, configured to acquire the pre-calibrated first position relationship; the first position relationship being used to characterize a corresponding relationship between a first position sum and a second position sum, the first position sum being the sum of the positions of the horizontal and vertical axes when measured by the laser displacement sensor and a first fixed deviation, and the second position sum being the sum of the positions of the horizontal and vertical axes when measured by the vision system and the position of the center of the magnet in the vision system;
[0060] a first difference determination module, configured to determine, based on the first position relationship, that the fourth position is a difference between the first target position and the first fixed deviation;
[0061] The first target position is determined based on the first position, the second position and the third position.
[0062] In an optional embodiment, the first camera positioning module includes:
[0063] a second position relationship acquisition module, configured to acquire the pre-calibrated second position relationship; the second position relationship being used to characterize the correspondence between a third position sum and a fourth position sum, the third position sum being 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 being the sum of the position of the vertical axis measured by the laser displacement sensor and a reading of the laser displacement sensor;
[0064] a second difference determination module, configured to determine, based on the second position relationship, 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;
[0065] 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.
[0066] In an optional embodiment, the second camera positioning module includes:
[0067] a third position relationship acquisition module, configured to acquire the pre-calibrated third position relationship; the third position relationship being used to characterize the correspondence between a fifth position sum and a sixth position sum, the fifth position sum being the sum of the horizontal and vertical axis positions during measurement by the three-dimensional magnetic field camera, the position of the magnet center in the three-dimensional magnetic field camera, and a third fixed deviation; and the sixth position sum being the sum of the horizontal and vertical axis positions during measurement by the visual system and the position of the magnet center in the visual system;
[0068] a third difference determination module, configured to determine, based on the third positional relationship, that the positions of the horizontal and vertical axes when the three-dimensional magnetic field camera performs measurement are the differences between the fourth target position and the fifth target position;
[0069] 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.
[0070] In an optional embodiment, the device further comprises:
[0071] A visual system calibration module, used for calibrating the visual system;
[0072] a first moving module, configured to control the visual system to move to above a preset magnet, obtain a first preset position of the horizontal and vertical axes during measurement by the visual system, and determine a second preset position of the magnet center of the preset magnet in the visual system; wherein the preset magnet is fixed to the detection device;
[0073] a second movement module, configured to control the laser displacement sensor to move to the center position of the preset magnet, obtain a third preset position of the horizontal and vertical axes, a fourth preset position of the vertical axis, and a preset reading of the laser displacement sensor during measurement by the laser displacement sensor;
[0074] a third moving module, configured to control the three-dimensional magnetic field camera to move to above the preset magnet, to obtain a fifth preset position of the horizontal and vertical axes, a sixth preset position of the vertical axis, and a preset measurement gap of the three-dimensional magnetic field camera during measurement by the three-dimensional magnetic field camera;
[0075] 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;
[0076] A position relationship determination module is used to 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 fourth preset position and the sum of the preset readings 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.
[0077] In an optional embodiment, the position relationship determination module includes:
[0078] a first position relationship determining unit, configured to 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;
[0079] a second position relationship determining unit, configured to 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, to obtain the second position relationship;
[0080] The third position relationship determining unit is used 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 to obtain the third position relationship.
[0081] In an optional embodiment, the location determination module includes:
[0082] a first initial position determining unit, configured to determine a first initial position of a magnet center of the preset magnet in the three-dimensional magnetic field camera;
[0083] a second initial position determining unit, configured to 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;
[0084] a third initial position determining unit, configured to continue rotating 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;
[0085] a fourth initial position determining unit, configured to continue rotating 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;
[0086] The seventh preset position determining unit is configured to determine an average of the first initial position, the second initial position, the third initial position, and the fourth initial position to obtain the seventh preset position.
[0087] In an optional embodiment, the device further comprises:
[0088] a conversion module, configured to convert the target magnetic flux data into a magnetic field thermal map;
[0089] A connected domain determination module is used to connect the magnetic flux data that meet preset conditions in the magnetic field thermodynamic map to obtain a connected domain;
[0090] The peak position determination module is used to take the magnetic flux data in the connected domain that is greater than the magnetic field data threshold as the magnetic field peak value, and take the average value of all the magnetic flux data in the connected domain as the position data of the target magnet.
[0091] In an optional embodiment, the device further comprises:
[0092] 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;
[0093] a scanning line segment data acquisition module, configured to acquire magnetic flux data located on the at least one scanning line segment in the target magnetic flux data;
[0094] The peak width determination module is used to analyze the magnetic flux data located on the at least one scanning line segment to obtain the magnetic field peak value and magnetic pole width of the at least one scanning line segment.
[0095] On the other hand, an electronic device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the magnetic flux detection method as described above.
[0096] On the other hand, a computer storage medium is provided, wherein the computer storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the magnetic flux detection method as described above.
[0097] Another aspect provides a computer program product or computer program, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to implement the magnetic flux detection method described above.
[0098] The magnetic flux detection method and device provided by the present invention have the following technical effects:
[0099] The present invention determines the fourth position of the horizontal and vertical axes when the laser displacement sensor is measuring based on the first position relationship between the laser displacement sensor and the visual system, the first position of the magnet center of the target magnet in the product to be measured, the second position of the horizontal and vertical axes when the visual system is measuring, and the third position of the target magnet in the visual system. The laser displacement sensor is moved to the fourth position to obtain the fifth position of the vertical axis and the target reading of the laser displacement sensor. Then, based on the pre-calibrated second position relationship between the three-dimensional magnetic field camera and the laser displacement sensor, the fifth position, the target reading and the target measurement gap, the three-dimensional magnetic field phase is determined. The vertical axis position of the three-dimensional magnetic field camera during measurement is determined by the laser position, and the measurement height of the three-dimensional magnetic field camera is located by the laser position. Then, based on the pre-calibrated third position relationship between the three-dimensional magnetic field camera and the visual system, the first position, the second position and the third position are used to determine the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement, thereby realizing the positioning of the measurement position of the three-dimensional magnetic field camera by the visual system, and then enabling the three-dimensional magnetic field camera to collect magnetic flux data of all points in the field of view at one time, thereby improving the measurement efficiency of the magnetic flux; in addition, since the pre-calibrated first position relationship, the second position relationship and the third position relationship are used to detect the magnetic flux data, the detection accuracy of the magnetic flux data can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0101] In order to more clearly illustrate the technical solutions and advantages of the embodiments of this specification or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0102] Figure 1 It is a structural schematic diagram of a detection device provided in an embodiment of the present application.
[0103] Figure 2 It is a flow chart of a magnetic flux detection method provided in an embodiment of the present application.
[0104] Figure 3 It is a flowchart of a calibration process provided in an embodiment of the present application.
[0105] Figure 4 This is a flow chart of determining the fourth position of the horizontal and vertical axes during measurement by a laser displacement sensor, provided in an embodiment of the present application.
[0106] Figure 5 This is a flow chart of determining the vertical axis position during three-dimensional magnetic field camera measurement, provided in an embodiment of the present application.
[0107] Figure 6 This is a flow chart of determining the horizontal and vertical axis positions of a three-dimensional magnetic field camera during measurement, provided by an embodiment of the present application.
[0108] Figure 7 This is a structural block diagram of a magnetic flux detection device provided in an embodiment of the present application.
[0109] Among them, the accompanying drawings are numerals as follows:
[0110] 1-Vision system, 2-3D magnetic field camera, 3-Laser displacement sensor, 4-Horizontal axis, 5-Vertical axis, 6-Vertical axis. DETAILED DESCRIPTION
[0111] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0112] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate 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 "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0113] See also Figure 1 , Figure 1 This is a schematic diagram of the structure of a detection device provided in an embodiment of the present application. Figure 1 As shown, the detection device may include at least a vision system 1, a three-dimensional magnetic field camera 2, a laser displacement sensor 3, a horizontal axis (X axis) 4, a longitudinal axis (Y axis) 5, and a vertical axis (Z axis) 6. The vision system 1 may be a CCD vision system.
[0114] It should be noted that the embodiment of the present application does not limit the positional relationship between the visual system 1, the three-dimensional magnetic field camera 2, the laser displacement sensor 3, the horizontal axis 4, the longitudinal axis 5 and the vertical axis 6. It only needs to be able to fix the product to be tested and the preset magnet, move the visual 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 achieve measurement of the target magnetic flux data.
[0115] For example, continue as Figure 1 As shown, the visual 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 .
[0116] The magnetic flux detection method provided in the embodiment of the present application includes a calibration process and a measurement process. During the calibration process, a preset magnet is fixed on the detection device. During the measurement process, the product to be tested is fixed on the detection device, and the fixed position of the product to be tested on the detection device is the same as the fixed position of the preset magnet on the detection device.
[0117] A magnetic flux detection method of the present invention is described below. Figure 2It is a flow chart of a magnetic flux detection method provided in an embodiment of the present application. This specification provides the method operation steps as described in the embodiment or flow chart, but may include more or fewer operation steps based on conventional or non-creative work. The order of steps listed in the embodiment is only one way of executing the steps among many steps, and does not represent the only execution order. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:
[0118] S101. Obtain the reference point of the product to be tested based on the visual system; determine the first position of the target magnet relative to the reference point in the product to be tested, the second position of the horizontal and vertical axes when the visual system is measuring, and the third position of the magnet center of the target magnet relative to the reference point in the visual system.
[0119] In the embodiment of the present application, during the actual measurement of the magnetic flux data of the product under test, the product under test can be fixed to the testing equipment, and the visual system can be controlled to move above the product under test, and the visual system can be used to capture the reference point of the product under test. The reference point of the product under test, in engineering drawings, generally refers to the core reference origin used for positioning, measurement, and dimensioning in product design and manufacturing, which is equivalent to the "zero point" in a three-dimensional coordinate system.
[0120] Since the reference point can be considered the "zero point" of the three-dimensional coordinate system, the first position PM (Mx1, My1) of the target magnet in the product under test relative to the reference point can be determined. Simultaneously, the second position PV1 (VX1, VY1) of the horizontal and vertical axes located by the vision system can be recorded, where VX1 refers to the horizontal axis position located by the vision system, and VY1 refers to the vertical axis position located by the vision system. Furthermore, after determining the reference point, the third position PV2 (VX2, VY2) of the target magnet in the vision system relative to the reference point can be determined using the reference point as a reference point.
[0121] Optionally, the process of determining the third position of the magnet center of the target magnet relative to the reference point in the visual system can be: taking an image of the target magnet through the visual system, cropping the magnet area from the image, determining the center of mass of the magnet area, and using the position of the center of mass relative to the reference point as the third position of the magnet center relative to the reference point in the visual system.
[0122] S103. Based on the first position relationship between the laser and vision, the first position, the second position and the third position, determine the fourth position where the horizontal and vertical axes are located during measurement by the laser displacement sensor.
[0123] 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.
[0124] In an embodiment of the present application, the first position relationship between the laser displacement sensor and the visual system can be pre-calibrated. Since the second position and the third position are both features associated with the visual system, the first position is the position of the target magnet relative to the reference point in the product to be measured. Therefore, based on the pre-calibrated first position relationship, combined with the first position, the second position, and the third position, the fourth position (LX1, LY1) of the horizontal and vertical axes during the laser displacement sensor measurement can be accurately determined. LX1 refers to the position of the horizontal axis during the laser displacement sensor measurement, and LY1 refers to the position of the vertical axis during the laser displacement sensor measurement. The fourth position of the horizontal and vertical axes during the laser displacement sensor measurement can refer to: the positions of the horizontal and vertical axes located by the laser displacement sensor during operation.
[0125] After determining the operating 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 of the 3D magnetic field camera (i.e., the vertical axis position), after moving the laser displacement sensor to the fourth position, the fifth position (LZ1) where the vertical axis is currently located can be located, and the target reading (LV1) of the laser displacement sensor can be read simultaneously. The target reading can include the distance from the upper surface of the target magnet to the position of the light outlet of the laser displacement sensor.
[0126] S107. 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.
[0127] 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 3D magnetic field camera.
[0128] In this embodiment of the present application, a second positional relationship between the 3D magnetic field camera and the laser displacement sensor can be pre-calibrated. Since the fifth position, target reading, and target measurement gap are all features associated with the laser displacement sensor, the position of the 3D magnetic field camera can be determined based on this second positional relationship and the aforementioned features associated with the laser displacement sensor. Furthermore, since the laser displacement sensor can determine the measurement height (i.e., vertical axis position) of the 3D magnetic field camera, the vertical axis position (SZ) of the 3D magnetic field camera during measurement, i.e., the operating vertical axis position (SZ) of the 3D magnetic field camera, can be quickly and accurately determined based on this second positional relationship and the aforementioned features associated with the laser displacement sensor.
[0129] S109. 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, determine the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement.
[0130] In embodiments of the present application, a third positional relationship between the 3D magnetic field camera and the vision system can also be pre-calibrated. Since the first position, second position, and third position are all parameters associated with the vision system, the position of the 3D magnetic field camera during measurement can be quickly and accurately determined based on this third positional relationship and the aforementioned parameters associated with the vision system. Furthermore, since the vision system can locate the measurement position of the 3D magnetic field camera, the horizontal and vertical axis positions of the 3D magnetic field camera during measurement can be quickly and accurately determined based on this third positional relationship and the aforementioned parameters associated with the vision system.
[0131] S1011. Control the three-dimensional magnetic field camera to obtain target magnetic flux data at the horizontal axis, longitudinal axis position and vertical axis position.
[0132] In an embodiment of the present application, after obtaining the horizontal and vertical axis positions and vertical axis positions of the three-dimensional magnetic field camera during measurement, the three-dimensional magnetic field camera can be moved to the positions where the horizontal and vertical axis positions and vertical axis positions are located, and the three-dimensional magnetic field camera can be controlled to obtain target magnetic flux data at this position.
[0133] It should be noted that the above steps S101 to S1011 can be performed for different target magnets, so that target magnetic flux data corresponding to different target magnets can be obtained.
[0134] The embodiment of the present application uses the above-mentioned solution to locate the measurement position of the three-dimensional magnetic field camera through a visual system and locate the height of the three-dimensional magnetic field camera through a laser displacement sensor, thereby enabling the three-dimensional magnetic field camera to collect magnetic flux data (Bx, By, Bz) of all points within the field of view at one time. In addition, the X and Y intervals of each collection point are known, thereby improving the efficiency of magnetic flux measurement. In addition, since the magnetic flux data is detected using pre-calibrated first position relationships, second position relationships, and third position relationships, the detection accuracy of the magnetic flux data can be improved.
[0135] First, the calibration process of the first position relationship, the second position relationship, and the third position relationship is explained. Figure 3 This is a flow chart of a calibration process provided by an embodiment of the present application, such as Figure 3 As shown in Figure 2, the calibration process includes:
[0136] S201. Calibrate the visual system.
[0137] Alternatively, a 9-point calibration algorithm can be used to move the motion axes (horizontal, vertical, and vertical axes) by 9 points for visual calibration. This algorithm uses a set of known points to calibrate the internal and external parameters of the visual system, thereby determining the rotation and translation matrices of the visual system. Specifically, nine non-collinear points can be taken on a plane. Using the mapping relationship between the visual projections of these nine points and their actual world coordinates, a system of linear equations containing multiple unknowns can be established. This system of equations can then be solved to obtain the rotation and translation matrices of the visual system.
[0138] S203. Control the visual system to move above the preset magnet, obtain the first preset position of the horizontal and vertical axes of the visual system during measurement, 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.
[0139] In the embodiments of the present application, a square, pre-set magnet with axial magnetization and uniform magnetic flux distribution can be fixed to the detection device. This pre-set magnet can be used to calibrate the position of the vision system, laser displacement sensor, and 3D magnetic field camera. It should be noted that the position of the pre-set magnet on the detection device is the same as the position of the target magnet on the detection device during measurement.
[0140] Next, the visual system is controlled to move above the preset magnet, and the first preset position Pv1 (Vx1, Vy1) of the horizontal and vertical axes when the visual system is measuring is recorded. At the same time, the second preset position Pv2 (Vx2, Vy2) of the magnet center of the preset magnet in the visual system is calculated.
[0141] Optionally, calculating the second preset position of the magnet center of the preset magnet in the visual system may include: capturing an image of the preset magnet through the visual system, cropping a magnet area from the image, determining the center of mass of the magnet area, and using the center of mass as the second preset position of the magnet center of the preset magnet in the visual system.
[0142] S205. Control the laser displacement sensor to move to the center position of the preset magnet, obtain the third preset position of the horizontal and vertical axes, the fourth preset position of the vertical axis, and the preset reading value of the laser displacement sensor during measurement.
[0143] Next, the laser displacement sensor is controlled to move to the center position of the preset magnet, and the third preset position Pl1 (Lx1, Ly1) of the horizontal and vertical axes located by the laser position sensor during measurement, the fourth preset position (Lz1) of the vertical axis, and the preset reading Lv1 of the laser displacement sensor are recorded.
[0144] The preset reading value of the laser displacement sensor may include: a distance from the upper surface of the preset magnet to the position of the light outlet of the laser displacement sensor.
[0145] S207. Control the three-dimensional magnetic field camera to move above the preset magnet, obtain the fifth preset position of the horizontal and vertical axes, the sixth preset position of the vertical axis, and the preset measurement gap of the three-dimensional magnetic field camera during measurement.
[0146] In this embodiment of the present application, the 3D magnetic field camera can be moved above a preset magnet to record the fifth preset position Ps1 (Sx1, Sy1) of the horizontal and vertical axes, the sixth preset position (Sz) of the vertical axis, and the current preset measurement gap (Sg) of the 3D magnetic field camera during operation. The preset measurement gap refers to the distance from the upper surface of the preset magnet to the measurement surface of the 3D magnetic field camera.
[0147] S209 . 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.
[0148] In an embodiment of the present application, a three-dimensional magnetic field camera can be controlled to read current preset magnetic flux data and calculate a seventh preset position of the magnet center of the preset magnet within the three-dimensional magnetic field camera. Calculating the seventh preset position of the magnet center of the preset magnet within the three-dimensional magnetic field camera may include: capturing an image of the preset magnet using the three-dimensional magnetic field camera, cropping a magnet region from the image, determining a center of mass of the magnet region, and using the center of mass as the seventh preset position Pv(Sx, Sy) of the magnet center of the preset magnet within the three-dimensional magnetic field camera.
[0149] S2011. 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 fourth preset position and the sum of the preset readings 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.
[0150] Optionally, for the first position relationship, a 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 can be set to obtain the first position relationship. Since the first preset position includes the horizontal axis and the vertical axis position, the second preset position also includes the horizontal axis and the vertical axis position, and the third preset position also includes the horizontal axis and the vertical axis position, the horizontal axis position (Lx1) in the third preset position can be set to the first fixed deviation ( ) and the corresponding relationship between the sum of the horizontal axis position (Vx1) in the first preset position and the horizontal axis position (Vx2) in the second preset position, to obtain the first position relationship corresponding to the horizontal axis; set the vertical axis position (Ly1) in the third preset position, the first fixed deviation ( ), and the correspondence between the sum of the longitudinal axis position (Vy1) in the first preset position and the longitudinal axis position (Vy2) in the second preset position, to obtain the first position relationship corresponding to the longitudinal axis.
[0151] 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 position relationship. Since the first preset position includes the horizontal axis and the vertical axis position, the second preset position also includes the horizontal axis and the vertical axis position, and the third preset position also includes the horizontal axis and the vertical axis position, the horizontal axis position in the third preset position can be set to the first 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, and the first position relationship corresponding to the horizontal axis is obtained; the vertical axis position in the third preset position is set to the first fixed deviation corresponding to the vertical axis ( ) is equal to the sum of the longitudinal axis position in the first preset position and the longitudinal axis position in the second preset position, obtaining a first position relationship corresponding to the longitudinal axis. Specifically, the first position relationship can be as follows:
[0152] Lx1+ = Vx1 + Vx2;
[0153] Ly1+ = Vy1 + Vy2.
[0154] In other embodiments, the horizontal axis position in the third preset position may be the first fixed deviation ( ) is set as a weight, the product of the weight and the sum is calculated to obtain a 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 a second product, and the first product is set equal to the second product to obtain the first position relationship. At the same time, the vertical axis position in the third preset position and the first fixed deviation corresponding to the vertical axis ( ), 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.
[0155] Optionally, for the second position relationship: the sixth preset position (Sz), the preset measurement gap (Sg) and the second fixed deviation ( ) and the corresponding relationship between the sum of the fourth preset position (Lz1) and the preset reading (Lv1) to obtain the second position relationship. In one embodiment, the sixth preset position (Sz), the preset measurement gap (Sg) and the second fixed deviation ( ) is equal to the sum of the fourth preset position (Lz1) and the preset reading (Lv1), and the second position relationship is obtained. The specific calculation formula can be as follows:
[0156] Sz + Sg + = Lz1 + Lv1.
[0157] In another embodiment, the sixth preset position (Sz), the preset measurement gap (Sg) and the second fixed deviation ( ) and set a weight for the sum of the fourth preset position (Lz1) and the preset reading (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.
[0158] Optionally, for the third position relationship: the correspondence between 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.
[0159] 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 horizontal axis position in the fifth preset position and the horizontal axis position in the seventh preset position can be set to a third fixed deviation ( ) and the corresponding relationship between 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; set 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 ( ) and the correspondence between the sum of the longitudinal axis position in the first preset position and the longitudinal axis position in the second preset position to obtain a third position relationship corresponding to the longitudinal axis.
[0160] In one embodiment, the sum of the fifth preset position Ps1 (Sx1, Sy1), the seventh preset position Pv (Sx, Sy) and the third fixed deviation can be set to be 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 horizontal and vertical axis positions, the horizontal axis position in the fifth preset position and the horizontal axis position in the seventh preset position can be set to the third fixed deviation ( ) 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, and the third position relationship corresponding to the horizontal axis is obtained; and 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 longitudinal axis position in the first preset position and the longitudinal axis position in the second preset position, obtaining a third position relationship corresponding to the longitudinal axis. Accordingly, the third position relationship can be as follows:
[0161] Sx1 + Sx + = Vx1 + Vx2;
[0162] Sy1 + Sy + = Vy1 + Vy2.
[0163] In other embodiments, 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 a 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 an eighth product, set the seventh product equal to the eighth product, and obtain the third position relationship. At the same time, for 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 a 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 a tenth product, set the ninth product equal to the tenth product, and obtain the third position relationship corresponding to the vertical axis.
[0164] During the calibration process, the embodiments of the present application accurately calibrate the first, second, and third positional relationships in advance. This allows the three-dimensional magnetic field camera's measurement position and height to be accurately located during subsequent measurements based on these three positional relationships. This allows the calibrated three-dimensional magnetic field camera to collect magnetic flux data for all points within its field of view at once during the measurement process, thereby improving magnetic flux measurement efficiency and detection accuracy. Furthermore, the calibration accuracy of the first positional relationship is improved by 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. The calibration accuracy of the second positional relationship is improved by setting the sum of the sixth preset position, the preset measurement gap, and the second fixed deviation equal to the sum of the fourth preset position and the preset reading. The calibration accuracy of the third positional relationship is improved by setting the sum of the fifth preset position, the seventh preset position, and the third fixed deviation equal to the sum of the first preset position and the second preset position.
[0165] In an optional embodiment, in step S209, the step of 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:
[0166] A first initial position of a magnet center of the preset magnet in the three-dimensional magnetic field camera is determined.
[0167] The preset magnet is rotated 90° to determine a second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.
[0168] The preset magnet is further rotated by 90° to determine a third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.
[0169] The preset magnet is further rotated by 90° to determine a fourth initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera.
[0170] 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.
[0171] In an embodiment 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. The preset magnet is rotated 90°, and the second initial position Pv2 (SVx2, SVy2) of the magnet center of the preset magnet in the three-dimensional magnetic field camera is determined again. The magnet is rotated 90° further, and the third initial position Pv3 (SVx3, SVy3) of the magnet center of the preset magnet in the three-dimensional magnetic field camera is determined again. The magnet is rotated 90° further, and the fourth initial position Pv4 (SVx4, SVy4) of the magnet center of the preset magnet in the three-dimensional magnetic field camera is determined. Finally, the average or weighted average of the first initial position, the second initial position, the third initial position, and the fourth initial position is calculated 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:
[0172] Pv(Sx,Sy) = ((SVx1 + SVx2 + SVx3 + SVx4) / 4,(SVy1 + SVy2+ SVy3 +SVy4) / 4).
[0173] Optionally, determining the first initial position of the magnet center of the preset magnet within the 3D magnetic field camera may include: capturing an image of the preset magnet using the 3D magnetic field camera, cropping a magnet region from the image, determining the center of mass of the magnet region, and using the center of mass as the first initial position of the magnet center of the preset magnet within the 3D magnetic field camera. The second, third, and fourth initial positions are calculated in the same manner as the first initial position.
[0174] Since the preset magnet is axially magnetized, there may be slight deviations during magnetization. By rotating 90 degrees in the above manner to obtain four initial positions, and averaging the four initial positions to obtain the seventh preset position, the accuracy of determining the seventh preset position of the magnet center of the preset magnet in the three-dimensional magnetic field camera can be improved, thereby improving the calibration accuracy and further improving the magnetic flux detection accuracy.
[0175] It should be noted that the above step S103 can be implemented in various ways, which are not specifically limited.
[0176] Figure 4 : is a flow chart of determining the fourth position of the horizontal and vertical axes when measuring with a laser displacement sensor according to an embodiment of the present application. Figure 4 As shown, in one embodiment, the above-mentioned determination of the fourth position of the horizontal and vertical axes 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 may include:
[0177] S1031. Obtain the first position relationship that has been calibrated in advance; the first position relationship is used to characterize the correspondence between the first position sum and the second position sum, the first position sum being the sum of the positions of the horizontal and vertical axes when the laser displacement sensor is measuring and the first fixed deviation, and the second position sum being the sum of the positions of the horizontal and vertical axes when the visual system is measuring and the position of the center of the magnet in the visual system.
[0178] S1033. Based on the first position 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.
[0179] In this embodiment, a pre-calibrated first position relationship can be obtained. The first position relationship is used to represent the corresponding relationship between a first position sum and a second position sum. The first position sum is the sum of the positions of the horizontal and vertical axes during measurement by the laser displacement sensor and a first fixed deviation, while the second position sum is the sum of the positions of the horizontal and vertical axes during measurement by the vision system and the position of the center of the magnet in the vision system. More specifically, the first position relationship can be used to represent that the first position sum is equal to the second position sum.
[0180] Based on this first positional relationship, a fourth position (LX1, LY1) can be determined as the difference between the first target position and the first fixed deviation. In one embodiment, 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 embodiments, the first target position can be obtained by assigning different weights to the first, second, and third positions.
[0181] 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 of the fourth position (LX1, LY1) 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 first fixed deviation of the horizontal axis ( The longitudinal axis position of the fourth position (LX1, LY1) may be the sum of the longitudinal 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 longitudinal axis ( The specific calculation formula can be as follows:
[0182] LX1 = VX1 + VX2 - + Mx1;
[0183] LY1 = VY1 + VY2 - + My1.
[0184] Since the first position relationship is used to characterize the correspondence between the sum of the positions of the horizontal and vertical axes during measurement by the laser displacement sensor and the first fixed deviation, and the sum of the positions of the horizontal and vertical axes during measurement by the visual system and the position of the center of the magnet in the visual system, and since the second position and the third position are both features associated with the visual system, 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 measurement by the laser displacement sensor can be accurately determined, thereby improving the position determination accuracy during measurement by the laser displacement sensor, thereby improving the position determination accuracy during measurement by the three-dimensional magnetic field camera, and further improving the detection accuracy of the target magnetic flux data.
[0185] It should be noted that the above step S107 can be implemented in various ways, which are not specifically limited.
[0186] Figure 5 is a flow chart of determining the vertical axis position of a three-dimensional magnetic field camera during measurement provided by an embodiment of the present application, such as Figure 5 As shown, in an optional embodiment, in the above step S107, determining 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 includes:
[0187] S1071. Obtain the pre-calibrated second position relationship; the second position relationship is used to characterize the correspondence 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.
[0188] S1073. Based on the second position relationship, determine 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; 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.
[0189] In this embodiment, a pre-calibrated second position relationship may be obtained, and the second position relationship is used to represent the corresponding relationship between the third position sum and the fourth position sum. More specifically, the second position relationship may be used for the third position sum to be equal to the fourth position sum.
[0190] According to the second position relationship, it can be determined that the vertical axis position (SZ) of the three-dimensional magnetic field camera during measurement 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 (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 embodiment, the second target position is the sum of the fifth position (LZ1) and the target reading (LV1), and the third target position is the second fixed deviation ( ) and the target measurement gap (SG). In other embodiments, 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) are given different weights.
[0191] The second target position is the sum of the fifth position (LZ1) and the target reading (LV1), and the third target position is the second fixed deviation ( ) and the target measurement gap (SG) as an example, the vertical axis position (SZ) of the three-dimensional magnetic field camera during measurement can be the sum of the fifth position (LZ1) and the target reading (LV1), and the second fixed deviation ( ), the difference between the sum of the target measurement gap (SG). The specific calculation formula can be as follows:
[0192] SZ = LZ1 + LV1 - -SG.
[0193] Since the second position relationship is used to characterize the correspondence between the third position sum and the fourth position sum, and since the fifth position, target reading and target measurement gap are all features associated with the laser displacement sensor, based on the second position relationship and the above-mentioned features associated with the laser displacement sensor, the vertical axis position during three-dimensional magnetic field camera measurement can be obtained quickly and accurately, thereby improving the position determination accuracy during three-dimensional magnetic field camera measurement, and thereby improving the detection accuracy of target magnetic flux data.
[0194] It should be noted that the above step S109 can be implemented in various ways, which are not specifically limited.
[0195] Figure 6: is a flow chart of determining the horizontal and vertical axis positions of a three-dimensional magnetic field camera during measurement provided by an embodiment of the present application, such as Figure 6 As shown, in one embodiment, in the above step S109, the above-mentioned determination of 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 the vision, the first position, the second position, and the third position includes:
[0196] S1091. Obtain the pre-calibrated third position relationship.
[0197] S1093. Based on the third position relationship, determine that the position of the horizontal and vertical axes of the three-dimensional magnetic field camera 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.
[0198] In this embodiment, a pre-calibrated third position relationship may be obtained, and the third position relationship is used to represent the corresponding relationship between the fifth position sum and the sixth position sum. More specifically, the third position relationship may be used to represent that the fifth position sum is equal to the sixth position sum.
[0199] Based on this third positional relationship, the position (SX, SY) of the horizontal and vertical axes at which the 3D magnetic field camera measures can be determined as the difference between the fourth target position and the fifth target position. In one embodiment, 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). The fifth target position is the sum of the third fixed deviation and the position of the magnet center in the 3D magnetic field camera. In other embodiments, 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). 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 3D magnetic field camera.
[0200] 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 of the position (SX, SY) of the horizontal axis and vertical axis when the three-dimensional magnetic field camera is measuring 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 third fixed deviation ( ), the difference between the sum of the positions of the magnet center in the three-dimensional magnetic field camera, the vertical axis position in the position (SX, SY) where the horizontal axis and vertical axis are located when the three-dimensional magnetic field camera is measuring 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 sum of the positions of the magnet center in the three-dimensional magnetic field camera. The specific calculation formula can be as follows:
[0201] SX = VX1 + VX2 - -6.4 + Mx1;
[0202] SY = VY1 + VY2 - -6.4 + My1.
[0203] The position of the magnet center in the three-dimensional magnetic field camera is 6.4.
[0204] Because the third positional relationship is used to characterize the correspondence between the fifth position sum and the sixth position sum, and because the first position, the second position, and the third position are all parameters associated with the vision system, the position of the three-dimensional magnetic field camera during measurement can be quickly and accurately determined based on the third positional relationship and the aforementioned parameters associated with the vision system. Furthermore, because the vision system can locate the measurement position of the three-dimensional magnetic field camera, the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement can be quickly and accurately determined based on the third positional relationship and the aforementioned parameters associated with the vision system, thereby improving the position determination accuracy of the three-dimensional magnetic field camera during measurement and, in turn, improving the detection accuracy of the target magnetic flux data.
[0205] In an optional embodiment, 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:
[0206] The target magnetic flux data is converted into a magnetic field heat map.
[0207] The magnetic flux data satisfying the preset conditions in the magnetic field thermodynamic map are connected to obtain a connected domain.
[0208] The magnetic flux data in the connected domain that is greater than the magnetic field data threshold is used as the magnetic field peak value, and the average value of all the magnetic flux data in the connected domain is used as the position data of the target magnet.
[0209] In an embodiment of the present application, the target magnetic flux data can be converted into a magnetic field heat map, and a connected domain analysis is performed on the magnetic field heat map to obtain the magnetic field peak value and position data. Specifically, the magnetic flux data that meet the preset conditions in the magnetic field heat map can be connected to obtain the connected domain of the target magnet. The magnetic flux data that meet the preset conditions can be the same magnetic flux data, or the magnetic flux data can be greater than a certain threshold. Then, the magnetic flux data in the connected domain that is greater than the magnetic field data threshold is used as the magnetic field peak value of the target magnet, wherein the magnetic flux data that is greater than the magnetic field data threshold can refer to the maximum magnetic flux data. At the same time, the average value of the magnetic flux data in the connected domain is used as the position data of the target magnet. For example, the average value of the magnetic flux data that meets a certain threshold condition in the connected domain can be calculated to obtain the position data of the target magnet.
[0210] Therefore, the three-dimensional magnetic field camera can collect the magnetic flux values of all points within the field of view at one time and convert them into a planar heat map, which allows a more intuitive view of the distribution of the magnetic flux. By performing a connected domain analysis on the heat map, the magnetic flux peak value and two-dimensional position can be quickly and accurately obtained, more accurately showing the actual peak value and position of the magnetic flux.
[0211] In an optional embodiment, the above method further includes:
[0212] At least one scanning line segment passing through the target magnet is acquired on the magnetic field thermodynamic map.
[0213] Magnetic flux data located on the at least one scanning line segment in the target magnetic flux data is acquired.
[0214] Analyze the magnetic flux data on the at least one scanning line segment to obtain the magnetic field peak value and magnetic pole width of the at least one scanning line segment.
[0215] In this embodiment, at least one scanning line segment passing through the target magnet can be drawn on the magnetic flux heat map, and magnetic flux data located on the at least one scanning line segment can be obtained. The magnetic flux data on each scanning line segment is analyzed, and the maximum magnetic flux data on each scanning line segment is used as the magnetic field peak value of each scanning line segment. A magnetic field threshold is defined based on the magnetic field peak value, and a search is conducted from the magnetic field peak value to both sides to find the point where the magnetic field intensity first falls below the magnetic field threshold value, obtaining two boundary points, and the distance between the two boundary points is used as the magnetic pole width on the scanning line segment. In this way, the scanning line segment can be drawn on the magnetic flux heat map, and after data analysis, the magnetic pole width and magnetic field peak value at multiple positions can be accurately, quickly, and effectively obtained.
[0216] In other embodiments, the data acquired by the mobile three-dimensional magnetic field camera multiple times can be spliced into a large magnetic field distribution map, which can be converted into an image and then visually analyzed to obtain magnet characteristics, such as the pole radius and pole center of a circular magnet.
[0217] It should be noted that, since the present application can execute the above steps S101-S1011 for different target magnets, the target magnetic flux data corresponding to different target magnets can be obtained. Therefore, for different target magnets, their magnetic field peak value, position data and magnetic pole width can be calculated in the above manner.
[0218] The following is an overall description of the above magnetic flux detection process:
[0219] Calibration process:
[0220] 1) Use motion drawing to move 9 points for visual calibration.
[0221] 2) Take a square preset magnet with axial magnetization and uniform magnetic flux distribution, fix it to the detection equipment, and use the preset magnet to calibrate the position of the vision system, laser displacement sensor and 3D magnetic field camera.
[0222] 3) Controlling the visual system to move to above a preset magnet, obtaining a first preset position of a horizontal axis and a vertical axis during measurement by the visual system, and determining a second preset position of a magnet center of the preset magnet in the visual system.
[0223] 4) Controlling the laser displacement sensor to move to the center position of the preset magnet, obtaining the third preset position of the horizontal and vertical axes, the fourth preset position of the vertical axis, and the preset reading of the laser displacement sensor during measurement.
[0224] 5) Controlling the three-dimensional magnetic field camera to move above the preset magnet, obtaining the fifth preset position of the horizontal and vertical axes, the sixth preset position of the vertical axis, and the preset measurement gap of the three-dimensional magnetic field camera during measurement.
[0225] 6) Acquiring 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.
[0226] 7) 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; setting the sum of the sixth preset position, the preset measurement gap, and the second fixed deviation equal to the sum of the fourth preset position and the preset reading to obtain the second position relationship; setting the sum of the fifth preset position, the seventh preset position, and the third fixed deviation equal to the sum of the first preset position and the second preset position to obtain the third position relationship.
[0227] Testing process:
[0228] 1) Acquiring a reference point of the product to be measured based on the vision system; determining a first position of the target magnet relative to the reference point in the product to be measured, a second position of the horizontal and vertical axes during 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.
[0229] 2) Based on the first position relationship between the laser and the vision, the first position, the second position and the third position, a fourth position of the horizontal and vertical axes during measurement by the laser displacement sensor is determined.
[0230] 3) Controlling the laser displacement sensor to move to the fourth position, obtaining a fifth position where the vertical axis is located and a target reading value of the laser displacement sensor.
[0231] 4) Determining a vertical axis position of the three-dimensional magnetic field camera during measurement based on a second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap.
[0232] 5) 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, the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement are determined.
[0233] 6) Controlling the three-dimensional magnetic field camera to acquire target magnetic flux data at the horizontal axis, longitudinal axis position and vertical axis position.
[0234] 7) Repeat steps 1) to 6) in the above detection process to obtain target magnetic flux data of multiple target magnets.
[0235] 8) The magnetic field data obtained above is converted into a magnetic field thermodynamic map, and the magnetic field distribution can be observed intuitively.
[0236] 9) Converting the target magnetic flux data into a magnetic field heat map; connecting the magnetic flux data that meet preset conditions in the magnetic field heat map to obtain a connected domain; using the magnetic flux data in the connected domain that is greater than the magnetic field data threshold as the magnetic field peak value, and using the average value of the magnetic flux data in the connected domain as the position data of the target magnet.
[0237] 10) Acquiring at least one scanning line segment passing through the target magnet on the magnetic field thermodynamic map; acquiring magnetic flux data located on the at least one scanning line segment in the target magnetic flux data; and analyzing the magnetic flux data located on the at least one scanning line segment to obtain a magnetic field peak value and a magnetic pole width of the at least one scanning line segment.
[0238] Figure 7 This is a structural block diagram of a magnetic flux detection device provided in an embodiment of the present application. 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 vertical axis, and a vertical axis. The product to be tested is fixed on the detection device, such as Figure 7 As shown, the device includes:
[0239] A first determination module 301 is configured 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 and vertical axes during measurement by the visual system, and a third position of the magnet center of the target magnet relative to the reference point in the visual system;
[0240] A first laser positioning module 303 is configured to determine a fourth position of the horizontal and vertical axes of the laser displacement sensor during measurement based on a first positional relationship between the laser and the visual sense, the first position, the second position, and the third position;
[0241] The second laser positioning module 305 is used to control the laser displacement sensor to move to the fourth position, obtain the fifth position of the vertical axis and the target reading of the laser displacement sensor;
[0242] A first camera positioning module 307 is configured to determine a vertical axis position of the three-dimensional magnetic field camera during measurement based on a second positional relationship between the three-dimensional magnetic field camera and the laser, the fifth position, the target reading, and the target measurement gap;
[0243] A second camera positioning module 309 is configured to 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 the vision, the first position, the second position, and the third position;
[0244] The magnetic flux acquisition module 3011 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.
[0245] In an optional embodiment, the first laser positioning module includes:
[0246] a first position relationship acquisition module, configured to acquire the pre-calibrated first position relationship; the first position relationship being used to characterize a corresponding relationship between a first position sum and a second position sum, the first position sum being the sum of the positions of the horizontal and vertical axes when measured by the laser displacement sensor and a first fixed deviation, and the second position sum being the sum of the positions of the horizontal and vertical axes when measured by the vision system and the position of the center of the magnet in the vision system;
[0247] a first difference determination module, configured to determine, based on the first position relationship, that the fourth position is a difference between the first target position and the first fixed deviation;
[0248] The first target position is determined based on the first position, the second position and the third position.
[0249] In an optional embodiment, the first camera positioning module includes:
[0250] a second position relationship acquisition module, configured to acquire the pre-calibrated second position relationship; the second position relationship being used to characterize the correspondence between a third position sum and a fourth position sum, the third position sum being 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 being the sum of the position of the vertical axis measured by the laser displacement sensor and a reading of the laser displacement sensor;
[0251] a second difference determination module, configured to determine, based on the second position relationship, 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;
[0252] 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.
[0253] In an optional embodiment, the second camera positioning module includes:
[0254] a third position relationship acquisition module, configured to acquire the pre-calibrated third position relationship; the third position relationship being used to characterize the correspondence between a fifth position sum and a sixth position sum, the fifth position sum being the sum of the horizontal and vertical axis positions during measurement by the three-dimensional magnetic field camera, the position of the magnet center in the three-dimensional magnetic field camera, and a third fixed deviation; and the sixth position sum being the sum of the horizontal and vertical axis positions during measurement by the visual system and the position of the magnet center in the visual system;
[0255] a third difference determination module, configured to determine, based on the third positional relationship, that the positions of the horizontal and vertical axes when the three-dimensional magnetic field camera performs measurement are the differences between the fourth target position and the fifth target position;
[0256] 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.
[0257] In an optional embodiment, the device further comprises:
[0258] A visual system calibration module, used for calibrating the visual system;
[0259] a first moving module, configured to control the visual system to move to above a preset magnet, obtain a first preset position of the horizontal and vertical axes during measurement by the visual system, and determine a second preset position of the magnet center of the preset magnet in the visual system; wherein the preset magnet is fixed to the detection device;
[0260] a second movement module, configured to control the laser displacement sensor to move to the center position of the preset magnet, obtain a third preset position of the horizontal and vertical axes, a fourth preset position of the vertical axis, and a preset reading of the laser displacement sensor during measurement by the laser displacement sensor;
[0261] a third moving module, configured to control the three-dimensional magnetic field camera to move to above the preset magnet, to obtain a fifth preset position of the horizontal and vertical axes, a sixth preset position of the vertical axis, and a preset measurement gap of the three-dimensional magnetic field camera during measurement by the three-dimensional magnetic field camera;
[0262] 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;
[0263] A position relationship determination module is used to 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 fourth preset position and the sum of the preset readings 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.
[0264] In an optional embodiment, the position relationship determination module includes:
[0265] a first position relationship determining unit, configured to 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;
[0266] a second position relationship determining unit, configured to 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, to obtain the second position relationship;
[0267] The third position relationship determining unit is used 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 to obtain the third position relationship.
[0268] In an optional embodiment, the location determination module includes:
[0269] a first initial position determining unit, configured to determine a first initial position of a magnet center of the preset magnet in the three-dimensional magnetic field camera;
[0270] a second initial position determining unit, configured to 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;
[0271] a third initial position determining unit, configured to continue rotating 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;
[0272] a fourth initial position determining unit, configured to continue rotating 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;
[0273] The seventh preset position determining unit is configured to determine an average of the first initial position, the second initial position, the third initial position, and the fourth initial position to obtain the seventh preset position.
[0274] In an optional embodiment, the device further comprises:
[0275] a conversion module, configured to convert the target magnetic flux data into a magnetic field thermal map;
[0276] A connected domain determination module is used to connect the magnetic flux data that meet preset conditions in the magnetic field thermodynamic map to obtain a connected domain;
[0277] The peak position determination module is used to take the magnetic flux data in the connected domain that is greater than the magnetic field data threshold as the magnetic field peak value, and take the average value of all the magnetic flux data in the connected domain as the position data of the target magnet.
[0278] In an optional embodiment, the device further comprises:
[0279] 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;
[0280] a scanning line segment data acquisition module, configured to acquire magnetic flux data located on the at least one scanning line segment in the target magnetic flux data;
[0281] The peak width determination module is used to analyze the magnetic flux data located on the at least one scanning line segment to obtain the magnetic field peak value and magnetic pole width of the at least one scanning line segment.
[0282] The device and method embodiments in the device embodiments are based on the same inventive concept.
[0283] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the magnetic flux detection method provided in the above method embodiment.
[0284] An embodiment of the present invention also provides a computer storage medium, which can be set in a terminal to store at least one instruction or at least one program related to a magnetic flux detection method in a method embodiment. The at least one instruction or at least one program is loaded and executed by the processor to implement the magnetic flux detection method provided by the above method embodiment.
[0285] Embodiments of the present invention further provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to implement the magnetic flux detection method provided in the above method embodiment.
[0286] Optionally, in the embodiments of this specification, the storage medium may be located in at least one of the multiple network servers in the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard drive, a magnetic disk, or an optical disk, among other media capable of storing program code.
[0287] The memory described in the embodiments of this specification can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein 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 a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0288] It should be noted that the order in which the embodiments of this specification are presented is for illustrative purposes only and does not represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions are of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying 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.
[0289] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, equipment, and storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant portions, refer to the descriptions of the method embodiments.
[0290] Those skilled in the art will understand that all or part of the steps of implementing the above embodiments may be accomplished by hardware, or by a program instructing the relevant hardware to accomplish the steps. The program may be stored in a computer storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0291] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection 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, which includes a visual system, a three-dimensional magnetic field camera, a laser displacement sensor, a horizontal axis, a longitudinal axis, and a vertical axis. The product to be tested is fixed on the detection device. The magnetic flux detection method includes: Acquiring 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 of a horizontal axis and a vertical axis during measurement by the vision system, and a third position of a magnet center of the target magnet relative to the reference point in the vision system; 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 when the laser displacement sensor is measuring; Controlling the laser displacement sensor to move to the fourth position, obtaining a fifth position of the vertical axis and a target reading of the laser displacement sensor; Determining a vertical axis position of the three-dimensional magnetic field camera during measurement based on a 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 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 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 determining of a fourth position of the horizontal and vertical axes during measurement by the laser displacement sensor based on the first position relationship between the laser and the vision, the first position, the second position, and the third position includes: Obtaining the pre-calibrated first position relationship; the first position relationship is used to represent the corresponding relationship between the first position sum and the second position sum, the first position sum being the sum of the positions of the horizontal and vertical axes when measured by the laser displacement sensor and a first fixed deviation, and the second position sum being the sum of the positions of the horizontal and vertical axes when measured by the vision system and the position of the center of the magnet in the vision 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 includes: Obtaining a pre-calibrated second position relationship; the second position relationship is used to represent a correspondence between a third position sum and a 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 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 a 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, wherein: The determining of 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 the vision, the first position, the second position, and the third position, includes: Obtaining the pre-calibrated third position relationship; the third position relationship is used to characterize the correspondence between the fifth position sum and the sixth position sum, the fifth position sum being the sum of the horizontal and vertical axis positions during measurement by the three-dimensional magnetic field camera, the position of the magnet center in the three-dimensional magnetic field camera, and a third fixed deviation; and the sixth position sum being the sum of the horizontal and vertical axis positions during measurement by the visual system and the position of the magnet center in the visual system; Based on the third positional relationship, determining that the positions of the horizontal and vertical axes of the three-dimensional magnetic field camera during measurement are the differences 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, wherein: The method further comprises: calibrating the visual system; Controlling the visual system to move above a preset magnet, obtaining a first preset position of a horizontal axis and a vertical axis during measurement by the visual system, and determining a second preset position of a magnet center of the preset magnet in the visual system; wherein the preset magnet is fixed to the detection device; Controlling the laser displacement sensor to move to the center position of the preset magnet, obtaining a third preset position of the horizontal and vertical axes, a fourth preset position of the vertical axis, and a preset reading of the laser displacement sensor during measurement by the laser displacement sensor; Controlling the three-dimensional magnetic field camera to move above the preset magnet, obtaining a fifth preset position of the horizontal and vertical axes, a sixth preset position of the vertical axis, and a preset measurement gap of the three-dimensional magnetic field camera during measurement by the three-dimensional magnetic field camera; Acquiring 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; 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 corresponding relationship between the sixth preset position, the preset measurement gap, the sum of the second fixed deviation, and the fourth preset position and the sum of the preset readings; the third position relationship is obtained by setting the corresponding relationship 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.
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 correspondence between the sixth preset position, the preset measurement gap, the sum of the second fixed deviation, and the fourth preset position and the sum of the preset readings to obtain the second position relationship 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 position relationship; The setting of 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 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: 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; Rotating the preset magnet 90° to determine a second initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Continue rotating the preset magnet 90° to determine a third initial position of the magnet center of the preset magnet in the three-dimensional magnetic field camera; Continue rotating the preset magnet 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 magnetic flux data that meet 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 used as the magnetic field peak value, and the average value of the magnetic flux data in the connected domain is used 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 thermodynamic map; Acquire magnetic flux data located on the at least one scanning line segment in the target magnetic flux data; Analyze the magnetic flux data on the at least one scanning line segment to obtain the magnetic field peak value and 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, which includes a visual system, a three-dimensional magnetic field camera, a laser displacement sensor, a horizontal axis, a longitudinal axis, and a vertical axis. The product to be tested 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 tested based on the visual system; determine a first position of a target magnet relative to the reference point in the product to be tested, a second position of a horizontal axis and a vertical axis during measurement by the visual system, and a third position of a magnet center of the target magnet relative to the reference point in the visual system; A first laser positioning module is configured to determine a fourth position of the horizontal and vertical axes of the laser displacement sensor during measurement based on a first positional relationship between the laser and the visual sense, 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 of the vertical axis and a target reading of the laser displacement sensor; a first camera positioning module, configured to determine a vertical axis position of the three-dimensional magnetic field camera during measurement based on a second positional 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 configured to determine the horizontal and vertical axis positions of the three-dimensional magnetic field camera during measurement based on a third positional 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 and vertical axis positions.
Citation Information
Patent Citations
Single working station magnetic flux measuring device
CN108445430A
Multi-station magnetic flux measurement device
CN108828474A