Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
INSPECTION OF OBJECTS
Document Type and Number:
WIPO Patent Application WO/2024/019706
Kind Code:
A1
Abstract:
At least in some examples, a method for inspecting an object by color thresholding an image of the object comprises accessing image data representing the image of the object, determining a global hue range for a background of the image, determining a global saturation range for the background of the image, and generating a first thresholded binary image based on the determined hue range and the determined saturation range, whereby to isolate at least one portion for the object from the background of the image.

Inventors:
ELLAM DANIEL CAMERON (GB)
POOTHERI SHAMNA (SG)
GRÜBL THOMAS (SG)
Application Number:
PCT/US2022/037578
Publication Date:
January 25, 2024
Filing Date:
July 19, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
HEWLETT PACKARD DEVELOPMENT CO (US)
UNIV NANYANG TECH (SG)
International Classes:
G06T7/11
Foreign References:
CN107767379B2021-02-12
US20060126941A12006-06-15
CN113920139A2022-01-11
Attorney, Agent or Firm:
MCFARLAND, Elena K. et al. (US)
Download PDF:
Claims:
Claims 1. A method for inspecting an object by color thresholding an image of the object, the method comprising: accessing image data representing the image of the object; determining a global hue range for a background of the image; determining a global saturation range for the background of the image; generating a first thresholded binary image based on the determined hue range and the determined saturation range, whereby to isolate at least one portion for the object from the background of the image. 2. The method as claimed in claim 1, further comprising: identifying sub-regions of the image based on the first thresholded binary image, and for each of the identified sub-regions: determining a local hue range for the sub-region; and determining a local saturation range for the sub-region; and generating a second thresholded binary image based on the determined local hue ranges and the determined local saturation ranges of respective sub-regions. 3. The method as claimed in claim 1, wherein at least one of the global hue range and the global saturation range comprise maximum continuous ranges for the image of the object. 4. The method as claimed in claim 2, wherein at least one of the local hue range and the local saturation range comprise maximum continuous ranges for the image of the object.

5. The method of claim 3, wherein generating the first thresholded binary image comprises, for each pixel in the image: setting an intensity of a corresponding pixel in the first thresholded binary image to a first value if a hue component of the pixel in the image is within the global maximum continuous hue range and the saturation component of the pixel is within the global maximum continuous saturation range; and setting the intensity of the corresponding pixel to a second value, otherwise. 6. The method of claim 4, wherein generating the second thresholded binary image comprises, for each pixel in a respective identified sub-region of the image: setting an intensity of a corresponding pixel in the corresponding sub-region of the second thresholded binary image to a first value if a hue component of the pixel in the image is within the local maximum continuous hue range and the saturation component of the pixel is within the local maximum continuous saturation range of the sub-region; and setting the intensity of the corresponding pixel to the second value, otherwise. 7. The method of claim 1, wherein the image comprises an image of a Printed Circuit Assembly (PCA) board. 8. The method of claim 2, wherein the image comprises an image of a Printed Circuit Assembly (PCA) board, the method further comprising identifying components of the PCA board based on the second thresholded binary image. 9. The method of claim 2, comprising identifying sub-regions of the image using a binary large object detection process.

10. The method of claim 9, further comprising surrounding respective identified sub- regions with bounding boxes. 11. The method of claim 10, further comprising setting the intensity of corresponding pixels in the second thresholded binary image to the first value in sub-regions of the image other than identified sub-regions. 12. The method of claim 1, further comprising: determining a threshold value for the global hue of the image of the object using at least one of an area under a portion of a probability mass function and a gradient of the probability mass function at a selected point. 13. A machine-readable storage medium encoded with instructions for color thresholding an image of an object to be inspected, the instructions executable by a processor, whereby to cause the processor to: determining a global hue range for a background of the image; determining a global saturation range for the background of the image; generating a first thresholded binary image based on the determined hue range and the determined saturation range, whereby to isolate at least one portion for the object from the background of the image. 14. The machine-readable storage medium of claim 13, further comprising instructions, whereby to cause the processor to: determine data representing a histogram of hue values for pixels of the image or a sub-region of the image; determine data representing a probability mass function (PMF) of the histogram; determine data representing a probability limit value indicative of a hue of a background region of the image; determine data representing at least one of a global maximum continuous hue range and a local maximum continuous hue range, based on the probability limit value. 15. The machine-readable storage medium of claim 13, further comprising instructions, whereby to cause the processor to: identify sub-regions of the image based on the first thresholded binary image, and for each of the identified sub-regions: determine a local hue range for the sub-region; and determine a local saturation range for the sub-region; and generate a second thresholded binary image based on the determined local hue ranges and the determined local saturation ranges of respective sub-regions.  

Description:
INSPECTION OF OBJECTS Background There exist many scenarios in which it is desirable to inspect an object. For example, as Printed Circuit Assembly (PCA) boards become increasingly complex and densely packed with components, knowing that the board contains the correct components as intended by the manufacturer can be challenging. Having human experts manually and individually check objects, such as PCA boards for example, during/after assembly is time consuming, expensive, and prone to error. Brief Description of the Drawings In order that the present invention may be more readily understood, embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings, in which: Figure 1a is an image of a PCB; Figure 1b is a schematic representation of a probability mass function of a Hue component of the image of figure 1a; Figure 2 is a flowchart of a method according to an example; Figure 3 is a flowchart of a method according to an example; Figure 4 is a flowchart of a method according to an example; Figures 5a-f are images of a PCB along with corresponding GTIs (global, and global and local thresholded) according to an example; and Figure 6 is a schematic representation of a machine according to an example. Detailed Description Example embodiments are described below in sufficient detail to enable those of ordinary skill in the art to embody and implement the systems and processes herein described. It is important to understand that embodiments can be provided in many alternate forms and should not be construed as limited to the examples set forth herein. Accordingly, while embodiments can be modified in various ways and take on various alternative forms, specific embodiments thereof are shown in the drawings and described in detail below as examples. There is no intent to limit to the particular forms disclosed. On the contrary, all modifications, equivalents, and alternatives falling within the scope of the appended claims should be included. Elements of the example embodiments are consistently denoted by the same reference numerals throughout the drawings and detailed description where appropriate. The terminology used herein to describe embodiments is not intended to limit the scope. The articles “a,” “an,” and “the” are singular in that they have a single referent, however the use of the singular form in the present document should not preclude the presence of more than one referent. In other words, elements referred to in the singular can number one or more, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises,” “comprising,” “includes,” and/or “including,” when used herein, specify the presence of stated features, items, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, items, steps, operations, elements, components, and/or groups thereof. Unless otherwise defined, all terms (including technical and scientific terms) used herein are to be interpreted as is customary in the art. It will be further understood that terms in common usage should also be interpreted as is customary in the relevant art and not in an idealized or overly formal sense unless expressly so defined herein. As used herein, the term technique comprises an action or procedure that is used as part of a process to achieve a certain objective or tactic. Thresholding, or background suppression, can be used to remove unnecessary or unwanted information to enable an object, by way of an image of the object, to be inspected more efficiently. For example, RGB based colour thresholding techniques can be implemented with knowledge of the grayscale features of different colour channels of an image of an object. However, such techniques may not be reliable in thresholding colour images since they are designed to process the intensity of the colours without considering the image chromaticity. In scenarios in which an object to be inspected comprises multiple elements and multiple colours, discriminating unwanted object elements or colours to enable more efficient inspection can be time consuming. For example, in an assembly line for, e.g., PCBs, a board’s functionality could be maliciously altered by adding, substituting, or removing components without such activity being easily detectable in an assembled board. It can therefore be desirable to inspect objects such boards for example, in order to discover anomalies. According to an example, a process for inspecting an object, such as a PCB board for example, can be automated to enable components or elements mounted onto a board during an assembly process to be analysed, whereby to enable detection of anomalies. In an implementation, a process of distinguishing between background and foreground regions in an image of an object to be inspected is provided. For example, the background of a PCB, and the foreground components mounted onto it can be distinguished from one another, thereby significantly improving the ability to automatically detect anomalies on the board. An anomaly can comprise a missing component or components, an additional component or components, a component in the wrong position, an issue with a conductive trace, board damage, component damage and so on. According to an example, a two-stage background suppression process is provided. The process can be based on the use of information derived from an image of an object to be inspected, such as chromaticity (hue and saturation) histograms of image pixels, which can be used to threshold or segment an image into foreground and background regions. A method for inspecting an object according to an example can be applied to images containing, for example, PCBs or printed circuit assembly (PCA) boards, but can be applied to other datasets, such as those containing images. Global (i.e., image wide) hue and saturation limits can be calculated using values for chromaticity of all image pixels of an image and applied globally to threshold the image. Local (e.g., comprising sub- regions of an image) blocks/regions can be detected using the globally thresholded image, and the detected blocks can be further refined using local hue-saturation threshold limits, as will be described in more detail below. Thus, according to an example, a thresholding process can be implemented in global and local stages, which can, in examples, be applied independently, in isolation from one another or consecutively (e.g., global followed by local). For global thresholding, a threshold value is applied to the entirety of an image (such as of an object to be inspected) in order to separate background and foreground regions of the image. In local thresholding, a threshold value can be dynamically changed over the image. That is, for example, a threshold can be determined on the basis of pixel- values around a region or block. Accordingly, different threshold values can be obtained for different regions of the same image. According to an example, an image of an object to be inspected can be converted to a hue (H), saturation (S) and value (V) format. That is, data representing each pixel in the image can be comprise an (H, S, V) tuple. In such an HSV format, chromaticity components (H and S) of a pixel are decoupled from its intensity component (V). In an example, an intensity component V can be excluded from a threshold computation in order to avoid illumination changes. A two-stage thresholding technique can be applied to the image based on data representing histograms of the chromaticity components in global and local image regions. According to an example, data representing a histogram for a hue component of respective pixels of an image is used to calculate a Probability Mass Function (PMF) for the hue component representing the probability distribution of a discrete random variable, and providing the possible values and their associated probabilities. In an example, a probability limit is estimated via a heuristic from the PMF, and hue values above the probability limit are nominated for the background hue selection. If the probability limit is too high, the entire hue range of the background region may not be obtained. Conversely, if the probability limit is too low, the hues of some foreground regions may be selected. In an example, a selected probability limit is configured to incorporate the entire background hue range and filter out foreground hues using a maximum continuous hue range heuristic, which defines a largest range of hues above the probability limit (which may include the peak hue value in an example), for which the difference between the consecutive hue values are less than a threshold value. The probability limit can be adjusted when there is a large variance in image capturing environment or PCB background colours. A probability limit can be manually determined or, as noted above, determined using a heuristic in which, e.g., threshold choices of decreasing value can be iterated through until a stopping criterion is satisfied. For example, using the calculated PMF, the largest value, max(PMF), can be selected as the current threshold value The threshold value can be decremented by a predetermined value (e.g., (max(PMF) – min(PMF))/100) with each iteration. The first iteration always has 1 connected component, denoted as the root component. The threshold value after iterations is denoted All values, in the preimage PMF -1 of the PMF are determined such that Such values can be organized into connected components, where lie in the same connected component if all where also satisfies Such a label can be described by the 2-tuple For the threshold value each connected component is denoted as The root component will be denoted The largest threshold for which there is 1 connected component but for which has 2 or more components is denoted The set of values above is denoted Two components at a given threshold are defined as being weakly connected to the root node if they are “close” to the root node by some predetermined measure, even though they are separate components. In an example, at threshold component is weakly connected to the root if either of the following are true (the two cases is to deal with components to the right and left of the root, respectively): For example, could be a scalar value, such as a value between 1 and 10, such as 2 for example. Alternatively, it could have dependency on the root component, such that, e.g., where is a rational scalar. Finally, the Maximum Continuous Hue Range is selected to be the largest (spanning the largest range) union of weakly connected components (iterating over thresholds again), all of whose parents are also weakly connected. In an example, this range can include the peak hue from the probability mass function. According to an example, a probability limit representing a threshold for which hue values above the probability limit can be nominated for the background hue selection can be determined automatically and can be used to detect probable background hue/sat values (nominated hue/sat values), which can be further refined to obtain an optimal background hue in a given image. Figure 1a is an image of a PCB. The PCB 100 of figure 1a comprises multiple components attached to a board 101. Figure 1b is graph depicting the PMF for an image of the PCB of figure 1a. The hue and saturation shades of the PCB of figure 1a include shades of green, yellow and blue, which can be discarded via a maximum continuous hue range. From the input image of figure 1a it can be interpreted that the hue of yellow texts and the blue capacitor is causing small peaks in the PMF of figure 1b, and these local maxima 103 are above the probability limit 105. To eliminate these foreground hues, the maximum continuous hue range above the probability limit is selected as the threshold range. This continuous hue range estimated is defined as the Global Hue Range (global because this hue range is estimated from the entire set of image pixels. It is applied to the whole image for thresholding, so it is a global hue range.) The maximum continuous hue range 107 in Figure 1b occurs between around 75-90 and represents the background hues of the input PCB image of Figure 1a. According to an example, to determine the global saturation range, pixels within the global hue range are shortlisted from the image, and the S component of the shortlisted pixels (Shortlisted_S) are collected. The histogram of the Shortlisted_S are used to estimate the maximum continuous saturation range (Global_S_range), as described in more detail below. Once the global hue and saturation ranges are fixed, the image is segmented as the background and foreground regions. If the hue of a pixel hue is within the Global_H_range and saturation is within the Global_S_range, that pixel is considered as a background pixel, otherwise it is considered a foreground pixel. In an example, a global thresholded binary image can be generated as an output by setting the intensity values of all background pixels to ‘0’ and the intensity of foreground pixels to '255'. The input colour image, global thresholded image and the global hue-saturation threshold ranges can be used in a thresholding (second) stage to improve the result of thresholding as described above. According to an example, a second stage can be used to dynamically determine varying local hue and saturation threshold ranges in order to refine background and foreground regions. Local relevant blocks/regions detected from the global thresholded binary image and detected blocks can be processed using local hue-saturation thresholds. In an example, window sizes for local regions can be automatically detected using Binary Large Object (blob) detection techniques from the globally thresholded image. A blob is a region of an image in which some properties are constant or approximately constant. Broadly speaking, all points in a blob can be considered in some sense to be similar to each other (e.g., in terms of hue). Image areas around blobs can be extracted using a bounding box around them. In the present context, the relevant regions are selected by eliminating backgrounds (areas outside the bounding boxes) and irrelevant regions (bounding boxes less than a minimal size) for further refining. A region from the relevant list can then be selected and the corresponding image section from the input colour image cropped. The H, S and V components of the cropped image section can be computed, and the local H component can be used to calculate a histogram confined within the Global_H_range. This eliminates the foreground object's hues while fine-tuning background in the local regions. The histogram of the local H components can be used to calculate the maximum continuous local hue range (Local_H_range). Similarly, maximum continuous local saturation range (Local_S_range) can also be computed. Threshold can then be applied dynamically over the image regions based on the corresponding local hue and saturation ranges. Any pixels within the threshold range can be set as background pixels and other pixels can be set as foreground. All the irrelevant areas are set as background regions. As such, a background can be suppressed without affecting, e.g., small foreground objects. The method is invariant to both changes in illumination and image quality. Figure 2 is a flowchart of a method according to an example. Figure 2 represents part of a first stage of a method for inspecting an object by color thresholding an image of the object, in which a global thresholding is performed. The process as described with reference to figure 2 utilises a ‘range’ function, which will be described in more detail with reference to figure 3. An image of object to be inspected, img, is provided and, in block 201 the image is converted to an H,S,V (hue, saturation, value) format, as described above, where the hue is the color, typically expressed as a number from 0 to 360 degrees (in some implementations, a hue representation can be an 8 bit representation lying in the range 0- 180, as per fig.1 (b) for example), saturation describes the amount of gray in a particular color, from 0 to 100 percent or 0 to 1 (where, e.g., 0 is gray, and 1 is a primary color, and value (or brightness) works in conjunction with saturation and describes the brightness or intensity of the color, from 0 to 100 percent, where 0 is completely black, and 100 is the brightest and reveals the most color. In block 203, data representing a histogram of the H components (H_histogram) is generated. In block 205, the range function is used to determine the minimum (min) and maximum (max) values from H_histogram. In block 207, a global (i.e., across the whole of the image) hue range, Global_H_range, is set according to a minimum global hue value (GH_min) and a maximum global hue value (GH_max), such that Global_H_range (GH_min, GH_max) = (min, max). In block 209, a set of pixels of the image whose H components fall within Global_H_range are selected to for a shortlist, Shortlisted_S. In block 211, a histogram is generated representing the components of Shortlisted_S to form Shortlisted_S_histogram. In block 213, the range function is utilised in order to determine the minimum and maximum values from Shortlisted_S_histogram. In block 215, a global (i.e., across the whole of the image) saturation range, Global_S_range, is set according to a minimum global saturation value (GS_min) and a maximum global saturation value (GS_max), such that Global_S_range (GS_min, GS_max) = (min, max). In block 217, for each pixel in the input color image, the intensity of a pixel is set to zero if the hue component of that pixel is within Global_H_range, and the saturation component of that pixel is within the Global_S_range. Otherwise, the intensity of the pixel is set to a value of 255. The resulting image forms (block 219) a global thresholded image (GTI), which is in the form of a background suppressed binary image (i.e., in this example, black and white due to the intensity of pixels having been set to zero or 255). In block 221, a second stage of the process, as described in more detail below, can be performed in order to implement local thresholding (i.e., thresholding over specific selected regions of the image) using a Local_Thresholding function which, in an example, takes img, GTI, GH_min, GH_max, GS_min and GS_max as inputs. Figure 3 is flowchart of a method according to an example. In the example of figure 3, a process for determining a range is provided, as utilised in the process described with reference to figure 2 for example. In block 301, a range function can be invoked in respect of data representing a histogram, such as a histogram representing hue values of an image of an object to inspected for example. Accordingly, in block 303 a probability mass function is calculated from the histogram. The PMF is, in general, a function over the sample space of a discrete random variable X which gives the probability that X is equal to a certain value. It therefore provides a probability measure that provides probabilities of the possible values for a random variable. In block 305, a probability limit is estimated heuristically, as described above, from the PMF. In block 307, a set of hue values, Nominatedh, for pixels in the image is generated, in which, for each hue value in the histogram, if PMF(h) ^ the limit, the hue value is included in Nominated_h. In block 309, the range (min, max) is calculated based on the maximum continuous values from Nominated_h. Such a continuous range goes to eliminate local maxima. Figure 4 is a flowchart of a method for local thresholding according to an example. In block 401, inputs img, GTI, GH_min, GH_max, GS_min and GS_max are received from, e.g., the results of the process described with reference to figure 2. In block 403, blobs (as described above) are detected in the GTI, and bounding boxes are generated around the detected blobs. In an example, any suitable method for blob detection can be used, such as a method based on differential or local maxima techniques. In block 405, regions are selected by eliminating (or disregarding) background regions outside of the bounding boxes. These regions may be classified as relevant regions. Conversely, regions below a predetermined threshold size are classified as irrelevant regions and not considered. In block 407, a relevant region is selected, and the corresponding image section is cropped from data representing the image. In block 409, the H, S and V values of the cropped image section are determined, and in block 411 local hue components, Local_H, (i.e., hue components of the cropped image section) are confined according to: where C1 is heuristically determined constant. This confinement helps to avoid the hues of foreground object in the cropped image section, whilst fine tuning background hues in local regions. In block 413, a histogram, Local_H_histogram, is generated from Local_H. In block 415, the range function, as described above, is used to determine the minimum and maximum values from Local_H_histogram. In block 417, the determined values for min and max are used to define a local (i.e., specific to the cropped image section) range of hue values, Local_H_range, such that: In block 419, a set of image pixels whose values fall within Local_H_range is selected to provide Shortlisted_S. In block 421, Shortlisted_S is used to select the local saturation, Shortlisted_Local_S, within the global saturation range, according to: Again, C2 is a heuristically determined constant. In block 423, a histogram, Shortlisted_Local_S_histogram, is generated from Shortlisted_Local_S. In block 425, the range function, as described above, is used to determine minimum and maximum values from Shortlisted_Local_S_histogram. In block 427, the determined values for min and max are used to define a local (i.e., specific to the cropped image section) range of saturation values, Local_S_range, such that: In an example, local hue and local saturation are +/- a constant value from the global hue and saturation. Otherwise, when the histogram the colour of the foreground component is generated it may will dominating. For example, consider the blue capacitor in figure 1a cropped from the image. Here, the green background in the cropped image should be refined so that the green colors in the cropped region is determined by eliminating other colours. In some examples, C1 may be equal to C2. In block 429, for each image pixel in the cropped image section, the intensity of a pixel is set to zero if the hue component of that pixel is within Local_H_range, and the saturation component of that pixel is within the Local_S_range. Otherwise, the intensity of the pixel is set to a value of 255. This is repeated (block 431), in an example, for other relevant regions of the image. Irrelevant regions of the image have their intensity set to zero. This provides (block 433) a two-stage binary thresholded image. In an example, in order to determine a probability limit automatically an image can be converted to HSV format, as described above. As noted, in such an HSV format chromaticity components (H and S) are decoupled from the intensity component (V). In an example, the intensity component V is excluded from the background colour computation to avoid illumination changes. A hue PMF is computed from the input image. The hue PMF represents the number of pixels corresponding to the hues present in the input image. The PMF can be filtered by, e.g., smoothing in order to isolate significant peaks and valleys from insignificant ones. For example, a moving average may be used. In an example, calculations can be performed using the histogram of an image rather than the image itself, which effectively binds computations to a fixed-size histogram instead of the increasing the computational complexity with increased image resolution. To estimate a probable background hue range (nominated hue values) of an image, an area under the curve of the PMF for the image and the gradient for a short interval (e.g., in a sliding window manner) can be calculated using the smoothed hue PMF. The area represents the total number of pixels, and the gradient represents the slope within the window in the PMF. According to an example, a specific hue value (h) of the smoothed hue PMF qualifies for a nominated-hue value when it is greater than a predefined cut-off value (Cutoff Area) compared to the neighbouring cumulative PMF, or the average slope of the smoothed hue PMF surrounding the value h (a sudden change in PMF within a window) is greater than a predefined cut-off value (Cutoff_Gradient). Accordingly, probable background hues (nominated-hue values) in an input image, and the optimal background hue range can be determined based on properties of the image histogram and/or predefined thresholds. If the input image has small foreground components (as in PCBs for example), the histogram might be unimodal with one sharp peak (representing background hue) and some small peaks representing foreground components. Histograms of images having larger foreground components may have bimodal or multimodal histograms. In an example, an optimal background hue range can comprise a range of nominated values having a maximum area under the curve (of a smoothed hue PMF). In the case of a unimodal histogram for example, the optimal background hue can be extracted from the nominated hue range using a maximum area under curve heuristic, given the area includes the peak hue. Foreground object size can be determined on the basis of the ratio of foreground and background pixels in the input image. For example, a higher ratio indicates larger foreground objects. According to an example, for an input image (img) a final hue range for the image (Final_Hue_Range) can be determined on the basis of an automatically determined threshold value by: Converting the img into Hue (H), Saturation (S) and Value(V) format; Generating a PMF from the Histogram of H components of the img; Smoothing the PMF to provide: Smoothed(PMF_H) Initializing a nominated hue range, Nominated_Range={} for each h in Smoothed_PMF, if (h is not in Nominated_Range), then h_lower = max(0, h-window_size/2) h_upper= min(h + window_size/2, 180) where window_size represents a sliding window of preselected size as noted above. Computing Average_Area and Average_Gradient within the window as follows: Final_Hue_Range (FH_low, FH_high) then comprises the lower and upper limit of hue values in the Nominated_Range based on maximum continuous hue range (for unimodal histograms) or maximum continuous cumulative area heuristic (for bimodal or multimodal histograms). Shortlisted_S comprises components of img pixels whose h components fall between FH_low, FH_high, and PMF_S comprises the histogram of Shortlisted_S components. To determine Nominated_Range, Average_Area and Average_Gradient are recomputed where Smoothed_PMF = Smoothen(PMF_S) Final_Saturation_Range (FS_low, FS_high) comprises lower and upper limit of saturation values in Nominated_Range based maximum continuous saturation range (for unimodal histograms) or maximum continuous cumulative area heuristic (for bimodal or multimodal histograms). Accordingly, in order to determine a final saturation range, the pixels within the final hue range are shortlisted, and the S components of the shortlisted pixels (Shortlisted_S) are collected. After smoothing the Shortlisted_S component the nominated saturation values are calculated. Heuristics, such as maximum-continuous saturation range or maximum area under the curve can be applied to the nominated saturation values to provide the final saturation values (FS_low to FS_high). Figures 5a-f are images of a PCB along with corresponding GTIs (global, and global and local thresholded) according to an example. Figures 5a and 5d are full colour images a PCB taken under different lighting conditions. Figures 5b and 5e are GTIs of the PCB of figures 5a and 5d generated according to an example, in which global thresholding (as described with reference to figure 2 for example) has been performed. Figures 5c and 5f are GTIs of the PCB of figures 5a and 5d generated according to an example, in which global thresholding followed by local thresholding (as described with reference to figure 4 for example) has been performed. The results show that the method as described herein is invariant to changes in illumination, image quality and also able to suppresses the PCB background efficiently without affecting small foreground components. The resulting image forms (block 219) a global thresholded image (GTI), which is in the form of a background suppressed binary image (i.e., in this example, black and white due to the intensity of pixels having been set to zero or 255). In block 221, a second stage of the process, as described in more detail below, can be performed in order to implement local thresholding (i.e., thresholding over specific selected regions of the image) using a Local_Thresholding function which, in an example, takes img, GTI, GH_min, GH_max, GS_min and GS_max as inputs. Examples in the present disclosure can be provided as methods, systems or machine- readable instructions, such as any combination of software, hardware, firmware or the like. Such machine-readable instructions may be included on a computer readable storage medium (including but not limited to disc storage, CD-ROM, optical storage, etc.) having computer readable program codes therein or thereon. The present disclosure is described with reference to flow charts and/or block diagrams of the method, devices and systems according to examples of the present disclosure. Although the flow diagrams described above show a specific order of execution, the order of execution may differ from that which is depicted. Blocks described in relation to one flow chart may be combined with those of another flow chart. In some examples, some blocks of the flow diagrams may not be necessary and/or additional blocks may be added. It shall be understood that each flow and/or block in the flow charts and/or block diagrams, as well as combinations of the flows and/or diagrams in the flow charts and/or block diagrams can be realized by machine readable instructions. The machine-readable instructions may, for example, be executed by a general-purpose computer, user equipment such as a smart device, e.g., a smart phone, a special purpose computer, an embedded processor or processors of other programmable data processing devices to realize the functions described in the description and diagrams. In particular, a processor or processing apparatus may execute the machine-readable instructions. Thus, modules of apparatus (for example, a module implementing a range function) may be implemented by a processor executing machine readable instructions stored in a memory, or a processor operating in accordance with instructions embedded in logic circuitry. The term 'processor' is to be interpreted broadly to include a CPU, processing unit, ASIC, logic unit, or programmable gate set etc. The methods and modules may all be performed by a single processor or divided amongst several processors. Such machine-readable instructions may also be stored in a computer readable storage that can guide the computer or other programmable data processing devices to operate in a specific mode. For example, the instructions may be provided on a non-transitory computer readable storage medium encoded with instructions, executable by a processor. Figure 6 is a schematic representation of a machine according to an example. The machine 600 can be, e.g., a system or apparatus, user equipment, or part thereof. The machine 600 comprises a processor 603, and a memory 605 to store instructions 607, executable by the processor 603. The machine comprises a storage 609 that can be used to store data representing at least one of an image 611, processed image 615, GTI 617, H value, S value, V value 613 and so on as described above with reference to figures 1 to 5 for example. The instructions 607, executable by the processor 603, can cause the machine 600 to determine a global hue range for a background of the image, determine a global saturation range for the background of the image, generate a first thresholded binary image based on the determined hue range and the determined saturation range, whereby to isolate at least one portion for the object from the background of the image. Accordingly, the machine 600 can implement a method for color thresholding an image of an object to be inspected. Such machine-readable instructions may also be loaded onto a computer or other programmable data processing devices, so that the computer or other programmable data processing devices perform a series of operations to produce computer-implemented processing, thus the instructions executed on the computer or other programmable devices provide an operation for realizing functions specified by flow(s) in the flow charts and/or block(s) in the block diagrams. Further, the teachings herein may be implemented in the form of a computer or software product, such as a non-transitory machine-readable storage medium, the computer software or product being stored in a storage medium and comprising a plurality of instructions, e.g., machine readable instructions, for making a computer device implement the methods recited in the examples of the present disclosure. In some examples, some methods can be performed in a cloud-computing or network- based environment. Cloud-computing environments may provide various services and applications via the Internet. These cloud-based services (e.g., software as a service, platform as a service, infrastructure as a service, etc.) may be accessible through a web browser or other remote interface. Various functions described herein may be provided through a remote desktop environment or any other cloud-based computing environment. While various embodiments have been described and/or illustrated herein in the context of fully functional computing systems, one or more of these exemplary embodiments may be distributed as a program product in a variety of forms, regardless of the particular type of computer-readable-storage media used to actually carry out the distribution. The embodiments disclosed herein may also be implemented using software modules that perform certain tasks. These software modules may include script, batch, or other executable files that may be stored on a computer-readable storage medium or in a computing system. In some embodiments, these software modules may configure a computing system to perform one or more of the exemplary embodiments disclosed herein. In addition, one or more of the modules described herein may transform data, physical devices, and/or representations of physical devices from one form to another. The preceding description has been provided to enable others skilled in the art to best utilize various aspects of the exemplary embodiments disclosed herein. This exemplary description is not intended to be exhaustive or to be limited to any precise form disclosed. Many modifications and variations are possible without departing from the spirit and scope of the instant disclosure. The embodiments disclosed herein should be considered in all respects illustrative and not restrictive. Reference should be made to the appended claims and their equivalents in determining the scope of the instant disclosure.



 
Previous Patent: DEVICE COVER WITH TOPCOAT LAYER

Next Patent: PHOTOVOLTAIC CELLS