1. Technical Field
Embodiments of the present disclosure relate to systems and methods for processing motherboards of electronic devices, and more particularly, to a computing device, a storage medium, and a method for processing location holes of a motherboard.
2. Description of Related Art
A motherboard of an electronic device may include several location holes. Some holes may be configured for automated machines, such as mechanical arms, to grab the motherboard, and the other holes may be configured for fastening electronic components, such as screws. For accurately grabbing the motherboard or fastening the electronic components, it is desired a method for accurately locating the location holes of the motherboard.
The disclosure, including the accompanying drawings, is illustrated by way of example and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
The storage system 10 further stores a motherboard image. The motherboard image is defined as a digital image of the motherboard that is captured from the motherboard using an image capturing device. For example,
In one embodiment, the storage system 10 may be a random access memory (RAM) for temporary storage of information, and/or a read only memory (ROM) for permanent storage of information. In other embodiments, the storage system 10 may also be an external storage device, such as a hard disk, a storage card, or a data storage medium. The processor 11 executes computerized operations of the computing device 1 and other applications, to provide functions of the computing device 1.
In the embodiment, the location hole processing system 100 includes an establishing module 101, a processing module 102, an acquisition module 103, a calculation module 104, a selecting module 105, and an output module 106. The module 101-106 may comprise a plurality of functional modules each comprising one or more programs or computerized codes that can be accessed and executed by the at least one processor 11. In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The establishing module 101 acquires a motherboard image from the storage system 10, and establishes a coordinate system for the motherboard image according to the size data of the motherboard that is recorded in the storage system 10. In one example with respect to
The processing module 102 converts the motherboard image into a grayscale image, normalizes the grayscale image, and converts the normalized grayscale image into a binary image. The grayscale image refers to an image that is composed exclusively of shades of gray, varying from black at the weakest intensity to white at the strongest intensity. Normalizing the grayscale image refers to a process that changes the range of pixel values of the grayscale image. The range of pixel values may be a range from 0 to 255. The binary image is defined as a digital image that has only two given pixel values (i.e., 0 and 255) for each pixel of the binary image. The pixel value 0 refers to white and the pixel value 255 refers to black in the binary image.
The acquisition module 103 acquires one or more closed contours from the binary image, and a minimum circumscribed circle of each of the closed contours. Each of the closed contours is defined as a polygon. The closed contours can be acquired using a contour model of the motherboard. The minimum circumscribed circle is defined as a circle that passes through all vertices of a corresponding closed contour and has a minimum area in all circumscribed circles of the corresponding closed contour. The minimum circumscribed circle of each of the closed contours can be acquired using an approximation method.
The calculation module 104 calculates a radius and a circumcenter coordinate of each minimum circumscribed circle. The radius and the circumcenter coordinate of each minimum circumscribed circle can be calculated using the approximation method.
The calculation module 104 further calculates an average pixel value of each minimum circumscribed circle, and an average pixel value of the binary image. The average pixel value of each minimum circumscribed circle is a quotient of a sum of pixel values of a corresponding minimum circumscribed circle and a number of pixels of the corresponding minimum circumscribed circle. The average pixel value of the binary image is a quotient of a sum of pixel values of the binary image and a number of pixels of the binary image.
The selecting module 105 selects one or more minimum circumscribed circles corresponding to the location holes in the binary image according to the radius and the average pixel value of each minimum circumscribed circle, and the average pixel value of the binary image.
In the embodiment, the selecting module 105 determines whether a radius of each minimum circumscribed circle is within a predetermined radius range. The predetermined radius range refers to a radius range of the location holes. For example, the predetermined radius range is from one centimeter to two centimeters. The selecting module 105 further determines whether the average pixel value of each minimum circumscribed circle is greater than the average pixel value of the binary image.
Since the location holes in the binary image may include more black pixel, the average pixel value of each of the location holes in the binary image should be greater than the average pixel value of the binary image. The selecting module 105 selects the one or more minimum circumscribed circles each of which has a radius in the predetermined radius range and an average pixel value that is greater than the average pixel value of the binary image.
The output module 106 displays the motherboard image marked with the selected minimum circumscribed circles on the display device 12 of the computing device 1, and displays the circumcenter coordinate and the radius of each selected minimum circumscribed circles on the motherboard image for observation of the user or the automated machines. Each of the selected minimum circumscribed circles indicates a location hole on the motherboard image. For example, the selected minimum circumscribed circles respectively indicate the location holes C1, C2, C3 and C4 in
In block S1, the establishing module 101 acquires a motherboard image from the storage system 10, and establishes a coordinate system for the motherboard image according to the size data of the motherboard that is recorded in the storage system 10.
In block S2, the processing module 102 converts the motherboard image into a grayscale image, normalizes the grayscale image, and converts the normalized grayscale image into a binary image
In block S3, the acquisition module 103 acquires one or more closed contours in the binary image, and a minimum circumscribed circle of each of the closed contours.
In block S4, the calculation module 104 calculates a radius, a circumcenter coordinate, and an average pixel value of each minimum circumscribed circle, and calculates an average pixel value of the binary image.
In block S5, the selecting module 105 selects one or more minimum circumscribed circles corresponding to the location holes in the binary image according to the radius and the average pixel value of each minimum circumscribed circle, and the average pixel value of the binary image.
In the embodiment, the selecting module 105 determines whether a radius of each minimum circumscribed circle is within a predetermined radius range, such as a radius range from one centimeter to two centimeters. The selecting module 105 further determines whether the average pixel value of each minimum circumscribed circle is greater than the average pixel value of the binary image. The selecting module 105 selects the one or more minimum circumscribed circles each of which has a radius in the predetermined radius range and an average pixel value that is greater than the average pixel value of the binary image.
In block S6, the output module 106 displays the motherboard image marked with the selected minimum circumscribed circles on the display device 12 of the computing device 1, and displays the circumcenter coordinate and the radius of each selected minimum circumscribed circles on the motherboard image for observation of the user or the automated machines. Each of the selected minimum circumscribed circles indicates a location hole on the motherboard image.
Although certain embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201110347931.5 | Nov 2011 | CN | national |