Particle detection method, electronic device, and storage medium
AssigneeTriple Win Technology(Shenzhen) Co. Ltd.
InventorJyun-Hong Lu
Life of this patent
Estimating the term…
Abstract
Disclosed in the present invention are a particle detection method, an electronic device, and a storage medium. The particle detection method includes obtaining a detection image; identifying an imaging of a particle in the detection image and obtaining a shadow region of the particle; determining a maximum influence degree of the particle based on an influence degree of each pixel point in the shadow region; and obtaining size information of the particle based on the maximum influence degree of the particle. The present disclosure can distinguish the particles of different sizes, thereby accurately calculating the size of the particle and improving the accuracy of the particle detection.
Claims9
A particle detection method comprising:
- obtaining a detection image;
- processing the detection image by filtering out noise and retaining the particle in the detection image to obtain a particle image;
- processing the detection image by averaging the particle in the particle image to obtain a background image;
- identifying an imaging of a particle in the detection image and obtaining a shadow region of the particle;
- determining a maximum influence degree of the particle based on an influence degree of each pixel point in the shadow region;
- and
- obtaining size information of the particle based on the maximum influence degree of the particle;
- wherein obtaining the size information of the particle based on the maximum influence degree of the particle, further comprises:
- determining a projection distance and a focal ratio of a camera module, wherein the projection distance is a distance between a photosensitive element and a filter lens, and the focal ratio is a ratio of an equivalent focal length to an optical aperture;
- and
- obtaining the size information of the particle based on the projection distance, the focal ratio, and the maximum influence degree;
- wherein determining the maximum influence degree of the particle based on the influence degree of each pixel point in the shadow region, comprises:
- obtaining the influence degree of each pixel point in the shadow region based on grayscale values of each pixel point in the shadow region in the particle image and grayscale values of each pixel point in the shadow region in the background image;
- and
- taking a maximum value of the influence degree of each pixel point in the shadow region as the maximum influence degree of the particle.
An electronic device comprising:
- a storage device;
- and
- at least one processor, wherein the storage device stores one or more programs, when executed by the at least one processor, the one or more programs cause the at least one processor to:
- obtain a detection image;
- process the detection image by filtering out noise and retaining the particle in the detection image to obtain a particle image;
- process the detection image by averaging the particle in the particle image to obtain a background image;
- identify an imaging of a particle in the detection image and obtain a shadow region of the particle;
- determine a maximum influence degree of the particle based on an influence degree of each pixel point in the shadow region;
- obtain size information of the particle based on the maximum influence degree of the particle;
- determine a projection distance and a focal ratio of a camera module, wherein the projection distance is a distance between a photosensitive element and a filter lens, and the focal ratio is a ratio of an equivalent focal length to an optical aperture;
- and
- obtain the size information of the particle based on the projection distance, the focal ratio, and the maximum influence degree;
- wherein the at least one processor is further caused to:
- obtain the influence degree of each pixel point in the shadow region based on grayscale values of each pixel point in the shadow region in the particle image and grayscale values of each pixel point in the shadow region in the background image;
- and
- take a maximum value of the influence degree of each pixel point in the shadow region as the maximum influence degree of the particle.
A non-transitory storage medium having stored thereon instructions that, when executed by a processor of an electronic device, causes the processor to perform a particle detection method, wherein the method comprises:
- obtaining a detection image;
- process the detection image by filtering out noise and retaining the particle in the detection image to obtain a particle image;
- process the detection image by averaging the particle in the particle image to obtain a background image;
- identifying an imaging of a particle in the detection image and obtaining a shadow region of the particle;
- determining a maximum influence degree of the particle based on an influence degree of each pixel point in the shadow region;
- and
- obtaining size information of the particle based on the maximum influence degree of the particle;
- wherein obtaining the size information of the particle based on the maximum influence degree of the particle, further comprises:
- determining a projection distance and a focal ratio of a camera module, wherein the projection distance is a distance between a photosensitive element and a filter lens, and the focal ratio is a ratio of an equivalent focal length to an optical aperture;
- and
- obtaining the size information of the particle based on the projection distance, the focal ratio, and the maximum influence degree;
- wherein determining the maximum influence degree of the particle based on the influence degree of each pixel point in the shadow region, further comprises:
- obtaining the influence degree of each pixel point in the shadow region based on grayscale values of each pixel point in the shadow region in the particle image and grayscale values of each pixel point in the shadow region in the background image;
- and
- taking a maximum value of the influence degree of each pixel point in the shadow region as the maximum influence degree of the particle.
Dependencies are inferred from the claim text.