Patent Description:
In the medical field and the like, there have been proposed various kinds of automatic analyzer. Generally speaking, in the automatic analyzer, a sample is analyzed by mixing a biospecimen such as blood or urine with a reagent to obtain a reaction liquid and by performing automatic measurement thereon. The mixture of the biospecimen with the reagent is generally performed by dispensing the sample and reagent from the sample container and reagent container in predetermined amounts through suction dispensing by using a dispensing apparatus (dispense probe) or the like, and by supplying them to a reaction container for reaction.

When performing the dispensing, the distal end of the dispense probe is put into a liquid substance such as the sample and reagent to be dispensed; the deeper it is put in, the more liquid adheres to the outer wall of the probe, resulting in an increase in contamination between the different samples and reagents. Further, the deeper it is put in, the more time is needed for the vertical movement. In view of this, the height of the liquid surface is detected so that the distal end of the dispense probe may be allowed to enter only slightly, with the distal end of the dispense probe being controlled in height direction in conformity with the height. Regarding the technique for detecting this liquid surface height, there is known the problem of erroneously recognizing the height of the surface of any bubble generated on the surface of the liquid as the height of the liquid surface, resulting in failure in suction. To cope with this problem, there has been examined how to detect the liquid surface condition through image processing.

For example, Patent Document <NUM> discloses a method in which illumination is applied from above to the object of inspection and in which an image of the liquid surface is taken through imaging by a color camera. Then, reflection (mirror surface reflection) of the illumination on the liquid surface is extracted by utilizing hue information indicating a difference in the ratios of the spectral components of light and is counted to thereby detect the presence of bubbles. It can happen that the reflection light from the bottom surface of the sample container creates various complicated and varied images, and that bubbles not interfering with the suction dispending are generated at the position of the inner wall of the sample container below the liquid surface. In the case, however, by using the method in which the mirror surface reflection of the illumination is extracted, it can be easily distinguished from the condition of bubble generation on the liquid surface.

As another examination example, Patent Document <NUM> discloses a method in which, after the processing of obtaining the center of a liquid surface circle with respect to the inspection image at the time of imaging by a camera, histogram evaluation and FFT evaluation of a radial image having undergone polar coordinate transformation, and further, ring detection through Hough transformation, are conducted to thereby detect bubbles.

A detector for foam on a liquid surface with the features in the pre-characterizing portion of Claim <NUM> is disclosed in <CIT>. Another related detector for bubbles on a liquid surface is disclosed in <CIT>.

In the case of the examination example disclosed in Patent Document <NUM>, however, when inexpensive visible light illumination is employed, there is the possibility of its being impossible for a sample like a urine sample the liquid color of which is very light or for a sample highly diluted to accurately extract the mirror surface reflection of the illumination on the liquid surface, since their spectral absorption of the visible light area is slight. To cope with this problem, it might be possible to extract the reflection of the illumination to detect the presence of bubbles, by making it possible to obtain a difference in ratio for each spectral component through addition of light of a wavelength out of the visible light range which involves a reduction in permeability even in the case of fresh water which exhibits high permeability with respect to light of a wavelength of the visible light range; in that case, however, an increase in cost for illumination, etc. is to be feared. Further, in the case of a sample containing a large amount of a component causing total reflection of the illumination light out of the sample liquid like grease molecules, the hue of the sample is rather unstable, making it sometimes difficult to extract the reflection of the illumination. The method shown in Patent Document <NUM> involves an enormous amount of computation, resulting in a problem of an increase in processing time and hardware cost.

In view of the above circumstances, it is an object of the present invention to provide at low cost a liquid surface condition detector, an automatic analyzer, and a liquid surface condition detecting method making it possible to enhance the accuracy with which the liquid surface condition of a liquid substance such as bubbles is detected.

In view of the above object, the present invention as defined in Claim <NUM> is suggested. Further advantageous features are set out in the dependent claims.

In the liquid surface condition detector, the automatic analyzer, and the liquid surface condition detecting method according to the present invention, it is possible to enhance the accuracy with which the liquid surface condition such as bubbles is detected with respect to various liquid substances.

In the following, an embodiment of the present invention will be described with reference to the drawings. It should be noted that this embodiment is only given by way of example, and the present invention should not be construed restrictively on the basis thereof.

First, a liquid surface condition detector according to an embodiment of the present invention will be described.

<FIG> is a schematic diagram illustrating the construction of a liquid surface condition detector according to the first embodiment of the present invention. As shown in <FIG>, in the liquid surface detector according to the present embodiment, a liquid (hereinafter referred to as a liquid substance <NUM>) is accommodated in a test tube <NUM> as a container.

The test tube <NUM> is formed as a substantially transparent, vertically elongated bottomed cylinder formed of various resin materials, various glass materials, etc., and has a cylindrical or conically tapered container. Examples of the liquid substance <NUM> accommodated in the test tube <NUM> include a biospecimen such as blood or urine, a reagent used for the analysis of the biospecimen, a mixture liquid obtained by mixing the biospecimen with the reagent, and a reaction liquid in which they react with each other. The test tube <NUM> is held by a test tube rack <NUM>. Even when the test tube <NUM> is not in the condition in which it is held by the test tube rack <NUM>, it is possible to detect the liquid surface condition by the liquid surface condition detector of the present invention, for example, in a condition in which the test tube <NUM> is alone. Further, while the rack shown in <FIG> can hold a plurality of test tubes, the rack may be one which holds only one test tube.

Above the test tube <NUM>, there is provided a lighting <NUM> as a light irradiation unit for applying light to the liquid surface of the liquid substance <NUM> accommodated in the test tube <NUM>. The lighting <NUM> is what is generally called "ring lighting" and has a hollow <NUM>. The lighting <NUM> consists of a plurality of ring-like white LEDs (a combination of blue light emitting diodes with fluorescent materials to attain a quasi-white color which is slightly tinged) arranged close to each other.

Above the lighting <NUM>, there is provided a camera <NUM> as an imaging unit for taking a picture (hereinafter also referred to as an image) having at least color information of the light from the test tube <NUM> and the liquid substance <NUM> accommodated in the test tube <NUM> (an exposure amount for each of a plurality of different wavelengths is obtained).

A lens <NUM> of the camera <NUM> is arranged such that it is possible to peep downwards through the hollow <NUM> of the lighting <NUM>. The camera <NUM> generally takes a picture having color information due to light of the three wavelength ranges, R, G, and B; it is formed, for example, through application of a CCD or CMOS image sensor. Electrically connected to the camera <NUM> is an image processing apparatus <NUM> as a detection unit for detecting the liquid surface condition by using the color information in the picture taken.

The image processing apparatus <NUM> consists, for example, of a computer formed by a microprocessor, memory, etc. The image processing apparatus <NUM> has a mode selection unit <NUM> optimally selecting a liquid surface condition mode. Further, the image processing apparatus <NUM> is provided with a first bubble detection unit <NUM> which determines whether or not there is a bubble on the liquid surface from the area of the lighting color mirror-reflected by the liquid surface. Further, the image processing apparatus <NUM> is provided with a second bubble detection unit <NUM> which calculates the brightness gradient in the direction along the inner wall surface configuration of the test tube and which determines whether or not there is a bubble on the liquid surface based on the calculated brightness gradient.

Further, electrically connected to the image processing apparatus <NUM> is memory <NUM> as a storage unit for storing the picture with the color information taken by the camera <NUM> and storing processing results obtained through the processing of the picture. The memory <NUM> is formed, for example, by a hard disk, flash-memory, etc. Further, connected to the image processing apparatus <NUM> is an interface unit <NUM> as an interface portion so that electrical connection to the input/output portions of other devices, apparatuses, etc. may be possible. Further, electrically connected to the image processing apparatus <NUM> is a display unit <NUM> as a display portion for displaying a picture with color information taken by the camera <NUM>, processing results obtained through the processing of the picture, etc. The display unit <NUM> consists, for example, of a liquid crystal monitor. Further, electrically connected to the image processing apparatus <NUM> is an input unit <NUM> as an input portion so that information can be input from the exterior to the image processing apparatus <NUM>. The input unit <NUM> consists, for example, of a keyboard or a mouse.

While in the above description the image processing apparatus <NUM> as the detection unit, the memory <NUM>, the interface unit <NUM>, the display unit <NUM>, and the input unit <NUM> are individual devices, it is possible for each of them to be formed as an individual device, or for all or a part of them to be formed as an integral unit. For example, all or a part of the image processing apparatus <NUM>, the memory <NUM>, the interface unit <NUM>, the display unit <NUM>, and the input unit <NUM> may be integrally formed as a detection unit.

In an embodiment of the present invention, the lighting <NUM> and the camera <NUM> are installed vertically above the liquid surface of the container <NUM>, and the light of the lighting undergoes mirror reflection by the liquid surface and can be imaged by the camera. The camera <NUM> is connected to the image processing apparatus <NUM>, and can perform image processing by transmitting the image information it has taken to the image processing apparatus <NUM>. Further, the image processing apparatus <NUM> is connected to the memory <NUM>, and can store the image information taken and processing results. The processing process and the information stored in the memory <NUM> can be displayed on the display unit <NUM>. Further, the input unit <NUM> is used for adjustment setting and execution instruction of the image processing apparatus <NUM>.

Next, a liquid surface condition detection process as an example of the liquid surface condition detection process executed by the above liquid surface condition detector described above will be briefly described with reference to <FIG>.

First, the detection mode selection step in which the bubble detection mode is selected is executed by a mode selection unit <NUM>.

In the detection mode step, first, the lighting light <NUM> is applied to the test tube <NUM> and into the interior of the test tube <NUM>, and imaging is performed by the camera <NUM>, whereby there is obtained a picture containing light color information such as the reflection light from the liquid surface of the liquid substance <NUM> and the transmitted light (S200). In obtaining of the color information, light is applied from the lighting <NUM> to the test tube <NUM> and the liquid surface of the liquid substance <NUM> accommodated in the test tube <NUM>, and the camera <NUM> takes the light color information of the reflection light, transmitted light, etc. from the test tube <NUM> and from the liquid substance <NUM> accommodated in the test tube <NUM>.

Next, there is executed processing in which a zone unnecessary for the selection of the detection mode (peripheral zone) is removed through image processing and in which an effective zone is set (S201). As a result, the image information obtaining range with respect to the liquid surface in the test tube <NUM> is restricted, making it possible to achieve an improvement in terms of the reliability in the detection mode selection.

Next, the number of pixels exhibiting a color previously determined with respect to the liquid substance <NUM> within the set effective zone (hereinafter referred to as the reference color) is counted (S202). Here, the color of the pixels counted is determined depending on the liquid substance <NUM> constituting the object of imaging. For example, in the case of blood or urine, it is set to a reference color such as red or yellow. The hue of each pixel within the effective zone is calculated, and when the value thereof is within a predetermined hue range, it is selected as an effective pixel. The reference color is generated through a change in the wavelength spectrum of the lighting light transmitted through the liquid substance based on the characteristics of the light absorption spectrum that the liquid substance has.

Next, the number of pixels exhibiting a color not in the normal state within the effective zone of the liquid substance <NUM> (hereinafter referred to as the abnormal color) is counted (S203). To determine whether it is an abnormal color or not, the pixels within the predetermined zone of a predetermined hue (which is, for example, green or yellowish green in the case of blood or urine) are counted as the effective pixels. In the case of a sample containing a large amount of grease component or the like, the hue of the sample is unstable. There appear a large number of pixels of a color that is not that of the specimen in the normal state.

Next, it is determined whether or not the number of pixels exhibiting the reference color counted in step S201 is less than a threshold value (S204). When it is less than the threshold value, the sample is with high transmissivity, so it is determined to be difficult to make a determination by the first detection unit <NUM>, and the determination by the second detection unit <NUM> is selected, with the procedure advancing to step S212. When the number of pixels exhibiting the reference color is not less than the threshold value, the procedure advances to the next step.

Next, it is determined whether or not the number of pixels exhibiting the abnormal color counted in step S203 is equal to or more than a threshold value (S205). When it is the threshold value or more, the hue of the sample is unstable, and the determination by the first detection unit <NUM> is regarded as difficult. Then, the determination by the second detection unit <NUM> is selected, and the procedure advances to step S212. When the number of pixels exhibiting a color that is not in the normal state is not the threshold value or more, the procedure advances to the step for the first detection unit <NUM>.

Next, the liquid surface condition detection by the first detection unit <NUM> will be described.

First, to remove unnecessary peripheral zone information from the picture taken in step S200, and, to enhance the reliability of the liquid surface condition detection at the position where the distal end of the dispense probe is lowered, there is conducted effective zone setting processing with respect to the liquid surface within the sample container (S206).

Next, the lighting color area reflected by the liquid surface within the effective zone through mirror reflection is extracted (S207). While there are no particular restrictions regarding the method of extracting the lighting color area, a method, for example, may be adopted in which the hue range corresponding to the lighting color is previously determined and in which pixels exhibiting that hue are selected. By using hue for the selection of the lighting color area, distinction can be easily made between the reflection light from a position other than the liquid surface (e.g., a bubble generated at the bottom of the test tube <NUM> or a position below the liquid surface) and a bubble on the liquid surface constituting the object of detection. Further, due to a difference in the distance from the camera or lighting to the liquid surface, the brightness of the image information on the liquid surface varies. However, by checking the hue indicating a difference in the ratio of the spectral component of light, it is possible to accurately select lighting light mirror-reflected by the liquid surface independently of the distance to the liquid surface.

Next, the number of the lighting color pixels areas extracted is counted (S208). The term lighting color region means a set of pixels extracted in step S207 independently of the number of pixels and the area of the region, and means regions isolated without coming into contact with each other in the picture. More specifically, it can be realized through "labeling (Labeling, Image-labeling)" processing procedures generally known in the image processing technique. By counting the number of regions, it is possible to check the number of reflections of the lighting color without depending on the difference in distance from the camera to the liquid surface and the bubble size.

Next, it is determined whether or not the number of reflection regions of the lighting color counted in step S208 is larger than the number of lightings being used (S209). In the case where there are no bubbles on the liquid surface the lighting is reflected by the liquid surface in the number of lightings, whereas, in the case where there are bubbles on the liquid surface, the lighting light is reflected not only by the liquid surface but also by the surface of each bubble, so that the reflection regions of the lighting light increase. In the present embodiment, there is used a single ring-like light source, so that it is determined that there are bubbles on the liquid surface in the case where the number of regions counted is more than <NUM> (S210), and it is determined that there are no bubbles in the case where the number of regions <NUM> or less (S211).

Subsequently, the liquid surface condition detection based on the brightness gradient in the direction along the test tube configuration conducted by the second detection unit <NUM> will be described (S212 through S216).

First, there is conducted the processing of setting an effective zone from the image information obtained in step S200 (S212). As a result, information on the unnecessary peripheral region having the possibility of containing noise is removed, and it becomes possible to enhance the reliability of the liquid surface detection at the position where the distal end of the dispense probe descends.

Next, within the effective zone set in step S212, the brightness gradient in the direction along the inner wall surface configuration of the test tube is calculated, and the maximum value of the brightness gradient is obtained (S213).

Next, it is determined whether or not the maximum value of the brightness gradient obtained in step S213 is a predetermined threshold value or more (S214). In the case where the maximum value of the brightness gradient is the threshold value or more, it is determined that there are bubbles on the liquid surface (S215), and, in the case where the maximum value of the brightness gradient is less than the threshold value, it is determined that there are no bubbles (S216).

<FIG> is an arrangement diagram illustrating the positional relationship between the dispense probe <NUM>, the test tube <NUM>, and the camera <NUM>.

The dispense probe <NUM> rotates in a horizontal plane, moves in the vertical direction, and dispenses a predetermined amount of liquid from the test tube <NUM> positioned at the dispensing position. It is desirable for the descent position <NUM> where the distal end of the dispense probe <NUM> comes into contact with the liquid surface to be previously adjusted so as to coincide with the center axis of the test tube <NUM> for dispensing, or so as to be positioned within a range near the center axis. This is for the purpose of preventing the distal end of the dispense probe <NUM> from coming into contact with the test tube <NUM> and of avoiding, as much as possible, the position of a bubble generated on the liquid surface, which is situated so as to be in contact with the inner wall surface of the test tube <NUM>.

Further, it is also desirable for the optical axis of the camera <NUM> to be previously arranged and adjusted so as to include the descent position <NUM> of the distal end of the dispense probe <NUM>. Generally speaking, a camera involves least distortion and exhibits satisfactory resolution near the center of the optical axis.

The sampling position for the dispense probe <NUM> and the imaging position for the camera <NUM> are preferably coaxial with each other. However, they may be dislocated with respect to each other. Through the dislocation, it is possible to observe the sampling condition in real time by the camera <NUM>, and it is possible to indicate that no bubble is sucked at the time of dispensing.

A bubble determination method using color information detection means will be described with reference to <FIG>.

<FIG> shows an example of the picture taken in step S200 of the flowchart of <FIG>. Suppose the actual picture is a color image <NUM>, and the sample is of a normal liquid color. The object of determination is the test tube <NUM> at the center, and two bubbles 402a and 402b float on the liquid surface at positions where they are in contact with the inner wall surface. It can be seen from the image <NUM> that, apart from the lighting light reflection region 403a on the liquid surface, there exist on the bubble surface reflection regions 403b and 403c of the lighting light. In the present embodiment, the lighting light source is a hollow ring lighting, so the reflection region of the lighting light is a hollow circle. Further, due to the light and darkness of the reflection light from the tube bottom, it can happen that there is generated a dark portion of the same configuration as the outer configuration of the test tube. In the present embodiment, it is a dark portion <NUM> of a concentric circular configuration.

<FIG> is an image showing an effective zone <NUM> set in step S201 of the flowchart of <FIG>. It indicates that the zone is set in a circular form around the descent position <NUM> for the distal end of the dispense probe <NUM>. Due to the setting of the effective zone <NUM>, even if test tubes are arranged adjacent and close to each other, they do not affect the bubble detection. The information on the portion near the inner wall of the test tube at the center is nullified.

<FIG> shows an image which is extracted in step S202 of the flowchart of <FIG>, and which selects pixels within a predetermined range of the region <NUM> exhibiting the hue of a reference color within an effective zone <NUM>. By extracting the reference color region, solely the region tinged with the color of the liquid accommodated in the test tube <NUM> is extracted. When the number of pixels in the extracted region is small, it is determined that the bubble determination by the first detection unit <NUM> is difficult, and the determination by the second detection unit <NUM> is selected. While the image after the extraction of the abnormal color region in step S203 is not shown, switching selection is performed between the first detection unit <NUM> and the second detection unit <NUM> by the number of pixels of the region exhibiting an abnormal color that is not generated in the normal state.

<FIG> shows an image which is extracted in step S206 of the flowchart of <FIG> and which exhibits an effective zone <NUM> for the determination by the first detection unit <NUM>. The zone is set as a circular region around the descent position <NUM> of the distal end of the dispense probe <NUM>. The descent position <NUM> for the distal end of the dispense probe <NUM> has been shown as a coordinate point within the image. Actually, however, the distal end portion of the dispense probe has a thickness corresponding to the tube diameter of the probe, and, further, at the descent position, there is the possibility of generation of a mechanical production error or adjustment error. In view of this, there is provided a descent range <NUM> which is a range allowing descent of the distal end of the dispense probe. In the case where bubbles are detected on the inner side of the descent range <NUM>, the bubbles and the dispense probe are brought into contact with each other to generate erroneous liquid surface detection, and there is the possibility that the liquid cannot be accurately dispensed. However, so long as the bubbles exist outside the descent range, the liquid dispensing is not affected. Thus, the effective zone <NUM> is set to be larger than the descent range <NUM>, and even in the case where the inner diameter of the test tube is large, there is no need to make a determination with respect to the range not affecting the descent range, so that it is desirable for the zone to be set to be smaller than the entire liquid surface.

<FIG> shows an image in which a region exhibiting a hue corresponding to the color of the lighting light is extracted in step S207 of the flowchart of <FIG>. As can be seen from the drawing, such regions as the bubble contour and the inner wall position of the test tube, which are tinged with the color of the liquid, are not extracted, and solely regions 409a through 409c obtained through reflection by the mirror reflection of the lighting light are extracted.

<FIG> shows an example of a diagram in which the lighting color regions are counted in step S208 of the flowchart of <FIG>. The present diagram is a schematic one, and there is no need to actually write the counted number to the image. In the present embodiment, it is indicated that, as a result of the counting, three lighting color reflection regions are extracted. In this case, the number of reflection regions of the lighting color extracted in step S209 is more than <NUM>, so that it is determined that there is a bubble on the liquid surface.

<FIG> illustrates the case of a sample of high light transmissivity over the entire visible light wavelength range, using another example of the image taken in step S200 of the flowchart of <FIG>.

<FIG> shows an image <NUM> which is lighter in liquid color as compared with the image <NUM> and which is mostly tinged with the lighting color although the image information on the liquid surface exhibits light and darkness. On the liquid surface in the test tube <NUM> constituting the object of determination, there float three air bubbles 502a, 502b, and 502c while in contact with the inner wall surface of the test tube. Further, due to the light and darkness of the reflection light from the tube bottom, there is a dark portion <NUM> of a configuration concentric with the contour of the test tube. There ought to be a reflection region of the lighting light source as in the case of the image <NUM>; it is, however, not clear when the transmissivity of the sample is high, and in the following description of the processing, it is slightly related, so that it is omitted in <FIG>.

<FIG> is an enlarged view of the liquid region inside the central test tube <NUM> of <FIG>. Dark portions 503a and 503b of a configuration centric with the contour of the test tube are due to the light and darkness of the reflection light from the tube bottom. They vary in size, thickness, and multiplicity due to various factors such as the material and bottom configuration of the test tube and the liquid amount of the sample. In the case of a sample of low transmissivity and deep liquid color, the reflection light from the tube bottom is weak and of low contrast in the image, whereas, in the case of a sample of high transmissivity and of light liquid color, the contrast is high and conspicuous. On the other hand, regarding the outer configuration of the bubbles, the contrast is low and unclear in the case of a sample of low transmissivity and deep liquid color, and, depending upon the liquid amount of the sample, it can disappear due to the reflection light from the tube bottom, whereas, in the case of a sample of high transmissivity and light liquid color, the contrast appears high and clearly.

<FIG> shows an effective zone <NUM> in which setting is made so as to remove the region (black region) unnecessary for the latest determination in step S212 of <FIG> as compared with the image of <FIG>. The effective zone <NUM> is set to be a hollow donut-like configuration around the descent position <NUM> for the distal end of the dispense probe <NUM>. Due to the hollow donut-like configuration, even if the dark portions 503a and 503b due to the light and darkness of the reflection light from the tube bottom appear in the effective zone, they are not erroneously detected as bubbles. Further, the portion near the descent position <NUM> is not set as the effective zone <NUM>, the bubble actually existing on the liquid surface does not remain near the center of the liquid surface of the test tube but approaches the test tube inner wall surface. Thus, no particular problem is involved. In the case where the contour of a bubble is not detected in the periphery of the descent range, it may be determined that there is no bubble within the descent range, so that the inner diameter <NUM> of the donut circle (i.e., the diameter of the hollow) may be approximately the same as the descent range, and even if the inner diameter of the test tube used is large, the contour <NUM> of the donut circle may be set to be smaller than the entire liquid surface range.

<FIG> is a diagram illustrating the calculation results of the brightness gradient obtained through scanning in the direction along the configuration of the test tube of the brightness information (sum total of the brightness of R, G, and B) of the image within the effective zone <NUM> in step S213 of <FIG>. The portion of small brightness gradient is shown to be black, and the portion of large brightness gradient is shown to be white. By calculating the brightness gradient in the direction along the circle, it is possible to detect the outer configuration of the bubble without being affected by the concentric dark portions 503a and 503b due to the light and darkness of the reflection light from the tube bottom. When the brightness gradient has been calculated within the effective zone <NUM>, the maximum value of the brightness gradient is obtained. When the obtained maximum value is a predetermined threshold value or more, it is determined that a bubble has been generated, and when the obtained maximum value is less than the threshold value, it is determined that no bubble has been generated.

In the determination of the liquid surface condition in an ordinary test tube, the distance from the camera and the lighting to the liquid specimen undergoes a change, and the brightness information on the liquid surface also undergoes a change, so that the determination based on the threshold value is difficult. However, by using the brightness gradient of the above method, it is possible to robustly determine the presence of bubbles without depending on the liquid surface height.

Next, a method of calculating the brightness gradient in the direction along the test tube configuration in step S213 of <FIG> will be described with reference to <FIG>.

<FIG> is a diagram illustrating the effective zone <NUM> shown in <FIG> in an xy orthogonal coordinate plane. As shown in the drawing, the coordinate in the effective zone <NUM> can be expressed in a circular coordinate (r, θ) the origin of which is the descent position <NUM>. In <FIG>, the direction along the inner wall configuration of the test tube configuration is the tangential direction of a circle with a radius r. In the circular coordinate A (r, θ), it is the direction of the tangent <NUM> in the drawing.

<FIG> is an enlarged view of the portion near the circular coordinate A (r, θ). To calculate the brightness gradient in the coordinate A (r, θ), the pixel brightness average is obtained for each of two vicinity ranges <NUM> and <NUM> adjacent to each other in the direction of the tangent <NUM> with the coordinate A (r, θ) therebetween, and the absolute value of the difference between the two brightness averages is obtained as the brightness gradient. More strictly, the calculation method for the direction dependent type filter described in the treatise "<NPL>) is restrictively applied to the tangential direction of a circle to obtain the absolute value.

According to the present embodiment, it is possible to accurately determine the presence of bubbles on the liquid surface of a liquid substance without depending upon the light and shade of the liquid color of the sample constituting the object of determination. Further, an ordinary visible light lighting is used, and it is only necessary to perform minimal calculation processing with respect to image information on a limited range, so that the embodiment can be realized at low cost.

In the present embodiment, the effective zone is set to a circular or donut-shaped configuration of a fixed radius. In the case, however, where the test tube configuration is not columnar but of a special configuration and where the descent range (<NUM>) for the distal end of the probe is elliptical or rectangular due to a mechanical error factor, the configuration and size of the effective zone may be changed accordingly to achieve an improvement in terms of the accuracy in the detection. Further, while the optimum configuration and size for each object are to be regarded as individual, the effective zones <NUM>, <NUM>, and <NUM> may be set commonly in order to reduce the number of setting steps.

Further, steps S202 and S203 for counting the pixels exhibiting the reference color and the abnormal color may be executed simultaneously, or the detection mode selection processing may be terminated at the point in time when one count value has attained a level allowing determination.

In steps S204 and S205 in which determination is made through comparison between the counted pixel number and the threshold value, the determination may be made through comparison of the ratio (area ratio) of the reference color or abnormal color pixel number with respect to the total pixel number in the set effective zone <NUM> with the threshold value. In this case, a change in the enlargement ratio of the picture taken by the camera can be robustly coped with.

Further, the algorithms for the first liquid surface condition detection unit <NUM> and the second liquid surface condition detection unit <NUM> may be executed simultaneously. In this case, there is no need to execute steps S204 and S205 for the selection of steps for the first liquid surface condition detection unit <NUM> and the second liquid surface condition detection unit <NUM>, and the final result of the detection of a bubble is derived from at least one of the respective determination results of these liquid surface condition detection units.

Further, in order that the number of kinds of liquid substance <NUM> to which the present invention is applicable may be increased, it may be so arranged that a plurality of reference color hue ranges can be set for the liquid substance <NUM>. Similarly, it may be so arranged that a plurality of abnormal color hue ranges can be set. The determination of the reference color, abnormal color, and lighting color of the liquid substance <NUM> may be based on a color system other than hue. Hue is convenient in that it allows color designation one-dimensionally and that it helps to easily establish correspondence with human color sense. However, some other kind of information will also do so long as it is color information not depending on the distance to the liquid surface constituting the object of shooting. For example, the color range may be designated by color difference information U and V in a YUV format, or, in the case of an RGB format, the designation may be executed by using the ratio of R/G, B/G, etc..

Further, as the original brightness information in step S213 for obtaining the brightness gradient, some other kind of brightness information may be used instead of the sum total of the brightness of R, G, and B. It may, for example, be brightness information on one of R, G, and B channels, or average brightness, or monochrome transformation image information in conformity with human vision.

Further, in step S213, it is not always necessary to obtain the "maximum value" of the brightness gradient. Alternatively, it may be determined that a bubble has been generated if there is at least one portion of a brightness gradient equal to or greater than a predetermined threshold value within the effective zone. In adjusting and setting the threshold value, it is desirable to check the brightness gradient of the entire effective zone and to make it possible to obtain the maximum value. However, after the threshold value has been determined, there is no need to obtain the maximum value. It may be determined that a bubble has been generated if there is at least one portion of a brightness gradient equal to or greater than the predetermined threshold value, and, by completing the determination at the point in time when the brightness gradient equal to or greater than the threshold value while brightness information on the effective zone is being gained, it is possible to quickly terminate the determination processing.

As a second embodiment, another brightness gradient calculation method will be described with reference to <FIG> and <FIG>.

<FIG> is a diagram illustrating how the region of the effective zone <NUM> is divided into equal angles. In the embodiment, there is shown a case where the effective zone is divided into <NUM> equal parts so that θ = π/<NUM> radians. For each region, the brightness gradient is approximately calculated in the tangential direction of the circle by using the weighting matrix shown in <FIG>. By using the brightness of <NUM> × <NUM> proximity pixels around the pixel (r, θ), the brightness gradient is calculated. The product of the values of the arrangement elements of a weighting matrix corresponding to the brightness of each of the <NUM> × <NUM> proximity pixels is obtained and <NUM> products in total are added, and the absolute value thereof is regarded as the brightness gradient. Each weighting matrix is weighted in the tangential direction of the circle in correspondence with θ.

