Coil detection method and device, storage medium and product
By collecting three-dimensional point clouds and constructing depth and brightness maps in real time during the coil winding process, and combining deep learning and dynamic threshold segmentation algorithms to generate elliptical models, the problems of low coil detection accuracy and efficiency are solved, efficient and accurate quality control is achieved, and manufacturing efficiency and product quality are improved.
Patent Information
- Application Number
- CN202510643513.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, the winding and testing process of American-style transformer coils is complex and relies on manual operation, resulting in low detection accuracy and low efficiency, making it difficult to achieve efficient and accurate quality control.
By collecting three-dimensional point clouds in real time during the coil winding process and constructing depth and brightness maps, combining deep learning and dynamic threshold segmentation algorithms to determine the winding position, generate an elliptical model, and calculate the specified properties of the coil, fast and accurate detection can be achieved.
It improves the efficiency and accuracy of coil detection, ensures that quality meets standards, realizes real-time quality control, detects problems and defects in production early, and improves manufacturing efficiency and product quality.
Smart Images

Figure CN120672837A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of transformer coils, and in particular to a coil detection method, device, storage medium, and product. Background Art
[0002] Coils are the core components of American transformers, enabling voltage conversion and power transmission. The process dimensions during the winding process play a crucial role in the performance and stability of American transformers. However, the winding and testing processes for high-voltage American transformer coils are complex and currently rely primarily on manual labor. However, manual testing suffers from low accuracy, inefficiency, and a lack of sustainability.
[0003] Therefore, how to efficiently and accurately control the quality of coils is an urgent problem to be solved. Summary of the Invention
[0004] The main purpose of this application is to provide a coil detection method, device, storage medium and product, aiming to solve the technical problem of how to efficiently and accurately control the quality of coils.
[0005] To achieve the above objectives, the present application proposes a coil detection method, which includes: During the winding process of the target coil, the corresponding depth map and brightness map are constructed based on the three-dimensional point cloud collected in real time from the surface of the target coil; determining a winding position of a target coil in the brightness image to obtain a detection area, wherein the detection area is generated based on the winding position; When the detection area is not an area covered by the oil paper, a currently wound coil portion of the target coil is fitted based on the depth map to generate a corresponding elliptical model; The specified properties of the target coil are calculated based on the elliptical model to obtain the coil detection results.
[0006] In some embodiments, determining the winding position of the target coil in the brightness map includes: Input the brightness map into the pre-trained segmentation model to obtain the predicted position; Calculate the local threshold of each window at the predicted position using a dynamic threshold segmentation algorithm; wherein the brightness map includes multiple pre-divided windows, and each window includes multiple pixels; Based on each local threshold, each pixel in the brightness image is classified to obtain the winding position of the target coil; The dynamic threshold segmentation algorithm is expressed by Expression 1:
[0007] T(x,y) is the local threshold of the pixel (x,y), I(x,y) is the pixel value of the brightness image at position (x,y), N is the total number of pixels in the window, and a and b are the lengths of the window in the x and y directions, respectively.
[0008] In some embodiments, fitting the currently wound coil portion of the target coil based on the depth map to generate a corresponding ellipse model includes: Mapping the detection area to the depth map to obtain the target area; wherein the target area includes a specified number of equally divided sub-areas; Based on the angle value and depth value corresponding to each sub-region, the winding profile of the target coil is obtained by fitting; Perform dimensionality-increasing fitting on the winding contour to obtain an ellipse model, wherein the ellipse model includes point cloud data.
[0009] In some embodiments, calculating the specified properties of the target coil based on the elliptical model to obtain the coil detection result includes: Construct a covariance matrix, perform singular value decomposition on the covariance matrix, and obtain the major axis and minor axis directions of the winding profile; The point cloud data is fitted by the least square method to obtain the ellipse equation of the ellipse model in three-dimensional space; Among them, the ellipse equation is expressed by expression 2:
[0010] in, and are two orthogonal unit vectors in the plane where the elliptical model is located, representing the directions of the major axis and minor axis respectively. is the angle parameter obtained by the winding encoder, r is the coordinate vector of any point in the ellipse model, a is the length of the major axis of the ellipse model, and b is the length of the minor axis of the ellipse model. The major axis length is obtained based on the projection of the point cloud data in the major axis direction, and the minor axis length is obtained based on the projection of the point cloud data in the minor axis direction; The specified properties of the target coil are calculated according to the ellipse equation to obtain the coil detection results.
[0011] In some embodiments, calculating the specified properties of the target coil according to the ellipse equation to obtain the coil detection result includes: The coil circumference of the target coil is calculated using Expression 3:
[0012] Where e is the eccentricity, which is calculated by Expression 4:
[0013] Where a is 1 / 2 of the major axis of the ellipse, and b is 1 / 2 of the minor axis of the ellipse.
[0014] In some embodiments, calculating the specified properties of the target coil according to the ellipse equation to obtain the coil detection result includes: Calculate the corresponding ellipse equations for the two specified sampling moments; According to the two ellipse equations, the lengths of the major axis and the minor axis corresponding to the two sampling moments are obtained; Based on the major axis length and the minor axis length, the thickness difference between the coils corresponding to the two sampling moments is obtained.
[0015] In some embodiments, after calculating the specified properties of the target coil based on the elliptical model and obtaining the coil detection result, the coil detection method further includes: When the target coil is wound, the three-dimensional point cloud corresponding to the target coil is collected to construct the corresponding brightness map; Based on the brightness map, the top winding edge and the bottom winding edge of the target coil are fitted; Calculate the straight line distance between the top winding edge and the bottom winding edge as the coil height of the target coil.
[0016] In addition, to achieve the above-mentioned purpose, the present application also proposes a coil detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the coil detection method described above.
[0017] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of the coil detection method described above are implemented.
[0018] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the coil detection method described above are implemented.
[0019] One or more technical solutions proposed in this application have at least the following technical effects: By capturing a 3D point cloud and constructing depth and brightness maps in real time during the target coil winding process, the system accurately determines the winding position using the brightness map. This system then uses the depth map to perform an ellipse fitting model to efficiently calculate the specified properties of the target coil. This enables fast and precise inspection, effectively improving inspection efficiency and accuracy and ensuring that coil quality meets standards. Real-time quality control achieved through inspection during the winding phase can help identify production issues and defects early on, further improving manufacturing efficiency and product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1 A schematic diagram of a flow chart of a coil detection method provided in an embodiment of the present application is shown; Figure 2 A point cloud diagram of a target coil provided by an exemplary embodiment of the present application is shown; Figure 3 A schematic diagram showing a winding position and a detection area provided by an exemplary embodiment of the present application is shown; Figure 4 A schematic diagram of a sub-region provided by an exemplary embodiment of the present application is shown; Figure 5 A schematic diagram of an ellipse model provided by an exemplary embodiment of the present application is shown; Figure 6 A schematic diagram showing a coil being wound according to an exemplary embodiment of the present application is shown; Figure 7 A schematic structural diagram of a coil detection device provided in one embodiment of the present application is shown.
[0023] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0024] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0025] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0026] The main solution of the embodiment of the present application is: during the winding process of the target coil, a corresponding depth map and brightness map are constructed based on the three-dimensional point cloud collected in real time from the surface of the target coil; the winding position of the target coil is determined in the brightness map; based on the depth map and the winding position, the currently wound coil part of the target coil is fitted to generate corresponding point cloud data; based on the point cloud data, the specified attributes of the target coil are calculated to obtain the coil detection results.
[0027] In related technologies, coils are the core components of American transformers, enabling voltage conversion and power transmission. The process dimensions during the winding process play a crucial role in the performance and stability of American transformers. However, the winding and testing processes for high-voltage American transformer coils are complex and currently rely primarily on manual labor. However, manual testing suffers from low accuracy, inefficiency, and a lack of sustainability.
[0028] Specifically, (1) due to human interference and the limitations of measuring tools, it is difficult to ensure that the size of each coil fully meets the design standards, resulting in obvious inconsistency in coil size, which in turn seriously affects the performance and stability of the transformer; (2) The complex coil size and variable structure require operators to repeatedly measure and adjust, which consumes a lot of time and manpower, is cumbersome to operate and slow to measure, seriously affecting production efficiency and delivery cycle; (3) Manual inspection depends on the technical level and working status of the operator, the quality fluctuates greatly, the production cycle is difficult to control, and the uncertainty and risk in the production process are increased; (4) Manual inspection methods are difficult to adapt to the needs of large-scale production, with low production efficiency and high cost, which is not conducive to enterprises achieving efficient production and quality control.
[0029] Based on this, some detection methods have been improved and designed in related technologies, but there are still problems such as low detection efficiency, limited detection range, poor detection accuracy, and narrow application range.
[0030] In summary, how to efficiently and accurately control the quality of coils is a problem that needs to be solved urgently.
[0031] Based on this, this application provides a solution that uses a 3D visual detection method to realize real-time automatic detection of relevant parameters such as transformer coil winding dimensions. While ensuring high precision, it can improve the winding quality of the coil and realize real-time feedback on the coil quality.
[0032] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution capabilities, such as a tablet computer, personal computer, or mobile phone, or a coil detection device capable of performing the aforementioned functions. This embodiment and the following embodiments will be described below using a coil detection device as an example.
[0033] Reference Figure 1 , Figure 1 The following is a flow chart of a coil detection method provided by an embodiment of the present application. The coil detection method can be applied to a coil detection device and includes the following steps S110 to S140: Step S110 : During the winding process of the target coil, a corresponding depth map and brightness map are constructed based on the three-dimensional point cloud collected in real time from the surface of the target coil.
[0034] The target coil refers to the transformer coil to be wound, which can be an American-style transformer coil, but this is not a limitation here. It is understood that transformer coils are typically wound using various methods, including continuous, tangled, or internal screen winding. For example, continuous winding involves continuously winding the wire around the coil bobbin.
[0035] In this embodiment, workers can use a scanner (e.g., a barcode scanner) to scan a pre-set code (e.g., a QR code, barcode, etc.) on the target coil to obtain the coil model. Based on the target coil model, the manufacturing execution system can send the target coil's product work order number, model, and process standard parameters to the visual inspection system.
[0036] The staff can select the corresponding work order and start the winding program for the target coil. At the same time, the visual inspection system starts working and collects data on the target coil in real time during the winding process.
[0037] Specifically, the visual inspection system may include a 3D laser profile scanner. In this embodiment, during the coil winding process, the 3D laser profile scanner can scan the target coil in real time based on the triangulation principle to generate a 3D point cloud (e.g., Figure 2 shown).
[0038] Based on a 3D point cloud, a 2D brightness map and a 3D depth map composed of the point cloud contours can be generated. A 2D brightness map is a common grayscale image that records the brightness information at each pixel on the object's surface, reflecting the optical properties of the surface—that is, the intensity of light reflected or emitted by the surface. A 3D depth map is an image used to represent the depth information of an object's surface. A 3D depth map records the distance from the 3D laser profiler to each point on the object's surface (target coil) and is typically stored in a matrix format, where each element represents the depth value at the corresponding pixel location. Optimizing the 3D depth map through triangulation algorithms allows for pixel accuracy of up to 1µm.
[0039] Step S120 , determining the winding position of the target coil in the brightness image, and obtaining a detection area, where the detection area is generated based on the winding position.
[0040] In this embodiment, for a coil in the winding process, detection items may include the coil's major axis length, minor axis length, coil cross-sectional circumference, and coil thickness. To obtain the attributes corresponding to these detection items, a fitting operation may be performed on the wound portion of the target coil based on the depth map and brightness map obtained in step S110.
[0041] In some embodiments, to determine the current winding position of the target coil, the brightness map can be input into a pre-trained segmentation model to obtain a predicted position. Specifically, the segmentation model can be pre-trained using a large number of brightness map datasets prior to step S110. This pre-trained segmentation model can learn the characteristics of the winding position, thereby achieving the effect of inputting a brightness map and outputting the winding position in actual use.
[0042] In this embodiment, after the winding position of the target coil is determined by the deep learning segmentation model, the precise winding position of the target coil can be further determined by the dynamic threshold segmentation method.
[0043] Specifically, the brightness map can be segmented into multiple windows according to a certain preset size, each window including multiple pixels. At the predicted position, a local threshold of each window can be calculated using a dynamic threshold segmentation algorithm.
[0044] Specifically, the dynamic threshold segmentation algorithm is expressed by Expression 1:
[0045] T(x,y) is the local threshold of the pixel (x,y), I(x,y) is the pixel value of the brightness image at position (x,y), N is the total number of pixels in the window, and a and b are the lengths of the window in the x and y directions, respectively.
[0046] After obtaining the local thresholds corresponding to each window, the pixels in the brightness image can be classified based on the local thresholds to determine the winding locations of the target coil. For example, in a window, if the pixel value is greater than the local threshold, it can be considered that there is a winding at that pixel location; if the pixel value is less than or equal to the local threshold, it can be considered that there is no winding at that pixel location. In this way, the winding locations of the coil can be adaptively divided in each window.
[0047] After obtaining the winding position, the detection area can be divided according to the location of the winding position in the transformer. Specifically, if the winding position is above the target coil, a rectangular detection area of a specified size is generated below the winding position; if the winding position is below the target coil, a specified rectangular detection area is generated above the winding position. Figure 3 For example, the winding position ( Figure 3 If the white line (shown in red) is above the target coil, the rectangular detection area is below the winding position.
[0048] Step S130 : When the detection area is not the area covered by the oil paper, the currently wound coil portion of the target coil is fitted based on the depth map to generate a corresponding ellipse model.
[0049] Since the coil needs to be wrapped with a layer of oil paper after winding, and the oil paper will affect the detection of relevant parameters, it is necessary to further judge the aforementioned detection area, that is, to judge whether the detection area is the oil paper covered area.
[0050] Specifically, it is possible to determine whether the detection area is an oil-paper area through global threshold segmentation, connected domain segmentation, and Blob analysis algorithms.
[0051] Among them, the expression of the global threshold segmentation algorithm is:
[0052] Among them, C represents the binary pixel value, G represents the original pixel value, T represents the threshold, and i represents the pixel number in the brightness image.
[0053] Through connected domain segmentation, the connected area can be divided into multiple independent blobs:
[0054] Among them, each connected domain Ri satisfies:
[0055] The area of each blob is:
[0056] This allows us to determine the areas of multiple connected domains. It's understandable that the area of the coil region is typically within a relatively stable range, while the area of the oil-paper region can be smaller or larger, and can vary significantly. Based on the actual situation, we can set an area threshold range. By comparing the area of the connected domain with the set area threshold range, if the area of the connected domain falls within the threshold range, it is determined to be a coil region; if the area of the connected domain falls outside the threshold range, it is determined to be an oil-paper region.
[0057] If it is determined that the detection area is an area covered by oil paper, the subsequent steps will not be executed, or the above-mentioned related steps for obtaining the detection area will be re-executed after waiting for a period of time; if it is determined that the detection area is not an area covered by oil paper, the detection area will be mapped to the depth map to obtain the target area.
[0058] In some embodiments, to further improve accuracy, a morphological operation can be performed on the intensity map to filter out noise within the detection area. Morphological operations are image processing methods that can be used to process binary images. They define a small set of "structuring elements" and perform mathematical operations on the image to remove noise.
[0059] Morphological operations can include erosion and dilation:
[0060]
[0061] Where A is the input image, B is the structure element, and x and y are the image pixel domains.
[0062] Through the opening operation, the noise points in the coil area extraction process can be effectively removed, making the extracted coil area more accurate and complete, thereby providing a more reliable data basis for subsequent detection steps.
[0063] In this embodiment, the detection area can be mapped to the depth map to obtain the corresponding target area. The target area can be divided into multiple sub-areas according to a specified number (such as Figure 4 As shown, the dotted line segments divide the detection area in the black frame into multiple sub-areas). For example, the specified number may be 50, and 50 sub-areas may be obtained.
[0064] It's understood that during the coil winding process, the winding encoder can record the encoder angle value at the corresponding moment in real time. For each of the 50 sub-regions mentioned above, the central lateral coordinate value of each sub-region corresponds to an encoder angle value, and each sub-region also has corresponding depth data (from the depth map). Based on the depth values and the corresponding encoder angle values, the winding profile of the target coil can be fitted.
[0065] It can be understood that the winding contour is approximately an ellipse. Assuming that the coordinates of the center points of the sub-regions are (x1, y1), (x2, y2), ..., (xn, yn), the winding contour can be characterized as:
[0066] Furthermore, the winding profile can be fitted in a higher dimension to obtain an elliptical model.
[0067] Step S140 : Calculate the designated attributes of the target coil based on the ellipse model to obtain a coil detection result.
[0068] Specifically, the ellipse outline is upgraded to a three-dimensional point cloud to obtain an ellipse model (such as Figure 5As shown). An ellipse equation can be established for the ellipse model, where the ellipse equation can be expressed as:
[0069] Among them, u and v are two orthogonal unit vectors in the plane where the elliptical model is located, indicating the directions of the major axis and minor axis respectively. It is the angle parameter obtained by the winding encoder, r is the coordinate vector of any point in the ellipse model, a is the length of the major axis of the ellipse model, and b is the length of the minor axis of the ellipse model. The major semi-axis length is obtained based on the projection of the point cloud data in the major axis direction, and the minor semi-axis length is obtained based on the projection of the point cloud data in the minor axis direction.
[0070] Specifically, the fitting process of the ellipse equation can be achieved by the least squares method. The fitting goal is set to minimize the objective function:
[0071] in, The first Points, It is the angle parameter transmitted by the encoder, which is used to describe the angle corresponding to the point on the ellipse.
[0072] In the process of solving the objective function, we can first centralize the point cloud and calculate the center of mass of the point cloud:
[0073] Then, construct the covariance matrix:
[0074] Perform singular value decomposition on the covariance matrix to obtain the main direction vector, that is, the direction of the major axis (and thus the direction of the minor axis):
[0075] in, The first two column vectors of and Can be used as the basis vector of the platform where the ellipse is located and .
[0076] After the above steps, the point cloud can be projected in the major and minor axis directions, and then the a and b of the ellipse equation can be calculated. It can be understood that a is 1 / 2 of the major axis of the ellipse, and b is 1 / 2 of the minor axis of the ellipse.
[0077] Based on the obtained ellipse equation, the circumference of the target coil can be calculated:
[0078] Where e is the eccentricity, which is calculated from a and b:
[0079] In the above embodiment, the calculation of the major axis, minor axis, and circumference is all for a specific moment in the winding process. For the entire winding process, the coil thickness needs to be calculated using the ellipse equation corresponding to different sampling moments.
[0080] Specifically, for the two specified sampling moments, the corresponding ellipse equations are calculated respectively; based on the two ellipse equations, the major axis length and the minor axis length corresponding to the two sampling moments are obtained; based on the major axis length and the minor axis length, the thickness difference between the coils corresponding to the two sampling moments is obtained.
[0081] The two designated sampling moments may be the moment when a certain layer of coil winding begins and the moment when the coil winding of the same layer is completed. The thickness difference calculated by the method provided in this embodiment is the thickness of the coil this time.
[0082] In addition, after the coil is fully wound, the finished coil needs to be inspected for coil height compliance. In this embodiment, once the target coil is wound, a 3D point cloud corresponding to the target coil can be collected to construct a corresponding brightness map. Based on the brightness map, the top and bottom winding edges of the target coil are fitted. The straight-line distance between the top and bottom winding edges is calculated as the coil height of the target coil.
[0083] Specifically, global threshold segmentation can be performed on the brightness image first. The topmost circle image can then be subjected to global threshold segmentation to obtain the coil region. Dynamic thresholding and morphological processing are then used to obtain the upper edge. Similarly, the lower image can be processed to obtain the lower edge. The steps for global threshold segmentation and morphological processing are similar to those of the threshold segmentation method in the previous embodiment and will not be repeated here.
[0084] After obtaining the point sets corresponding to the upper and lower edges, we can perform straight line fitting on the upper and lower edge point sets to obtain two straight lines, namely the top winding edge and the bottom winding edge:
[0085]
[0086]
[0087] By substituting the formula for the average distance between straight lines into the equations for the top and bottom winding edges, the coil height can be calculated:
[0088] in, and and is the equation of line 2 The coefficient of and is the equation of line 1 on points.
[0089] In some embodiments, the work order corresponds to various standard values corresponding to the target coil (i.e., the aforementioned process standard parameters). As the various test data are obtained through the steps in the above embodiment, the deviation between the test data and the corresponding standard values can be calculated to determine in real time whether the target coil is a good product.
[0090] At the same time, the inspection results can be stored in real time in the database and displayed on the staff's user interface, thus achieving closed-loop data retention and visual display. The 3D point cloud data of the coil is collected in real time by a 3D laser contour scanner. The inspection system is deployed according to the preset settings on the industrial control computer. The system uses the visual inspection algorithm to automatically perform real-time inspections and feedback data during and after the winding process. This ensures that the data is rooted, active, traceable, and usable, thereby improving production efficiency and product quality.
[0091] In some embodiments, to further improve visibility, the number of turns transmitted by the Programmable Logic Controller (PLC) can be received in real time during the coil winding process. The number of winding segments can be calculated based on the number of turns and the number of turns. A proportional 3D point cloud model of the coil is generated in real time based on the total number of segments and the number of winding segments, and then displayed in the user interface (e.g., Figure 6 shown).
[0092] This embodiment provides a coil detection method that collects a 3D point cloud and constructs depth and brightness maps in real time during the target coil winding process. After accurately determining the winding position in the brightness map, the method uses the depth map to perform ellipse fitting to generate a model. This method then efficiently calculates the specified properties of the target coil, enabling fast and accurate detection. This effectively improves detection efficiency and accuracy, ensuring that coil quality meets standards. Real-time quality control achieved through inspection during the winding stage can help identify production problems and defects early, further improving manufacturing efficiency and product quality.
[0093] The present application provides a coil detection device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the coil detection method of the above-mentioned embodiment 1.
[0094] Reference below Figure 7 , which shows a schematic diagram of the structure of a coil detection device suitable for implementing the embodiments of the present application. The coil detection device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The coil detection device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0095] like Figure 7 As shown, coil detection device 100 may include a processing device 110 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 120 or programs loaded from storage device 130 into random access memory (RAM) 140. RAM 140 also stores various programs and data required for coil detection device operation. Processing device 110, ROM 120, and RAM 140 are interconnected via bus 150. An input / output (I / O) interface 160 is also connected to the bus. Typically, the following systems may be connected to I / O interface 160: input device 170, such as a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output device 180, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 130, such as a magnetic tape, hard disk, etc.; and communication device 190. Communication device 190 can allow the coil detection device to communicate with other devices wirelessly or wired to exchange data. Although the figures show a coil detection device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have alternatively.
[0096] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 130, or installed from a ROM 120. When the computer program is executed by the processing device 110, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0097] The coil detection device provided in this application, utilizing the coil detection method described in the aforementioned embodiment, can address the technical problem of efficiently and accurately controlling coil quality. Compared to the prior art, the coil detection device provided in this application achieves the same beneficial effects as the coil detection method described in the aforementioned embodiment. Other technical features of this coil detection device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0098] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0099] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0100] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the coil detection method in the above embodiment.
[0101] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0102] The computer-readable storage medium may be included in the coil detection device; or may exist independently without being assembled into the coil detection device.
[0103] The computer-readable storage medium carries one or more programs that, when executed by the coil detection device, enable the coil detection device to write computer program code for performing the operations of the present application in one or more programming languages, or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0104] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0105] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0106] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned coil detection method. This computer-readable storage medium addresses the technical problem of efficiently and accurately controlling coil quality. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the coil detection method provided in the aforementioned embodiments and are not further elaborated here.
[0107] The present application also provides a computer program product, including a computer program, which implements the steps of the coil detection method as described above when the computer program is executed by a processor.
[0108] The computer program product provided in this application can solve the technical problem of how to efficiently and accurately control the quality of coils. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the coil detection method provided in the above embodiment, and will not be repeated here.
[0109] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A coil detection method, characterized in that: The coil detection method comprises: During the winding process of the target coil, a corresponding depth map and brightness map are constructed based on the three-dimensional point cloud collected in real time from the surface of the target coil; determining a winding position of the target coil in the brightness map to obtain a detection area, wherein the detection area is generated based on the winding position; When the detection area is not an area covered by the oil paper, fitting the currently wound coil portion of the target coil based on the depth map to generate a corresponding elliptical model; The designated properties of the target coil are calculated based on the ellipse model to obtain a coil detection result.
2. The coil detection method according to claim 1, wherein: Determining the winding position of the target coil in the brightness map includes: Inputting the brightness map into a pre-trained segmentation model to obtain a predicted position; Calculating a local threshold of each window at the predicted position by a dynamic threshold segmentation algorithm; wherein the brightness map includes a plurality of pre-divided windows, and each window includes a plurality of pixels; Classifying each pixel in the brightness image based on each local threshold value to obtain a winding position of the target coil; The dynamic threshold segmentation algorithm is expressed by Expression 1: T(x,y) is the local threshold of the pixel (x,y), I(x,y) is the pixel value of the brightness image at position (x,y), N is the total number of pixels in the window, and a and b are the lengths of the window in the x and y directions, respectively.
3. The coil detection method according to claim 2, wherein: The fitting of the currently wound coil portion of the target coil based on the depth map to generate a corresponding ellipse model includes: Mapping the detection area to the depth map to obtain a target area; wherein the target area includes a specified number of equally divided sub-areas; Fitting the winding profile of the target coil based on the angle value and the depth value corresponding to each sub-region; Performing dimensionality-increasing fitting on the winding profile to obtain the ellipse model, wherein the ellipse model includes point cloud data.
4. The coil detection method according to claim 3, wherein: The calculating the specified attribute of the target coil based on the elliptical model to obtain the coil detection result includes: Constructing a covariance matrix, performing singular value decomposition on the covariance matrix, and obtaining the major axis and minor axis directions of the winding profile; Fitting the point cloud data by the least squares method to obtain an ellipse equation of the ellipse model in three-dimensional space; The ellipse equation is expressed by Expression 2: in, and are two orthogonal unit vectors in the plane where the elliptical model is located, representing the directions of the major axis and the minor axis respectively, is the angle parameter obtained by the winding encoder, r is the coordinate vector of any point in the ellipse model, a is the length of the major semi-axis of the ellipse model, b is the length of the minor semi-axis of the ellipse model, the major semi-axis length is obtained based on the projection of the point cloud data in the major axis direction, and the minor semi-axis length is obtained based on the projection of the point cloud data in the minor axis direction; The designated properties of the target coil are calculated according to the ellipse equation to obtain a coil detection result.
5. The coil detection method according to claim 4, wherein: Calculating the specified attribute of the target coil according to the ellipse equation to obtain a coil detection result includes: The coil circumference of the target coil is calculated by Expression 3: Where e is the eccentricity, which is calculated by Expression 4: Where a is 1 / 2 of the major axis of the ellipse, and b is 1 / 2 of the minor axis of the ellipse.
6. The coil detection method according to claim 4, wherein: Calculating the specified attribute of the target coil according to the ellipse equation to obtain a coil detection result includes: For two specified sampling moments, respectively calculating the corresponding ellipse equations; According to the two ellipse equations, the major axis length and the minor axis length corresponding to the two sampling moments are obtained; Based on the major axis length and the minor axis length, a thickness difference between the coils corresponding to the two sampling moments is obtained.
7. The coil detection method according to claim 1, wherein: After calculating the specified attribute of the target coil based on the elliptical model and obtaining the coil detection result, the coil detection method further includes: When the target coil is wound, a three-dimensional point cloud corresponding to the target coil is collected to construct a corresponding brightness map; Based on the brightness map, fitting is performed to obtain a top winding edge and a bottom winding edge of the target coil; The straight-line distance between the top winding edge and the bottom winding edge is calculated as the coil height of the target coil.
8. A coil detection device, characterized in that: The coil detection device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the coil detection method according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the coil detection method according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the coil detection method according to any one of claims 1 to 7 are implemented.