CN110611802B - Microscope camera light source distinguishing method, and self-adaptive white balance method and device for microscope camera - Google Patents
Microscope camera light source distinguishing method, and self-adaptive white balance method and device for microscope camera Download PDFInfo
- Publication number
- CN110611802B CN110611802B CN201910764037.4A CN201910764037A CN110611802B CN 110611802 B CN110611802 B CN 110611802B CN 201910764037 A CN201910764037 A CN 201910764037A CN 110611802 B CN110611802 B CN 110611802B
- Authority
- CN
- China
- Prior art keywords
- light source
- microscope
- minimum circumscribed
- circumscribed circle
- component
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B21/00—Microscopes
- G02B21/06—Means for illuminating specimens
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/002—Diagnosis, testing or measuring for television systems or their details for television cameras
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/02—Diagnosis, testing or measuring for television systems or their details for colour television signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/88—Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- General Physics & Mathematics (AREA)
- Optics & Photonics (AREA)
- Color Television Image Signal Generators (AREA)
Abstract
The invention discloses a microscope camera light source distinguishing method which can determine the type of a microscope camera light source according to the distribution state of pixel points in an rb space. The self-adaptive balance method and the device can accurately carry out white balance calibration on the image by adopting corresponding white balance correction strategies aiming at different light source types after the light source type is judged by utilizing a microscope camera light source judgment method.
Description
Technical Field
The invention belongs to the field of microscopic imaging, and particularly relates to a method for distinguishing a light source of a microscope camera, and a method and a device for self-adaptive white balance of the microscope camera.
Background
A microscope is an optical device used to observe micro-organisms, cells or micro-structures of some matter.
The digital camera special for the microscope captures an image formed by a microscope system by using a photoelectric image sensor, processes the image by using an ISP (image processor) in a chip, and finally displays, observes or stores the image for subsequent analysis and processing through a display.
The optical microscope mainly comprises a light source, a reflector, an objective table, an objective lens and an ocular lens. The light source functions to provide illumination for the microscope. The light sources of the existing optical microscope are roughly the following:
1) the low-voltage tungsten lamp has a tungsten filament, which is sealed by filling argon. The color temperature is about 3000K, and the emitted spectrum is complete. The common use is 6V15W and 12V30W, which is suitable for primary and middle-grade metallographic microscope observation. The price is cheap and the service life is long, so the method is generally adopted;
2) halogen lamps, which are brighter than incandescent lamps, have a spectrum close to daylight and a color temperature that varies considerably less with time. Because of small volume, less heat generation and large luminance per unit area, the LED lamp is also called as a cold light source;
3) the LED light source is low in price, long in service life and high in brightness, can provide uniform illumination for a sample, is constant in color temperature, is generally 6300K, and provides a real sample shape. The LED generates less heat, so that a cooling fan is not needed, and a quiet and interference-free working environment can be created.
From the above analysis, it is easy to find that the existing microscope light source devices are various in types and different in spectral characteristics, resulting in different microscopes, initial images obtained by the same section and sensor, and colors varying with the illumination light source. Therefore, to restore the true color of the slice, the white balance is often not the same. The single white balance algorithm can not meet the requirement of accurate imaging of the multi-light-source microscope platform, or the algorithm library is complex and not simple enough, or is simple but not applicable.
The white balance adjusting methods disclosed in application publication nos. CN103795992A and CN103780892A are all general white balance methods, and when the light sources are different, the general white balance methods cannot meet the requirement of accurate imaging of the multi-light-source microscope platform.
Disclosure of Invention
The invention aims to provide a microscope camera light source distinguishing method which can determine the type of a microscope camera light source according to the distribution state of pixel points in an rb space.
Another objective of the present invention is to provide an adaptive white balance method for a microscope camera, which employs a light source identification method of the microscope camera to identify the light source type, and then employs corresponding white balance correction strategies for different light source types, so as to achieve accurate white balance calibration of the image.
Another object of the present invention is to provide an adaptive white balance apparatus for a microscope camera, which can adopt corresponding white balance correction strategies for different light source types, and can achieve accurate white balance calibration of an image.
In order to achieve the purpose, the invention provides the following technical scheme:
in a first aspect, the present invention provides a method for discriminating a light source of a microscope camera, comprising the following steps:
collecting standard images of a white object under the irradiation of n types of microscope light sources, and counting all pixel points in the n types of standard images on an rb coordinate system with r and b as coordinate axes;
according to the distribution condition of the pixel points on an rb coordinate system, determining a minimum circumscribed circle of the concentrated distribution pixel points corresponding to each standard image, wherein the color temperatures of the pixels inside the minimum circumscribed circle are basically the same, and the pixels are considered to come from the same microscope light source, namely the corresponding relation between the microscope light source and the minimum circumscribed circle and the position of the minimum circumscribed circle are determined;
when the method is applied, a microscopic image is collected, all pixel points in the microscopic image are counted on an rb coordinate system, and the type of a microscope light source adopted by the microscopic image is determined according to the distribution condition of the pixel points in the n minimum circumscribed circles and the corresponding relation between the microscope light source and the minimum circumscribed circle.
According to the method for distinguishing the light source of the microscope camera, certain distinguishability exists in an rb space constructed by two components, namely R-R/G and B-B/G, which are obtained by normalizing a G component according to three components of RGB in a digital image. The light source of the microscope camera is judged by utilizing the distinguishability.
In the microscope camera light source distinguishing method, a white object imaging mode is adopted, calibration of microscope light sources with different color temperatures is achieved, namely, a large number of white object images of white objects under the irradiation of n types of microscope light sources are collected, and the white object images are used as standard images to determine different types of microscope light sources. Specifically, the acquired data of the acquired standard image is placed on the rb coordinate system. Theoretical analysis and experiments prove that the positions of points with the same color temperature in an rb coordinate system are concentrated in a certain range, and pixel points concentrated in the certain range can be considered to be irradiated by the same microscope light source.
On an rb coordinate system, after a few pixel points which are abnormally far away are omitted, all adjacent pixel points are surrounded by a minimum circumcircle method, and the positions and the area ranges of several common microscope light sources in the rb coordinate system are calibrated by the method for determining the minimum circumcircle.
Common microscope light sources are: low-voltage tungsten lamps, halogen lamps and LED lamps. Therefore, the circle center position and the radius of the minimum circumscribed circle corresponding to the pixel point of the white point imaging in the rb coordinate by taking the low-voltage tungsten lamp, the halogen lamp and the LED lamp as light sources are respectively determined.
Preferably, the counting all the pixel points in the n standard images on an rb coordinate system with r and b as coordinate axes includes:
and calculating the R value and the B value of each pixel point in the standard image by using a formula R ═ R/G and B ═ B/G, and counting the R value and the B value of all the pixel points on an rb coordinate system with R and B as coordinate axes.
When the method is applied, when the microscope light source is determined by using the minimum circumcircle, the number of the pixel points in the minimum circumcircle can be determined, and the method is simple to calculate. Therefore, preferably, the determining the type of the microscope light source used by the microscope image according to the distribution of the pixel points in the n minimum circumscribed circles and the corresponding relationship between the microscope light source and the minimum circumscribed circle includes:
and counting and calculating the proportion of the pixel points in each minimum circumscribed circle, and considering the microscope light source corresponding to the minimum circumscribed circle with the proportion larger than a set proportion threshold value as the microscope light source adopted by the microscopic image according to the corresponding relation between the microscope light source and the minimum circumscribed circle.
For example, the types of the microscope light sources include 3 types, the ratio of the pixel points in the measured microscopic image in the first minimum circumscribed circle is 4/5, the ratio in the second minimum circumscribed circle is 1/10, the ratio in the second minimum circumscribed circle is 1/20, and the remaining pixel points are distributed outside the three minimum circumscribed circles, so that the microscope light source corresponding to the first minimum circumscribed circle with the ratio of 4/5 is the microscope light source adopted by the measured microscopic image.
In a second aspect, the present invention provides an adaptive white balancing method for a microscope camera, comprising the steps of:
aiming at a microscopic image obtained by shooting with a microscope, determining a microscope light source adopted by the microscopic image by using the microscope camera light source distinguishing method provided by the first aspect;
setting a pixel point number threshold K1 corresponding to the microscope light source according to the type of the microscope light source;
when the number of the pixel points in the minimum circumscribed circle corresponding to the determined microscope light source is greater than the threshold value K1 of the number of the pixel points, adopting a white balance correction strategy I, namely:
gain of R componentGain of B componentGain PG of G componentgL, where L is a fixed coefficient, i is the index of the pixel, M is the total number of pixels taken into account, here the number of pixels in the minimum circumscribed circle, riR value of the ith pixel point, biThe b value of the ith pixel point is obtained;
then the R component R' ═ R × PGrB component B ═ B × PGbG component G ═ G × PGg。
Preferably, when the number of the pixel points in the minimum circumscribed circle corresponding to the determined microscope light source is less than the pixel point number threshold K1 and is greater than the number minimum threshold K2, K1> K2, the white balance correction strategy II is adopted, that is:
gain PG in calculating R componentrAnd, gain PG of B componentbThen, pixels near the outside of the minimum circumscribed circle are included in the calculation, so that the total number M of the calculated pixels is more than or equal to the pixel number threshold K1;
gain of R componentWherein L is a fixed coefficient, riIs the r value, beta, of the ith pixel pointiIs the weight coefficient of the ith pixel point, anddithe distance from the ith pixel point to the center of the minimum circumscribed circle is calculated;
gain of B componentWherein L is a fixed coefficient, biIs the b value, beta, of the ith pixel pointiIs the weight coefficient of the ith pixel point, anddithe distance from the ith pixel point to the center of the minimum circumscribed circle is calculated;
gain PG of G componentGL, where L is a fixed coefficient.
Then the R component R' ═ R × PGrB component B ═ B × PGbG component G ═ G × PGG。
Experiments prove that when the microscope light sources are different, different white balance correction strategies are adopted, the color temperature deviation of the image can be corrected more accurately, and the problem of inaccurate color restoration when the microscope light sources emit light rays which are obviously yellow or blue is solved.
In order to correct the color temperature deviation of the microscopic image more accurately, through a large amount of experimental researches, different pixel number threshold values K1 and K2 are set for different microscope light source types, and the pixel number threshold values K1 and K2 are used as the basis for selecting a white balance correction strategy, so that the most appropriate white balance correction strategy can be selected to correct the color temperature deviation of the microscopic image irradiated by different microscope light sources in a targeted manner, and the color temperature deviation correction effect is improved.
Preferably, when the microscope light source is a low-voltage tungsten lamp, the pixel point number threshold K1 is 87% of the total pixel points. When the microscope light source is a halogen lamp, the pixel point number threshold value K1 is 82% of the total pixel points. When the microscope light source is an LED lamp, the pixel point number threshold K1 is 83% of the total pixel points. The range of the three pixel number threshold values K1 is an empirical range obtained through a large number of experimental researches, and a proper white balance correction strategy is selected according to the three empirical ranges, so that the effect of correcting color temperature deviation can be improved. And the minimum threshold value K2 of the number of the pixel points is uniformly 75% of the total number of the pixel points.
The theoretical basis of the invention is that the following mathematical relations of all parameters can be obtained easily by the theory of optical imaging:
where i (x) is the intensity of the light at the xth pixel in the image, the integration limit F represents the range of the visible spectrum, S (λ) is the imaging device response factor, R (λ) is the spectral reflectance of the object surface, and E (λ) is the spectral distribution of the light source.
According to the theory, different light sources have different spectral distributions, so that the response sizes of the photoelectric image sensors are different, and accurate white balance suitable for microscopes with various light source types can be easily realized only by performing differentiated white balance calibration on microscope images with different light source types.
In a third aspect, the present invention provides an adaptive white balancing apparatus for a microscope camera, comprising a computer memory, a computer processor and a computer program stored in the computer memory and executable on the computer processor,
the computer memory stores the position of the minimum circumscribed circle corresponding to each type of microscope light source determined by the microscope camera light source discrimination method provided by the first aspect;
the computer processor, when executing the computer program, implements the adaptive white balance method for a microscope camera provided in the second aspect.
In the self-adaptive white balance device for the microscope camera, the corresponding relation between each microscope light source and the minimum circumscribed circle and the position (namely the circle center and the radius) of the minimum circumscribed circle are stored in the accessor in advance, so that when the self-adaptive white balance device is applied, the position of the minimum circumscribed circle and the corresponding relation between the minimum circumscribed circle and the microscope light source are directly called, the type of the microscope light source adopted by a microscopic image can be determined, and then a proper white balance correction strategy is selected by adopting a self-adaptive white balance method for the microscope camera according to the type of the microscope light source to pertinently correct the color temperature deviation of the microscopic image.
The self-adaptive white balance method and the self-adaptive white balance device identify the light source type of the microscope by processing the original imaging data of the microscope, adjust the corresponding white balance algorithm and carry out accurate white balance calibration on the microscopic image. The method enables a single algorithm to be suitable for microscopes with various common light source types, and is accurate in result and generally applicable.
In addition, the light source of the microscope is of a few types, specifically: tungsten lamps, halogen lamps and LED lamps. Then the algorithm only calculates the points on the areas corresponding to the three light sources on the RGB image or the points adjacent to the areas, and other points do not need statistics, thereby reducing the calculation amount.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
The embodiment of fig. 1 provides a flow chart of an adaptive white balance method for a microscope camera.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the detailed description and specific examples, while indicating the scope of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
The embodiment provides a microscope camera light source distinguishing method, which comprises the following steps:
s101, constructing a corresponding relation between a microscope light source and the minimum circumcircle and the circle center and the radius of the minimum circumcircle.
In the embodiment, a microscopic image is acquired by using a photoelectric image sensor IMX 183. Specifically, different light sources are adopted to irradiate on a white object, images are formed through a light path, namely a microscope, then an image is acquired by a 1600-thousand-pixel camera with an IMX183 sensor through an interface between the microscope and the camera, then image data is input into a Hi3519A chip of Haisi, preliminary picture cutting is carried out, RGB data are analyzed, and further processing is waited.
And G component normalization is carried out on the white object image acquired under the irradiation of each light source, namely the white object image is counted on an rb coordinate system with two components of R, R and B, and G as coordinate axes.
According to the distribution condition of the pixel points on an rb coordinate system, a minimum circumscribed circle of the concentrated distribution pixel points corresponding to each standard image is determined, the color temperatures of the pixels in the minimum circumscribed circle are basically the same, the pixels are considered to come from the same microscope light source, namely, the corresponding relation between the microscope light source and the minimum circumscribed circle and the position of the minimum circumscribed circle are determined, and thus, the corresponding relation between the microscope light source and the minimum circumscribed circle and the circle center and the radius of the minimum circumscribed circle are established.
And S102, judging the light source of the microscope camera to be detected according to the corresponding relation between the light source of the microscope and the minimum circumscribed circle and the circle center and the radius of the minimum circumscribed circle.
And after the corresponding relation between the microscope light source and the minimum circumscribed circle and the circle center and the radius of the minimum circumscribed circle are obtained, the standard for judging the type of the microscope light source is obtained, and the type of the microscope light source is judged by utilizing the standard.
Specifically, a microscopic image under the irradiation of an unknown light source is collected, all pixel points in the microscopic image are counted on an rb coordinate system, the proportion of the pixel points in each minimum circumscribed circle is counted and calculated, and according to the corresponding relation between the microscope light source and the minimum circumscribed circle, the microscope light source corresponding to the minimum circumscribed circle with the proportion larger than a set proportion threshold value is considered as the microscope light source adopted by the microscopic image.
The method for judging the light source of the microscope camera can determine the type of the light source of the microscope camera according to the distribution state of the pixel points in the rb space, is simple, and has accurate judgment result.
Example 2
On the basis of embodiment 1, in order to solve the problem that color reduction is inaccurate when a microscope light source emits light rays which are obviously yellowish or bluish, the embodiment designs a wider and more accurate white balance method for automatically matching light sources with different color temperatures for a microscope camera through a large number of tests and simulations according to a basic white balance principle based on self-abundant theoretical knowledge of image processing and deep knowledge of various mainstream microscopes.
Specifically, as shown in fig. 1, the adaptive white balance method for a microscope camera provided in this embodiment includes the following steps:
s201, constructing a corresponding relation between a microscope light source and the minimum circumcircle, and the circle center and the radius of the minimum circumcircle.
Step S201 is substantially the same as step 101, and a microscopic image is acquired using the photoelectric image sensor IMX 183. Specifically, different light sources are adopted to irradiate on a white object, images are formed through a light path, namely a microscope, then an image is acquired by a 1600-thousand-pixel camera with an IMX183 sensor through an interface between the microscope and the camera, then image data is input into a Hi3519A chip of Haisi, preliminary picture cutting is carried out, RGB data are analyzed, and further processing is waited.
S202, determining the microscope light source adopted by the microscopic image to be corrected according to the corresponding relation between the microscope light source and the minimum circumcircle and the circle center and the radius of the minimum circumcircle.
Counting all pixel points in the microscopic image to be corrected on an rb coordinate system, counting and calculating the proportion of the pixel points in each minimum circumscribed circle, and considering the type of the microscopic light source corresponding to the minimum circumscribed circle with the proportion larger than a set proportion threshold value as the microscopic light source adopted by the microscopic image according to the corresponding relation between the microscopic light source and the minimum circumscribed circle.
And S203, selecting different white balance correction strategies to perform white balance correction on the microscopic image to be corrected according to the microscope light source adopted by the microscopic image to be corrected.
After the pixel number threshold value K1 corresponding to each microscope light source type is determined, the number of pixels in the minimum circumscribed circle corresponding to the microscope light source adopted by the microscopic image to be detected is counted, and when the number of the pixels is greater than the pixel number threshold value K1, a white balance correction strategy I is adopted, namely:
gain of R componentGain of B componentGain PG of G componentgL, where L is a fixed coefficient, i is the index of the pixel, M is the total number of pixels taken into account, here the number of pixels in the minimum circumscribed circle, riR value of the ith pixel point, biThe b value of the ith pixel point is obtained;
then the R component R' ═ R × PGrB component B ═ B × PGbG component G′=G×PGg. When the number of the pixel points in the minimum circumcircle corresponding to the determined microscope light source is less than the pixel point number threshold K1 but greater than the number minimum threshold K2 (K1)>K2) And adopting a white balance correction strategy II, namely:
gain PG in calculating R componentrAnd, gain PG of B componentbThen, pixels near the outside of the minimum circumscribed circle are included in the calculation, so that the total number M of the calculated pixels is more than or equal to the pixel number threshold K1;
gain of R componentWherein r isiIs the r value, beta, of the ith pixel pointiIs the weight of the ith pixel pointA coefficient of gravity, L is a fixed coefficient, anddithe distance from the ith pixel point to the center of the minimum circumscribed circle is calculated;
gain of B componentWherein, biIs the b value, beta, of the ith pixel pointiIs the weight coefficient of the ith pixel point, L is a fixed coefficient, anddithe distance from the ith pixel point to the center of the minimum circumscribed circle is calculated;
gain PG of G componentGL, where L is a fixed coefficient.
Then the R component R' ═ R × PGrB component B ═ B × PGbG component G ═ G × PGG。
Specifically, the adaptive white balance method for the microscope camera is registered in Firmware, and the Firmware acquires statistical information of each frame under the drive of interruption, runs the adaptive white balance method for the microscope camera, and configures an ISP register. And measuring and calculating r and b of pixel points according to the acquired statistical information of each frame, then counting the number of points in the minimum circumscribed circle of the calibrated rb space in an algorithm library, and selecting the closest microscope light source type according to the relation between the number of points in each circumscribed circle and a threshold value. The light source mode includes: a tungsten lamp mode, a halogen lamp mode, and an LED light source mode. If the identified data is not the same as any one built in the method, the default automatic white balance algorithm of Hi3519A chip from Haisi is automatically adopted. And after the type of the microscope light source is determined, performing white balance correction on the microscopic image to be corrected by adopting different white balance correction strategies according to the type of the microscope light source.
After the correction microscopic image is subjected to white balance correction, the Haisi chip is subjected to other image processing steps and then is output on a display screen through the HDMI, so that the actual imaging effect of the microscope camera can be observed conveniently.
The self-adaptive white balance method selects a proper white balance correction strategy according to the type of the microscope light source to pertinently correct the color temperature deviation of the microscopic image to be detected, and the color temperature deviation correction effect is improved.
Example 3
On the basis of embodiments 1 and 2, in order to solve the problem that color reduction is inaccurate when a microscope light source emits light rays which are obviously yellowish or bluish, the present embodiment provides an adaptive white balance apparatus for a microscope camera, which specifically includes:
a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor,
the computer memory stores the position of the minimum circumscribed circle corresponding to each type of microscope light source determined by the microscope camera light source determination method provided in embodiment 1;
the computer processor, when executing the computer program, implements the adaptive white balance method for a microscope camera provided in embodiment 2, that is, the computer processor, when executing the computer program, performs the following steps:
s301, determining the microscope light source adopted by the microscopic image to be corrected according to the corresponding relation between the microscope light source and the minimum circumcircle and the circle center and radius of the minimum circumcircle.
And S302, selecting different white balance correction strategies to perform white balance correction on the microscopic image to be corrected according to the microscope light source adopted by the microscopic image to be corrected.
The specific steps and achieved technical effects of S301 and S302 are substantially the same as those of S202 and S203 in embodiment 2, and are not described herein again.
In practical applications, the computer memory may be volatile memory at the near end, such as RAM, or volatile memory, such as ROM, FLASH, floppy disk, mechanical hard disk, etc., or may be a remote storage cloud. The computer processor can be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA), that is, the steps of determining the microscope light source used by the microscopic image to be corrected and performing white balance correction on the microscopic image to be corrected by selecting different white balance correction strategies according to the microscope light source used by the microscopic image to be corrected can be realized by the processors.
Claims (8)
1. A light source distinguishing method of a microscope camera comprises the following steps:
the method comprises the following steps of collecting standard images of a white object under the irradiation of n types of microscope light sources, counting all pixel points in the n types of standard images on an rb coordinate system with r and b as coordinate axes, and comprising the following steps: calculating the R value and the B value of each pixel point in the standard image by using a formula R ═ R/G and B ═ B/G, and counting the R value and the B value of all the pixel points on an rb coordinate system with R and B as coordinate axes;
according to the distribution condition of the pixel points on an rb coordinate system, determining a minimum circumscribed circle of the concentrated distribution pixel points corresponding to each standard image, wherein the color temperatures of the pixels inside the minimum circumscribed circle are basically the same, and the pixels are considered to come from the same microscope light source, namely the corresponding relation between the microscope light source and the minimum circumscribed circle and the position of the minimum circumscribed circle are determined;
when the method is applied, a microscopic image is collected, all pixel points in the microscopic image are counted on an rb coordinate system, and the type of a microscope light source adopted by the microscopic image is determined according to the distribution condition of the pixel points in the n minimum circumscribed circles and the corresponding relation between the microscope light source and the minimum circumscribed circle.
2. The method for discriminating the light source of the microscope camera according to claim 1, wherein the determining the type of the microscope light source used by the microscope image according to the distribution of the pixel points in the n minimum circumscribed circles and the corresponding relationship between the microscope light source and the minimum circumscribed circle comprises:
and counting and calculating the proportion of the pixel points in each minimum circumscribed circle, and considering the microscope light source corresponding to the minimum circumscribed circle with the proportion larger than a set proportion threshold value as the microscope light source adopted by the microscopic image according to the corresponding relation between the microscope light source and the minimum circumscribed circle.
3. An adaptive white balancing method for a microscope camera, comprising the steps of:
determining a microscope light source used for a microscopic image by using the microscope camera light source discrimination method of claim 1 or 2 for the microscopic image obtained by shooting with a microscope;
setting a pixel point number threshold K1 corresponding to the microscope light source according to the type of the microscope light source;
when the number of the pixel points in the minimum circumscribed circle corresponding to the determined microscope light source is greater than the threshold value K1 of the number of the pixel points, adopting a white balance correction strategy I, namely:
gain of R componentGain of B componentGain PG of G componentgL, where L is a fixed coefficient, i is the index of the pixel, M is the total number of pixels taken into account, here the number of pixels in the minimum circumscribed circle, riR value of the ith pixel point, biThe b value of the ith pixel point is obtained;
then the R component R' ═ R × PGrB component B ═ B × PGbG component G ═ G × PGg。
4. The adaptive white balance method for a microscope camera according to claim 3, wherein when the determined number of pixels in the minimum circumscribed circle of the microscope light source is less than the threshold value K1 for the number of pixels and greater than the threshold value K2 for the number of pixels, K1> K2, the white balance correction strategy II is adopted:
in calculating gain PGr of R component and gain PG of B componentbMeanwhile, the pixel points near the outside of the minimum circumcircle are included in the calculation so as to lead the meter to be countedThe calculated total number M of the pixel points is more than or equal to a pixel point number threshold value K1;
gain of R componentWherein L is a fixed coefficient, riIs the r value, beta, of the ith pixel pointiIs the weight coefficient of the ith pixel point, anddithe distance from the ith pixel point to the center of the minimum circumscribed circle is calculated;
gain of B componentWherein L is a fixed coefficient, biIs the b value, beta, of the ith pixel pointiIs the weight coefficient of the ith pixel point, anddithe distance from the ith pixel point to the center of the minimum circumscribed circle is calculated;
gain PG of G componentGL, where L is a fixed coefficient;
then the R component R' ═ R × PGrB component B ═ B × PGbG component G ═ G × PGG。
5. The adaptive white balance method for a microscope camera according to claim 3, wherein when the microscope light source is a low-voltage tungsten lamp, the pixel count threshold K1 is 87% of the total pixel count.
6. The adaptive white balance method for a microscope camera according to claim 3, wherein when the microscope light source is a halogen lamp, the pixel count threshold value K1 takes a value of 82% of the total pixel count.
7. The adaptive white balance method for a microscope camera according to claim 3, wherein when the microscope light source is an LED lamp, the pixel point number threshold K1 is 83% of the total pixel points.
8. An adaptive white balancing apparatus for a microscope camera, comprising a computer memory, a computer processor and a computer program stored in the computer memory and executable on the computer processor,
the computer memory stores the position of the minimum circumcircle corresponding to each type of microscope light source determined by the microscope camera light source identification method of claim 1 or 2;
the computer processor, when executing the computer program, implementing an adaptive white balancing method for a microscope camera according to any one of claims 3 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910764037.4A CN110611802B (en) | 2019-08-19 | 2019-08-19 | Microscope camera light source distinguishing method, and self-adaptive white balance method and device for microscope camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910764037.4A CN110611802B (en) | 2019-08-19 | 2019-08-19 | Microscope camera light source distinguishing method, and self-adaptive white balance method and device for microscope camera |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110611802A CN110611802A (en) | 2019-12-24 |
CN110611802B true CN110611802B (en) | 2021-06-22 |
Family
ID=68890504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910764037.4A Active CN110611802B (en) | 2019-08-19 | 2019-08-19 | Microscope camera light source distinguishing method, and self-adaptive white balance method and device for microscope camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110611802B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111275774A (en) * | 2019-12-31 | 2020-06-12 | 杭州迪英加科技有限公司 | Method for acquiring image under microscope and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06186482A (en) * | 1992-12-22 | 1994-07-08 | Shinetsu Eng Kk | Lighting device for microscope |
CN102902052A (en) * | 2011-07-27 | 2013-01-30 | 莱卡微系统Cms有限责任公司 | Microscope lighting process and microscope |
CN108337496A (en) * | 2018-04-25 | 2018-07-27 | 普联技术有限公司 | White balancing treatment method, processing unit, processing equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150124072A1 (en) * | 2013-11-01 | 2015-05-07 | Datacolor, Inc. | System and method for color correction of a microscope image |
-
2019
- 2019-08-19 CN CN201910764037.4A patent/CN110611802B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06186482A (en) * | 1992-12-22 | 1994-07-08 | Shinetsu Eng Kk | Lighting device for microscope |
CN102902052A (en) * | 2011-07-27 | 2013-01-30 | 莱卡微系统Cms有限责任公司 | Microscope lighting process and microscope |
CN108337496A (en) * | 2018-04-25 | 2018-07-27 | 普联技术有限公司 | White balancing treatment method, processing unit, processing equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
用于数码显微镜的白平衡校正方法;窦江龙等;《光子学报》;20120430;第41卷(第4期);第472-477页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110611802A (en) | 2019-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5334602B2 (en) | Color calibration system | |
CN105721845B (en) | For the auto white balance system of Electrofax | |
JP2018519511A (en) | Gemstone color measurement | |
JP7100500B2 (en) | Visual function test and optical characteristic calculation system | |
CN113194303A (en) | Image white balance method, device, electronic equipment and computer readable storage medium | |
CN105898260A (en) | Method and device of adjusting camera white balance | |
CN110611802B (en) | Microscope camera light source distinguishing method, and self-adaptive white balance method and device for microscope camera | |
CN104954772A (en) | Image adjacent-grey pixel selection algorithm applied to automatic white balance algorithm | |
JP2020510475A (en) | Eyesight test method and apparatus | |
CN104111330A (en) | Up-conversion luminescence immunochromatography analyzer and detection method thereof | |
TWI588779B (en) | Automatic white balance systems for electronic cameras | |
JP6552604B2 (en) | Method of correcting the color reproduction of a digital microscope, and a digital microscope | |
CN109922708A (en) | Method and apparatus for visual acuity test | |
JP2020139871A (en) | Method for measuring turbidity and turbidity meter | |
CN109238461A (en) | Room lighting dazzle measurement method based on digital camera images | |
CN115902685B (en) | Optical test system special for navigation mark lamp | |
JP5556362B2 (en) | Spectral characteristic measuring apparatus and calibration method thereof | |
EP2919455A1 (en) | Imaging system and imaging method | |
CN114018401A (en) | Multi-parameter intelligent regulation and control chip for blue light radiation safety evaluation and eye protection display of display | |
Pavlova et al. | Optimization of the methods for measuring color characteristics of light-emitting diodes in laboratory conditions | |
JP7438403B2 (en) | Apparatus, methods of calibrating the apparatus, and devices for calibrating the apparatus | |
JPH08320253A (en) | Total luminous flux measuring device | |
US11892351B2 (en) | Instrument monitoring and correction | |
US20240069316A1 (en) | Microscope and imaging method for a microscope | |
JP2001099704A (en) | Discomfort glare evaluation device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |