Image processing apparatus, image processing method, microscope system, and storage medium
An image processing apparatus obtains image data captured via a microscope, obtains first color information from the image data and detects a region corresponding to an observation target from the image data. The first color information is information relating to saturation, and the image processing apparatus detects a region with a value for saturation based on the first color information that is greater than a predetermined threshold as the region corresponding to the observation target of the image data.
1 . An image processing apparatus comprising:
one or more processors or circuitry configured to perform functions of the following units;
an obtaining unit configured to scan, by a microscope, a region in which an observation target is arranged and obtain a plurality of image data corresponding to different positions from each other;
a first color information obtaining unit configured to, for each of the plurality of image data, calculate saturation of each pixel of the image data and obtain an average value of the saturation of each pixel as an average value of the saturation for each image data;
a composite image generating unit configured to generate a composite image composed of a plurality of pixels corresponding to the plurality of image data; and
a detecting unit configured to detect a region corresponding to the observation target in the plurality of image data, wherein
the composite image generating unit generates the composite image by assigning the average value of the saturation obtained for the image data as a pixel value to a pixel position corresponding to each of the plurality of image data, and
the detecting unit further detects, in the composite image, a region including a pixel having a pixel value greater than a predetermined threshold as the region corresponding to the observation target in the plurality of image data.
2 . The image processing apparatus according to claim 1 , wherein the one or more processors or circuitry are further configured to perform functions of a determining unit configured to determine whether the image data of the plurality of image data includes a region corresponding to the observation target, wherein
the determining unit determines, in the composite image, a region including a pixel having a pixel value greater than the predetermined threshold as the region corresponding to the observation target, and
the detecting unit detects the region corresponding to the observation target according to determination by the determining unit.
3 . The image processing apparatus according to claim 2 , wherein the one or more processors or circuitry are further configured to perform functions of a second color information obtaining unit configured to obtain second color information from the image data, wherein
the second color information is hue and value information, and
the determining unit determines, in the composite image, the region corresponding to the observation target regardless of a value relating to hue and value based on the second color information.
4 . The image processing apparatus according to claim 2 , wherein the one or more processors or circuitry are further configured to perform functions of
a correcting unit configured to correct the image data by applying a predetermined gain to each RGB component of the image data, wherein
the predetermined gain is gain set so that saturation of a specific region without the observation target approaches an achromatic color when the correcting unit corrects image data obtained by capturing the specific region, and
the determining unit determines whether the image data includes a region corresponding to the observation target using image data corrected by the correcting unit.
5 . The image processing apparatus according to claim 1 , wherein
the observation target is stained via a predetermined staining method.
6 . The image processing apparatus according to claim 1 , wherein
the number of regions into which the image data is divided is set on a basis of any one of objective lens magnification, zoom magnification of the image data, and type of the observation target and size of the observation target.
7 . An inspection apparatus comprising:
an objective lens that optically enlarges an image of an observation target;
an image sensor configured to capture an image via the objective lens;
the image processing apparatus according to claim 1 ; and
a first driver configured to drive the observation target in a direction orthogonal to an optical axis of the objective lens, wherein
in the image processing apparatus
the obtaining unit obtains an image obtained by driving the first driver to change a region of an image captured by the image sensor as the image data, and
the detecting unit detects the region corresponding to the observation target from the image data obtained.
8 . The inspection apparatus according to claim 7 , further comprising:
a second driver configured to drive the observation target in an optical axis direction of the objective lens, wherein
before detection of the region corresponding to the observation target is started by the detecting unit, the second driver drives so that the objective lens and the observation target become a predetermined distance apart.
9 . The inspection apparatus according to claim 8 , further comprising:
a focus adjusting unit configured to adjust focus by driving the second driver while determining a focused state of an image captured by the image sensor, wherein
after detection of the region corresponding to the observation target ends, focus is adjusted to the region corresponding to the observation target by the focus adjusting unit.
10 . The inspection apparatus according to claim 7 , further comprising:
an operating unit configured to operate the observation target in a direction orthogonal with an optical axis of the objective lens; and
a notifying unit configured to communicate that an image captured by the image sensor includes a region corresponding to the observation target.
11 . An inspection apparatus comprising:
a storing unit configured to store a plurality of images including an observation target; and
the image processing apparatus according to claim 1 , wherein
in the image processing apparatus
the obtaining unit obtains an image stored in the storing unit, and
the detecting unit detects the region corresponding to the observation target from the image data obtained.
12 . An image processing method executed by an image processing apparatus, comprising:
scanning, by a microscope, a region in which an observation target is arranged and obtaining a plurality of image data corresponding to different positions from each other;
calculating, for each of the plurality of image data, saturation of each pixel of the image data and obtaining an average value of the saturation of each pixel as an average value of the saturation for each image data;
generating a composite image composed of a plurality of pixels corresponding to the plurality of image data; and
detecting a region corresponding to the observation target in the plurality of the image data, wherein
the generating the composite image including generating the composite image by assigning the average value of the saturation obtained for the image data as a pixel value to a pixel position corresponding to each of the plurality of image data, and
the detecting further includes detecting, in the composite image, a region including a pixel having a pixel value greater than a predetermined threshold as the region corresponding to the observation target in the plurality of image data.
13 . A microscope system including a microscope, comprising:
a image sensor configured to scan, by the microscope, a region in which an observation target is arranged and obtain a plurality of image data corresponding to different positions from each other;
one or more processors or circuitry configured to perform functions of the following units;
a first color information obtaining unit configured to, for each of the plurality of image data, calculate saturation of each pixel of the image data and obtain an average value of the saturation of each pixel as an average value of the saturation for each image data;
a composite image generating unit configured to generate a composite image composed of a plurality of pixels corresponding to the plurality of image data;
a detecting unit configured to detect a region corresponding to the observation target in the plurality of image data; and
a notifying unit configured to communicate that the image data includes a region corresponding to an observation target in a case where the region corresponding to the observation target is detected from the image data, wherein
the composite image generating unit generates the composite image by assigning the average value of the saturation obtained for the image data as a pixel value to a pixel position corresponding to each of the plurality of image data, and
the detecting unit further detects, in the composite image, a region including a pixel having a pixel value greater than a predetermined threshold as the region corresponding to the observation target in the plurality of image data.
14 . A non-transitory computer-readable storage medium storing instructions which perform an image processing method executed by an image processing apparatus, the method comprising:
scanning, by a microscope, a region in which an observation target is arranged and obtaining a plurality of image data corresponding to different positions from each other;
calculating, for each of the plurality of image data, saturation of each pixel of the image data and obtaining an average value of the saturation of each pixel as an average value of the saturation for each image data;
generating a composite image composed of a plurality of pixels corresponding to the plurality of image data; and
detecting a region corresponding to the observation target in the plurality of the image data, wherein
the generating the composite image including generating the composite image by assigning the average value of the saturation obtained for the image data as a pixel value to a pixel position corresponding to each of the plurality of image data, and
the detecting further includes detecting, in the composite image, a region including a pixel having a pixel value greater than a predetermined threshold as the region corresponding to the observation target in the plurality of image data.