GENERATION OF FREQUENCY DISTRIBUTION FOR OBJECTS
FIELD [0001] The invention relates to generating a frequency distribution for dimensions of objects to be imaged.
BACKGROUND [0002] Paper industry, for example, uses pulp processes in which the average length of fibers and the distribution of their length are often among the most essential parameters. Length distribution is usually expressed as proportional frequencies (weighted by length) of different length categories, and thus the values of the length categories can be interpreted as percentage shares of the entire pulp mass. [0003] One method of measuring these parameters is to produce an image of a pulp suspension of low consistency, with the fibers in the suspension dispersed into water acting as a medium, and to aim at determining, by means of an automated image processing equipment, a representative amount of sample fibers from the pulp to establish the nature of the pulp. A similar method can be used to measure other objects than pulp as well. [0004] However, this measurement involves problems. When objects to be imaged are in a space in which the position of each object is at least partly free and when the dimension of each object in the image depends on its position, the projected dimension of the object can be measured from the image. The projection distorts the frequency distribution of the dimensions of the objects and thus measurements carried out this way do not correspond to reality. Moreover, if the space that is being imaged is smaller than the space in which the objects are allowed to move, the margin of the image forms an area in which only the part of the object that is within the margin can be imaged, and thus it is not possible to determine the real dimension of the object. Further, in the middle of the image there may be discontinuities caused by impurities or cracks in the measurement optics, which will affect the visibility of the dimensions and their measurement.
SUMMARY [0005] It is an object of the invention to provide an improved method, computer program, and a measuring device.
[0006] This is achieved by a method for determining a frequency distribution for dimensions of objects, in which method there is available an image from which the frequency distribution of imaged objects is determined; the method comprising modifying the frequency distribution of the dimensions of the objects measured from the image by a weighting operation associated with a probability of the real dimensions of the objects being imaged in the image. [0007] Further, this is achieved by a method for determining a frequency distribution for dimensions of objects, in which method there is available a frequency distribution of the dimensions of objects projected onto an image; the frequency distribution is generated by measuring a dimension of the objects in a space in which the position of each object is at least partly free; and the dimension of each object in the image depends on the position of the object, the method comprising modifying the frequency distribution of the dimensions of the projected objects by a weighting operation cancelling the impact of the projection in order to generate a real frequency distribution of the objects. [0008] Further, this is achieved by a method for determining a frequency distribution for dimensions of objects, in which method there is available an image from which the frequency distribution of the dimensions of imaged objects is determined; some of the objects are entirely imaged in the image, and some of the objects are partly imaged in the image, the method comprising modifying the frequency distribution of the dimensions of objects measured from the image by a correction operation associated with the dimensions of the image, the dimensions of the objects in the image, and the location of the objects in the image. [0009] The invention also relates to a computer program for executing a computer process which, when being executed, determines a frequency distribution for a dimension of objects, in which the frequency distribution of the dimension of the imaged objects determined from an image is supplied to the computer program, the computer process comprising modifying the frequency distribution of the dimensions of the objects measured from the image by a weighting operation associated with a probability of the real dimensions of the objects being imaged to the image. [0010] The invention further relates to a computer program for executing a computer process which, when being executed, determines a
frequency distribution for a dimension of objects, in which the frequency distribution of the dimensions of the objects projected onto the image is supplied to the computer program the frequency distribution being generated by measuring the dimension of the objects in a space in which the position of each object is at least partly free, the dimension of each object in the image depending on the position of the object, the computer process comprising modifying the frequency distribution of the dimensions of the projected objects by a weighting operation cancelling the impact of the projection in order to generate a real frequency distribution of the objects [0011] The invention further relates to a computer program for executing a computer process which, when being executed, determines a frequency distribution for a dimension of objects, in which the frequency distribution of the dimensions of objects determined from an image are supplied to the computer program, some of which objects are entirely imaged in the image and some of the objects are partly imaged in the image, the computer process comprising modifying the frequency distribution of the dimensions of the objects measured from the image by a correction operation associated with the dimensions of the image, the dimensions of the objects in the image, and the location of the objects in the image [0012] The invention further relates to a measuring device for determining a frequency distribution for dimensions of objects, the measuring device comprising a signal processing unit configured to receive the frequency distribution of the dimensions of the imaged objects, and the signal processing unit is configured to modify the frequency distribution of the dimensions of the objects measured from the image by a weighting operation associated with a probability of the real dimensions of the objects being imaged in the image [0013] The invention still further relates to a measuring device for determining a frequency distribution for a dimension of imaged objects, the measuring device comprising a signal processing unit configured to receive the frequency distribution of the dimension of the objects projected onto the image the frequency distribution being generated by measuring the dimension of the objects in a space in which the position of each object is at least partly free, the dimension of each object in the image depending on the position of the object, and the signal processing unit is configured to modify the frequency distribution of the dimension of the projected objects by a weighting operation
compensating for the impact of the projection in order to generate a real frequency distribution of the objects. [0014] The invention still further relates to a measuring device for determining a frequency distribution for a dimension of imaged objects, the measuring device comprising a signal processing unit configured to receive the frequency distribution of objects determined from the image, in which image some of the objects are entirely imaged and some of the objects are partly imaged, and the signal processing unit is configured to modify the frequency distribution of the dimensions of the objects measured from the image by a correction operation associated with the dimensions of the image, the dimensions of the objects in the image, and the location of the objects in the image. [0015] Preferred embodiments of the invention are disclosed in the dependent claims. [0016] The method and system of the invention provide several advantages. The impact of the position of the objects can be eliminated from the frequency distribution calculated from a dimension of objects measured from an image, and thus it is possible to generate an unbiased frequency distribution. Similarly it is possible to eliminate from the frequency distribution the impact of an image margin or some other similar element of the measuring arrangement that splits the images of individual objects or otherwise changes their dimensions projecting onto the image plane.
LIST OF FIGURES [0017] In the following the invention will be described in greater detail with reference to the preferred embodiments and the accompanying drawings, in which Figure 1 illustrates a measuring arrangement; Figure 2 is a flow diagram of the method; Figure 3 illustrates a frequency distribution measured from an image; and Figure 4 illustrates a frequency distribution from which the impact of projection has been rectified; and Figure 5 illustrates frequency distributions associated with the length measurement of wood fibers.
DESCRIPTION OF THE EMBODIMENTS [0018] The frequency distribution of the dimensions objects can be measured as shown in Figure 1 , for example. An optical radiation source 100 is used for focusing optical radiation to a measuring cell 102 having objects consisting of a low-consistency suspension containing wood fibers, for example (the consistency may vary between 0.001 % and 0.003%, although it is not restricted thereto). In addition to wood fibers, the objects 1020 may consist of fine particulate matter 1020 present in a medium 1022. In a general case, most diversified particles of solid substances, liquid substances, or gaseous substances, instead of a fiber suspension, may be dispersed into a liquid medium. Moreover, in a general case, particles of a liquid substance or a solid substance may be dispersed into a gaseous medium. Instead of particles, large pieces can be measured as well, and the measurement may be carried out without a medium. [0019] The optical radiation source 100 may emit an ultraviolet radiation, visible light, or infrared radiation. A camera sensitive to optical radiation and comprising a detecting pixel matrix may be used as a detector 104. The pixel matrix may be a semiconductor component, such as a CCD (Charge-Coupled Device) cell. As the optical radiation focused to the measurement cell 102 exits from the cell 102, a desired image of the combination of the particles and the medium inside the measurement cell 102 can be formed to the detector 104 by means of an image-forming optical component, such as a lens. The optical radiation source 100 and the detector 104 may be on opposite sides of the measurement cell 102, whereby the cell 102 is transilluminated. [0020] Each pixel in the detector 104 converts the intensity of optical radiation it encounters to an electronic signal. The generated electrical signals are converted to a digital image data signal, which is then supplied to an automated image-processing unit 106. [0021] The image-processing unit 106 may measure the dimensions of the objects and generate a frequency distribution for the dimensions of the imaged objects. The generated frequency distribution data may be supplied to a separate signal-processing unit 108, or to the image-processing unit 106, which may include the signal-processing unit 108. The signal-processing unit 108 modifies the frequency distribution of the dimensions of the imaged objects in order to generate the real frequency distribution of the dimensions of
the objects. The frequency distribution for the dimensions of the imaged objects may be generated and this distribution modified separately and independently from each other, but equally well they may be part of the same signal processing process. [0022] Examine next the disclosed method with reference to Figure 2. The method steps may be executed in the signal-processing unit 108. In the method there is available a frequency distribution of a dimension of objects projected onto the image, generated by measuring the dimension of the objects. The measurement is carried out in a space the size of which allows each object to assume a position that is at least partly free. In addition, the dimension of each object in the image depends on its position in the measurement space, which may be the space projected onto the image to be generated, this space being restricted in the depth direction by the walls of the measurement cell, for example. The dimension of each object in the image depends on the position of the object. In method step 200 the frequency distribution of the dimensions of the objects measured from the image are modified by a weighting operation associated with the probability of the real dimensions of the objects being imaged in the image. [0023] Next, examine the projection involved in the imaging in greater detail. The objects to be imaged, such as wood fibers in a fiber suspension, assume different random positions in the measuring cell if the dimensions of the cell are greater than those of the object. The objects are also in random locations. In that case a dimension determining an object imaged in the image plane is probably smaller than in reality and therefore a projected dimension is always at the most equal to the real dimension of an object. Since the position of an individual object is impossible to know, the real dimension of the object cannot be determined with precision. However, when a large set of objects is imaged in one sample and the probability, or statistical dependency, associated with the position of the objects in the space to be measured is known, the frequency distribution of the measured projection lengths can be converted to the real frequency distribution of the objects. The frequency distribution converted from the frequency distribution of the dimensions thus projected corresponds to a measurement made from an image in which the dimension of each object is imaged in full length, i.e. in which the projection length, for example, is the same as the real length of an object.
[0024] According to a basic principle, the frequency distribution of the projected dimensions of objects can be modified by a weighting operation based on the probability of the positions of the objects. [0025] Examine then a large set of objects that is being imaged. A sample shows that an individual object may assume at least partly in any position and any location in the image area. Also the impact of the position or location of an individual object, a sample state, or some other interfering factor on the dimension of the object's projection is known, and the average combined effect of these can be determined. Since the average combined effect is known, a transfer function f(x,y) can be defined to illustrate the interdependency between the real dimensions x of the objects and the dimensions y of their projections. [0026] Let the number of objects In a large sample be N and let the projection lengths of imaged objects be grouped into categories according to a dimension to be measured, and let the number of categories be k and a dimension measure corresponding to the last category be at least equal to the real dimension (such as length) of the largest object in the entire set of objects. The dimension measure corresponding to the last category may also be the dimension measure of the smallest object (an inverse of its length, for example). Let Nx be the number of objects really belonging to category x, and ny the number of projected objects in category y, and let symbol nx y denote the number of objects that are real objects of category x, but projected objects in category y. Thus ny may be expressed as
[0027] In order to be able to generate the real distribution of the dimensions of the objects, it must be possible to define the values of N
x for all x's. Thus, quantities n
y are known, whereas quantities nx,
y are generally not known. However, if it is possible to define transfer function f(x,y) for example such that
f(
χ,y) = -ϋ- , (3)
n χ,y then quantities N
x can be calculated. [0028] If the imaging arrangement only allows a decrease in projection dimensions (or, correspondingly, only an increase) in imaging, and if N is large enough, it can be assumed that there is a category x
max containing only projected objects whose real dimension also belongs to the same a category x
max. This category corresponds to the greatest (or, correspondingly, smallest) dimension of this type and has a projection length of at least one object classified therein. Let thus n
Xmax,
Xmax be the number of objects whose real dimension belongs to dimension category x
max and which are also projected to category X
max. With the average impact the position or location of objects, a sample state, or some other interfering factor has on an object's projection length known, transfer function f(x,y) may be defined and used for calculating n
xmax,
y '(Xmaxιy)"ri ax,xmax — π
Xm
aχ,y > (4) for all y's. [0029] Let then x
max-ι be the category closest in size preceding (or following) category x
max, whereby the following is valid: riχmax-1
— riχmax-1 ,xmax-1
**
* π
Xmax,xmax-1 • ) [0030] Since the transfer function values at points (xmax, y) are known, quantity n
Xm
ax,
Xmax-ι is known. Similarly, n
xmax-ι is also known and thus the quantity can be calculated from the above equation. Further, it is possible to calculate T(Xmax-1 ιy)'n max-1 ,xmax-1
= fl
xmaχ-1 ,y i ) for all y's. By continuing this, eventually all quantities n
x y can be calculated from which follows that all quantities N
x can be calculated as well. [0031] A transfer function correcting an average projection distortion caused by the position of the objects can be normalized by means of a function representing the probability of the objects' position by dividing a corresponding noncontinuous probability function by the value of its highest category, the category thus obtaining always the value one (f(x,x) = 1), or some other predetermined value, and the lower categories can then be weighted accordingly. In other words, when it is possible to define the probability function analytically (or by means of simulation or test measurements) in such a way that it can be expressed as a continuous function, the probability of the category comprising
the largest objects can be determined as an integral of the probability function from the lower limit of the dimension of the largest category to its upper limit. Correspondingly, it is possible to make the probability function discrete for lower categories and then a transfer function can be deduced, as will be disclosed below. [0032] Examine then an example in which n
y = {200,500,200,100}, y e (1 , 2, 3, 4} represent the frequency distribution of the object lengths measured from a sample of 1000 objects. Figure 3 shows the frequency distribution measured from the image. The horizontal axis depicts the length category and the vertical axis the number of objects in each category. [0033] The imaging arrangements are such that all the objects are imaged in the image plane in a length corresponding to their real dimension at the most. Projection length transfer function f(x,y) corresponding to the measurement situation can be determined as follows:
[0034] In the initial phase the following data is available on the measured dimensions of the objects:
[0035] In the first step of the algorithm, the number of objects belonging to category 4 and the corresponding numbers of objects to be
removed from shorter categories are calculated, and thus n3]3 can be solved as follows:
N4 =∑f(4,y) - n44 y=1 = (1/10) -100 +(1/10) -100 + (1/10) -100 + 1 -100 = 130,
[0036] In step two, in which the category of the second largest dimensions is modified, the following result is obtained:
N3 = Yf(3,y) - n33 = n ,ι + n3,2 + n3ι3 -A
= (1/10) • 190 +(1/10) • 190 + 1 • 190 = 228 and thus n22 can be solved:
[0037] In the third step, in which the category of the third largest dimensions is modified, the following result is obtained: 2 N2 = ∑f(2,y) - n2 2 = n2,ι + n2,2 y=1
= (1/10) - 471 +1 - 471 = 518.1 , and thus nι,ι and, thereby, the real number Ni of objects in category 1 can be solved.
[0038] Figure 4 shows a modified distribution. The horizontal axis depicts the length category and the vertical axis the number of objects in each category.
[0039] In some cases transfer function f(x,y) can be analytically deduced from a setting associated with the measurement, for example for entirely freely positioned straight fibers in a large three-dimensional space. More often, however, the probability function is either obtained as a result of simulation or defined on the basis of measurements of objects known in advance. [0040] Examine then briefly the interdependency between a transfer function and probability functions by means of the example below. Assume that it is possible to analytically define frequency function
which represents the frequency distribution of objects of dimension x in relation to project dimension y < x. The probability P(y1 < y < y2) that an object whose real dimension is x sets to a position or place where its projection length is within ]y1 ,y2] can then be calculated using cumulative distribution function
or, more generally, with P(y1 < y < y2) = j p(x,y)dy , i.e. the frequency function integral within a corresponding range. [0041] Let the object categories be defined such that the width of one category is x/N, and let the corresponding categories be labeled with symbols (Y1 , Y2, Y3, ... , YN). By means of a cumulative distribution function it is now possible to define a corresponding transfer function f(YN, Yn) f(YN, Yn) = P(y £ Yn) , (10) P(y e YN) [0042] Similarly, it is possible to determine a general interdependency between the probability function and the transfer function, but
instead of analytic deduction, it may be necessary to resort to approximations, simulation and/or practical testing [0043] The frequency distribution of the dimensions of objects measured from an image can be modified by a weighting operation associated with the probability of the objects' real dimensions being imaged in the image also in situations where an object is on the margin of the image with only part of the dimension to be measured visible The location of an object has an impact on the length of the projection for example when a part of an object that happens to be on the margin of the image is left out of the image Since it is not possible to measure a part of an individual object that is outside the image area, the real length of that object cannot be determined with precision However, the probability associated with the length of the part of the object within the image is almost evenly distributed aiong the entire length on the margins of rectangular images when the dimensions of the object are small in relation to the dimensions of the image For images of some other shape, such as round, the distribution of probability is not necessarily uniform but can be deduced or determined by means of simulation or testing In practical applications, however, deviation from a uniform distribution is so small that an assumption of uniform distribution can be applied In addition, since one sample contains a large set of objects to be imaged and the random function of length determined by object location is known, information on the distribution of measured lengths can be modified such that on the average the distribution is the same as it would be if each fiber had been measured perpendicularly against its vertical axis, without the margins of the image being exceeded However, the corner areas of an image increase the relative proportion of the smallest projected lengths in comparison with the larger projection dimension categories, but the impact of this often so small that it can be ignored [0044] The ratio of objects entirely in the image to those only partly there can be expressed as a function of object length (or width) and image dimensions, however, this is applied to each case separately, and depends on the measuring arrangements With this ratio it is possible to define a probability function modifying dimensions to allow the projection dimensions of objects imaged in the margins of an image and partly outside thereof to be determined After the probable projection dimensions of objects imaged in the margins have been determined, it is possible to generate a frequency distribution of all dimensions of (partly or entirely) imaged objects, and the distribution can be
modified according to the method disclosed above. The probability function associated with objects imaged in the margins can be deduced analytically or determined by means of simulation or testing. [0045] Let an image have a size of 5 cm x 5 cm = 25 cm2 and all objects to be measured a length of I = 2 cm, for example. In this case an object will fit into the image with certainty if the distance of its midpoint from the margin is greater than 1 cm, i.e. it will be in the mid-area 3 cm x 3cm = 9 cm2 of the image. If the midpoint of the object is inside the image and its distance from the margin of the image is less than 1 cm, the probability of the entire object of fitting into the image is about 28%, i.e. at a probability of about 72% it will be on the margin. Further, if the midpoint of the object is outside the image at a distance of 1 cm at the most from the margin, there is a probability of 48% that a part of the object will extend over the image margin. The surface area of the margin within the borders of the image is 25 cm2 - 9 cm2 = 16 cm2 and the corresponding surface area of the margin on the outside is about 21.56 cm2, but only 48% of it, i.e. 10.34 cm2, needs to be taken into account. The entire surface area to be taken into account is thus 25 cm2 + 10.34 cm2 = 35.34 cm2. It is now possible to calculate that if an object is at least partly in the image area, it will fit entirely into the image, i.e. with a probability P the projection length p is the same as the object length I:
P(p = l) = 100 % [9-1.0 +■ 16-0.28 + 21.56 0.0j/35.34 « 38.1 %
[0046] Correspondingly, with a probability P the object is only partly in the image:
P(p < I) = 100 %-(1.0 - 0.381) « 61.9 %
[0047] Let the image have the above dimensions, the measure applied between categories be Δl = 0.1 cm, and let category 2.00 - 2.1 cm contain 38 objects grouped therein as a result of measurement, and assume that the measured frequency of this category does not contain any objects belonging to a category consisting of objects whose real lengths are longer. It is thus known that the image contains n partial objects n = 0.619-38/0.381 * 61.73
[0048] Assuming that the objects partly shown in the image are uniformly distributed as regards their lengths that are shorter than the real length, the corresponding transfer function is
where the value 0.0812 of function f(l, p) is arrived at by multiplying the ratio of objects partly in the image to those entirely in it by the ratio of the category range to the length of the objects to be measured (P(p < I)/ P(p = l)) (ΔI/l) = (0.619/0.381)-(0.1 cm/2 cm) « 0.0812). [0049] The bending or breaking of an object has a significant impact on its projection length. Compared with a situation where the objects are entirely straight, it is much more complicated to define the probability and the transfer function by means of analytical deduction. However, simulation and measurement of known samples may be used for determining an approximation that is sufficiently precise for practical purposes. The curliness C of an object can be defined by means of the following formula: C = 100 (1 - δ/l), (12) where δ is the shortest distance between the ends of an object and I is the length of the midline of the object. The impact of the projection can be cancelled from both of these dimensions by means of the disclosed method. In each dimension category can be determined as a function of the object's curliness. However, an analytic function is complicated to deduce, and in view of the object of application it is therefore often appropriate to determine the function only by means of simulation or by measuring known objects. [0050] Figure 5 shows a frequency distribution measured from an image, and modified frequency distributions. The curves depict the length distribution of wood fibers, the horizontal axis representing fiber length and the vertical axis the relative proportion. Curve 500 depicts an unmodified frequency distribution measured from the image and curve 502, in turn, a frequency distribution in which the impact of the image margins on the distribution has been cancelled. Curve 504 depicts a frequency distribution in which the impact of the projections of the fibers to the frequency distribution has been cancelled. Further, curve 506 depicts the real frequency distribution
of the wood fibers, both the impact of the image margin and the projection having been cancelled from the distribution by the method described above. [0051] Other factors that may have an impact on object dimensions include litter, cracks or other similar flaws in the measurement optics, a broken light detector, a set of detectors, a row of pixels, or the like, in a camera, the distance of the object in depth direction from the imaging plane, distortion in the image projection due to the location of the object (e.g. what is known as fish-eye optics), physical compression or swelling of objects, or changes in the speed of movement of the objects. Any changes to the frequency distribution caused by these can be eliminated by modifying the frequency distribution of the object dimensions measured from an image by a weighting operation associated with the probability of the real object dimensions being imaged in the image. [0052] Both the image-processing unit 106 and the signal- processing unit 108 can be implemented as a processor and software, and the disclosed method can be implemented as a computer program. Likewise, the signal processing unit 108 as well as the image-processing unit 106 can alternatively be implemented in the form of a hardware configuration by means of separate logic components or one or more Application-Specific Integrated Circuits (ASIC). Also a hybrid of these different implementations is possible. [0053] The method can be implemented as a computer program product to be installed to a signal processing unit and encoding a computer process for determining a frequency distribution for object dimensions. This computer process conforms to the disclosed method. The computer program product can be stored to a computer program distribution medium. The distribution medium can be read by means of a computer executing the program (the signal processing unit). The delivery means may be any known means for delivering a computer program from a manufacturer/supplier to an end user. The delivery means may be for example a medium readable by the signal processing unit, a program storage medium, a memory readable by the signal processing unit, a telecommunications signal addressed to the end user (or the signal processing unit) by the manufacturer/supplier, or a compressed software package. [0054] Although the invention is disclosed above with reference to an example according to the accompanying drawings, it is obvious that the
invention is not restricted thereto but can be modified in many ways within the scope of the accompanying drawings.