Screw assembly methods and devices, motors, air conditioners
By removing interfering objects from the motor image and determining the positional relationship of screw holes, the problem of inaccurate screw hole position determination was solved, enabling more efficient screw assembly.
Patent Information
- Application Number
- CN202310458889.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-04-25
AI Technical Summary
During screw assembly, interference from non-screw mounting holes or non-closed panels can lead to inaccurate screw hole position determination, resulting in misjudgments and unqualified screw assembly.
By removing interfering objects from the motor image, the target motor image is obtained, the positional relationship between each candidate area and the center point of the motor is determined, and the screw hole position is selected according to the positional relationship. The screw assembly equipment is then controlled to assemble the screws into the correct position.
It improves the accuracy of screw hole position identification, reduces the probability of misidentification, and enhances screw assembly efficiency and production efficiency.
Smart Images

Figure CN116352426B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control technology, and more specifically, to a screw assembly method and apparatus, a motor, and an air conditioner. Background Technology
[0002] In product manufacturing, the materials used for screw assembly are diverse, and the production process must ensure that the number of screws used and their assembly status meet requirements. Timely positioning of screw holes and inspection of assembly quality are crucial for improving production efficiency and ensuring product quality. Existing methods involve manual inspection of hole positions and screw driving followed by inspection, or automated assembly and inspection. However, in automated screw assembly, the hole position identification process is prone to inaccurate judgment due to interference from other non-screw holes or the semi-circular shape of non-closed panels, leading to misidentification of hole positions and causing malfunctions in the screw assembly process.
[0003] Regarding the problem in the aforementioned related technologies where the screw hole position is not accurately determined during screw assembly due to interference from non-screw mounting holes or non-closed panels, leading to misjudgments and unqualified screw assembly, no effective solution has yet been proposed. Summary of the Invention
[0004] This invention provides a screw assembly method and apparatus, a motor, and an air conditioner, to at least solve the technical problem in the related art where, during the screw assembly process, the judgment of screw hole positions is inaccurate due to interference from non-screw mounting holes or non-closed panels, which easily leads to misjudgment and unqualified screw assembly.
[0005] According to one aspect of the present invention, a screw assembly method is provided, comprising: deleting interfering objects from a motor image to obtain a target motor image, wherein the motor image is an image obtained by image acquisition of a motor to which screws are to be assembled, and the interfering objects include at least one of the following: closed regions in the motor image with shapes different from screw hole positions and lines in the motor image, wherein the screw hole positions are the holes of the screws to be assembled on the motor; determining the positional relationship between each candidate region in the target motor image and the center point of the motor, wherein the candidate regions are regions in the target motor image with the same shape as the screw hole positions; selecting the screw hole positions from each candidate region according to the positional relationship; and controlling a screw assembly device to assemble the screws to be assembled into each screw hole position according to the position information of the screw holes.
[0006] Optionally, removing interfering objects from the motor image to obtain the target motor image includes: after receiving a screw assembly instruction, triggering an image acquisition device to perform an image acquisition operation on the motor to obtain the motor image; preprocessing the motor image to obtain a preprocessed motor image, wherein the preprocessing includes at least one of the following operations: grayscale conversion, binarization, and convex hull calculation; performing edge search on the preprocessed motor image to extract the motor body image from the preprocessed motor image, wherein the motor body image is the motor image excluding the motor bracket image, and the motor bracket is used to support the motor; identifying the interfering objects in the motor body image; and deleting the interfering objects from the motor body image to obtain the target motor image.
[0007] Optionally, determining the interference object in the motor body image includes at least one of the following: matching each closed region in the motor body image with the shape of the screw hole to determine closed regions in each closed region that do not match the shape of the screw hole, and determining the mismatched closed regions as the interference object; searching for lines in the motor body image and determining the lines as the interference object.
[0008] Optionally, determining the positional relationship between each candidate region in the target motor image and the center point of the motor includes: determining each candidate region from the target motor image; determining the center point distance between the center point coordinates of each candidate region and the center point coordinates of the motor; and determining the positional relationship between each candidate region in the target motor image and the center point of the motor based on the center point distance.
[0009] Optionally, selecting the screw hole position from each of the candidate regions based on the positional relationship includes: determining a target region in each candidate region whose center point lies on a circle centered on the center point of the motor and with a reference center point distance as the radius, wherein the reference center point distance is the standard distance from the center point of the motor to the center point of the screw hole, and the standard distance is the distance from the center point of the motor to the center point of the screw hole in a motor image sample, wherein the motor image sample is an image obtained by image acquisition of a motor with qualified screw assembly; and determining the target region in each candidate region as the screw hole position.
[0010] Optionally, determining the target area among the candidate areas as the screw hole position includes: determining the center and radius of the first circular contour corresponding to each target area before assembling the screw to be assembled in each target area; determining the initial center distance between the center of each first circular contour and the center of the second circular contour corresponding to the motor shaft hole position; determining the area in each target area where the initial center distance is within a first predetermined center distance range and the radius of the first circular contour corresponding to the target area is within a first predetermined radius range as the screw hole position.
[0011] Optionally, controlling the screw assembly equipment to assemble the screw to be assembled into each of the screw holes according to the position information of the screw holes includes: after determining that the screw assembly equipment has picked up the screw to be assembled, determining the movement path of the screw assembly equipment according to the position information of the target area; controlling the screw assembly equipment to move to the screw hole according to the movement path, and assembling the screw to be assembled into the screw hole.
[0012] Optionally, after the control screw assembly equipment assembles the screw to be assembled into each of the screw holes according to the position information of the target area, the screw assembly method further includes: determining the center and radius of the second circular contour corresponding to each screw hole after the screw to be assembled into each of the screw holes; determining the current center distance between the center of each of the second circular contours and the center of the second circular contour corresponding to the motor shaft hole; determining that the screws in the screw holes whose current center distance is within a second predetermined center distance range and whose radius of the second circular contour corresponding to the screw hole is within a second predetermined radius range are qualified for screw assembly.
[0013] Optionally, after the control screw assembly equipment assembles the screw to be assembled into each of the screw holes according to the position information of the target area, the screw assembly method further includes: determining the center and radius of the second circular contour corresponding to each screw hole after the screw to be assembled into each of the screw holes; determining the current center distance between the center of each of the second circular contours and the center of the second circular contour corresponding to the motor shaft hole; determining that the current center distance in each screw hole is within a second predetermined center distance range, and that the radius of the second circular contour corresponding to the screw hole is within a second predetermined radius range, then determining the first grayscale pixel average value and the second grayscale pixel average value of the top surface of the motor where the screw hole is located before and after the screw to be assembled into each of the screw holes; and determining that the screw hole screws are qualified if the pixel difference between the first grayscale pixel average value and the second grayscale pixel average value is within a predetermined pixel range.
[0014] Optionally, after the control screw assembly equipment assembles the screw to be assembled into each of the screw holes according to the location information of the target area, the screw assembly method further includes: acquiring an image of the nut of the screw to be assembled and a current motor image of the motor; performing feature point matching between the nut image and the current motor image to obtain a matching result; when the matching result indicates that the similarity between the nut image and the nut image corresponding to the screw in the current motor image is greater than a similarity threshold, determining that the screw assembly at the screw hole position is qualified.
[0015] According to another aspect of the present invention, a screw assembly apparatus is also provided, comprising: an acquisition unit, configured to remove interfering objects from a motor image to obtain a target motor image, wherein the motor image is an image obtained by image acquisition of a motor to which the screw to be assembled is located, and the interfering objects include at least one of the following: closed regions in the motor image with shapes different from those of screw holes and lines in the motor image, wherein the screw holes are the holes of the screws to be assembled on the motor; a first determining unit, configured to determine the positional relationship between each candidate region in the target motor image and the center point of the motor, wherein the candidate regions are regions in the target motor image with shapes similar to those of the screw holes; a selection unit, configured to select the screw holes from each candidate region according to the positional relationship; and a control unit, configured to control a screw assembly device to assemble the screws to be assembled into each screw hole according to the positional information of the screw holes.
[0016] Optionally, the acquisition unit includes: a trigger subunit, configured to trigger an image acquisition device to perform an image acquisition operation on the motor after receiving a screw assembly instruction, thereby obtaining a motor image; a preprocessing subunit, configured to preprocess the motor image to obtain a preprocessed motor image, wherein the preprocessing includes at least one of the following operations: grayscale conversion, binarization, and convex hull calculation; a search subunit, configured to perform edge search on the preprocessed motor image and extract a motor body image from the preprocessed motor image, wherein the motor body image is the motor image excluding the motor bracket image, and the motor bracket is used to support the motor; a first determination subunit, configured to determine the interference object in the motor body image; and a first acquisition subunit, configured to delete the interference object from the motor body image to obtain the target motor image.
[0017] Optionally, the first determining subunit includes at least one of the following: a first determining module, configured to match the shapes of each closed region in the motor body image with the screw hole positions to determine closed regions in each closed region that do not match the shapes of the screw hole positions, and to determine the mismatched closed regions as the interference objects; and a second determining module, configured to search for lines in the motor body image and to determine the lines as the interference objects.
[0018] Optionally, the first determining unit includes: a second determining subunit, configured to determine each candidate region from the target motor image; a third determining subunit, configured to determine the center point distance between the center point coordinates of each candidate region and the center point coordinates of the motor; and a fourth determining subunit, configured to determine the positional relationship between each candidate region in the target motor image and the center point of the motor based on the center point distance.
[0019] Optionally, the second determining subunit includes: a third determining module, configured to determine, based on the positional relationship, a target region on a circle with the center point of the motor as the center and a reference center point distance as the radius, where the reference center point distance is the standard distance from the center point of the motor to the center point of the screw hole, and the standard distance is based on the distance from the center point of the motor to the center point of the screw hole in a motor image sample, wherein the motor image sample is an image obtained by image acquisition of a motor with qualified screw assembly; and a fourth determining module, configured to determine the target region among the candidate regions as the screw hole.
[0020] Optionally, the fourth determining module includes: a first determining submodule, used to determine the center and radius of the first circular contour corresponding to each of the target areas before assembling the screw to be assembled in each of the target areas; a second determining submodule, used to determine the initial center distance between the center of each of the first circular contours and the center of the second circular contour corresponding to the shaft hole of the motor; and a third determining submodule, used to determine that the area in each of the target areas where the initial center distance is within a first predetermined center distance and the radius of the first circular contour corresponding to the target area is within a first predetermined radius is the screw hole.
[0021] Optionally, the control unit includes: a fifth determining subunit, configured to determine the moving path of the screw assembly device based on the position information of the target area after determining that the screw assembly device has picked up the screw to be assembled; and a control subunit, configured to control the screw assembly device to move to the screw hole according to the moving path and assemble the screw to be assembled into the screw hole.
[0022] Optionally, the screw assembly device further includes: a second determining unit, configured to determine the center and radius of the second circular contour corresponding to each screw hole after the screw assembly equipment assembles the screw to be assembled into each screw hole according to the position information of the target area; a third determining unit, configured to determine the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole; and a fourth determining unit, configured to determine that the screw assembly is qualified if the current center distance in each screw hole is within a second predetermined center distance range and the radius of the second circular contour corresponding to the screw hole is within a second predetermined radius range.
[0023] Optionally, the screw assembly device further includes: a fifth determining unit, used to determine the center and radius of the second circular contour corresponding to each screw hole after the screw assembly equipment assembles the screw to be assembled into each screw hole according to the position information of the target area; a sixth determining unit, used to determine the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole; a seventh determining unit, used to determine the first grayscale pixel average and the second grayscale pixel average of the top surface of the motor where the screw hole is located before and after the screw to be assembled into each screw hole, after determining that the current center distance in each screw hole is within a second predetermined center distance and the radius of the second circular contour corresponding to the screw hole is within a second predetermined radius; and an eighth determining unit, used to determine that the screw assembly of the screw hole is qualified if the pixel difference between the first grayscale pixel average and the second grayscale pixel average is within a predetermined pixel range.
[0024] Optionally, the screw assembly device further includes: a data acquisition unit, used to acquire an image of the nut of the screw to be assembled and a current motor image of the motor after the control screw assembly equipment assembles the screw to be assembled into each screw hole according to the position information of the target area; a matching unit, used to perform feature point matching between the nut image and the current motor image to obtain a matching result; and a ninth determination unit, used to determine that the screw hole screw assembly is qualified when the matching result indicates that the similarity between the nut image and the nut image corresponding to the screw in the current motor image is greater than a similarity threshold.
[0025] According to another aspect of the present invention, an electric motor is also provided, the electric motor using the screw assembly method described in any of the above embodiments.
[0026] According to another aspect of the present invention, an air conditioner is also provided, wherein the outdoor unit of the air conditioner includes the aforementioned motor.
[0027] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium comprising a stored program, wherein the program performs the screw assembly method described in any one of the above embodiments.
[0028] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, performs the screw assembly method described in any of the above embodiments.
[0029] In this embodiment of the invention, interference objects are removed from the motor image to obtain the target motor image. The motor image is an image obtained by image acquisition of the motor to which screws are to be assembled. Interference objects include at least one of the following: closed regions in the motor image with shapes different from the screw hole positions, and lines in the motor image. The screw hole positions are the holes on the motor to which screws are to be assembled. The positional relationship between each candidate region in the target motor image and the center point of the motor is determined. The candidate regions are regions in the target motor image with shapes similar to the screw hole positions. Screw hole positions are selected from each candidate region based on the positional relationship. The screw assembly equipment is controlled to assemble the screws to be assembled into each screw hole according to the positional information of the screw hole positions. The screw assembly method provided by this invention achieves the goal of denoising the motor image before identifying screw hole positions, reducing interference during the screw hole identification process, improving the accuracy of screw hole identification, reducing the probability of misidentification of screw hole positions, and thus improving screw assembly efficiency. This improves production efficiency and solves the technical problem in related technologies where, during screw assembly, the judgment of screw hole positions is inaccurate due to interference from non-screw mounting holes or non-closed panels, leading to misjudgments and unqualified screw assembly. Attached Figure Description
[0030] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0031] Figure 1 This is a hardware structure block diagram of a mobile terminal for a screw assembly method according to an embodiment of the present invention.
[0032] Figure 2 This is a flowchart of a screw assembly method according to an embodiment of the present invention;
[0033] Figure 3 This is a flowchart of screw hole position detection according to an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of the motor screw hole positions according to an embodiment of the present invention;
[0035] Figure 5 This is a schematic diagram of the screw assembly according to an embodiment of the present invention;
[0036] Figure 6 This is a flowchart of an optional screw assembly method according to an embodiment of the present invention;
[0037] Figure 7 This is a schematic diagram of a screw assembly device according to an embodiment of the present invention. Detailed Implementation
[0038] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0040] As described in the background section, screw hole positions are manually inspected and screws are driven for inspection, or automated assembly and inspection are performed. However, during automated screw assembly, the identification of screw holes is often inaccurate due to interference from other non-screw mounting holes or the semi-circular shape of non-closed panels, leading to misidentification and potential malfunctions in the screw assembly process. To address the shortcomings of related technologies where interference from non-screw mounting holes or non-closed panels leads to inaccurate screw hole position identification and subsequent defective screw assembly, embodiments of the present invention provide a screw assembly method and apparatus, a motor, an air conditioner, a computer-readable storage medium, and a processor.
[0041] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0042] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a screw assembly method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0043] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the screw assembly method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] According to an embodiment of the present invention, a method embodiment for assembling screws is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0045] Figure 2 This is a flowchart of a screw assembly method according to an embodiment of the present invention, such as... Figure 2 As shown, the assembly method of this screw includes the following steps:
[0046] Step S202: Remove interference objects from the motor image to obtain the target motor image. The motor image is an image obtained by image acquisition of the motor to be assembled with screws. The interference objects include at least one of the following: closed regions in the motor image with shapes different from the screw hole positions and lines in the motor image. The screw hole positions are the holes of the screws to be assembled on the motor.
[0047] Optionally, the motor mentioned above can be the motor in the outdoor unit of an air conditioner. Of course, it can also be the motor in other equipment, without specific limitations here.
[0048] In this embodiment, interfering factors can be removed from the motor image, such as non-closed curves in the motor image, i.e., the aforementioned lines, and closed regions in the motor image that have shapes different from those of the screw holes.
[0049] For example, if the screw hole is circular, interference factors such as semicircles or arc curves can be removed from the motor image to facilitate the rapid location of the screw hole in the subsequent motor image, thereby improving the assembly efficiency of the screw.
[0050] It should be noted that the closed area that is considered an interference target does not include the closed area corresponding to the motor shaft hole.
[0051] Step S204: Determine the positional relationship between each candidate area in the target motor image and the center point of the motor, wherein the candidate area is the area in the target motor image that has the same shape as the screw hole.
[0052] In this embodiment, multiple regions with the same shape as the screw hole can be found from the target motor image first, namely, the above-mentioned candidate regions; then, the relationship between each candidate region and the center point of the motor is determined, for example, whether each candidate region is on a circle with the center point of the motor as the center.
[0053] Step S206: Select screw hole positions from each candidate area according to their positional relationships.
[0054] In this embodiment, screw hole positions can be selected from each candidate area based on the positional relationship determined in the above steps, which facilitates subsequent screw assembly work.
[0055] Step S208: Control the screw assembly equipment to assemble the screws to be assembled into each screw hole according to the position information of the screw holes.
[0056] As can be seen from the above, in this embodiment of the invention, interference objects can be first removed from the motor image to obtain the target motor image. The motor image is an image obtained by image acquisition of the motor to which the screws to be assembled are located. Interference objects include at least one of the following: closed regions in the motor image with shapes different from the screw hole positions, and lines in the motor image. The screw hole positions are the holes on the motor to which the screws to be assembled are located. Next, the positional relationship between each candidate region in the target motor image and the center point of the motor is determined. The candidate regions are regions in the target motor image with shapes identical to the screw hole positions. After selecting the screw hole positions from each candidate region based on the positional relationship, the screw assembly equipment is controlled to assemble the screws to be assembled into each screw hole according to the positional information of the screw hole positions. This achieves the purpose of denoising the motor image before identifying the screw hole positions, reducing interference during the screw hole position identification process, improving the accuracy of screw hole position identification, reducing the probability of misidentification of screw hole positions, and thus improving screw assembly efficiency and production efficiency.
[0057] Therefore, the technical solution provided by the embodiments of the present invention solves the technical problem in the related art where, during the screw assembly process, the judgment of screw hole position is inaccurate due to interference from non-screw mounting holes or non-closed panels, which easily leads to misjudgment and unqualified screw assembly.
[0058] According to the above embodiments of the present invention, removing interfering objects from a motor image to obtain a target motor image includes: after receiving a screw assembly instruction, triggering an image acquisition device to perform an image acquisition operation on the motor to obtain a motor image; preprocessing the motor image to obtain a preprocessed motor image, wherein the preprocessing includes at least one of the following operations: grayscale conversion, binarization, and convex hull calculation; performing edge search on the preprocessed motor image to extract a motor body image from the preprocessed motor image, wherein the motor body image is the motor image excluding the motor bracket image, and the motor bracket is used to support the motor; identifying interfering objects in the motor body image; and removing the interfering objects from the motor body image to obtain the target motor image.
[0059] In this embodiment, upon receiving a screw assembly command, an image acquisition device (e.g., a camera mounted on a screw assembly robot) can be triggered to acquire an image of the motor. The acquired motor image can then undergo preprocessing such as grayscale conversion, binarization, and convex hull calculation to facilitate subsequent screw hole location identification.
[0060] In `otsu_threshold`, `otsu` is the algorithm for deriving `threshold`, and `threshold` is the threshold required for binarizing a grayscale image. `otsu` primarily divides the image into foreground and background parts based on its grayscale characteristics.
[0061] After obtaining the motor image, the motor edge contour can be obtained using findcontours and Canny, and the motor target and its center point coordinates can be extracted.
[0062] Figure 3 This is a flowchart of screw hole position detection according to an embodiment of the present invention, such as... Figure 3 As shown, the motor image can be processed by grayscale conversion, binarization, and convex hull fitting, and then the motor target and the coordinates of the motor center point can be determined.
[0063] According to the above embodiments of the present invention, determining interference objects in a motor body image includes at least one of the following: matching the shapes of each closed region in the motor body image with the screw hole positions to determine closed regions in each closed region that do not match the shapes of the screw hole positions, and determining the mismatched closed regions as interference objects; searching for lines in the motor body image and determining the lines as interference objects.
[0064] In this embodiment, it can also be determined that the circular hole is on the motor target, thereby eliminating interference from circular or semi-circular holes that are not screw holes, and confirming that its circular position is the location of the screw hole. Figure 4 As shown, the four corners of the mounting bracket also have round and arc edges, but the radius of the round edges is not the same as that of the screw holes, and these edges are not on the motor target.
[0065] Since the interference object can be a closed area in the motor image that does not match the shape of the screw hole, or a line in the motor body image, we can identify the closed area or line in the motor image that does not match the shape of the screw hole and use it as the interference object.
[0066] Specifically, such as Figure 3 As shown, when the screw hole is circular, the interference object can be a semicircle, an arc curve, etc. Since the screw location on the motor image is a circular hole, a circular center is fitted using a circular contour. The motor center is as follows: Figure 4 ( Figure 4 As shown in the schematic diagram of the motor screw hole positions according to an embodiment of the present invention, the motor is represented by the shaded circle, and the center of the motor is the center point in the diagram. Through multiple tests, the radius range of the circle was determined, and the distance between the centers and the corresponding radii were calculated to ensure they met the requirements. The screw holes are located on the upper edge of the motor in four small circles with a radius of R, which are marked thereon.
[0067] The closed region that does not match the shape of the screw hole can be a non-circular area such as a square or rectangle. By fitting a circle, circular screw holes are selected. After obtaining the coordinates of the motor target and its center point, all contour features within the motor target image are searched. A circular contour is fitted to one of these contours, and the center and radius of the circular contour are determined. The distance between the fitted small circle and the motor center, as well as the radius of the small circle, are calculated. If the edge contour does not coincide with the fitted circle, it is not a circular hole but a semi-circular or arc-shaped edge contour, which can then be deleted from the motor image.
[0068] For example Figure 3 As shown, the center point coordinates of the motor target (i.e., the motor body) can be determined by fitting the center and radius of the circle; then, the edge contour and circle fitting are found; and the distance between the center of the fitted circle and the center of the motor is calculated; the distance between the center of the fitted circle (i.e., the area to be selected) and the center of the motor circle is judged; when the distance between the center of the fitted circle and the center of the motor circle is not within the standard range, it is determined that it does not meet the criteria for judging round holes; conversely, if the center distances are almost equal and the radii of the fitted circles are basically the same, the number and position of round holes are determined; and automated assembly is prepared.
[0069] According to the above embodiments of the present invention, determining the positional relationship between each candidate region in the target motor image and the center point of the motor includes: determining each candidate region from the target motor image; determining the center point distance between the center point coordinates of each candidate region and the center point coordinates of the motor; and determining the positional relationship between each candidate region in the target motor image and the center point of the motor based on the center point distance.
[0070] In this embodiment, such as Figure 4 As shown, the circular position of the screw hole is determined. The distance between the center of the circular outline and the center of the motor is calculated, and the relative relationships of these circular positions are compared. For example, if the distances from the center of the circle to the motor center are basically consistent, and the circular positions are all on the same circle with the motor center as the center and the distance from the center point of the circular position to the motor center as the radius, then... Figure 4 The dashed circle in the diagram represents the motor target inside and the mounting bracket outside. The circles are concentric with the motor's edge outline, and the distance between the centers of the circles indicated by the dashed lines is equal, indicating that the circular holes are evenly distributed around the center of the motor.
[0071] According to the above embodiments of the present invention, selecting screw hole positions from each candidate area based on positional relationships includes: determining, based on positional relationships, a target area in each candidate area whose center point lies on a circle centered on the center point of the motor and with a reference center point distance as its radius, wherein the reference center point distance is the standard distance from the center point of the motor to the center point of the screw hole, and the standard distance is based on the distance from the center point of the motor to the center point of the screw hole in a motor image sample, wherein the motor image sample is an image obtained by image acquisition of a motor with qualified screw assembly; and determining the target area in each candidate area as the screw hole position.
[0072] In this embodiment, pre-collected images of a qualified assembled motor can be used to determine the reasonable range of standard values for the screw hole radius, including: MAX_DISTANC, MIN_DISTANCE, MAX_D, MIN_R, and MAX_R. These values must conform to the standard value ± a constant value. The radius of the concentric circle shown by the dashed line before assembly is denoted as R0, and after assembly as R. MIN_R represents the standard radius of the circular outline before screw assembly, and MAX_R represents the standard radius of the circular outline after screw assembly, denoted as the standard radius of the screw after assembly. MAX_D represents the standard difference between the center distance of the circular outline and the center of the motor before and after assembly, i.e., the standard difference between the center distance D1 before assembly and the center distance D2 after assembly, where MAX_D = R - R0. MAX_DISTANC represents the standard value of the difference between the grayscale pixels of the motor surface and the grayscale pixels of the screw hole before assembly. MIN_DISTANCE represents the standard value of the difference between the grayscale pixels of the motor surface and the grayscale pixels of the screw hole after assembly.
[0073] According to the above embodiments of the present invention, determining the target area of each candidate area as a screw hole position includes: determining the center and radius of the first circular contour corresponding to each target area before assembling the screw to be assembled in each target area; determining the initial center distance between the center of each first circular contour and the center of the second circular contour corresponding to the shaft hole of the motor; determining the area in each target area where the initial center distance is within a first predetermined center distance and the radius of the first circular contour corresponding to the target area is within a first predetermined radius range as a screw hole position.
[0074] In this embodiment, the center and radius of the circular contour of each target area can be determined before screws are assembled in each target area. At the same time, the initial center distance between the center of each first circular contour and the center of the second circular contour corresponding to the motor shaft hole is determined. The initial center distance in each target area is determined to be within the first predetermined center distance range, and the area where the radius of the first circular contour corresponding to the target area is within the first predetermined radius range is the screw hole.
[0075] For example, before assembly: the center profile that satisfies the following conditions is determined as the screw hole position: the center r: MIN_R-5 <= r <= MIN_R+5 and the center distance D1: R0-5 <= D1 <= R0+5.
[0076] According to the above embodiments of the present invention, controlling the screw assembly equipment to assemble the screws to be assembled into each screw hole according to the position information of the screw holes includes: after determining that the screw assembly equipment has picked up the screws to be assembled, determining the movement path of the screw assembly equipment according to the position information of the target area; controlling the screw assembly equipment to move to the screw hole according to the movement path, and assembling the screws to be assembled into the screw holes.
[0077] In this embodiment, the movement path of the screw assembly equipment can be determined according to the screw hole position, and then the screw assembly equipment can be controlled to move to the screw hole position according to the above movement path, and the screw to be assembled can be assembled into the screw hole position.
[0078] According to the above embodiments of the present invention, after the control screw assembly equipment assembles the screws to be assembled into each screw hole according to the position information of the target area, the screw assembly method further includes: determining the center and radius of the second circular contour corresponding to each screw hole after the screws to be assembled are assembled into each screw hole; determining the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole; determining that the screws in each screw hole whose current center distance is within a second predetermined center distance range and whose radius of the second circular contour corresponding to the screw hole is within a second predetermined radius range are qualified for screw assembly.
[0079] That is, after the screws are assembled into the screw holes, the center and radius of the second circular contour corresponding to each screw hole can be determined; the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole can be determined; and the screw hole screw assembly is qualified based on the relationship between the current center distance and the second predetermined center distance range in each screw hole, and the radius of the second circular contour corresponding to the screw hole and the second predetermined radius range.
[0080] For example, after screw assembly, the following screw hole positions are determined to be qualified screw holes that satisfy the following conditions: center r': MAX_R-5≤r'<=MAX_R+5 and center distance D2: R-5≤D2≤R+5 and MAX_D-5≤D2-D1≤MAX_D+5 and MAX_DISTANC-5≤P1-P≤MAX_DISTANC+5 and MIN_DISTANC-5≤P1-P'≤MINDISTANC+5; This can be filtered. Figure 5 ( Figure 5 (This is a schematic diagram of the screw assembly according to an embodiment of the present invention.) In this diagram, hole 1 meets the screw hole requirements, while holes 2 and 3 do not meet the requirements. Only when the assembly position also meets the requirements of 1 is the assembly qualified.
[0081] According to the above embodiments of the present invention, after the control screw assembly equipment assembles the screws to be assembled into each screw hole according to the position information of the target area, the screw assembly method further includes: determining the center and radius of the second circular contour corresponding to each screw hole after the screws to be assembled are installed in each screw hole; determining the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole; determining that the current center distance in each screw hole is within a second predetermined center distance range, and the radius of the second circular contour corresponding to the screw hole is within a second predetermined radius range, then determining the first grayscale pixel average value and the second grayscale pixel average value of the top surface of the motor where the screw hole is located before and after the screws to be assembled are installed in each screw hole; and determining that the screws in the screw holes whose pixel difference between the first grayscale pixel average value and the second grayscale pixel average value is within a predetermined pixel range are qualified for screw assembly.
[0082] In this embodiment, after automated assembly, the similarity of nut features is detected. By calculating the grayscale pixel difference between the top surface of the motor where the screw is located (as a reference surface) and the screw hole position, and using a feature point matching method for the screw head, the assembly qualification of the screw target position is accurately determined, improving the accuracy of defect detection.
[0083] like Figure 5 As shown, taking the top surface of the motor where the screw is located as the reference surface, the average grayscale pixel value P1 of this reference surface is calculated. The average grayscale pixel value of the screw hole position before assembly is denoted as P, the radius r of the circular hole and the center distance between the circular hole and the center of the motor are denoted as D, and the average grayscale pixel value after assembly is denoted as P'. The radius r' of the fitted circular hole and the center distance between the circular hole and the center of the motor are denoted as D'. Calculations and statistics show that r and r' satisfy the ranges of MIN_R and MAX_R, as shown. Figure 5 As shown, the grayscale pixel differences calculated between P and P' and P1 show significant changes, and the differences between P and P1, and between P' and P1, satisfy the range of MAX_DISTANCE and MIN_DISTANCE. However, the difference between D1 and D2 also satisfies the range of MAX_D. Exceeding the maximum value indicates that the screw assembly position is not standardized.
[0084] According to the above embodiments of the present invention, after the control screw assembly equipment assembles the screws to be assembled into each screw hole according to the location information of the target area, the screw assembly method further includes: acquiring the nut image of the screw to be assembled and the current motor image of the motor; performing feature point matching between the nut image and the current motor image to obtain a matching result; when the matching result indicates that the similarity between the nut image and the nut image corresponding to the screw in the current motor image is greater than the similarity threshold, it is determined that the screw assembly at the screw hole position is qualified.
[0085] In this embodiment, the nut image can be extracted, its feature points and pattern contours can be extracted, the edges can be fitted, and the feature points of the assembled motor image can be extracted. The nut image and the assembled motor image are then matched and calculated. According to the matching calculation, if the similarity of the feature points of the two reaches more than 95%, the requirement that the circular hole position has a screw can be met.
[0086] According to the above embodiments of the present invention, the calculated position of the screw hole is determined based on the results of the circular contour before and after assembly, including the radius, center distance, and pixel grayscale difference. If the calculated position is within the normal range, it indicates a reasonable position; otherwise, it indicates non-standard assembly. Combining the results of nut feature matching calculation, feature point matching calculations are performed between the nut image and the assembled motor image. If the calculated similarity is above 95%, it indicates that the assembly is standard and the screw is the required screw type; otherwise, non-standard assembly or missing screws are considered unqualified. This method of identifying and assembling screw holes improves the screw hole recognition rate, completes the assembly of the air conditioner outdoor unit motor, improves the performance and accuracy of automated assembly, and saves assembly quality inspection time.
[0087] Figure 6 This is a flowchart of an optional screw assembly method according to an embodiment of the present invention, such as... Figure 6 As shown, after determining the screw hole positions, an automated assembly operation is performed based on the screw hole positions; then, the pixel difference between the top surface of the grayscale motor and the screw hole positions is calculated; then, the similarity is calculated by feature point matching; after determining the position status corresponding to the screw hole positions, the assembly effect and the number of assembled screws are statistically analyzed; it is determined whether the required number and position are consistent with the number and position of assembled screws; if they are consistent, the assembly is determined to be defective; otherwise, the assembly is determined to be defective.
[0088] The above methods are used to detect the location of screw holes and the quality of screw assembly. These methods primarily employ image edge contouring, image fitting, image segmentation, and image convex hull calculation. By fitting and calculating the size of circular holes, calculating the center distance of the circles, and determining whether the edge contour coincides with the fitted circle to identify concentric circles, the target holes for screws are screened to eliminate interference from non-screw hole locations and determine their positions. After automated assembly, the difference between the grayscale pixels of the target hole location and the grayscale pixels of the reference surface (the top surface of the motor is used as the reference surface), as well as the difference in grayscale pixels before and after assembly, are calculated. This is then used for feature point matching calculations on the screw cap. Based on the grayscale pixel differences and matching parameters, defect detection can be performed on the screw hole targets, and the number of installed screws and their corresponding states can be calculated. By calculating the difference in the displayed screw reference surface and using SIFT feature point matching, the assembly qualification of the screw target location is accurately determined, improving the accuracy of the assembly work.
[0089] It should be noted that the above screw assembly method can also be applied to other equipment, not limited to screw assembly of motors, but also to other components and individual equipment that require assembly.
[0090] The screw assembly method provided in this invention employs binarization and watershed segmentation algorithms for motor screw assembly. It locates the motor target and uses the motor's center point as a reference. Edge contours are found through grayscale and Canny edge extraction. Semi-circular regions are removed using shape fitting methods, and non-screw holes are eliminated based on the radius and center distance of the calculated circle. The required screw hole locations are determined, and interference from non-screw hole positions is removed to avoid misidentification of screw positions. Referring to the identified screw holes, after assembly, the grayscale value difference between the screw hole area and the motor's top surface is calculated, along with the similarity of the nut features, to verify the target assembly quality and improve assembly accuracy.
[0091] The aforementioned screw assembly method facilitates the automation of product manufacturing. In practical applications involving screw installation for different motors, it allows for defect detection of screws at varying assembly heights, further assessing their contours and grayscale values to ensure assembly quality in automated production. Applied to screw assembly production scenarios, it determines screw placement based on the detected screw hole positions, eliminating interference from non-screw hole locations and preventing assembly defects caused by positional deviations. Post-assembly inspection improves production efficiency and accuracy. It also effectively solves the problem of inaccurate screw hole identification and assembly defects.
[0092] To prevent interference from non-installing screw holes, the screw hole positions of the motor are accurately detected, improving the efficiency and accuracy of screw assembly in production, increasing the efficiency of product inspection and the product qualification rate, and preventing automatic detection of screw assembly failures. The top surface of the motor is used as a reference surface to confirm whether the screw is installed in place, so as to detect unqualified screw assembly.
[0093] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0094] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0095] According to an embodiment of the present invention, a screw assembly apparatus for implementing the above-described screw assembly method is also provided. Figure 7 This is a schematic diagram of a screw assembly device according to an embodiment of the present invention, as shown below. Figure 7 As shown, the device includes: an acquisition unit 71, a first determination unit 73, a selection unit 75, and a control unit 77. The assembly device for the screw will now be described.
[0096] The acquisition unit 71 is used to remove interference objects from the motor image to obtain the target motor image. The motor image is an image obtained by image acquisition of the motor to be assembled with screws. The interference objects include at least one of the following: closed areas in the motor image with shapes different from the screw hole positions and lines in the motor image. The screw hole positions are the holes of the screws to be assembled on the motor.
[0097] The first determining unit 73 is used to determine the positional relationship between each candidate area in the target motor image and the center point of the motor, wherein the candidate area is an area in the target motor image with the same shape as the screw hole.
[0098] Selection unit 75 is used to select screw hole positions from each candidate area according to positional relationships.
[0099] The control unit 77 is used to control the screw assembly equipment to assemble the screws to be assembled into each screw hole according to the position information of the screw holes.
[0100] It should be noted that the above-mentioned acquisition unit 71, first determination unit 73, selection unit 75 and control unit 77 correspond to steps S202 to S208 in the above embodiments. The four units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.
[0101] As can be seen from the above, in the solution described in the above embodiments of the present invention, interference objects can first be removed from the motor image using the acquisition unit to obtain the target motor image. The motor image is an image obtained by image acquisition of the motor to which the screws to be assembled are located. Interference objects include at least one of the following: closed regions in the motor image with shapes different from the screw hole positions, and lines in the motor image. The screw hole positions are the holes on the motor to which the screws to be assembled are located. Then, the first determining unit determines the positional relationship between each candidate region in the target motor image and the center point of the motor. The candidate regions are regions in the target motor image with shapes similar to the screw hole positions. Next, the selection unit selects the screw hole positions from each candidate region based on the positional relationship. Finally, the control unit controls the screw assembly equipment to assemble the screws to be assembled into each screw hole according to the positional information of the screw hole positions. This achieves the purpose of denoising the motor image before identifying the screw hole positions, reducing interference during the screw hole position identification process, improving the accuracy of screw hole position identification, reducing the probability of misidentification of screw hole positions, and thus improving screw assembly efficiency and production efficiency.
[0102] Therefore, the technical solution provided by the embodiments of the present invention solves the technical problem in the related art where, during the screw assembly process, the judgment of screw hole position is inaccurate due to interference from non-screw mounting holes or non-closed panels, which easily leads to misjudgment and unqualified screw assembly.
[0103] Optionally, the acquisition unit includes: a trigger subunit, used to trigger an image acquisition device to perform an image acquisition operation on the motor after receiving a screw assembly instruction, thereby obtaining a motor image; a preprocessing subunit, used to preprocess the motor image to obtain a preprocessed motor image, wherein the preprocessing includes at least one of the following operations: grayscale conversion, binarization, and convex hull calculation; a search subunit, used to perform edge search on the preprocessed motor image and extract a motor body image from the preprocessed motor image, wherein the motor body image is the motor image excluding the motor bracket image, and the motor bracket is used to support the motor; a first determination subunit, used to determine interference objects in the motor body image; and a first acquisition subunit, used to delete the interference objects from the motor body image to obtain a target motor image.
[0104] Optionally, the first determining subunit includes at least one of the following: a first determining module, used to match the shapes of each closed region in the motor body image with the screw hole positions to determine the closed regions in each closed region that do not match the shapes of the screw hole positions, and to determine the mismatched closed regions as interference objects; and a second determining module, used to search for lines in the motor body image and to determine the lines as interference objects.
[0105] Optionally, the first determining unit includes: a second determining subunit, used to determine each candidate region from the target motor image; a third determining subunit, used to determine the center point distance between the center point coordinates of each candidate region and the center point coordinates of the motor; and a fourth determining subunit, used to determine the positional relationship between each candidate region in the target motor image and the center point of the motor based on the center point distance.
[0106] Optionally, the second determining subunit includes: a third determining module, used to determine, based on positional relationships, the target area of the center point of each candidate area on a circle with the center point of the motor as the center and the distance from the reference center point as the radius, wherein the distance from the reference center point is the standard distance from the center point of the motor to the center point of the screw hole, and the standard distance is based on the distance from the center point of the motor to the center point of the screw hole in the motor image sample, the motor image sample being an image obtained by image acquisition of a motor with qualified screw assembly; and a fourth determining module, used to determine that the target area of each candidate area is the screw hole.
[0107] Optionally, the fourth determining module includes: a first determining submodule, used to determine the center and radius of the first circular contour corresponding to each target area before assembling the screw to be assembled in each target area; a second determining submodule, used to determine the initial center distance between the center of each first circular contour and the center of the second circular contour corresponding to the shaft hole of the motor; and a third determining submodule, used to determine that the area in each target area where the initial center distance is within a first predetermined center distance and the radius of the first circular contour corresponding to the target area is within a first predetermined radius is the screw hole.
[0108] Optionally, the control unit includes: a fifth determining subunit, used to determine the moving path of the screw assembly equipment based on the position information of the target area after determining that the screw assembly equipment has picked up the screw to be assembled; and a control subunit, used to control the screw assembly equipment to move to the screw hole according to the moving path and assemble the screw to be assembled into the screw hole.
[0109] Optionally, the screw assembly device further includes: a second determining unit, used to determine the center and radius of the second circular contour corresponding to each screw hole after the screw assembly equipment assembles the screw to be assembled into each screw hole according to the position information of the target area; a third determining unit, used to determine the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole; and a fourth determining unit, used to determine that the screws in each screw hole are qualified to be assembled if the current center distance is within a second predetermined center distance and the radius of the second circular contour corresponding to the screw hole is within a second predetermined radius.
[0110] Optionally, the screw assembly device further includes: a fifth determining unit, used to determine the center and radius of the second circular contour corresponding to each screw hole after the screw assembly equipment assembles the screw to be assembled into each screw hole according to the position information of the target area; a sixth determining unit, used to determine the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole; a seventh determining unit, used to determine the first grayscale pixel average and the second grayscale pixel average of the top surface of the motor where the screw hole is located before and after the screw to be assembled into each screw hole, after determining that the current center distance in each screw hole is within a second predetermined center distance and the radius of the second circular contour corresponding to the screw hole is within a second predetermined radius; and an eighth determining unit, used to determine that the screw assembly of the screw hole is qualified if the pixel difference between the first grayscale pixel average and the second grayscale pixel average is within a predetermined pixel range.
[0111] Optionally, the screw assembly device further includes: a data acquisition unit, used to acquire an image of the nut of the screw to be assembled and a current motor image of the motor after the control screw assembly equipment assembles the screw to be assembled into each screw hole according to the location information of the target area; a matching unit, used to perform feature point matching between the nut image and the current motor image to obtain a matching result; and a ninth determination unit, used to determine that the screw hole screw assembly is qualified when the matching result indicates that the similarity between the nut image and the nut image corresponding to the screw in the current motor image is greater than a similarity threshold.
[0112] According to another aspect of the present invention, an electric motor is also provided, wherein the electric motor is assembled using any of the screws described above.
[0113] According to another aspect of the present invention, an air conditioner is also provided, wherein the outdoor unit of the air conditioner includes the aforementioned motor.
[0114] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes the screw assembly method of any of the above.
[0115] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any communication device in a group of communication devices.
[0116] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: removing interfering objects from a motor image to obtain a target motor image, wherein the motor image is an image obtained by image acquisition of the motor to be assembled with screws, and the interfering objects include at least one of the following: closed regions in the motor image with shapes different from the screw hole positions and lines in the motor image, and the screw hole positions are the holes of the screws to be assembled on the motor; determining the positional relationship between each candidate region in the target motor image and the center point of the motor, wherein the candidate region is a region in the target motor image with the same shape as the screw hole position; selecting screw hole positions from each candidate region according to the positional relationship; and controlling the screw assembly equipment to assemble the screws to be assembled into each screw hole according to the positional information of the screw hole positions.
[0117] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: upon receiving a screw assembly instruction, triggering an image acquisition device to perform an image acquisition operation on the motor to obtain a motor image; preprocessing the motor image to obtain a preprocessed motor image, wherein the preprocessing includes at least one of the following operations: grayscale conversion, binarization, and convex hull calculation; performing edge search on the preprocessed motor image to extract a motor body image from the preprocessed motor image, wherein the motor body image is the motor image excluding the motor bracket image, and the motor bracket is used to support the motor; identifying interference objects in the motor body image; and deleting the interference objects from the motor body image to obtain a target motor image.
[0118] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: matching the shapes of each closed region in the motor body image with the screw hole positions to determine closed regions in each closed region that do not match the shapes of the screw hole positions, and identifying the mismatched closed regions as interference objects; searching for lines in the motor body image and identifying the lines as interference objects.
[0119] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining each candidate region from the target motor image; determining the center point distance between the center point coordinates of each candidate region and the center point coordinates of the motor; and determining the positional relationship between each candidate region in the target motor image and the center point of the motor based on the center point distance.
[0120] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining, based on positional relationships, the target area of each candidate area is located on a circle with the center point of the motor as the center and the distance from the reference center point as the radius, wherein the distance from the reference center point is the standard distance from the center point of the motor to the center point of the screw hole, and the standard distance is based on the distance from the center point of the motor to the center point of the screw hole in the motor image sample, the motor image sample being an image obtained by image acquisition of a motor with qualified screw assembly; determining the target area of each candidate area as the screw hole.
[0121] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the center and radius of the first circular profile corresponding to each target area before assembling the screw to be assembled in each target area; determining the initial center-to-center distance between the center of each first circular profile and the center of the second circular profile corresponding to the shaft hole of the motor; determining the area in each target area where the initial center-to-center distance is within a first predetermined center-to-center distance range and the radius of the first circular profile corresponding to the target area is within a first predetermined radius range as the screw hole location.
[0122] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: after determining that the screw assembly device has picked up the screw to be assembled, determining the movement path of the screw assembly device according to the location information of the target area; controlling the screw assembly device to move to the screw hole according to the movement path, and assembling the screw to be assembled into the screw hole.
[0123] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: after the control screw assembly device assembles the screws to be assembled into each screw hole according to the position information of the target area, the center and radius of the second circular contour corresponding to each screw hole are determined after the screws to be assembled are assembled into each screw hole; the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole is determined; and the screws in the screw holes whose current center distance is within a second predetermined center distance and whose radius of the second circular contour corresponding to the screw hole is within a second predetermined radius are deemed to be qualified for screw assembly.
[0124] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: after the control screw assembly device assembles the screws to be assembled into each screw hole according to the position information of the target area, the center and radius of the second circular contour corresponding to each screw hole are determined after the screws to be assembled are assembled into each screw hole; the current center distance between the center of each second circular contour and the center of the second circular contour corresponding to the motor shaft hole is determined; after determining that the current center distance in each screw hole is within a second predetermined center distance range and the radius of the second circular contour corresponding to the screw hole is within a second predetermined radius range, the first grayscale pixel average value and the second grayscale pixel average value of the top surface of the motor where the screw hole is located are determined before and after the screws to be assembled are assembled into each screw hole; the screw assembly is qualified for screw holes where the pixel difference between the first grayscale pixel average value and the second grayscale pixel average value is within a predetermined pixel range.
[0125] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: after the control screw assembly device assembles the screws to be assembled into each screw hole according to the location information of the target area, the nut image of the screws to be assembled and the current motor image of the motor are acquired; the nut image and the current motor image are matched by feature points to obtain a matching result; when the matching result indicates that the similarity between the nut image and the nut image corresponding to the screw in the current motor image is greater than the similarity threshold, the screw hole screw assembly is determined to be qualified.
[0126] According to another aspect of the present invention, a processor is also provided, which is used to run a program, wherein the program executes the screw assembly method of any of the above embodiments.
[0127] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0128] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0129] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0130] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0131] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0132] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0133] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for assembling screws, characterized in that, include: The interference objects are removed from the motor image to obtain the target motor image. The motor image is an image obtained by image acquisition of the motor to be assembled with screws. The interference objects include at least one of the following: closed regions in the motor image with shapes different from the screw hole positions and lines in the motor image. The screw hole positions are the holes of the screws to be assembled on the motor. Determine the positional relationship between each candidate region in the target motor image and the center point of the motor, wherein the candidate region is a region in the target motor image with the same shape as the screw hole position; The screw hole positions are selected from each of the candidate areas according to the positional relationship; The control screw assembly equipment assembles the screws to be assembled into each of the screw holes according to the position information of the screw holes. Determining the positional relationship between each candidate region in the target motor image and the center point of the motor includes: identifying each candidate region from the target motor image; determining the center point distance between the center point coordinates of each candidate region and the center point coordinates of the motor; and determining the positional relationship between each candidate region in the target motor image and the center point of the motor based on the center point distance. Selecting the screw hole position from each of the candidate regions based on the positional relationship includes: determining a target region in each candidate region whose center point lies on a circle centered on the center point of the motor and with a reference center point distance as the radius, wherein the reference center point distance is the standard distance from the center point of the motor to the center point of the screw hole, and the standard distance is the distance from the center point of the motor to the center point of the screw hole in a motor image sample, wherein the motor image sample is an image obtained by image acquisition of a motor with qualified screw assembly; and determining the target region in each candidate region as the screw hole position.
2. The screw assembly method according to claim 1, characterized in that, Remove interfering objects from the motor image to obtain the target motor image, including: Upon receiving the screw assembly instruction, the image acquisition device is triggered to perform an image acquisition operation on the motor to obtain an image of the motor; The motor image is preprocessed to obtain a preprocessed motor image, wherein the preprocessing includes at least one of the following operations: grayscale conversion, binarization, and convex hull calculation. Edge search is performed on the preprocessed motor image to extract the motor body image, wherein the motor body image is the motor image excluding the motor bracket image, and the motor bracket is used to support the motor; Identify the interference object in the motor body image; The interference object is removed from the motor body image to obtain the target motor image.
3. The screw assembly method according to claim 2, characterized in that, The interference object in the motor body image is identified as including at least one of the following: Match each closed region in the motor body image with the shape of the screw hole to identify closed regions in each closed region that do not match the shape of the screw hole, and identify the mismatched closed regions as the interference objects; Search for lines in the image of the motor body and identify the lines as the interference objects.
4. The screw assembly method according to claim 1, characterized in that, Determining the target area among the candidate areas as the screw hole location includes: Before assembling the screw to be assembled in each of the target areas, determine the center and radius of the first circular contour corresponding to each of the target areas; Determine the initial center distance between the center of each of the first circular contours and the center of the second circular contour corresponding to the shaft hole position of the motor. The screw hole is defined as the area where the initial center distance of each target region is within a first predetermined center distance range, and the radius of the first circular contour corresponding to the target region is within a first predetermined radius range.
5. The method for assembling screws according to any one of claims 1 to 4, characterized in that, The control screw assembly equipment assembles the screws to be assembled into each of the screw holes according to the position information of the screw holes, including: After determining that the screw assembly equipment has picked up the screw to be assembled, the moving path of the screw assembly equipment is determined according to the position information of the target area; The screw assembly equipment is controlled to move to the screw hole according to the moving path, and the screw to be assembled is assembled into the screw hole.
6. The screw assembly method according to claim 5, characterized in that, After the control screw assembly equipment assembles the screws to be assembled into the respective screw holes according to the position information of the target area, the method further includes: After the screws to be assembled are installed in each of the screw holes, determine the center and radius of the second circular contour corresponding to each of the screw holes; Determine the current center-to-center distance between the center of each of the second circular profiles and the center of the second circular profile corresponding to the shaft hole position of the motor; The screws in each screw hole are qualified to be assembled if the current center distance is within the range of the second predetermined center distance and the radius of the second circular profile corresponding to the screw hole is within the range of the second predetermined radius.
7. The screw assembly method according to claim 5, characterized in that, After the control screw assembly equipment assembles the screws to be assembled into the respective screw holes according to the position information of the target area, the method further includes: After the screws to be assembled are installed in each of the screw holes, determine the center and radius of the second circular contour corresponding to each of the screw holes; Determine the current center-to-center distance between the center of each of the second circular profiles and the center of the second circular profile corresponding to the shaft hole position of the motor; After determining that the current center distance of each screw hole is within the range of the second predetermined center distance, and the radius of the second circular contour corresponding to the screw hole is within the range of the second predetermined radius, the average value of the first grayscale pixel and the average value of the second grayscale pixel on the top surface of the motor where the screw hole is located are determined before and after the screw to be assembled is installed in each screw hole. The screw assembly at the screw hole position is deemed qualified if the pixel difference between the average value of the first grayscale pixel and the average value of the second grayscale pixel is within a predetermined pixel range.
8. The screw assembly method according to claim 5, characterized in that, After the control screw assembly equipment assembles the screws to be assembled into the respective screw holes according to the position information of the target area, the method further includes: Acquire images of the nuts of the screws to be assembled and the current motor image of the motor; The nut image is matched with the current motor image by feature point matching to obtain the matching result; When the matching result indicates that the similarity between the nut image and the nut image corresponding to the screw in the current motor image is greater than the similarity threshold, the screw hole position screw assembly is determined to be qualified.
9. A screw assembly device, characterized in that, include: An acquisition unit is used to remove interfering objects from a motor image to obtain a target motor image, wherein the motor image is an image obtained by image acquisition of a motor to be assembled with screws, and the interfering objects include at least one of the following: a closed region in the motor image with a shape different from the screw hole position and a line in the motor image, wherein the screw hole position is the hole position of the screw to be assembled on the motor; The first determining unit is used to determine the positional relationship between each candidate region in the target motor image and the center point of the motor, wherein the candidate region is a region in the target motor image with the same shape as the screw hole position; The selection unit is used to select the screw hole position from each of the candidate areas according to the positional relationship; The control unit is used to control the screw assembly equipment to assemble the screws to be assembled into the respective screw holes according to the position information of the screw holes. The first determining unit includes: a second determining subunit, configured to determine each candidate region from the target motor image; a third determining subunit, configured to determine the center-point distance between the center-point coordinates of each candidate region and the center-point coordinates of the motor; and a fourth determining subunit, configured to determine the positional relationship between each candidate region in the target motor image and the center-point of the motor based on the center-point distance. The second determining subunit includes: a third determining module, used to determine, based on the positional relationship, a target area on a circle with the center point of the motor as the center and a reference center point distance as the radius, where the reference center point distance is the standard distance from the center point of the motor to the center point of the screw hole, and the standard distance is based on the distance from the center point of the motor to the center point of the screw hole in a motor image sample, where the motor image sample is an image obtained by image acquisition of a motor with qualified screw assembly; and a fourth determining module, used to determine that the target area in each of the candidate areas is the screw hole.
10. An electric motor, characterized in that, The motor uses the screw assembly method described in any one of claims 1 to 8.
11. An air conditioner, characterized in that, The outdoor unit of the air conditioner includes the motor described in claim 10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program performs the screw assembly method according to any one of claims 1 to 8.
13. A processor, characterized in that, The processor is used to run a program, wherein the program executes the screw assembly method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Looseness screw and method for supporting automatic assembly of Looseness screw
CN115546290A
Method for detecting angle of rotation in circumferential direction, and method for assembling storage medium and hard disk
JP2001280936A