CN115830043A - Boundary detection method, device and equipment of wireless magnet charging and storage medium - Google Patents

Boundary detection method, device and equipment of wireless magnet charging and storage medium Download PDF

Info

Publication number
CN115830043A
CN115830043A CN202310023655.XA CN202310023655A CN115830043A CN 115830043 A CN115830043 A CN 115830043A CN 202310023655 A CN202310023655 A CN 202310023655A CN 115830043 A CN115830043 A CN 115830043A
Authority
CN
China
Prior art keywords
boundary
magnet
image
detected
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310023655.XA
Other languages
Chinese (zh)
Other versions
CN115830043B (en
Inventor
黄耀
王宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aqrose Robot Technology Co ltd
Original Assignee
Beijing Aqrose Robot Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aqrose Robot Technology Co ltd filed Critical Beijing Aqrose Robot Technology Co ltd
Priority to CN202310023655.XA priority Critical patent/CN115830043B/en
Publication of CN115830043A publication Critical patent/CN115830043A/en
Application granted granted Critical
Publication of CN115830043B publication Critical patent/CN115830043B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/70Energy storage systems for electromobility, e.g. batteries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/7072Electromobility specific charging systems or methods for batteries, ultracapacitors, supercapacitors or double-layer capacitors

Landscapes

  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of image processing, and discloses a boundary detection method, a boundary detection device, boundary detection equipment and a storage medium for a wireless magnet charging device. The method comprises the following steps: acquiring an image to be detected of the magnet ring to be detected; determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet; performing area division on the boundary conversion image, and determining the integral boundary of the magnet ring to be detected; determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image; and finishing the boundary detection of the magnet ring to be detected according to the magnet boundary image. The calculation difficulty of the whole boundary is reduced, the magnet boundary image of the magnet ring to be detected can be determined based on the whole boundary and the boundary conversion image, the boundary of each single magnet in the magnet ring to be detected can be determined based on the magnet boundary image, the boundary detection of the magnet ring to be detected is completed, and the accuracy of the boundary detection of the magnet ring to be detected in wireless charging is guaranteed.

Description

Boundary detection method, device, equipment and storage medium of wireless magnet charger
Technical Field
The invention relates to the technical field of image processing, in particular to a boundary detection method, a boundary detection device, boundary detection equipment and a storage medium for a wireless magnet charger.
Background
When the traditional region extraction algorithm is applied to the wireless ring-shaped combined magnet, the requirement on the contrast ratio of the magnet and the background is strict, the traditional region extraction algorithm is limited by the process of the magnet, when the magnet deviates or breaks, the boundary of the magnet cannot be accurately judged, the region extraction is too much or too little, and the boundary detection result of the wireless ring-shaped combined magnet is inaccurate.
Disclosure of Invention
The invention mainly aims to provide a boundary detection method, a boundary detection device, boundary detection equipment and a storage medium of a wireless magnet charger, and aims to solve the technical problem of the prior art of how to accurately detect the boundary of a wireless magnet charger-shaped combined magnet and the segmentation precision.
In order to achieve the above object, the present invention provides a boundary detection method for a wireless magnetizing magnet, including:
acquiring an image to be detected of the magnet ring to be detected;
determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet;
performing area division on the boundary conversion image, and determining the integral boundary of the magnet ring to be detected;
determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image;
and finishing the boundary detection of the magnet ring to be detected according to the magnet boundary image.
Optionally, the determining a boundary transformation image according to the image center of the image to be detected and a preset magnet size includes:
calculating the initial edge position of the magnet ring to be detected according to the image center of the image to be detected;
determining a target edge according to the initial edge position and the preset magnet size;
determining a target magnet ring image according to the target edge and the image to be detected;
and performing polar coordinate conversion on the target magnet ring image to obtain a boundary conversion image.
Optionally, the performing region division on the boundary conversion image to determine the overall boundary of the magnet ring to be detected includes:
performing region division on the boundary conversion image to obtain a first conversion image, a second conversion image and a third conversion image;
determining the transverse boundary of the magnet ring to be detected according to the first conversion image and the second conversion image;
determining the longitudinal boundary of the magnet ring to be detected according to the third conversion image;
and determining the integral boundary of the magnet ring to be detected according to the transverse boundary and the longitudinal boundary.
Optionally, the determining the longitudinal boundary of the magnet ring to be detected according to the third conversion image includes:
determining a regional central line according to the third conversion image;
extracting a bright contour from the third converted image according to the line in the region to obtain a first contour line;
fitting according to the first contour line to obtain a second contour line;
and screening the second contour line according to a preset direction and a preset magnet size, and determining the longitudinal boundary of the magnet ring to be detected.
Optionally, the screening the second contour line according to the preset direction and the preset magnet size to determine the longitudinal boundary of the magnet ring to be detected includes:
filtering the second contour line according to the preset direction and the size of the preset magnet to obtain a third contour line;
determining the number of the combined magnets according to the magnet ring to be detected;
determining the number of target screening contours according to the number of the combined magnets;
when the number of the third profiles is larger than the target screening profiles, screening the third profiles according to the equivalent radius of the third profiles;
and determining the longitudinal boundary of the magnet ring to be detected according to the screening result of the third contour line.
Optionally, the determining the longitudinal boundary of the magnetic ring to be detected according to the screening result of the third contour includes:
determining a fourth contour according to the screening result of the third contour;
determining a magnet gap region according to the fourth contour line and the region central line;
determining a residual area on the pixel area according to the pixel area of the central line of the area and the magnet gap area;
determining the side surface boundary of the magnet ring to be detected according to the residual area;
and determining the longitudinal boundary of the magnet ring to be detected according to the fourth contour line and the side boundary.
Optionally, the determining a lateral boundary of the magnetic ring to be detected according to the first and second transformed images comprises:
traversing the first conversion image and the second conversion image to determine a first boundary of each combined magnet in the magnet ring to be detected;
determining a second boundary of each combined magnet in the magnet ring to be detected according to the regional central line of the third converted image, the first boundary and a preset magnet size;
and determining the transverse boundary of the magnet ring to be detected according to the first boundary and the second boundary.
In addition, in order to achieve the above object, the present invention further provides a boundary detection device of a wireless magnetizing magnet, including:
the acquisition module is used for acquiring an image to be detected of the magnet ring to be detected;
the determining module is used for determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet;
the dividing module is used for carrying out region division on the boundary conversion image and determining the integral boundary of the magnet ring to be detected;
the determining module is used for determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image;
and the completion module is used for completing the boundary detection of the magnet ring to be detected according to the magnet boundary image.
In addition, to achieve the above object, the present invention also provides a boundary detecting apparatus of a wireless charging magnet, including: the boundary detection program of the wireless charging magnet is configured to realize the boundary detection method of the wireless charging magnet.
In addition, in order to achieve the above object, the present invention further provides a storage medium, in which a boundary detection program of a wireless magnetizing magnet is stored, and the boundary detection program of the wireless magnetizing magnet realizes the boundary detection method of the wireless magnetizing magnet as described above when being executed by a processor.
The method comprises the steps of obtaining an image to be detected of a magnet ring to be detected; determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet; performing area division on the boundary conversion image, and determining the integral boundary of the magnet ring to be detected; determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image; and finishing the boundary detection of the magnet ring to be detected according to the magnet boundary image. By the mode, the boundary conversion image is determined based on the image center of the image to be detected and the size of the preset magnet, the whole boundary of the magnet ring to be detected is determined through the boundary conversion image, the calculation difficulty of the whole boundary is reduced, the magnet boundary image of the magnet ring to be detected is determined based on the whole boundary and the boundary conversion image, the boundary of each single magnet in the magnet ring to be detected can be determined based on the magnet boundary image, the boundary detection of the magnet ring to be detected is completed, and the accuracy of the wireless charging detection of the boundary of the magnet ring to be detected is guaranteed.
Drawings
FIG. 1 is a schematic diagram of a wireless magnet-charging boundary detection device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart illustrating a boundary detection method for a wireless charging magnet according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a transition of an embodiment of a method for detecting a boundary of a wireless charging magnet according to the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of a method for detecting a boundary of a wireless charging magnet according to the present invention;
FIG. 5 is a schematic boundary diagram illustrating a boundary detection method for a wireless charging magnet according to an embodiment of the present invention;
fig. 6 is a block diagram of a boundary detection device of a wireless charging magnet according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a boundary detection apparatus for a wireless magnet charger in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the boundary detection apparatus of a wireless charging magnet may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of the wireless magnet-charged boundary detection device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a boundary detection program of a wireless charger.
In the boundary detection device of the wireless charging magnet shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the boundary detection device of the wireless magnet charging of the present invention may be provided in the boundary detection device of the wireless magnet charging, and the boundary detection device of the wireless magnet charging calls the boundary detection program of the wireless magnet charging stored in the memory 1005 through the processor 1001 and executes the boundary detection method of the wireless magnet charging provided by the embodiment of the present invention.
An embodiment of the present invention provides a boundary detection method for a wireless charging magnet, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the boundary detection method for a wireless charging magnet according to the present invention.
The boundary detection method of the wireless magnet charger comprises the following steps:
step S10: and acquiring an image to be detected of the magnet ring to be detected.
It should be noted that, in the embodiment, the main execution body terminal device may be an intelligent terminal such as a computer, a mobile phone, or a tablet, or may be another intelligent terminal, which is not limited in this respect, a boundary detection system of a wireless magnet charger is present on the terminal device, the boundary detection system of the wireless magnet charger acquires an image to be detected of a magnet ring to be detected, a boundary conversion image is determined according to an image center of the image to be detected and a preset magnet size, region division is performed on the boundary conversion image, an overall boundary of the magnet ring to be detected is determined, a magnet boundary image of the magnet ring to be detected is determined according to the overall boundary and the boundary conversion image, and boundary detection of the magnet ring to be detected is completed according to the magnet boundary image.
The magnet ring to be detected is an annular combined magnet in wireless charging, is composed of a plurality of magnet blocks with the same size, and after a boundary instruction initiated by a user is received, the boundary of each magnet block in the magnet ring to be detected needs to be detected, an image of the magnet ring to be detected is obtained at the moment, and the image of the magnet ring to be detected is the image to be detected.
Step S20: and determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet.
It should be noted that the image center refers to a center position of the image to be detected, and the center of the image to be detected is located by using an NCC (Normalized cross correlation) model, so as to determine the image center of the image to be detected, where the image center is also the center of the magnetic ring to be detected.
The preset magnet size refers to the magnet width of each magnet block in the magnet ring to be detected in the longitudinal direction. The boundary transition image refers to a rectangular image obtained by straightening the annular region including the magnet ring to be detected.
It can be understood that after the image center of the image to be detected and the size of the preset magnet are determined, an annular region which contains the magnet ring to be detected and is reserved with a preset area can be determined in the image to be detected, the magnet ring to be detected is divided from any position of the magnet ring to be detected, the magnet ring to be detected is straightened, and then polar coordinate conversion is carried out to obtain a rectangular image of the region.
In a specific implementation, in order to obtain an accurate boundary transformation image, further, determining a boundary transformation image according to an image center of the image to be detected and a preset magnet size includes: calculating the initial edge position of the magnet ring to be detected according to the image center of the image to be detected; determining a target edge according to the initial edge position and the preset magnet size; determining a target magnet ring image according to the target edge and the image to be detected; and performing polar coordinate conversion on the target magnet ring image to obtain a boundary conversion image.
It should be noted that, after the image center of the image to be detected is determined, the approximate positions of the inner edge and the outer edge of the magnet ring to be detected can be calculated according to the image center, the approximate positions of the inner edge and the outer edge are the initial edge positions, an inner edge caliper is made according to the approximate position of the inner edge in the initial edge positions, so that the accurate inner edge is determined, and when the inner edge caliper fails, an outer edge caliper is made according to the approximate position of the inner edge and the outer edge in the initial edge positions, so that the accurate outer edge is determined.
It is understood that after the exact inner or outer edge is determined, the other edge of the magnet ring to be examined can be calculated from the predetermined magnet dimensions. For example, after finding an accurate inner edge according to the inner edge caliper, the outer edge of the magnet ring to be detected may be calculated according to the magnet width in the preset magnet size, and the target edge includes the inner edge and the outer edge of the magnet ring to be detected.
In specific implementation, after the target edge is determined, the region of the magnet ring to be detected can be determined in the image to be detected, the annular region which contains the magnet ring to be detected and is reserved with the preset area is determined in the image to be detected according to the preset area and the region of the magnet to be detected, and the image which contains the magnet ring to be detected and is reserved with the preset area and corresponds to the annular region is the target magnet ring image.
It should be noted that, after the target magnet ring image is determined, the magnet ring to be detected is divided from any position of the magnet ring to be detected in the target magnet ring image, and the magnet ring to be detected is straightened and then subjected to polar coordinate conversion, so as to obtain a corresponding rectangular image, where the rectangular image is a boundary conversion image. Thereby guarantee can accurately acquire the cyclic annular region that waits to detect the magnet ring place, guarantee to wait to detect the magnet ring and straighten back upper and lower border and keep a straight line as far as, will contain simultaneously to wait to detect the magnet ring and reserve the region of predetermineeing the area and straighten the extraction that more is favorable to the border of each magnet piece, the arc region is when confirming accurate complete profile according to four limits, the calculation that needs to go on is too complicated, after polar coordinate converts the rectangular region into, only need four straight lines of fit just can obtain a parallelogram's region. As shown in fig. 3, the target magnet ring image is a, the boundary transition image is B, a is an inner edge of the target edge of the magnet ring to be detected, and B is an outer edge of the target edge of the magnet ring to be detected.
Step S30: and carrying out region division on the boundary conversion image, and determining the integral boundary of the magnet ring to be detected.
The boundary conversion image is divided into three parts, namely an upper part, a middle part and a lower part, wherein an image corresponding to the upper part in the boundary conversion image comprises the upper boundary of each magnet block in the magnet ring to be detected, an image corresponding to the middle part in the boundary conversion image comprises a part of the longitudinal boundary of each magnet block in the magnet ring to be detected, and an image corresponding to the lower part in the boundary conversion image comprises the lower boundary of each magnet block in the magnet ring to be detected.
It can be understood that the upper boundary, the lower boundary and the longitudinal boundary of each magnet block in the magnet ring to be detected are respectively determined based on the divided boundary conversion images, and the upper boundary, the lower boundary and the longitudinal boundary of each magnet block in the magnet ring to be detected are the integral boundaries of the magnet ring to be detected.
Step S40: and determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image.
After the overall boundary is determined, the accurate regions of the magnet blocks in the magnet ring to be detected are made in the boundary conversion image, the accurate regions of the magnet blocks in the boundary conversion image are obtained, whether the number of the regions of the magnet blocks is the same as that of the magnet blocks in the magnet ring to be detected is determined, if the number of the regions of the magnet blocks is the same as that of the magnet blocks in the magnet ring to be detected, the reverse polar coordinate conversion is performed on the boundary conversion image, so that the original image of the magnet ring to be detected is mapped back, the original image is restored to be in an arc shape, the boundaries of the magnet blocks in the magnet ring to be detected in the original image are clearly marked, and the original image of the magnet ring to be detected is the magnet boundary image.
Step S50: and finishing the boundary detection of the magnet ring to be detected according to the magnet boundary image.
The boundary detection of the magnet ring to be detected is determined and completed according to the magnet boundary image.
It can be understood that, according to the boundary detection method of the wireless magnet charger in the embodiment, the length dimension of the magnet in the magnet ring to be detected can be measured; whether there is the magnet piece skew to detect in the magnet ring simultaneously, and concrete process is: fitting the upper boundary or the lower boundary of each magnet block in the magnet ring to be detected into a straight line so as to obtain a boundary datum line, measuring the upper boundary or the lower boundary of the target of each magnet block, calculating the distance between the upper boundary or the lower boundary of the target of each magnet block and the boundary datum line, and when the distance exceeds a threshold value, indicating that the magnet block is shifted; still can be used to distinguish the mar on the packing and the mar on the magnet in AI outward appearance is examined, because magnet fish tail or fracture and the mar imaging effect on the outer packaging film are very similar, consequently lead to easily examining, we can obtain the magnet region of relative accuracy through this algorithm, through handing over the operation with defect and magnet region, can judge the defect that runs through the magnet region as the mar on the extranal packing, can reduce the excessive examination rate by a wide margin.
In the embodiment, an image training set is obtained when a boundary detection task of a wireless magnet charger is received; performing model training according to the image training set to obtain an initial segmentation model; determining a target training set in the image training set according to the initial segmentation model; updating and training according to the image training set, the target training set and the initial segmentation model to obtain a target segmentation model; and completing the boundary detection task of the wireless magnet charging body according to the target segmentation model. Through the mode, when the initial segmentation model does not meet the online requirement, the target training set is determined in the image training set, the initial segmentation model is updated and trained on the basis of the target training set and the image training set, so that the target segmentation model meeting the online requirement and having better segmentation performance is obtained, the boundary detection task of the wireless magnet charger is completed on the basis of the target segmentation model, and the segmentation precision of the boundary detection task of the wireless magnet charger is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a second embodiment of a method for detecting a boundary of a wireless charging magnet according to the present invention.
Based on the first embodiment, the step S30 of the boundary detection method of the wireless charging magnet of this embodiment includes:
step S31: and carrying out region division on the boundary conversion image to obtain a first conversion image, a second conversion image and a third conversion image.
The boundary conversion image is divided into three parts, namely an upper part, a middle part and a lower part, wherein an image corresponding to the upper part in the boundary conversion image comprises the upper boundary of each magnet block in the magnet ring to be detected, an image corresponding to the middle part in the boundary conversion image comprises a part of the longitudinal boundary of each magnet block in the magnet ring to be detected, and an image corresponding to the lower part in the boundary conversion image comprises the lower boundary of each magnet block in the magnet ring to be detected.
It can be understood that the image corresponding to the upper region is the first converted image, the image corresponding to the lower region is the second converted image, and the image corresponding to the middle region is the third converted image.
Step S32: and determining the transverse boundary of the magnet ring to be detected according to the first conversion image and the second conversion image.
It should be noted that the lateral boundaries refer to the upper boundary and the lower boundary of each magnet block in the magnet ring to be detected. And determining the transverse boundary of each magnet block in the magnet ring to be detected according to the first conversion image and the second conversion image.
It is understood that, in order to obtain an accurate transverse boundary based on the first and second transformed images, further, the determining the transverse boundary of the magnet ring to be detected according to the first and second transformed images comprises: traversing the first conversion image and the second conversion image to determine a first boundary of each combined magnet in the magnet ring to be detected; determining a second boundary of each combined magnet in the magnet ring to be detected according to the regional central line of the third converted image, the first boundary and a preset magnet size; and determining the transverse boundary of the magnet ring to be detected according to the first boundary and the second boundary.
In concrete implementation, each combined magnet refers to a magnet block with the same size in the to-be-detected magnet ring, the first conversion image and the second conversion image are traversed, the first boundary of each magnet block in each to-be-detected magnet ring is extracted, and the concrete process is as follows: traversing the first conversion image, extracting the upper boundary of each magnet block in each magnet ring to be detected, traversing the second conversion image if the upper boundary of each magnet block in the magnet ring to be detected is not found in the first conversion image, extracting the lower boundary of each magnet block in each magnet ring to be detected, and determining the found upper boundary or lower boundary of each magnet block as the first boundary of each magnet block.
If the first boundary is the upper boundary of each magnet block, performing upward rectangle according to the area center line until the upper boundary is reached, and translating the upper boundary of each magnet block downwards according to the preset magnet size so as to obtain the lower boundary of each magnet block, wherein the lower boundary is the second boundary of each magnet block; and if the first boundary is the lower boundary of each magnet block, making a rectangle downwards according to the central line of the area until the lower boundary is reached, and translating the lower boundary of each magnet upwards according to the preset magnet size to obtain the upper boundary of each magnet block, wherein the upper boundary is the second boundary of each magnet block.
Step S33: and determining the longitudinal boundary of the magnet ring to be detected according to the third conversion image.
It should be noted that the longitudinal boundaries of the magnet ring to be detected, that is, the longitudinal boundaries of the magnet blocks in the magnet ring to be detected, may be used to determine the longitudinal separation lines between the magnet blocks, and after the boundary conversion image is subjected to area division, the longitudinal boundaries of the magnet blocks may be determined according to the third conversion image.
It is understood that, in order to determine the exact longitudinal boundary from the third conversion image, further, the determining the longitudinal boundary of the magnet ring to be inspected from the third conversion image comprises: determining a regional centerline from the third converted image; extracting a bright contour from the third converted image according to the line in the region to obtain a first contour line; fitting according to the first contour line to obtain a second contour line; and screening the second contour line according to a preset direction and a preset magnet size, and determining the longitudinal boundary of the magnet ring to be detected.
In specific implementation, the regional central line is the central line of the third conversion image, in order to accurately detect the sub-pixels, when the high precision of the regional central line is reduced due to imaging problems, the accuracy of the result can still be ensured within an acceptable range, a bright contour is extracted from the regional central line to the third conversion image, all sub-pixel contour lines of the magnet ring to be detected in the third conversion image are obtained, all sub-pixel contour lines are decomposed into straight lines, circular arcs and ellipses, and the straight lines in all the sub-pixel contour lines of the magnet ring to be detected are used as first contour lines.
It should be noted that, fitting is performed on the first contour line, adjacent straight lines in the first contour line are fitted, the length of the longitudinal boundary is ensured, and the straight line obtained through fitting is the second contour line. The preset direction refers to a direction perpendicular to the horizontal direction, and in the present embodiment, refers to a longitudinal direction.
It can be understood that, screening the second contour line according to the preset direction and the preset magnet size to determine the longitudinal boundary of each magnet block in the magnet ring to be detected, in order to obtain an accurate longitudinal boundary in this embodiment, further, screening the second contour line according to the preset direction and the preset magnet size to determine the longitudinal boundary of the magnet ring to be detected includes: filtering the second contour line according to the preset direction and the size of the preset magnet to obtain a third contour line; determining the number of the combined magnets according to the magnet ring to be detected; determining the number of target screening contours according to the number of the combined magnets; when the number of the third profiles is larger than the target screening profiles, screening the third profiles according to the equivalent radius of the third profiles; and determining the longitudinal boundary of the magnet ring to be detected according to the screening result of the third contour line.
In concrete implementation, the second contour line is screened according to the preset direction and the preset magnet size, so that a third contour line with the length reaching the preset magnet size and the contour line direction being the preset direction is obtained.
It should be noted that the number of the combined magnets refers to the number of the magnet blocks in the magnet ring to be detected, the number of the magnet blocks in the magnet ring to be detected is determined according to the magnet ring to be detected, so that the number of the combined magnets is obtained, the number of the target screening outlines refers to twice the number of the combined magnets, when the number of the third contour lines is larger than the number of the target screening outlines, the small radius of the equivalent ellipse of the third contour line is obtained, and the small radius of the equivalent ellipse is the equivalent radius of the third contour line. And screening the third contour line according to the equivalent radius of the third contour line, removing the contour line which is not straight in the third contour line, thereby obtaining the screening result of the third contour line, and determining the longitudinal boundary of the magnetic ring to be detected according to the screening result of the third contour line.
It can be understood that, in order to obtain an accurate longitudinal boundary based on the screening result of the third contour, further, the determining the longitudinal boundary of the to-be-detected magnetic ring according to the screening result of the third contour includes: determining a fourth contour according to the screening result of the third contour; determining a magnet gap region according to the fourth contour line and the region central line; determining a residual area on the pixel area according to the pixel area of the central line of the area and the magnet gap area; determining the side surface boundary of the magnet ring to be detected according to the residual area; and determining the longitudinal boundary of the magnet ring to be detected according to the fourth contour line and the side boundary.
In the concrete implementation, according to the screening result of the third contour line, after filtering the contour line which is not straight in the third contour line, a contour line which is straight in the third contour line is obtained, the contour line which is straight in the third contour line is the fourth contour line, the fourth contour line is the longitudinal boundary of each magnet ring in the magnet ring to be detected, and the left longitudinal boundary of the magnet block at the leftmost side of the magnet ring to be detected and the right longitudinal boundary of the magnet block at the rightmost side of the magnet ring to be detected are not included.
It should be noted that the fourth contour lines are sequenced to make the fourth contour lines correspond to the magnet blocks in the magnet ring to be detected, intersection points of the area center lines and the fourth contour lines are obtained, adjacent points of the distances between the focuses within the preset gap width range of the magnet blocks are connected into lines to obtain gap lines, the gap lines are converted into areas, that is, one line with a single pixel width is an area, so that gap areas between the magnet blocks are obtained, and the gap areas between the magnet blocks are magnet gap areas.
It can be understood that the central line of the region is converted into the region, so that a pixel region corresponding to the central line of the region is obtained, the pixel region is subtracted from the magnet gap region, a line region representing the transverse width of each magnet block can be obtained, extra short line regions possibly caused by excessive gap profiles are screened out, and the magnet block region and the magnet gap region which are more accurate are finally obtained.
In specific implementation, considering the situation that only one contour line is caused by the undersize of the magnet gap, the contour without adjacent contour lines is screened out, one pixel and two pixels are slightly expanded, a specified magnet gap area is obtained under the condition that the serious influence on the measurement of the magnet ring to be detected is not caused, and the newly obtained magnet gap area is subtracted by the pixel area, so that the magnet block areas with the correct number can be obtained.
It should be noted that, considering that there is no magnet gap at the two ends of the magnet ring to be detected and it may cause the extraction omission due to the unobvious extraction of the longitudinal boundaries at the two ends of the magnet ring to be detected, an area where the magnet ring to be detected is located of a third conversion image is obtained according to blob analysis, a rectangular closing operation is performed to make the area where the magnet ring to be detected is located more complete, the influence of the magnet gap area is eliminated, the pixel area is used to subtract the magnet gap area, so as to obtain a remaining area outside the magnet gap area processed on the pixel area, if the width of the remaining area is greater than the transverse width of the magnet block to be measured, in the remaining area of the pixel area, the longitudinal boundaries of the magnet blocks at the two ends of the magnet ring to be detected in a fourth contour line are used as calipers to obtain an accurate rectangular area, and the left and right edges of the rectangular area are the left longitudinal boundaries of the leftmost magnet block of the magnet ring to be detected and the right longitudinal boundaries of the rightmost magnet block of the magnet ring to be detected.
It is understood that the side boundaries and the fourth contour determined in the third converted image determine the longitudinal boundaries of the magnet blocks in the magnet ring to be detected. As shown in fig. 5, a to j are fourth contour lines, m and n are side boundaries, a is a region where each magnet block is located, and B is a magnet gap region.
Step S34: and determining the integral boundary of the magnet ring to be detected according to the transverse boundary and the longitudinal boundary.
It should be noted that after the transverse boundaries and the longitudinal boundaries of the magnet blocks of the magnet ring to be detected are obtained, the entire boundaries of the magnet ring to be detected can be determined.
In the embodiment, a first conversion image, a second conversion image and a third conversion image are obtained by performing region division on the boundary conversion image; determining the transverse boundary of the magnet ring to be detected according to the first conversion image and the second conversion image; determining the longitudinal boundary of the magnet ring to be detected according to the third conversion image; and determining the integral boundary of the magnet ring to be detected according to the transverse boundary and the longitudinal boundary. By the mode, the boundary conversion image is subjected to region division, and the transverse boundary and the longitudinal boundary of each magnet block are respectively determined based on the direction of the divided region, so that the boundary detection precision and the boundary detection efficiency are ensured.
In addition, referring to fig. 6, an embodiment of the present invention further provides a boundary detection apparatus for a wireless magnetizing magnet, including:
the obtaining module 10 is configured to obtain an image to be detected of the magnet ring to be detected.
And the determining module 20 is used for determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet.
And the dividing module 30 is configured to perform area division on the boundary conversion image, and determine an overall boundary of the magnet ring to be detected.
The determining module 20 is configured to determine a magnet boundary image of the to-be-detected magnet ring according to the entire boundary and the boundary conversion image.
And the finishing module 40 is used for finishing the boundary detection of the magnet ring to be detected according to the magnet boundary image.
In the embodiment, the image to be detected of the magnet ring to be detected is obtained; determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet; performing area division on the boundary conversion image, and determining the integral boundary of the magnet ring to be detected; determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image; and finishing the boundary detection of the magnet ring to be detected according to the magnet boundary image. By the mode, the boundary conversion image is determined based on the image center of the image to be detected and the size of the preset magnet, the whole boundary of the magnet ring to be detected is determined through the boundary conversion image, the calculation difficulty of the whole boundary is reduced, the magnet boundary image of the magnet ring to be detected is determined based on the whole boundary and the boundary conversion image, the boundary of each single magnet in the magnet ring to be detected can be determined based on the magnet boundary image, the boundary detection of the magnet ring to be detected is completed, and the accuracy of the wireless charging detection of the boundary of the magnet ring to be detected is guaranteed.
In an embodiment, the determining module 20 is further configured to calculate an initial edge position of the magnet ring to be detected according to an image center of the image to be detected;
determining a target edge according to the initial edge position and the preset magnet size;
determining a target magnet ring image according to the target edge and the image to be detected;
and performing polar coordinate conversion on the target magnet ring image to obtain a boundary conversion image.
In an embodiment, the dividing module 30 is further configured to perform area division on the boundary conversion image to obtain a first conversion image, a second conversion image, and a third conversion image;
determining the transverse boundary of the magnet ring to be detected according to the first conversion image and the second conversion image;
determining the longitudinal boundary of the magnet ring to be detected according to the third conversion image;
and determining the integral boundary of the magnet ring to be detected according to the transverse boundary and the longitudinal boundary.
In an embodiment, the dividing module 30 is further configured to determine a region centerline according to the third converted image;
extracting a bright contour from the third converted image according to the line in the region to obtain a first contour line;
fitting according to the first contour line to obtain a second contour line;
and screening the second contour line according to the preset direction and the preset magnet size, and determining the longitudinal boundary of the magnet ring to be detected.
In an embodiment, the dividing module 30 is further configured to filter the second contour line according to a preset direction and a preset magnet size to obtain a third contour line;
determining the number of the combined magnets according to the magnet ring to be detected;
determining the number of target screening contours according to the number of the combined magnets;
when the number of the third profiles is larger than the target screening profiles, screening the third profiles according to the equivalent radius of the third profiles;
and determining the longitudinal boundary of the magnet ring to be detected according to the screening result of the third contour line.
In an embodiment, the dividing module 30 is further configured to determine a fourth profile according to the screening result of the third profile;
determining a magnet gap region according to the fourth contour line and the region central line;
determining a residual area on the pixel area according to the pixel area of the central line of the area and the magnet gap area;
determining the side surface boundary of the magnet ring to be detected according to the residual area;
and determining the longitudinal boundary of the magnet ring to be detected according to the fourth contour line and the side boundary.
In an embodiment, the dividing module 30 is further configured to traverse the first conversion image and the second conversion image, and determine a first boundary of each combined magnet in the ring of magnets to be detected;
determining a second boundary of each combined magnet in the magnet ring to be detected according to the regional central line of the third converted image, the first boundary and a preset magnet size;
and determining the transverse boundary of the magnet ring to be detected according to the first boundary and the second boundary.
Since the present apparatus employs all technical solutions of all the above embodiments, at least all the beneficial effects brought by the technical solutions of the above embodiments are achieved, and are not described in detail herein.
Furthermore, an embodiment of the present invention further provides a storage medium, where a boundary detection program of a wireless magnetizing magnet is stored, and the boundary detection program of the wireless magnetizing magnet, when executed by a processor, implements the steps of the boundary detection method of the wireless magnetizing magnet as described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may be referred to a boundary detection method of a wireless charging magnet provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A boundary detection method of a wireless magnet charger, the boundary detection method of the wireless magnet charger comprising:
acquiring an image to be detected of the magnet ring to be detected;
determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet;
performing area division on the boundary conversion image, and determining the integral boundary of the magnet ring to be detected;
determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image;
and finishing the boundary detection of the magnet ring to be detected according to the magnet boundary image.
2. The boundary detection method of a wireless charging magnet according to claim 1, wherein the determining a boundary transition image according to the image center of the image to be detected and a preset magnet size comprises:
calculating the initial edge position of the magnet ring to be detected according to the image center of the image to be detected;
determining a target edge according to the initial edge position and the preset magnet size;
determining a target magnet ring image according to the target edge and the image to be detected;
and carrying out polar coordinate conversion on the target magnet ring image to obtain a boundary conversion image.
3. The method for detecting a boundary of a wirelessly charged magnet according to claim 1, wherein the step of performing area division on the boundary transition image to determine the overall boundary of the magnetic ring to be detected comprises:
performing region division on the boundary conversion image to obtain a first conversion image, a second conversion image and a third conversion image;
determining the transverse boundary of the magnet ring to be detected according to the first conversion image and the second conversion image;
determining the longitudinal boundary of the magnet ring to be detected according to the third conversion image;
and determining the integral boundary of the magnet ring to be detected according to the transverse boundary and the longitudinal boundary.
4. A method for detecting a boundary of a wirelessly charged magnet according to claim 3, wherein the determining the longitudinal boundary of the magnetic ring to be detected based on the third converted image comprises:
determining a regional centerline from the third converted image;
extracting a bright contour from the third converted image according to the line in the region to obtain a first contour line;
fitting according to the first contour line to obtain a second contour line;
and screening the second contour line according to a preset direction and a preset magnet size, and determining the longitudinal boundary of the magnet ring to be detected.
5. The method for boundary detection of a wireless charging magnet according to claim 4, wherein the step of screening the second contour line according to a preset direction and a preset magnet size to determine the longitudinal boundary of the magnet ring to be detected comprises:
filtering the second contour line according to the preset direction and the size of the preset magnet to obtain a third contour line;
determining the number of the combined magnets according to the to-be-detected magnet ring;
determining the number of target screening contours according to the number of the combined magnets;
when the number of the third profiles is larger than the target screening profiles, screening the third profiles according to the equivalent radius of the third profiles;
and determining the longitudinal boundary of the magnet ring to be detected according to the screening result of the third contour line.
6. The method for detecting the boundary of a wireless magnet charger according to claim 5, wherein the determining the longitudinal boundary of the magnet ring to be detected according to the screening result of the third contour comprises:
determining a fourth contour according to the screening result of the third contour;
determining a magnet gap region according to the fourth contour line and the region central line;
determining a residual area on the pixel area according to the pixel area of the central line of the area and the magnet gap area;
determining the side surface boundary of the magnet ring to be detected according to the residual area;
and determining the longitudinal boundary of the magnet ring to be detected according to the fourth contour line and the side boundary.
7. The method of claim 3, wherein said determining a lateral boundary of said magnet ring to be inspected based on said first converted image and said second converted image comprises:
traversing the first conversion image and the second conversion image to determine a first boundary of each combined magnet in the magnet ring to be detected;
determining a second boundary of each combined magnet in the magnet ring to be detected according to the regional central line of the third converted image, the first boundary and a preset magnet size;
and determining the transverse boundary of the magnet ring to be detected according to the first boundary and the second boundary.
8. A wireless magnet charging boundary detection device, comprising:
the acquisition module is used for acquiring an image to be detected of the magnet ring to be detected;
the determining module is used for determining a boundary conversion image according to the image center of the image to be detected and the size of a preset magnet;
the dividing module is used for carrying out region division on the boundary conversion image and determining the integral boundary of the magnet ring to be detected;
the determining module is used for determining a magnet boundary image of the magnet ring to be detected according to the integral boundary and the boundary conversion image;
and the completion module is used for completing the boundary detection of the magnet ring to be detected according to the magnet boundary image.
9. A boundary detection device of a wireless charging magnet, comprising: a memory, a processor, and a boundary detection program for a wireless charging magnet stored on the memory and executable on the processor, the boundary detection program being configured to implement the boundary detection method for a wireless charging magnet according to any one of claims 1 to 7.
10. A storage medium having a boundary detection program of a wireless charging magnet stored thereon, the boundary detection program of the wireless charging magnet being executed by a processor to implement the boundary detection method of the wireless charging magnet according to any one of claims 1 to 7.
CN202310023655.XA 2023-01-09 2023-01-09 Boundary detection method, device, equipment and storage medium for wireless charging magnet Active CN115830043B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310023655.XA CN115830043B (en) 2023-01-09 2023-01-09 Boundary detection method, device, equipment and storage medium for wireless charging magnet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310023655.XA CN115830043B (en) 2023-01-09 2023-01-09 Boundary detection method, device, equipment and storage medium for wireless charging magnet

Publications (2)

Publication Number Publication Date
CN115830043A true CN115830043A (en) 2023-03-21
CN115830043B CN115830043B (en) 2023-05-26

Family

ID=85520387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310023655.XA Active CN115830043B (en) 2023-01-09 2023-01-09 Boundary detection method, device, equipment and storage medium for wireless charging magnet

Country Status (1)

Country Link
CN (1) CN115830043B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110273467A1 (en) * 2009-02-23 2011-11-10 Fujitsu Limited Device and method for multicolor vector image processing
CN109325930A (en) * 2018-09-12 2019-02-12 苏州优纳科技有限公司 Detection method, device and the detection device of boundary defect
CN111709912A (en) * 2020-05-18 2020-09-25 北京配天技术有限公司 Arc edge detection method and device and storage medium
CN113139943A (en) * 2021-04-22 2021-07-20 苏州华兴源创科技股份有限公司 Method and system for detecting appearance defects of open circular ring workpiece and computer storage medium
CN113344954A (en) * 2021-05-06 2021-09-03 加特兰微电子科技(上海)有限公司 Boundary detection method and device, computer equipment, storage medium and sensor
CN113822890A (en) * 2021-11-24 2021-12-21 中科慧远视觉技术(北京)有限公司 Microcrack detection method, device and system and storage medium
CN114241036A (en) * 2021-12-15 2022-03-25 北京航空航天大学合肥创新研究院(北京航空航天大学合肥研究生院) Method and device for determining transparent band boundary, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110273467A1 (en) * 2009-02-23 2011-11-10 Fujitsu Limited Device and method for multicolor vector image processing
CN109325930A (en) * 2018-09-12 2019-02-12 苏州优纳科技有限公司 Detection method, device and the detection device of boundary defect
CN111709912A (en) * 2020-05-18 2020-09-25 北京配天技术有限公司 Arc edge detection method and device and storage medium
CN113139943A (en) * 2021-04-22 2021-07-20 苏州华兴源创科技股份有限公司 Method and system for detecting appearance defects of open circular ring workpiece and computer storage medium
CN113344954A (en) * 2021-05-06 2021-09-03 加特兰微电子科技(上海)有限公司 Boundary detection method and device, computer equipment, storage medium and sensor
CN113822890A (en) * 2021-11-24 2021-12-21 中科慧远视觉技术(北京)有限公司 Microcrack detection method, device and system and storage medium
CN114241036A (en) * 2021-12-15 2022-03-25 北京航空航天大学合肥创新研究院(北京航空航天大学合肥研究生院) Method and device for determining transparent band boundary, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115830043B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
US11551341B2 (en) Method and device for automatically drawing structural cracks and precisely measuring widths thereof
CN111028213B (en) Image defect detection method, device, electronic equipment and storage medium
CN104718428B (en) Inspection, measurement apparatus and the program of pattern
CN103207987B (en) A kind of registration recognition methods of pointer instrument
CN106340044B (en) Join automatic calibration method and caliberating device outside video camera
CN106650697B (en) A kind of meter dial recognition methods
JP5699788B2 (en) Screen area detection method and system
CN106920245B (en) Boundary detection method and device
JP2003016463A (en) Extracting method for outline of figure, method and device for pattern inspection, program, and computer- readable recording medium with the same stored therein
CN111486797B (en) Automatic extraction method for transverse diameter of subway circular shield tunnel
CN111307039A (en) Object length identification method and device, terminal equipment and storage medium
CN111161339B (en) Distance measuring method, device, equipment and computer readable medium
US20220284580A1 (en) Image analysis in pathology
CN115937203B (en) Visual detection method, device, equipment and medium based on template matching
CN114419045A (en) Method, device and equipment for detecting defects of photoetching mask plate and readable storage medium
CN111259710A (en) Parking space structure detection model training method adopting parking space frame lines and end points
CN112560584A (en) Face detection method and device, storage medium and terminal
CN115564723A (en) Wafer defect detection method and application
CN116046817A (en) Tire quality detection method, device, electronic equipment and readable storage medium
CN116596954B (en) Lesion cell image segmentation method, device, equipment and storage medium
CN113012127A (en) Cardiothoracic ratio measuring method based on chest medical image
CN116486126A (en) Template determination method, device, equipment and storage medium
CN115830043A (en) Boundary detection method, device and equipment of wireless magnet charging and storage medium
CN113554688B (en) O-shaped sealing ring size measurement method based on monocular vision
JP6018802B2 (en) Dimension measuring device and computer program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant