The present subject matter relates, in general, to image processing, and in particular, to counting gemstones using image processing.
Various industries require counting of objects before dispensing those objects for further processing of those objects. The objects may be counted either manually or by using machines, based on the number of objects to be counted and the cost associated with the process. In cases where the objects are small, such as gemstones used in making ornaments, manual counting of the gemstones is generally considered reliable. However, manual counting may be a time consuming and tedious task. Further, manual counting may not always be accurate and an error in such processes can never be overruled. This may be avoided by using devices, such as counters that are designed to automatically count the gemstones. The counters also save the time required for counting the gemstones, also adding a certain degree of accuracy to the process.
The detailed description is described with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The same numbers are used throughout the drawings to reference like features and components.
a & 1b illustrate components of a gemstone counting apparatus, in accordance with an embodiment of the present subject matter.
Apparatus and method for counting gemstones using image processing techniques are described herein. A gemstone may be understood as a piece of mineral, which, in cut and polished form, is used to make jewelry or other adornments. As gemstones are considered precious and are available at high costs, they are usually counted every time before being used, such as in making ornaments. Conventional methods for counting gemstones employ manual counting techniques or scale counting. When the gemstones are used in small quantities, counting may be performed manually. However, manually counting a large number of gemstones is a tedious task. The manual counting technique, therefore, is time-consuming and labor intensive.
Another conventional technique for counting the gemstones may include weighing the gemstones and dividing the total weight (observed) of the gemstones by an estimate of the average weight of the gemstones. The counting of the gemstones using the above described technique may not be accurate as the gemstones may not be equal in size and weight. This may provide scope of error in counting the gemstones and may result in an inaccurate number of gemstones being used as a result of the counting. In yet another method, vibrating feeders are used for counting the gemstones. Typically, the vibrating feeders are used for conveying bulk materials, such as nuts and bolts. Application of such feeders for counting the gemstones, such as diamonds may not be useful as diamonds, being the hardest material, may damage the feeders due to friction produced during vibrations. Further, the vibrations may also cause the diamonds to get rubbed against each other which may result in scratches being produced on the diamonds.
The present subject matter discloses aspects related to counting of gemstones using image processing techniques. The present subject matter describes an apparatus for counting of gemstones. In an embodiment, the apparatus includes a housing formed as an enclosure to house the components of the apparatus used for counting the gemstones. The housing, for example, may be formed as a cuboid having five walls, namely, a front wall, two side walls, a rear wall, and a top wall. The apparatus may also include a base for supporting the front wall, the two side walls and the rear wall. The front wall of the housing may include a door that may provide access to the components housed inside the housing. In an example, the door can be slid upwards to access the components of the apparatus. Further, the apparatus may include a tray supported by the housing. The tray may be configured for holding the gemstones and can be accessed through the door, say for placing and removing the gemstones in the tray. Further, the housing may include a middle plate that may be configured to hold a plurality of devices. In an implementation, the plurality of devices may include a camera, a camera housing, a lock for the sliding door, and a light source. Further, the top wall of the housing may be coupled to a plurality of devices, such as a camera, a motor, and a direct, indirect and/or structured light source. In an implementation, the camera may be integrated in the middle plate, such that the camera can be positioned directly above the fray. It will be understood that the camera may be configured to take images of the gemstones in the tray. Additionally, the camera can be moved along various directions to cover an entire area of the tray holding the gemstones. In an implementation, the motor may be configured to facilitate movement of the camera along the top wall and also to enable the camera to take images of the gemstones from different angles. The light source may provide illumination for facilitating capturing of clear images.
It will be evident to a person skilled in the art that although the subject matter is explained in context with a gemstone counting apparatus having a housing with five walls, the principles explained herein can be extended to gemstone counting apparatus having a cylindrical housing, a circular housing, or a housing with different shapes. Further, the images captured by the camera may be processed by using well known image processing techniques, such as image filtration, contrast detection, and edge detection, for counting the number of gemstones in the tray. In order to count the gemstones in an accurate manner, the present subject matter may include a vibrating mechanism for shaking or vibrating the tray and the gemstones contained therein. The shaking of the tray can disturb the position of the gemstones and may facilitate in obtaining a good view of the gemstones in the tray. In an implementation, the camera can be configured to capture a plurality of images of the tray, after each time the tray is vibrated by the vibrating mechanism.
In an embodiment, the vibrating mechanism may include an inner plate connected to the tray, an outer plate connected to the inner plate, and a motor or actuator or solenoid connected to the inner plate to actuate the inner plate, and hence, achieve the shaking the tray. The outer plate can be understood to serve as a guide for the movement of the inner plate upon actuation. In said embodiment, the inner plate may be placed within the outer plate, such that a first end of the inner plate may be connected to the outer plate by means of an elastic member, such as a spring. Further, the housing may include a bearing enclosure including one or more bearings mounted on an output shaft of the motor. The bearings can further have an eccentric piece mounted thereon, configured to facilitate in shaking the tray upon rotation of the output shaft of the motor. To do so, the eccentric piece may be connected to a second end of the inner plate by means of couplers. It will be understood that, in an embodiment, the motor can also be enclosed inside the bearing enclosure. In the present implementation, the actuation of the eccentric piece by the motor may cause the inner plate to move in a to and fro motion, for shaking the tray, and therefore, disturbing the arrangement or placement of the gemstones in the tray.
In an embodiment, the functionality of the actuator may be controlled via a computing device, such as a personal computer and a laptop, having a software driven processing unit, a memory unit in communication with the processing unit, and an interface. The memory unit may include program instructions and data that may be accessed and processed by the processing unit, such that the processing unit can control the functionality and operations related to the gemstone counting apparatus. The interface may include a variety of software and hardware interfaces, for example, interface for peripheral device(s), such as a keyboard, a keypad, a touch sensitive screen, and a mouse. Further, the processing unit may be in communication with the vibrating mechanism including the inner plate, the outer plate, the motor, and the eccentric piece. In an implementation, the user may provide inputs through the interface. Based on user input, the processing unit may send a signal to the actuator to vibrate the tray. In an alternative embodiment, all or part of the functionality of the vibrating mechanism may be implemented as pre-programmed firmware elements, such as application specific integrated circuits (ASICs), electrically erasable programmable read-only memories (EEPROMs), or other related components. These pre-programmed firmware elements may include a series of instructions that may readable directly by the processing unit.
Further, the housing may also include a timer that may be preset, for example, by a user, based on which the time for which tray may vibrate can be regulated. Once the time set by the timer is over, the camera may capture images of the gemstones, and provide the images to the processing unit. The processing unit can be configured to count the number of gemstones in the tray by using the image processing techniques. Accordingly, the present subject matter facilitates shaking the tray and counting the number of gemstones after each vibrate. Finally, a mode value may be determined based on all the images that are captured to find out the number of gemstones in the tray. It will be evident that the mode value may refer to the count occurring maximum number of times.
In another implementation, the median value of the different measurements may be taken as the number of gemstones in the tray. The median values may be understood as a middle value of a data set when it has been arranged in ascending order. In yet another implementation, the number of gemstones in the tray may be determined once a particular count has consecutively come for a pre-defined number of times. For example, for three consecutive vibrations of the tray, if the number of gemstones remains the same, the apparatus may consider that as final.
Accordingly, the present subject matter may provide a quick and inexpensive method of counting the gemstones from digital images. This may not only reduce the chances of error but may also substantially lower human intervention in the counting process. Further, the present subject matter avoids friction between the gemstones, which in turn reduces scratches on the gemstones, thereby preserving their value.
It should be noted that the description merely illustrates the principles of the present subject matter. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described herein, embody the principles of the present subject matter and are included within its spirit and scope. Furthermore, all examples recited herein are principally intended to be only for pedagogical purposes to aid the reader in understanding the principles of the present subject matter and the concepts contributed by the inventor(s) to furthering the art. Moreover, all statements herein reciting principles, aspects, and embodiments of the present subject matter, as well as specific examples thereof, are intended to encompass equivalents thereof.
While aspects of described methods for counting the gemstones can be implemented in any number of different production environments, and/or configurations, the embodiments are described in the context of the following environment(s). It will be evident to a person skilled in the art that although the subject matter is explained in context of gemstones, the principles explained herein can be extended to counting of other small objects. For example, an electronic circuit manufacturer may use the apparatus to count small electronic components like resistors, capacitors, ICs, etc.,
a & 1b illustrate components of a gemstone counting apparatus 100 (hereinafter referred as apparatus 100), in accordance of the present subject matter with an embodiment. The apparatus 100 may be configured to use image processing techniques for counting the gemstones. The apparatus 100 may include a housing 102, formed as an enclosure, having five walls, namely, a front wall 104, two side walls 106-1 and 106-2, a rear wall 108, and a top wall 109, connected together to form the housing 102. The apparatus 100 may also include a base 110 for supporting the front wall 104, two side walls 106-1 and 106-2, and the rear wall 108. Further, the housing 102 may include pillars 111 for supporting the walls. The pillars 111 may be configured to make the housing 102 light in weight. These pillars 111 may be then covered by aluminum plates for providing a covering to the housing 102 and thus forming the walls.
Additionally, an upper portion of the front wall 104 may be configured to be movable along a vertical axis, such that the upper portion may slide upwards to form a sliding door 112 of the housing 102. Further, the housing 102 may include a middle plate 113 configured to hold a plurality of devices. In an implementation, the plurality of devices may include a camera 114, a camera housing 116, a lock 118 for the sliding door 112, and a light source (not shown). In an implementation, the light source may be disposed below the middle plate.
The apparatus 100 can further include a tray 120 for holding the gemstones therein, the tray 120 being connected to and supported by the housing 102. In an example, the tray 120 may be supported by a separator plate .122 connected to the housing 102. The separator plate 122 may provide a smooth platform for placing the tray 120 thereon. As will be understood, the camera 114 can be placed vertically, directly above the tray 120 to capture images of the gemstones in the tray 120. Further, the light source may provide illumination which may facilitate in capturing the image. In an implementation, the light source may include a plurality of light sources spaced along an axis away from, and facing the tray 120, for directing the light rays on the gemstones. As mentioned earlier, the light source may be configured to project direct, indirect, and/or structured light onto the gemstones. In another implementation, the light source may be configured to facilitate structured light triangulation method. The structured light triangulation method may involve illuminating an object with a pre-defined pattern of light/laser. Such pattern of the light/laser may strike the object, such as the gemstones, and may get reflected. This pattern of reflection of the light/laser may be captured with the help of the camera 114 for counting the number of gemstones through blob analysis.
In addition, the camera 114 can be moved in various directions, say in order to capture the images of the gemstones in the tray 120 from different angles and to be able to capture and cover the entire area of the tray 120. In an implementation, the camera housing 116 may be designed to allow movement of the camera 114, such as along the top wall 109 of the housing 102. In an example, a posterior surface of the top wall 109, i.e., the surface of the top wall 109 facing the tray 120, can be provided with a plurality of guiding mechanisms for facilitating the movement of the camera 114 in different directions. Further, in an implementation, the camera housing 116 may be designed to provide the sliding movement of the door of the housing 102. In another implementation, the light source may be integrated within the camera housing 116 or may be located outside the camera housing.
The housing 102 may further include a vibrating mechanism for shaking the tray 120 containing the gemstones after a pre-defined time period. In an implementation, the vibrating mechanism may be located below the separator plate 122. The shaking of the tray 120 may facilitate in arranging the gemstones in one level such that the gemstones do not get overlapped or placed one over the other. In an implementation, the vibrating mechanism may vibrate the tray 120 in an orbital and linear direction to make sure that any overlapped surfaces of the gemstones may be placed in a linear pattern. Such a shaking may also take into consideration that none of the gemstones fall from the tray 120. The vibrating mechanism may include an outer plate 124 that may be fixed at a position and is stationary. Furthermore, in an embodiment, an inner plate 126 can be disposed in the outer plate 124 and may be adapted to move along a surface of the outer plate 124, the inner plate 126 further coupled to the tray 120 to actuate the tray 120.
In an implementation, the surface of the outer plate 124 on which the inner plate 126 is disposed, can include a plurality of guiding elements (not shown) for facilitating the movement of the inner plate 126. Further, the inner plate 126 may be coupled to the outer plate 124 by means of a first coupler 128 and a second coupler 130. For example, a first end of the inner plate 126 may be connected to the outer plate 124 by means of the first and the second coupler 128, 130, and a second end of the inner plate 126 may be connected to the outer plate 124 by means of an elastic member 132. In an implementation, then elastic member 132 may be a spring, a rubber connector, or any other elastic connector. The elastic member 132 may enable the inner plate 126 to move along the outer plate 124 in a reciprocating manner. In an implementation, the second coupler 130 may be made of a flexible material, such as rubber. Accordingly, the outer plate 124, the inner plate 126, the first and the second couplers 128 and 130, and the elastic member 132 may be considered as a part of the vibrating mechanism of the apparatus 100.
In an exemplary embodiment, the separator plate 122, the outer plate 124, the inner plate 126, the first and the second couplers 128 and 130 respectively, and the elastic member 132 may form to a platform. This platform may be configured to place the tray 120 in such a manner so as to provide some degrees of freedom in X and Y directions.
The housing 102 may further include an eccentric piece 134 that may further facilitate the movement of the inner plate 126 along the outer plate 124. For example, the eccentric piece 134 can be connected to the second coupler 130 may exert pressure on the second coupler 130 such that the elastic member 132 at the other end of the inner plate 126 may contract. In an implementation, the eccentric piece 134 may be an eccentric pulley. Accordingly, the elastic member 132 may exert a reaction force on the inner plate 126 thereby imparting a reciprocatory motion to the tray 120 and shaking the tray 120. The tray 120 may vibrate as a result of the movement of the eccentric piece 134 and biasing of the elastic member 132.
In an implementation, the movement of the eccentric piece 134 may be initiated by a motor 136 that may be enclosed within a bearing enclosure 138. It will be evident to a person skilled in the art that the motor 136 may be any actuator, such as a solenoid, an electrical, pneumatic, or hydraulic actuator. The bearing enclosure 138 may be placed within the housing 102 of the apparatus 100. In said implementation, the bearing enclosure 138 may include a bearing 140 that may be mounted on an output shaft 142 of the motor 136. As illustrated in the figures, the eccentric piece 134 may be mounted on the output shaft 142 by means of the bearing 140.
In operation, the rotation of the output shaft 142 of the motor 136, say a stepper motor, may impart oscillatory movements in the eccentric piece 134. As explained earlier, the eccentric piece 134 is connected to the second plate 126 by means of the first coupler 128 and the second coupler 130. Accordingly, the motor 136 may enable the second plate 126 to move which in turn may vibrate the tray 120 containing the gemstones. The elastic member 132 may facilitate in positioning the tray 120 at a centre position of the separator plate 122.
In another implementation, the tray 120 may be vibrated by using a solenoid (not shown) that may be intermittently charged for imparting vibrations in the tray 120. The solenoid may be configured to generate directional, linear oscillations in the tray 120 connected to the elastic member 132. Further, in yet another implementation, a cam driven actuator may be installed instead of the motor 136 for vibrating the tray 120.
In an implementation, the bearing enclosure 138 may include additional bearings and gears that may facilitate in maintaining speed at which the tray 120 is vibrated by the vibrating mechanism. Further, the images captured by the camera 114 may be analyzed by a processing unit (not shown) of the apparatus, using various image processing techniques. These techniques may be selected from various well known methods of counting objects using image processing. For example, the image processing technique that may be employed in the present subject matter may facilitate binarization of the image captured by the camera. Thereafter, various edge detection techniques may be employed for demarcating edges of each of the gemstones from the other gemstones in the image. Further, shape and size of each of the gemstone may be detected in the image. Based on the identified shape and size, the processing unit can identify the number of gemstones, type, and size grade.
For example, the image processing techniques used for counting the number of gemstones may include a blob analysis technique. As will be understood, a blob may be considered as an area of touching pixels with same logical state. All pixels in an image that belong to a blob are in a foreground state. The blob analysis technique may include a series of processing operations and analysis functions that produce information about any 2-dimensional shape in an image. Further, the blob analysis technique may detect joined blobs. For example, if the image captured by the camera 114 may include a pattern ‘8’, this may be indicative of two pieces of the gemstones placed adjacent to each other.
Referring to
Referring to
The gemstones may be illuminated by the light source as described above. In an implementation, structural light triangulation method may be used for illuminating the gemstones with a pre-defined pattern of light/laser. When such pattern of the light/laser strikes the gemstones, the beam of light may get interrupted. In another implementation, X-ray techniques may be used for identifying the gemstones. Further, the tray 120 containing the gemstones is vibrated at pre-defined time intervals to redistribute and level the plurality of gemstones in the tray 120.
After each pre-defined time interval, the camera 114 may capture an image of the gemstones received in the tray 120, as shown in block 704. In an example, the camera 114 may capture digital images. Subsequently, at block 706, the image captured from the camera 114 may be processed by the processing unit, say using the blob analysis technique. The image processing techniques may facilitate in providing clear image and detecting shapes of the gemstones.
At block 708, the number of gemstones captured in the image may be counted, say by the processing unit. Thereafter, at block 710, it is determined whether the number of gemstones captured in the image is same for a predefined number of times, say for at least three times, or not. If so, the count of gemstones is considered as final and provided to a user. However, at block 710, if the number of gemstones is not same for the predefined number of times, the method moves to block 712.
At block 712, it is determined whether the image is taken for a predetermined number of times for a specific set of gemstones or not. If so, the method 700 may move to block 714. At block 714, a mode value of all counts may be taken. As will be understood, the mode value is the one that occurs most frequently in a set of data. In an implementation, the method 700 may be automatically timed-out after the gemstones have been counted for the nth time. In an implementation of the present subject matter, a median value of the number of counts may be calculated to determine the number of gemstones in the tray 120. In yet another implementation, the number of gemstones in the tray 120 may be determined once the particular count has consecutively come for a pre-defined number of time. For example, for three consecutive vibrations of the tray 120, if the number of gemstones turns out to be equal, the method 700 may move to block 716. Accordingly, at block 716, the count of the gemstones may be provided by means of a display.
Referring back to block 712, if the image is not taken for the predetermined number of times, the method 700 may move to block 718. At block 718, the tray 120 containing the gemstones may be vibrated, by means of the vibrating mechanism, to re-arrange the gemstones in the tray 120. Thereafter, the method 700 may be directed back to block 704.
In an implementation, the method 700 for counting the gemstones may be optimized by using size-wise analysis and shape-wise analysis. The image processing algorithm can identify size, shape and orientation of blobs, i.e., gemstones. Based on this information, it can provide count of gemstones of particular shape and/or size or combination.
Although embodiments for counting gemstones using image processing have been described in language specific to structural features and/or methods, it is to be understood that the present subject matter is not necessarily limited to the specific features or methods described. Rather, the specific features and methods are disclosed as exemplary implementations for counting gemstones using image processing.
Number | Date | Country | Kind |
---|---|---|---|
3168/MUM/2012 | Oct 2012 | IN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/IB2013/002430 | 10/31/2013 | WO | 00 |