CN111311749B - Method and device for automatically inserting USB hole of equipment - Google Patents
Method and device for automatically inserting USB hole of equipment Download PDFInfo
- Publication number
- CN111311749B CN111311749B CN202010072250.1A CN202010072250A CN111311749B CN 111311749 B CN111311749 B CN 111311749B CN 202010072250 A CN202010072250 A CN 202010072250A CN 111311749 B CN111311749 B CN 111311749B
- Authority
- CN
- China
- Prior art keywords
- usb hole
- usb
- point cloud
- hole
- contour
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000003384 imaging method Methods 0.000 claims abstract description 46
- 230000008569 process Effects 0.000 claims abstract description 23
- 230000015654 memory Effects 0.000 claims description 18
- 238000003780 insertion Methods 0.000 claims description 16
- 230000037431 insertion Effects 0.000 claims description 16
- 238000001914 filtration Methods 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000009466 transformation Effects 0.000 claims description 2
- 238000001514 detection method Methods 0.000 abstract description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/10—Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/521—Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Optics & Photonics (AREA)
- Computer Graphics (AREA)
- Software Systems (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The application aims to provide a method and a device for automatically inserting a USB hole of equipment, wherein the side surface of the USB hole of the equipment is scanned by line laser; shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process; splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment; obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located; converting the position value (x, y) and the depth value z of the USB hole into target coordinates (x ', y ', z ') of a PLC control module; the PLC control module is used for controlling the USB plug to be inserted into the USB hole based on the target coordinate values (x ', y ', z '), so that the position of the USB hole of the equipment can be accurately positioned, and further the USB plug of the detection equipment can be reliably controlled to be automatically inserted into the USB hole based on the position of the USB hole of the equipment.
Description
Technical Field
The application relates to the field of computers, in particular to a method and a device for automatically inserting USB holes of equipment.
Background
The existing mode for detecting the performance of intelligent equipment such as mobile phones needs to insert the USB plug of the detection equipment into the USB hole of the intelligent equipment such as the mobile phones, and is time-consuming and labor-consuming, and the labor cost is high.
Disclosure of Invention
An object of the present application is to provide a method and apparatus for automatically inserting a USB hole of a device.
According to one aspect of the present application, there is provided a method of automatically inserting a USB hole of a device, the method comprising:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinates (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
Further, in the above method, obtaining the position value (x, y) and the depth value z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located includes:
acquiring a three-dimensional point cloud contour ps1 of the side surface where the USB hole is located;
carrying out normal vector filtering on the three-dimensional point cloud contour ps1, discarding a certain point in the three-dimensional point cloud contour ps1 if the included angle between the normal vector of the certain point and the vertical direction of the three-dimensional point cloud contour ps1 exceeds a preset threshold value a1, otherwise, reserving the certain point;
finally obtaining a filtered point cloud ps2 from all reserved points;
performing depth map projection on the point cloud ps2 to obtain a depth image d;
extracting each cavity area contour from the depth image d, and taking the cavity area contour extracted from the depth image to the maximum as a contour c1 of the USB hole;
traversing the coordinates of each point in the contour c1, and acquiring corresponding three-dimensional coordinate values (x, y, z) of each point in the point cloud ps2 according to the coordinates of the point in the contour c1;
and adding the three-dimensional coordinate values (x, y, z) of all points in the profile c1 to obtain an average value so as to obtain the central position of the profile c1 of the USB hole.
Further, in the above method, converting the position value (x, y) and the depth value z of the USB hole into target coordinate values (x ', y ', z ') of the PLC control module includes:
and converting the central position of the profile c1 of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module.
Further, in the above method, controlling, by the PLC control module, insertion of the USB plug into the USB hole based on the target coordinate values (x ', y ', z '), includes:
and controlling the first mobile device to drive the USB plug to move to a position corresponding to the target coordinate value (x ', y', z ') based on the target coordinate value (x', y ', z') through the PLC control module so as to enable the USB plug to be inserted into the USB hole.
Further, in the above method, shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process includes:
and shooting all imaging lines of the line laser on the side surface where the USB hole is located and parallel to the short side of the side surface where the USB hole is located in the scanning process.
Further, in the above method, scanning the side surface of the USB hole of the device with a line laser includes:
the side of the device where the USB hole is located is scanned with a blue line laser.
According to another aspect of the present application, there is also provided an apparatus for dynamically inserting a USB hole of a device, the apparatus comprising:
the scanning module is used for scanning the side surface of the USB hole of the equipment by using the line laser;
the shooting module is used for shooting all imaging lines of the line laser on the side surface where the USB hole is located in the scanning process;
the splicing module is used for splicing all the imaging lines to form a three-dimensional point cloud outline of the side surface of the USB hole of the equipment;
the position module is used for obtaining a position value (x, y) and a depth value z of the USB hole based on the three-dimensional point cloud outline of the side surface where the USB hole is located;
the conversion module is used for converting the position value (x, y) and the depth value z of the USB hole into target coordinates (values x ', y ', z ') of the PLC control module;
and the PLC control module is used for controlling the insertion of the USB plug into the USB hole based on the target coordinate values (x ', y ', z ').
Further, in the above device, the location module is configured to obtain a three-dimensional point cloud profile ps1 of a side surface where the USB hole is located; carrying out normal vector filtering on the three-dimensional point cloud contour ps1, discarding a certain point in the three-dimensional point cloud contour ps1 if the included angle between the normal vector of the certain point and the vertical direction of the three-dimensional point cloud contour ps1 exceeds a preset threshold value a1, otherwise, reserving the point, and finally obtaining filtered point cloud ps2 from all reserved points; performing depth map projection on the point cloud ps2 to obtain a depth image d; extracting each cavity area contour from the depth image d, and taking the cavity area contour extracted from the depth image to the maximum as a contour c1 of the USB hole; traversing the coordinates of each point in the contour c1, and acquiring corresponding three-dimensional coordinate values (x, y, z) of each point in the point cloud ps2 according to the coordinates of the point in the contour c1; and adding the three-dimensional coordinate values (x, y, z) of all points in the profile c1 to obtain an average value so as to obtain the central position of the profile c1 of the USB hole.
Further, in the above device, the conversion module is configured to convert the center position of the profile c1 of the USB hole into the target coordinate values (x ', y ', z ') of the PLC control module.
Further, in the above device, the PLC control module is configured to control, by using the PLC control module, the first mobile device to drive the USB plug to move toward a position corresponding to the target coordinate value (x ', y', z ') based on the position movement control information target coordinate value (x', y ', z'), so that the USB plug is inserted into the USB hole.
Further, in the above device, the shooting module is configured to shoot each imaging line of the line laser on the side surface where the USB hole is located and parallel to the short side of the side surface where the USB hole is located in the scanning process.
Further, in the above device, the scanning module is configured to use blue line laser to scan a side surface of the device where the USB hole is located.
According to another aspect of the present application, there is also provided a computing-based apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinates (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
According to another aspect of the present application, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinates (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
Compared with the prior art, the application scans the side surface of the USB hole of the equipment by using line laser; shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process; splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment; obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located; converting the position value (x, y) and the depth value z of the USB hole into target coordinates (x ', y ', z ') of a PLC control module; the PLC control module is used for controlling the USB plug to be inserted into the USB hole based on the target coordinate values (x ', y ', z '), so that the position of the USB hole of the equipment can be accurately positioned, and further the USB plug of the detection equipment can be reliably controlled to be automatically inserted into the USB hole based on the position of the USB hole of the equipment.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 is a flow chart of a method of dynamically inserting a USB port of a device in accordance with an embodiment of the present application;
fig. 2 shows a schematic diagram of an imaged line of an embodiment of the present application.
The same or similar reference numbers in the drawings refer to the same or similar parts.
Detailed Description
The application is described in further detail below with reference to the accompanying drawings.
In one exemplary configuration of the application, the terminal, the device of the service network, and the trusted party each include one or more processors (CPUs), input/output ports, network ports, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
As shown in fig. 1, the present application provides a method for automatically inserting a USB hole of an insertion device, the method comprising:
step S1, scanning the side surface of the USB hole of the equipment by using line laser;
the device can be various devices such as a mobile phone, a computer, a PAD and the like with USB holes, and the device generally comprises 6 surfaces, wherein the top surface is one surface with a display screen, the bottom surface is the back surface of the display screen, the other four surfaces are four side surfaces respectively connected with the top surface and the bottom surface, and the USB holes are generally arranged on one side surface of the device;
s2, shooting all imaging lines of the line laser on the side surface where the USB hole is located in the scanning process;
the line laser device scans the side surface where the USB hole is located to form an imaging line reflecting the uneven profile of the side surface where the USB hole is located;
step S3, splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
step S4, obtaining the position (x, y) and the depth z of the USB hole based on the three-dimensional point cloud outline of the side surface where the USB hole is located;
s5, converting the position value (x, y) and the depth value z of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module;
and S6, controlling the USB plug to be inserted into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
The application can accurately position the position of the USB hole of the equipment, and further can reliably control the USB plug of the detection equipment to be automatically inserted into the USB hole based on the position of the USB hole of the equipment.
In an embodiment of the method for automatically inserting a USB hole into a device of the present application, step S4, obtaining a position value (x, y) and a depth value z of the USB hole based on a three-dimensional point cloud contour of a side surface where the USB hole is located, includes:
step S41, acquiring a three-dimensional point cloud contour ps1 of the side surface where the USB hole is located;
step S42, normal vector filtering is carried out on the three-dimensional point cloud contour ps1, if the included angle between the normal vector of a certain point in the three-dimensional point cloud contour ps1 and the vertical direction of the three-dimensional point cloud contour ps1 exceeds a preset threshold value a1, the certain point is abandoned, otherwise, the certain point is reserved, and the filtered point cloud ps2 is finally obtained from all reserved points;
here, the smooth transition area between the inner wall of the USB hole or the bottom and the front of the mobile phone may also generate a point cloud, but this part of the point cloud is not needed, and especially, the point inside the USB hole may make the USB center extraction inaccurate. Because the points inside the USB holes are concave inwards, unnecessary points are filtered by judging that the included angle exceeds a preset threshold value a 1;
step S43, carrying out depth map projection on the point cloud ps2 to obtain a depth image d;
step S44, extracting each cavity area contour from the depth image d, and taking the cavity area contour extracted from the depth image to the maximum as a contour c1 of the USB hole;
step S45, traversing the coordinates of each point in the contour c1, and acquiring the corresponding three-dimensional coordinate values (x, y, z) of the point in the point cloud ps2 according to the coordinates of each point in the contour c1;
step S46, adding the three-dimensional coordinate values (x, y, z) of all points in the profile c1 to obtain an average value, so as to obtain the center position of the profile c1 of the USB hole.
Here, the embodiment can efficiently and accurately obtain the center position of the profile c1 of the USB hole, so as to accurately position the position of the USB hole.
In an embodiment of the method for automatically inserting a USB hole into a device according to the present application, step S5, converting a position value (x, y) and a depth value z of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module, includes:
and converting the central position of the profile c1 of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module.
Here, by converting the center position of the profile c1 of the USB hole into the target coordinate values (x ', y ', z ') of the PLC control module, the USB plug can be controlled to be accurately inserted into the USB hole.
In an embodiment of the method for automatically inserting a USB hole into a device of the present application, step S6, controlling, by a PLC control module, insertion of a USB plug into the USB hole based on the target coordinate values (x ', y ', z '), includes:
and controlling the first mobile device to drive the USB plug to move to a position corresponding to the target coordinate value (x ', y', z ') based on the target coordinate value (x', y ', z') through the PLC control module so as to enable the USB plug to be inserted into the USB hole.
In an embodiment of the method for automatically inserting a USB hole into a device of the present application, step S2, shooting each imaging line of the line laser on a side surface where the USB hole is located in a scanning process, includes:
and shooting all imaging lines of the line laser on the side surface where the USB hole is located and parallel to the short side of the side surface where the USB hole is located in the scanning process.
Here, as shown in fig. 2, the side surface where the USB hole is located is a rectangular frame surrounded by a long side and a short side, and each imaging line 3 that is parallel to the short side 1 of the side surface where the USB hole 4 is located, but not parallel to the long side 2, is used in the shooting scanning process, so that each imaging line is as short as possible, so as to ensure the accuracy of the three-dimensional point cloud contour of the side surface where the USB hole of the device is formed by splicing each imaging line.
In an embodiment of a method for automatically inserting a USB hole into a device of the present application, step S1, scanning a side surface of the device where the USB hole is located with a line laser, includes:
step S1, scanning the side surface of the USB hole of the equipment by using blue line laser.
The blue line laser has the characteristics of short wavelength and strong energy, and each imaging line of the line laser on the equipment can be obtained efficiently and reliably by using the blue line laser.
The application provides a device for automatically inserting a USB hole of an insertion device, which comprises:
the scanning module is used for scanning the side surface of the USB hole of the equipment by using the line laser;
the device can be various devices such as a mobile phone, a computer, a PAD and the like with USB holes, and the device generally comprises 6 surfaces, wherein the top surface is one surface with a display screen, the bottom surface is the back surface of the display screen, the other four surfaces are four side surfaces respectively connected with the top surface and the bottom surface, and the USB holes are generally arranged on one side surface of the device;
the shooting module is used for shooting all imaging lines of the line laser on the side surface where the USB hole is located in the scanning process;
the line laser device scans the side surface where the USB hole is located to form an imaging line reflecting the uneven profile of the side surface where the USB hole is located;
the splicing module is used for splicing all the imaging lines to form a three-dimensional point cloud outline of the side surface of the USB hole of the equipment;
a position module for obtaining a position value (x, y ) And a depth value z;
a conversion module for converting the position value (x, y ) And the depth value z are converted into target coordinates (value x', y ’,z’);
a PLC control module for controlling the operation of the computer based on the target coordinate value (x', y 'z') controlling the insertion of the USB plug into the USB hole.
The application can accurately position the position of the USB hole of the equipment, and further can reliably control the USB plug of the detection equipment to be automatically inserted into the USB hole based on the position of the USB hole of the equipment.
In an embodiment of the device for automatically inserting a USB hole into an apparatus of the present application, the location module is configured to obtain a three-dimensional point cloud contour of a side surface where the USB hole is located p s1; for the three-dimensional point cloud profile p S1, normal vector filtering is carried out, if the three-dimensional point cloud contour is p A normal vector of a point in s1 and the three-dimensional point cloud contour p If the included angle of the vertical direction of s1 exceeds a preset threshold value a1, discarding the point, otherwise, reserving the point, and finally obtaining the filtered point cloud from all reserved points p s2; the point cloud is processed p S2, performing depth map projection to obtain a depth image d; extracting each cavity area contour from the depth image d, and taking the cavity area contour extracted from the depth image to the maximum as a contour c1 of the USB hole; traversing the coordinates of each point in the contour c1, and acquiring the point in the point cloud according to the coordinates of each point in the contour c1 p The corresponding three-dimensional coordinate value in s2 (x, y z); the three-dimensional coordinate values of all points in the contour c1 (x, y z) adding up to average value to obtain the center position of the profile c1 of the USB hole.
Here, the smooth transition area between the inner wall of the USB hole or the bottom and the front of the mobile phone may also generate a point cloud, but this part of the point cloud is not needed, and especially, the point inside the USB hole may make the USB center extraction inaccurate. Because the points inside the USB hole are all concave inwards, unnecessary points are filtered by judging that the included angle exceeds a preset threshold value a 1.
Here, the embodiment can efficiently and accurately obtain the center position of the profile c1 of the USB hole, so as to accurately position the position of the USB hole.
In an embodiment of the apparatus for automatically inserting a USB hole of a device of the present application, the transformation module is configured to transform a center position of a profile c1 of the USB hole into a target coordinate value (x ', y ', z ') of the PLC control module.
Here, by converting the center position of the profile c1 of the USB hole into the target coordinate values (x ', y ', z ') of the PLC control module, the USB plug can be controlled to be accurately inserted into the USB hole.
In an embodiment of the device for automatically inserting the USB hole of the present application, the PLC control module is configured to control, by using the PLC control module, to move the control information target coordinate value (x ', y', z ') based on the position, and control the first moving device to drive the USB plug to move toward a position corresponding to the target coordinate value (x', y ', z') like the plug, so that the USB plug is inserted into the USB hole.
In an embodiment of the device for automatically inserting a USB hole into an apparatus of the present application, the photographing module is configured to photograph, on a side surface where the USB hole is located, each imaging line of the line laser parallel to a short side of the side surface where the USB hole is located in a scanning process.
Here, as shown in fig. 2, the side surface where the USB hole is located is a rectangular frame surrounded by a long side and a short side, and each imaging line 3 that is parallel to the short side 1 of the side surface where the USB hole 4 is located, but not parallel to the long side 2, is used in the shooting scanning process, so that each imaging line is as short as possible, so as to ensure the accuracy of the three-dimensional point cloud contour of the side surface where the USB hole of the device is formed by splicing each imaging line.
In an embodiment of the device for automatically inserting a USB hole of an apparatus, the scanning module is configured to scan a side surface of the USB hole of the apparatus with blue line laser.
The blue line laser has the characteristics of short wavelength and strong energy, and each imaging line of the line laser on the equipment can be obtained efficiently and reliably by using the blue line laser.
According to another aspect of the present application, there is also provided a computing-based apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinates (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
According to another aspect of the present application, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinates (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
Details of each device and storage medium embodiment of the present application may refer to corresponding parts of each method embodiment, and are not described herein.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, e.g., using Application Specific Integrated Circuits (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application may be executed by a processor to perform the steps or functions described above. Likewise, the software programs of the present application (including associated data structures) may be stored on a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. In addition, some steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
Furthermore, portions of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application by way of operation of the computer. Program instructions for invoking the inventive methods may be stored in fixed or removable recording media and/or transmitted via a data stream in a broadcast or other signal bearing medium and/or stored within a working memory of a computer device operating according to the program instructions. An embodiment according to the application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to operate a method and/or a solution according to the embodiments of the application as described above.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Claims (14)
1. A method of automatically inserting a USB hole of a device, wherein the method comprises:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
2. The method of claim 1, wherein deriving the position value (x, y) and the depth value z of the USB hole based on a three-dimensional point cloud profile of a side surface on which the USB hole is located, comprises:
acquiring a three-dimensional point cloud contour ps1 of the side surface where the USB hole is located;
carrying out normal vector filtering on the three-dimensional point cloud contour ps1, discarding a certain point in the three-dimensional point cloud contour ps1 if the included angle between the normal vector of the certain point and the vertical direction of the three-dimensional point cloud contour ps1 exceeds a preset threshold value a1, otherwise, reserving the certain point;
finally obtaining a filtered point cloud ps2 from all reserved points;
performing depth map projection on the point cloud ps2 to obtain a depth image d;
extracting each cavity area contour from the depth image d, and taking the cavity area contour extracted from the depth image d to the maximum as a contour c1 of the USB hole;
traversing the coordinates of each point in the contour c1, and acquiring corresponding three-dimensional coordinate values (x, y, z) of each point in the point cloud ps2 according to the coordinates of the point in the contour c1;
and adding the three-dimensional coordinate values (x, y, z) of all points in the profile c1 to obtain an average value so as to obtain the central position of the profile c1 of the USB hole.
3. The method of claim 2, wherein converting the position value (x, y) and the depth value z of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module, comprises:
and converting the central position of the profile c1 of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module.
4. A method according to claim 3, wherein controlling, by a PLC control module, insertion of a USB plug into the USB hole based on the target coordinate values (x ', y ', z '), comprises:
and controlling the first mobile device to drive the USB plug to move to a position corresponding to the target coordinate value (x ', y', z ') based on the target coordinate value (x', y ', z') through the PLC control module so as to enable the USB plug to be inserted into the USB hole.
5. The method of claim 1, wherein capturing each imaged line of the line laser on the side of the USB hole during scanning comprises:
and shooting all imaging lines of the line laser on the side surface where the USB hole is located and parallel to the short side of the side surface where the USB hole is located in the scanning process.
6. The method of claim 1, wherein scanning the side of the device where the USB hole is located with a line laser comprises:
the side of the device where the USB hole is located is scanned with a blue line laser.
7. An apparatus for automatically inserting a USB hole of a device, wherein the apparatus comprises:
the scanning module is used for scanning the side surface of the USB hole of the equipment by using the line laser;
the shooting module is used for shooting all imaging lines of the line laser on the side surface where the USB hole is located in the scanning process;
the splicing module is used for splicing all the imaging lines to form a three-dimensional point cloud outline of the side surface of the USB hole of the equipment;
the position module is used for obtaining a position value (x, y) and a depth value z of the USB hole based on the three-dimensional point cloud outline of the side surface where the USB hole is located;
the conversion module is used for converting the position value (x, y) and the depth value z of the USB hole into target coordinate values (x ', y ', z ') of the PLC control module;
and the PLC control module is used for controlling the insertion of the USB plug into the USB hole based on the target coordinate values (x ', y ', z ').
8. The device of claim 7, wherein the location module is configured to obtain a three-dimensional point cloud profile ps1 of a side surface on which the USB hole is located; carrying out normal vector filtering on the three-dimensional point cloud contour ps1, discarding a certain point in the three-dimensional point cloud contour ps1 if the included angle between the normal vector of the certain point and the vertical direction of the three-dimensional point cloud contour ps1 exceeds a preset threshold value a1, otherwise, reserving the point, and finally obtaining filtered point cloud ps2 from all reserved points; performing depth map projection on the point cloud ps2 to obtain a depth image d; extracting each cavity area contour from the depth image d, and taking the cavity area contour extracted from the depth image to the maximum as a contour c1 of the USB hole; traversing the coordinates of each point in the contour c1, and acquiring corresponding three-dimensional coordinate values (x, y, z) of each point in the point cloud ps2 according to the coordinates of the point in the contour c1; and adding the three-dimensional coordinate values (x, y, z) of all points in the profile c1 to obtain an average value so as to obtain the central position of the profile c1 of the USB hole.
9. The apparatus of claim 8, wherein the transformation module is configured to transform a center position of the profile c1 of the USB hole into a target coordinate value (x ', y ', z ') of a PLC control module.
10. The device according to claim 9, wherein the PLC control module is configured to control, by using the PLC control module, the first moving device to drive the USB plug to move toward a position corresponding to the target coordinate value (x ', y', z ') based on the position movement control information target coordinate value (x', y ', z'), so as to insert the USB plug into the USB hole.
11. The device of claim 7, wherein the shooting module is configured to shoot each imaging line of the line laser on the side where the USB hole is located and parallel to a short side of the side where the USB hole is located during scanning.
12. The apparatus of claim 7, wherein the scanning module is configured to scan a side of the device where the USB hole is located using a blue line laser.
13. A computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
14. A computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
scanning the side surface of the USB hole of the equipment by using line laser;
shooting each imaging line of the line laser on the side surface where the USB hole is located in the scanning process;
splicing all imaging lines to form a three-dimensional point cloud contour of the side surface of the USB hole of the equipment;
obtaining the position (x, y) and depth z of the USB hole based on the three-dimensional point cloud contour of the side surface where the USB hole is located;
converting the position value (x, y) and the depth value z of the USB hole into target coordinate values (x ', y ', z ') of a PLC control module;
and controlling the insertion of the USB plug into the USB hole by the PLC control module based on the target coordinate values (x ', y ', z ').
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010072250.1A CN111311749B (en) | 2020-01-21 | 2020-01-21 | Method and device for automatically inserting USB hole of equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010072250.1A CN111311749B (en) | 2020-01-21 | 2020-01-21 | Method and device for automatically inserting USB hole of equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111311749A CN111311749A (en) | 2020-06-19 |
CN111311749B true CN111311749B (en) | 2023-10-27 |
Family
ID=71161608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010072250.1A Active CN111311749B (en) | 2020-01-21 | 2020-01-21 | Method and device for automatically inserting USB hole of equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111311749B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2020222971A1 (en) | 2019-02-12 | 2021-09-23 | Ecoatm, Llc | Connector carrier for electronic device kiosk |
WO2020172190A1 (en) | 2019-02-18 | 2020-08-27 | Ecoatm, Llc | Neural network based physical condition evaluation of electronic devices, and associated systems and methods |
US11922467B2 (en) | 2020-08-17 | 2024-03-05 | ecoATM, Inc. | Evaluating an electronic device using optical character recognition |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007040736A (en) * | 2005-08-01 | 2007-02-15 | Sumitomo Electric Ind Ltd | Shape measuring apparatus |
CN107192340A (en) * | 2017-07-26 | 2017-09-22 | 广东理工学院 | A kind of NI Vision Builder for Automated Inspection of measured hole, the position of groove and physical dimension |
CN206546400U (en) * | 2017-03-14 | 2017-10-10 | 东莞市瑞迅五金电器科技有限公司 | A kind of USB interface automatic plug detection device |
CN108177134A (en) * | 2017-12-29 | 2018-06-19 | 广东欧珀移动通信有限公司 | For the auxiliary mould of test adaptor |
CN207799020U (en) * | 2017-12-29 | 2018-08-31 | 天津市中环通讯技术有限公司 | Testing circuit board of mobile phone USB port is inserted into hand-push apparatus |
CN108592847A (en) * | 2018-07-27 | 2018-09-28 | Oppo(重庆)智能科技有限公司 | The method that the groove depth of electronic device is measured using measuring device |
CN109977954A (en) * | 2019-04-01 | 2019-07-05 | 上海电气集团股份有限公司 | The identification of electric vehicle charge interface and localization method and system |
CN110488261A (en) * | 2019-08-23 | 2019-11-22 | 南京理工大学 | A kind of shelf locating hole checking device and method based on LiDAR |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11042146B2 (en) * | 2017-11-17 | 2021-06-22 | Kodak Alaris Inc. | Automated 360-degree dense point object inspection |
-
2020
- 2020-01-21 CN CN202010072250.1A patent/CN111311749B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007040736A (en) * | 2005-08-01 | 2007-02-15 | Sumitomo Electric Ind Ltd | Shape measuring apparatus |
CN206546400U (en) * | 2017-03-14 | 2017-10-10 | 东莞市瑞迅五金电器科技有限公司 | A kind of USB interface automatic plug detection device |
CN107192340A (en) * | 2017-07-26 | 2017-09-22 | 广东理工学院 | A kind of NI Vision Builder for Automated Inspection of measured hole, the position of groove and physical dimension |
CN108177134A (en) * | 2017-12-29 | 2018-06-19 | 广东欧珀移动通信有限公司 | For the auxiliary mould of test adaptor |
CN207799020U (en) * | 2017-12-29 | 2018-08-31 | 天津市中环通讯技术有限公司 | Testing circuit board of mobile phone USB port is inserted into hand-push apparatus |
CN108592847A (en) * | 2018-07-27 | 2018-09-28 | Oppo(重庆)智能科技有限公司 | The method that the groove depth of electronic device is measured using measuring device |
CN109977954A (en) * | 2019-04-01 | 2019-07-05 | 上海电气集团股份有限公司 | The identification of electric vehicle charge interface and localization method and system |
CN110488261A (en) * | 2019-08-23 | 2019-11-22 | 南京理工大学 | A kind of shelf locating hole checking device and method based on LiDAR |
Also Published As
Publication number | Publication date |
---|---|
CN111311749A (en) | 2020-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111311749B (en) | Method and device for automatically inserting USB hole of equipment | |
CN111273704B (en) | Method and device for automatically inserting external equipment hole | |
US10187546B2 (en) | Method and device for correcting document image captured by image pick-up device | |
US9305360B2 (en) | Method and apparatus for image enhancement and edge verification using at least one additional image | |
US8897546B2 (en) | Semi-global stereo correspondence processing with lossless image decomposition | |
TW201941110A (en) | Qr code identifying and reading method and apparatus, and device | |
CN105979165A (en) | Blurred photos generation method, blurred photos generation device and mobile terminal | |
CN108399596B (en) | Depth image engine and depth image calculation method | |
US9275448B2 (en) | Flash/no-flash imaging for binarization | |
CN111291661B (en) | Method and equipment for identifying text content of icon in screen | |
US11282176B2 (en) | Image refocusing | |
CN113077459B (en) | Image definition detection method and device, electronic equipment and storage medium | |
CN111210473A (en) | Mobile phone contour positioning method and equipment | |
CN105578023A (en) | Image quick photographing method and device | |
WO2019134505A1 (en) | Method for blurring image, storage medium, and electronic apparatus | |
US11238563B2 (en) | Noise processing method and apparatus | |
CN111314688A (en) | Disparity map hole filling method and device and electronic system | |
JP6932758B2 (en) | Object detection device, object detection method, object detection program, learning device, learning method and learning program | |
CN114690144A (en) | Point cloud data labeling method, device and system | |
CN116311135A (en) | Data dimension reduction method, data dimension reduction system and controller for semantic information | |
KR102556759B1 (en) | Apparatus for Camera-Lidar Calibration and method thereof | |
US9524553B2 (en) | Image processing apparatus, image processing method, and recording medium | |
CN111311678B (en) | USB position positioning method and device | |
CN115439550A (en) | Camera calibration method, distance measurement method, equipment and storage medium | |
CN107103321A (en) | The generation method and generation system of road binary image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai Applicant after: Shanghai wanwansheng Environmental Protection Technology Group Co.,Ltd. Address before: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai Applicant before: SHANGHAI YUEYI NETWORK INFORMATION TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |