1. Technical Field
Embodiments of the present disclosure relate to image processing systems and methods, and particularly to an image capturing device, a storage medium, and a method for image localization of objects.
2. Description of Related Art
In order to analyze performance of products (e.g., motherboards), one or more images of the products may be captured using a camera device. However, the camera device may be installed on a place where the images captured by the camera device are all taken obliquely, for instance, on a floor, or on a ceiling in a suspended state, and not face on or geometrically square. In such a case, distortion may occur on the captured image of the product. To avoid such distortion on the captured image, various kinds of countermeasures have been proposed, such as an optical compensation method or an optical localization method. However, in such a case, the production cost of the camera device becomes very high, and it is still difficult to obtain an image having a high quality.
The present disclosure, including the accompanying drawings, is illustrated by way of examples 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.”
In the present disclosure, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a program language. In one embodiment, the program language may be 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 a non-transitory computer-readable medium include CDs, DVDs, flash memory, and hard disk drives.
The camera unit 11 may be a digital camera device that is used to capture a panoramic image of the object that includes an image of the object (hereinafter “the object image”) and a background image of the object (hereinafter “the background image). In one example with respect to
The storage device 13 stores a standard image of the object that is predefined as a reference image of the object including a plurality of boundary points of the object, such as points a2, b2, c2 and d2 as shown in
In one embodiment, the image localization system 10 includes an image obtaining module 101, a boundary identifying module 102, a sub-pixel converting module 103, and an image localization module 104. The modules 101-104 may comprise computerized instructions in the form of one or more programs that are stored in the storage device 13 and executed by the at least one microprocessor 14. A detailed descriptions of each module will be given in
In step S21, the image obtaining module 101 obtains a panoramic image of the object captured by the camera unit 11. As mentioned above, the panoramic image includes the object image and the background image. Referring to
In step S22, the image obtaining module 101 changes all the colors of the background image to black by changing a pixel value of each pixel point of the background image to zero. Referring to
In step S23, the boundary identifying module 102 obtains a plurality of boundary points of the object image according to a pixel value of each pixel point of the object image. In the embodiment, the boundary identifying module 102 creates an X-Y coordinate system based on the panoramic image of the object, and identifies the boundary points, based on the X-Y coordinate system, according to the pixel value of each of the pixel points. Referring to
In step S24, the sub-pixel converting module 103 calculates actual coordinate values of each of the boundary points using a sub-pixel identification algorithm. In one embodiment, each pixel of the object image consists of three sub-pixels, being red, green, and blue (RGB). The sub-pixel identification algorithm is a pixel processing method that divides pixels of the boundary points into a certain amount of the sub-pixels, and calculates the actual coordinate values of each of the boundary points according to the sub-pixels. In one example, with respect to
In step S25, the sub-pixel converting module 103 retrieves a standard image of the object from the storage device 13, and obtains original coordinate values of each of the boundary points based on the standard image. In the embodiment, the standard image of the object is predefined as a reference image of the object that includes a plurality of boundary points of the object, such as the points a2, b2, c2 and d2 as shown in
In step S26, the image localization module 104 calculates localization coordinate values of each pixel of the object image according to the actual coordinate values and the original coordinate values of each of the boundary points. Referring to
In step S27, the image localization module 104 generates a sub-pixel localization image of the object by mapping each of the pixel points of the object image M1 to the localization coordinate values of each of the pixel points, and displays the sub-pixel localization image of the object on the display screen 12.
Although certain disclosed 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 |
---|---|---|---|
201110252601.8 | Aug 2011 | CN | national |