The weighting matrix of <FIG> is used in the region of -π/<NUM><θ≤π/<NUM> or in the region of 15π/<NUM><θ≤17π/<NUM>. The weighting matrix of <FIG> is used in the region of π/<NUM><θ≤3π/<NUM> or in the region of 17π/<NUM><θ≤19π/<NUM>. The weighting matrix of <FIG> is used in the region of 3π/<NUM><θ≤5π/<NUM> or in the region of 19π/<NUM><θ≤21π/<NUM>. The weighting matrix of <FIG> is used in the region of 5π/<NUM><θ≤7π/<NUM> or in the region of 21π/<NUM><θ≤23π/<NUM>. The weighting matrix of <FIG> is used in the region of 7π/<NUM><θ≤9π/<NUM> or in the region of 23π/<NUM><θ≤25π/<NUM>. The weighting matrix of <FIG> is used in the region of 9π/<NUM><θ≤11π/<NUM> or in the region of 25π/<NUM><θ≤27π/<NUM>. The weighting matrix of <FIG> is used in the region of 11π/<NUM><θ≤13π/<NUM> or in the region of 27π/<NUM><θ≤29π/<NUM>. The weighting matrix of <FIG> is used in the region of 13π/<NUM><θ≤15π/<NUM> or in the region of 29π/<NUM><θ≤31π/<NUM>.

The weighting matrix of <FIG> is only given by way of example. A weighting matrix of different range such as <NUM> × <NUM> or <NUM> × <NUM> may be used, or the effective zone may be divided more finely into <NUM> parts, and <NUM> kinds of corresponding weighting matrix may be used to achieve an improvement in terms of calculation accuracy. Further, fine adjustment may be made on the values of the arrangement elements of each weighting matrix to achieve an improvement in terms of calculation accuracy.

Next, a method of calculating the brightness gradient in the tangential direction of a circle using coordinate system transformation will be described with reference to <FIG>.

Reference numeral <NUM> of <FIG> indicates what is obtained through transformation and development of the image information of the effective zone <NUM> (the region from the inner diameter <NUM> to the outer diameter <NUM>, where <NUM>≤θ≤2π radians) into the plane having a horizontal axis θ and vertical axis r. A dark portion of a concentric circular configuration due to the light and darkness of the reflection light from the tube bottom is developed as indicated by numerals <NUM> and <NUM>.

In the image information after this development, the tangential direction of the original circle is replaced by the direction of the θ-axis, and the brightness gradient can be calculated by one weighting matrix. <FIG> shows what is obtained by calculating the brightness gradient in the θ-direction based on the <NUM> × <NUM> weighting matrix shown in <FIG> and depicting the brightness gradient of the pixel positions in the form of a picture. The portion where the brightness gradient is small is shown to be black, and the portion where the brightness gradient is large is shown to be white. By calculating the brightness gradient in restriction to the θ-direction along the circle, it is possible to capture the outer configuration of the bubble without being affected by the dark portions <NUM> and <NUM> of a concentric configuration due to the light and darkness of the reflection light from the tube bottom. In the picture shown in <FIG>, the dark portions <NUM> and <NUM> are drawn not in a straight line but in a gentle curve. This phenomenon occurs when the descent position <NUM> is deviated from the center of the test tube contour, or when the tube bottom configuration of the test tube is distorted. However, when the brightness gradient is calculated based on the brightness information on a range in the vicinity to some degree, it is possible to capture the brightness gradient due to the outer configuration of the air bubble without a hitch.

The <NUM> × <NUM> weighting matrix shown in <FIG> is only given by way of example, and a weighting matrix of a different range such as <NUM> × <NUM> or <NUM> × <NUM> may be used. Further, fine adjustment may be made on the value of each arrangement element of the weighting matrix to thereby achieve an improvement in terms of detection accuracy.

In embodiment <NUM>, the method of obtaining the brightness gradient in the tangential direction of the circle has been described on the assumption that the test tube accommodating the liquid is a container of a cylindrical or conical configuration. In the present embodiment, a case where the container is of a configuration other than a cylindrical or conical configuration will be described with reference to <FIG>.

<FIG> shows an example of a prism-shaped container, which contains a liquid substance such as a sample like blood or urine or a mixture liquid of a sample and reagent. <FIG> shows a picture <NUM> taken by imaging such a prism-shaped container from above. Inside the container, due to the light and darkness of the reflection light from the bottom apart from the bubble, dark portions <NUM> and <NUM> of a double regular square configuration due to the configuration of the container are reflected. Regarding this image, the processing of the effective zone setting step of the brightness gradient detection method (step S212 of <FIG>) and the brightness gradient calculation step (step S213) will be described.

<FIG> shows an effective zone <NUM> set in step S212. In the drawing, the effective zone <NUM> is a zone other than that painted black, and the effective zone is set to be a donut-shaped circle around the descent position for the dispense probe.

<FIG> is a diagram illustrating how, in step S213, the effective zone is divided into four portions by an angle π/<NUM> in order to calculate the brightness gradient in the direction along a regular square, which is the configuration of the inner wall surface of the container. In each region after the division, the brightness gradient is calculated by using two of the above-mentioned weighting matrixes. More specifically, in the region of -π/<NUM>+ε≤θ≤π/<NUM>-ε, the weighting matrix of FIG. <NUM> is used. In the region of π/<NUM>+ε≤θ<≤3π/<NUM>-ε, the weighting matrix of <FIG> is used. In the region of 3π/<NUM>+ε≤θ≤5π/<NUM>-ε, the weighting matrix of <FIG> is used. In the region of 5π/<NUM>+ε≤θ7π/<NUM>-ε, the weighting matrix of <FIG> is used. Here, ε is a value in which an error in the descent position (<NUM>), etc. is taken into account and which is adjusted as appropriate.

<FIG> is a diagram illustrating the cultivated brightness gradient. Even if there are in the effective zone the dark portions <NUM> and <NUM> attributable to the configuration of the container and indicating the reflection light from the tube bottom, it is possible to accurately capture the outer configuration of a bubble, thus making it possible to perform the detection of the presence of a bubble. In the case of the region of π/<NUM>+ε≤θ<≤3π/<NUM>-ε, and in the case of the region of 5π/<NUM>+ε≤θ7π/<NUM>-ε, image information obtained through rotation by π/<NUM> (<NUM>°) is adopted, whereby it is possible to perform calculation of the brightness gradient on all the regions solely by the weighting matrix of <FIG>.

As described above, by calculating the brightness gradient in the direction along the test tube configuration, the detection of the liquid surface condition is possible by minimum processing.

Next, an automatic analyzer to which the present invention is applied will be described.

<FIG> is a schematic diagram illustrating an automatic analyzer according to an embodiment of the present invention. In particular, the automatic analyzer used here is an automatic analyzer automatically performing qualitative and quantitative analysis on a sample from a living body such as blood or urine; the apparatus described here is one analyzing items such as a biochemistry item, an immunity item, and a coagulation item. The analyzer to which the present invention is applied may be some other type of analyzer so long as it is endowed with a function by which it dispenses a sample or reagent by a dispense probe from a test tube to a reaction container or from a reagent container to a reaction container.

In the automatic analyzer <NUM>, there are arranged a reagent disk <NUM>, a reaction disk <NUM>, a sample dispense probe <NUM>, a reagent dispense probe <NUM>, a stirring device <NUM>, a photometer <NUM>, and a conveyance mechanism <NUM>. Further, connected to the automatic analyzer <NUM> is a control device equipped with a display device <NUM> and an input device <NUM>.

The reagent disk <NUM> is rotatable and allows arrangement of a plurality of reagent containers in the circumference. Similarly, the reaction disk <NUM> can be equipped with a plurality of reaction containers in the circumference. The conveyance mechanism <NUM> can convey a sample holder <NUM> accommodating a plurality of sample containers <NUM>. In the present embodiment, there is employed a rack type sample holder <NUM> capable of holding five sample containers <NUM>, and it is possible to convey the sample containers <NUM> to a predetermined position by a conveyance belt horizontally driving with the sample holder being placed thereon.

The sample dispense probe <NUM> is capable of rotational driving and vertical driving, and sucks the sample held by the sample holder <NUM> carried to the predetermined position, dispensing and discharging the sample into a reaction container on the reaction disk <NUM>. The reagent dispense probe <NUM> is also capable of rotational driving and vertical driving, and sucks reagent from the reagent container held on the reagent disk <NUM>, dispensing it to the reaction container on the reaction disk <NUM>. The stirring device <NUM> stirs a mixture liquid in the reaction container. The photometer <NUM> analyzes the mixture liquid after the stirring.

In the automatic analyzer according to the present invention, due to a liquid surface condition detector for sample <NUM> provided above the conveyance mechanism <NUM>, and a liquid surface condition detector for reagent <NUM> provided above the reagent disk, it is possible to detect the presence of a bubble on the liquid surface before performing the dispensing of the sample and reagent. Further, the presence of a bubble may be detected at the position where the dispensing is performed.

Claim 1:
A liquid surface condition detector comprising:
an irradiation unit (<NUM>) configured to irradiate with light a container storing a liquid substance and a liquid surface of the liquid substance from above;
an imaging unit (<NUM>) configured to capture, from above, an image of the liquid substance subjected to light irradiation by the irradiation unit; and
a first liquid surface detector (<NUM>) adapted to detect bubbles on the surface of the liquid substance using color or brightness information contained in the image;
characterized in that
the first liquid surface detector is adapted to detect bubbles on the surface of the liquid substance using color information contained in the image by counting and determining the number of isolated mirror-reflection regions in the image having color information corresponding to the color of the light irradiated from the irradiation unit; and
the liquid surface condition detector further comprises
a second liquid surface detector (<NUM>) adapted to detect bubbles on the surface of the liquid substance using brightness information contained in the image by calculating a brightness gradient in a direction along an inner wall surface configuration of the container from the image; and
a mode selector (<NUM>) for selecting, by use of the color information contained in the image, which of the first and second liquid surface detectors is to be used for detecting bubbles on the surface of the liquid substance.