Image processing method and image processing program

By performing binarization, region segmentation and elliptical approximation on the image containing the sphere, combined with the average color acquisition and filling of the background area, the shortcomings of the prior art under unknown parameters are solved, and high-precision sphere area extraction is achieved.

CN119866506APending Publication Date: 2025-04-22RESONAC CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202380065902.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-22
Filing Date
2023-09-08
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The prior art is difficult to apply to image processing when the parameters are unknown, especially when processing non-uniform contoured cell images, and it is difficult to obtain accurate region information through one image analysis.

Method used

By acquiring an image containing the sphere, performing binarization, region segmentation and ellipse approximation, combining the average color acquisition and filling of the background area, the processing is repeated to improve the accuracy.

Benefits of technology

It realizes high-precision acquisition of sphere areas from non-uniform contoured cell images, which is suitable for cases where parameters are unknown, and can handle changes in object size and color in the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119866506A_ABST
    Figure CN119866506A_ABST
Patent Text Reader

Abstract

A sphere region is acquired with high precision from an image including a sphere having a non-uniform contour as a subject. This image processing method is provided with: an image acquisition step for acquiring an image including a sphere that is a subject; a binarization step of binarizing the obtained image to obtain a binarized image; a region segmentation step of performing region segmentation on the binarized image to obtain a sphere candidate region; and an ellipse approximation step of applying an ellipse approximation to the sphere candidate region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image processing method and an image processing program. Background Art

[0002] For example, there are cases where a sample such as cells cultured in a container is photographed to quantitatively measure the number and size of cells. To achieve this, fluorescent reagents can be introduced into cells for photographing, but such an operation may cause cell damage. On the other hand, for continuous operations such as culture and observation, non-invasive methods are sometimes required for photographing and measuring.

[0003] As a technology that meets such a requirement, there is a technology disclosed in Patent Document 1, for example. The technology comprises: a first step of acquiring an original image, wherein the original image includes a cell structure composed of a cell or a plurality of cells as a subject (subject); a second step of performing a bandpass filter process on the original image, wherein the bandpass filter process relatively attenuates spatial frequency components outside a bandwidth determined based on a contour width of the subject relative to spatial frequency components of the bandwidth; a third step of dividing, for the image after the second step, an area having a concentration higher than a predetermined threshold value into a first area, and dividing other areas into a second area; a fourth step of changing, for the image after the third step, a part of a portion of the second area sandwiched by the first area into the first area, and connecting the first areas sandwiching the second area; a fifth step of changing, for the image after the fourth step, a closed area of ​​the second area surrounded by the first area into the first area; and a sixth step of dividing, for the image after the fifth step, the first area having a contraction into a plurality of areas at the position of the contraction.

[0004] [Reference document]

[0005] [Patent document]

[0006] [Patent Document 1] (Japan) Patent Publication No. 2020-9217 Summary of the invention

[0007] [Technical issues to be solved]

[0008] The technology disclosed in Patent Document 1 is effective when the parameters used by the filter are known, but generally speaking, it cannot be applied when the parameters are unknown. In addition, the unevenness of color in the image and the degree of variation in the size of the object will also make it difficult to obtain all areas through a single image analysis (parsing). To address this issue, an image using the average color of the background can be generated for multiple image analyses, so that the corresponding area can be obtained regardless of the size and color unevenness of the object in the image.

[0009] The purpose of the present disclosure is to obtain a spheroid region with high precision from an image containing a cell structure with a non-uniform (inhomogeneous) outline as a subject (hereinafter collectively referred to as a "spheroid" (Note: "" is equivalent to "")).

[0010] [Technical solution]

[0011] The image processing method according to the first aspect of the present disclosure comprises:

[0012] An image acquisition step of acquiring an image including a sphere as a subject;

[0013] A binarization step of binarizing the obtained image to obtain a binarized image;

[0014] A region segmentation step, performing region segmentation on the binary image to obtain a sphere candidate region; and

[0015] The ellipse approximation step applies ellipse approximation to the sphere candidate region.

[0016] A second aspect of the present disclosure is the image processing method according to the first aspect, further comprising:

[0017] The step of obtaining the average color of the entire image is to obtain the average color of the entire image before binarization;

[0018] A background area average color acquisition step, for an image obtained by applying the ellipse approximation, acquiring the average color of the background area of ​​the image; and

[0019] The determination step compares the average color of the entire image with the average color of the background area.

[0020] A third aspect of the present disclosure is the image processing method according to the second aspect, wherein:

[0021] The background area average color acquisition step comprises:

[0022] A second binarization step of binarizing the image obtained by applying the ellipse approximation;

[0023] a dilation step of dilating a white area of ​​the binarized image obtained as a result of the second binarization step; and

[0024] The average color acquisition step acquires the average color of an area corresponding to a black area of ​​the binarized image obtained as a result of the dilation step, in the image obtained by applying the ellipse approximation.

[0025] A fourth aspect of the present disclosure is an image processing program that causes a computer to execute:

[0026] An image acquisition step of acquiring an image including a sphere as a subject;

[0027] A binarization step of binarizing the obtained image to obtain a binarized image;

[0028] A region segmentation step, performing region segmentation on the binary image to obtain a sphere candidate region; and

[0029] The ellipse approximation step applies ellipse approximation to the sphere candidate region.

[0030] [Beneficial Effects]

[0031] According to the present disclosure, a spherical area can be acquired with high accuracy from an image including a sphere having a non-uniform outline as a subject. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] [ Figure 1 ] Figure 1 This is a flowchart showing image processing according to one embodiment.

[0033] [ Figure 2 ] Figure 2 This is an example of the configuration of a computer device for executing image processing according to one embodiment.

[0034] [ Figure 3 ] Figure 3 It is a flowchart showing the steps of obtaining the average color of the background area.

[0035] [ Figure 4 ] Figure 4 FIG. 1 schematically shows an example of image changes caused by processing.

[0036] [ Figure 5 ] Figure 5 FIG. 2 schematically shows an example of image changes caused by processing. DETAILED DESCRIPTION

[0037] An embodiment of the image processing method of the present invention is described below. The image processing of this embodiment is to divide the image obtained by photographing the cell structure cultured in the culture medium into the cell structure area and other areas, and output the resulting image. The image processing is performed on the unprocessed original image photographed by the photographing device, and the photographing device has a photographing function for photographing a sample containing a sphere. The image processing can also be performed as one of the post-processing of the image data photographed by the photographing device. In addition, the image processing can also be performed by the photographing device or a computer device that receives the image data from an appropriate storage unit.

[0038] Here, a description is given of an exemplary manner in which the image processing of the present embodiment is performed by a general-purpose computer device on raw image data generated by already performed photography.

[0039] The image that is the object of the image processing of the present invention includes a sphere as the subject. In this specification, "sphere" refers to a cell structure in which multiple cells are aggregated into a roughly spherical shape, but it may also include cells whose general appearance is a relatively smooth closed curve, such as cells that appear to be roughly spherical or rotating ellipsoidal in the culture medium. The sphere being photographed is contained in a culture medium system in which it grows, for example, in a dispersed manner. The culture medium containing the sphere is placed in a transparent sample container to form a sample. In this case, the sphere is photographed through the sample container in which the culture medium is placed.

[0040] There is no particular limitation on the composition (structure) of the photographing device, as long as it has the function of photographing the sample containing the cultured spheroids together with the culture solution and outputting the photographed image as digital image data. In addition, the image is preferably a bright field image. In addition, as for the computer device, for example, a computer device with a general hardware composition that has been commercialized as a personal computer can be used. The detailed description of these hardware will be omitted below.

[0041] Figure 1 This is a flowchart showing the image processing of this embodiment. Figure 1 The image processing of this embodiment is briefly described, and then the specific contents of the image processing are described in detail.

[0042] The computer device obtains an original image obtained by bright field photographing a sample containing spheroids in a culture solution under appropriate photographing devices and photographing conditions (step S101). The original image contains at least one complete spheroid as a subject. In other words, the photographing magnification is set in a manner that contains at least one complete spheroid. For this reason, the original image may contain the spheroid as the detection object and other micro cells, debris, background, etc.

[0043] The image processing of this embodiment is particularly suitable for images containing spheres as the subject. For such cells, the size and shape are uneven due to the different growth levels of each cell. By performing high-precision detection on such cells, the area of ​​the cells can be accurately extracted.

[0044] The computer device obtains the average color of the entire image based on the original image obtained in step S101 or the processing target image generated in step S111 (step S102). The original image obtained in step S101 and the processing target image generated in step S111 are collectively referred to as "processing target image (image to be processed)". The average color of the entire image can be obtained by taking the arithmetic average of the R value in the RGB value of the pixel (pixel). The average color of the entire image can also be obtained by calculating any one of the RGB values, any one of the HSV values, or a combination thereof. The average color of the entire image obtained in step S102 can be used for the subsequent determination (judgment) processing of step S103.

[0045] When the average color of the entire image is obtained based on the original image obtained in step S101 for the first time, the process proceeds to the next step S104 without executing the determination process of step S103. The process of obtaining the average color of the entire image based on the processing target image generated in step S111 from the second round will be described later.

[0046] Next, the computer device selects a region segmentation method (step S104). Examples of region segmentation methods include watershed method and contour detection method. The region segmentation method can be selected before the region segmentation process of step S107 described later, and the timing of selecting the region segmentation method is not limited to this range.

[0047] In this embodiment, a spherical region is acquired through binarization processing (step S105), region segmentation processing (step S107), and ellipse approximation processing (step S108).

[0048] In the binarization process, the computer device divides the processing object image into a high-concentration area with a concentration higher than a predetermined concentration threshold and a low-concentration area with a concentration lower than a predetermined concentration threshold (step S105). In addition, the high-concentration area and the low-concentration area are respectively assigned a single concentration (for example, black and white). Accordingly, a binarized image after the processing object image is binarized can be obtained. By binarizing the image, the sphere can be represented as a high-concentration closed area surrounded by a low-concentration background area. As a binarization process, Otsu binarization, binarization using an appropriate threshold, etc. can be used.

[0049] The closed area surrounded by the contour thus extracted is equivalent to the interior of the sphere. In addition to the sphere as the detection object, the original image may also contain objects corresponding to small cells, debris, etc. In order to delete such objects, objects whose parameters related to morphological features meet the predetermined deletion conditions can be deleted.

[0050] Specifically, the computer device deletes objects whose area as the above parameter is less than or greater than a predetermined value (noise elimination step, i.e., step S106). The object deletion mentioned here means changing the object that has become a high-concentration area by binarization into a low-concentration area that is the same as the background area.

[0051] Next, the computer device performs a region segmentation process (step S107) using the region segmentation method selected in step S104. This region segmentation process is a process for separating and extracting a candidate region of a sphere when the object extracted by the processes of the above-mentioned steps S105 and S106 is an object where a plurality of spheres are connected. Such connection may occur in any of the cases where a plurality of spheres are actually connected in the sample and where they are separated in the sample but overlap when viewed from the shooting direction. By separating the connected spheres in the image from each other through the region segmentation process, a candidate region of the sphere can be obtained. By performing this region segmentation process, the error in calculating the number of spheres in the image, their respective sizes, areas, etc. can be reduced.

[0052] After that, the computer device performs ellipse approximation processing (step S108). The ellipse approximation processing applies ellipse approximation to the candidate region of the sphere extracted by the region segmentation processing in step S107. Specifically, as the ellipse approximation, for example, the least square method is used to determine the formula of the ellipse so that the difference between the outline of the candidate region of the sphere and the applied ellipse becomes small. By performing the ellipse approximation processing, the error in calculating the number of spheres in the image, their respective sizes, areas, etc. can be reduced.

[0053] Next, the computer device performs an ellipse deletion process (step S109). When the ellipse applied to the sphere candidate region to which the ellipse approximation is applied in step S108 is inappropriate, the ellipse deletion process deletes the ellipse. Specifically, in the case where there is a sphere candidate region to which an ellipse that should be a non-extraction object is applied, for example, the ellipse is treated as a non-extraction object based on the area or flattening (degree of flatness) of the ellipse being less than or greater than a predetermined value as a reference (standard). By performing the ellipse deletion process, the sphere candidate region to which the ellipse that has not been deleted is applied can be obtained as a sphere region.

[0054] Then, the computer device performs background area average color acquisition processing (step S110) on the spherical area obtained in step S109, which will be described in detail later. The background area average color acquisition processing is a processing for calculating the average color of the portion after the spherical area is removed from the processing target image by using binarization processing and dilation processing.

[0055] Next, the computer device generates a new processing target image obtained by filling the spherical region obtained from the processing target image in steps S108 and S109 with the average color of the background region obtained in step S110 (step S111 ). Thereafter, the process returns to step S102 .

[0056] In step S103 starting from the second round, the average color of the entire image obtained in step S102 and the average color of the background area obtained in step S110 are compared to determine whether the difference in average color is greater than the threshold value. If the difference in these average colors is greater than the threshold value, the process proceeds to step S104. If the difference in average color is less than the threshold value, the process proceeds to step S112. If the difference in average color is less than the threshold value, the process is equivalent to no remaining (leftover) sphere candidate area that can be extracted from the processing target image by the processing of steps S105 and S106.

[0057] The average color of the background area of ​​the N-1th processing object image (if the processing repetition (cycle) is the 2nd round, it is the original image of the 1st round, if the processing repetition is the 3rd round, it is the processing object image of the 2nd round) and the average color of the entire image of the Nth processing object image (if the processing repetition is the 2nd round, it is the processing object image of the 2nd round, if the processing repetition is the 3rd round, it is the processing object image of the 3rd round).

[0058] The step of judging the difference in average colors may also be performed following step S111 instead of following step S102, that is, it may be performed by comparing the average color of the entire image of the Nth processing object image before applying the processing from steps S102 to S111 with the average color of the background area of ​​the Nth processing object image after applying the processing from steps S102 to S111 to judge whether the difference in average colors is less than a threshold value.

[0059] By repeating the processing from step S102 to step S111 to repeatedly generate a processing target image in which the acquired spherical region and the background region are integrated, the spherical region can be acquired with high accuracy.

[0060] The computer device outputs an image in which the spherical region obtained by the above processing is displayed on the original image (step S112). Specifically, the output is an image in which the ellipse applied to the obtained spherical region is superimposed and displayed on the original image. It should be noted that the display for determining the spherical region is not limited to the display of the ellipse as described above. For example, an image in which the visibility of the spherical region is improved by performing various processing such as coloring (coloring) and emphasizing the outline of the spherical region in the original image can also be used as the output image.

[0061] The computer device saves the information related to the ellipse, such as the quantitative value of the spherical area obtained by the above-mentioned processing, to the storage unit 15 described later (step S113). Specifically, the number, area, length of the contour line, circularity and aspect ratio can be saved as numerical values. In addition, the number, true circularity, major diameter, minor diameter, center coordinates, etc. of the ellipse obtained by the ellipse deletion processing of step S109 can also be saved. In addition, statistical values ​​can also be calculated based on these numerical values. The values ​​containing the calculated statistical values ​​can be output as files such as CSV (Comma Separated Values) and Excel (registered trademark).

[0062] Accordingly, the result of image processing can be presented to the user by outputting and displaying the output image generated in step S112 and / or the statistical value generated in step S113 on, for example, the display unit 17 described later. The output image and / or the statistical value can be printed out or transmitted to an external device (not shown).

[0063] Figure 2 The computer device 1 is an example of a computer device for executing the image processing of the present embodiment. The computer device 1 is, for example, a personal computer having a general configuration (configuration), and includes a CPU (Central Processing Unit) 10, a memory 14, a storage unit 15, an input device 16, a display unit 17, an interface 18, a disk drive 19, and the like.

[0064] The CPU 10 executes a pre-prepared image processing program to implement the image processing unit 11 as a functional block for performing the above-mentioned image processing in a software manner. It should be noted that dedicated hardware for implementing the image processing unit 11 may also be provided. The memory 14 temporarily stores various data generated during the operation of the CPU 10. In addition to the image processing program to be executed by the CPU 10, the storage unit 15 also stores the image data of the original image, the processed image data, the information related to the above-mentioned ellipse, etc. for a long time.

[0065] The input device 16 is used to receive instruction input from the operator, and includes, for example, a mouse, a keyboard, etc. In addition, the display unit 17 is, for example, a liquid crystal display with an image display function, which can display various information such as original images, processed images, messages to the operator, etc. It should be noted that a touch panel in which the input device and the display unit are integrated can also be provided.

[0066] The interface 18 exchanges various data with external devices via an electrical communication line. An external recording disk 2 on which various data such as image data and image processing programs are recorded can be placed in the disk drive 19. The image data, image processing programs, etc. stored on the recording disk 2 can be read by the disk drive 19 and stored in the storage unit 15. The disk drive 19 can also have a function of writing data generated in the computer device 1 to the recording disk 2.

[0067] The image processing program for causing the computer device 1 to execute the image processing of the present embodiment can be read by the disk drive 19 accessing the recording disk 2 recording the program, or can be obtained by being given from an external device via the interface 18. The same is true for the original image data.

[0068] Combine the following Figure 3 The background area average color acquisition process of this embodiment ( Figure 1 The step S110 is described in detail.

[0069] The computer device performs binarization processing on the image processed by steps S108 and S109 (step S201). In the binarization processing of step S201, the computer device divides the processing object image into a high-concentration area with a concentration higher than a predetermined concentration threshold and a low-concentration area with a concentration lower than a predetermined concentration threshold, similar to the binarization processing of the above-mentioned step S105. As a binarization processing, Otsu binarization, binarization using an appropriate threshold, etc. can be used. By means of this binarization processing, the processing object image can be roughly divided into a sphere area and an area outside the sphere. The area outside the sphere is regarded as (referred to as) a background candidate area.

[0070] Next, the computer device performs dilation processing on the spherical region (step S202). As the operation of the dilation processing, the spherical region is fully expanded to the background candidate region. In order to expand from the spherical region to the background candidate region, for example, 10 pixels of dilation can be performed. By performing the dilation processing in this way, the spherical region can be completely removed from the background candidate region.

[0071] After that, the computer device executes background region acquisition processing (step S203). In the background region acquisition processing, the background region is acquired from the processing target image that has been dilated and obtained in step S202. In this way, the background region in the processing target image can be determined.

[0072] Next, the computer device obtains the average color of the background area obtained in step S203 (step S204). The acquisition of the average color can be performed in the same manner as in step S102. By calculating the average value of the background area in the processing target image, the average color of the background area can be obtained. The average color of the background area obtained in this way is used in step S103.

[0073] Figure 4 An example of image change caused by image processing according to this embodiment is schematically shown.

[0074] Figure 4 The image Ia shown schematically shows an example of an image obtained in step S101. Starting from the second round of the process of repeating steps S102 to S111, the processing target image generated in step S111 becomes image Ia. In image Ia, the spheres S1 to S4 as the detection targets are distributed in a roughly uniform background B. The spheres S1 to S4 have a roughly circular or elliptical shape. Figure 4 In the image Ia, although the inside of the spheres S1 to S4 also has a high density, the texture inside the spheres can be any texture. In addition, density unevenness occurs in the upper right portion of the image Ia where the background density becomes high.

[0075] Image Ib schematically shows an example of an image after image Ia is subjected to binarization processing (step S105). By binarization processing, the image can be divided into a region with a higher density and a region with a lower density. Figure 4 As shown in the image Ib in FIG. 1 , the spheres S1 to S4 are divided into high-density areas indicated by white in the figure. On the other hand, the other areas are divided into low-density areas indicated by black in the figure, and are actually deleted from the image.

[0076] Next, the image Ib after the binarization process is subjected to small area (noise) deletion (step S106). Image Ic is an example of an image after the small area is deleted from image Ib. By deleting the small area that meets the predetermined deletion condition from image Ib, objects other than the spheres S1 to S4 as detection objects can be deleted. The predetermined deletion condition is, for example, that the length and / or area does not meet the predetermined value, the circularity does not meet the predetermined value, etc.

[0077] After that, the noise-deleted image Ic is subjected to region segmentation processing (step S107). The region segmentation processing is a region segmentation processing for high-density regions, and for example, a watershed method can be used. Image Id is an example of an image after the spheres S1 to S4 included in image Ic are obtained as separate sphere regions.

[0078] Next, ellipse approximation is applied to the image Id after region segmentation (step S108). The contour line obtained by region segmentation using the watershed method does not necessarily capture the sphere. For this reason, the least square method is used to perform ellipse approximation on the above contour line. Based on this, the ellipse after approximation for each sphere can be determined. By determining the approximated ellipse to determine the sphere candidate region, the effect of reducing the error in calculating the number of spheres in the image, their respective sizes, areas, etc. can be achieved. Image Ie is an example of an image after ellipse approximation is applied to image Id.

[0079] After that, the ellipse deletion process is applied to the image Ie after the ellipse approximation process (step S109). Image If is an example of an image after the ellipse is deleted from the image Ie. By deleting the ellipse that meets the predetermined deletion condition from the image Ie, the spherical area can be determined. The predetermined deletion condition can be, for example, the length and / or area does not meet the predetermined value, the circularity does not meet the predetermined value, etc.

[0080] Figure 5 An example of image change caused by image processing according to this embodiment is schematically shown. Figure 5 The repetitive process of processing the average color of the entire image and the average color of the background area is described in detail in.

[0081] By applying steps S102 to S109 to the image II-1-a obtained in step S101, an image II-1-b in which the spherical area is determined can be obtained. In image II-1-b, a sphere in the upper right corner of the image is determined as the spherical area. By obtaining the average color of the entire image of image II-1-a, image II-1-c can be obtained. By applying steps S201 to S202 to image II-1-a, image II-1-d can be obtained. That is, by performing binarization processing (step S201) and dilation processing (step S202) on the processing object image, the background area can be determined. Thereafter, by applying steps S201 to S204 to image II-1-a, image II-1-e can be obtained. That is, the average color of the background area of ​​the processing object image can be obtained.

[0082] Image II-2-a is a processing target image for processing an image in which the spherical region cannot be completely determined in a series of processes from step S102 to step S111.

[0083] By reapplying the processing from step S102 to step S111 to image II-2-a, image II-2-b can be obtained. In image II-2-b, the sphere in the lower right corner of the image is redefined as the sphere region. Here, the average color of the background region of image II-2-e is applied to the sphere region defined in image II-2-b.

[0084] Thereafter, the processing from step S102 to step S111 is repeated similarly to determine the spherical region in the processing target image.

[0085] Although the determination process of step S103 is omitted in the description of the above image processing, the determination process of step S103 is performed every time the average color of the entire image is acquired. Figure 5 In the example, in image II-4-a, the difference between the average color of the entire image of image II-4-c and the average color of the background area of ​​image II-3-e is less than a predetermined threshold, so the process branches to step S112 and the image processing ends.

[0086] Furthermore, in the above-described embodiment, in the image after the binarization process, the low-density area in the original image is represented by black, and the high-density area is represented by white, but the reverse may also be true.

[0087] Furthermore, in the above-described embodiment, the result of image processing is output and displayed to present it to the user, but the use of the result of cell or other region extraction is not limited to this and may be used in any manner.

[0088] Furthermore, in the above-mentioned embodiment, the watershed method is used for the region segmentation process, but other region segmentation methods may also be used.

[0089] In addition, in the above embodiment, the region segmentation processing is performed using the general-purpose computer device 1, but as mentioned above, the processing function can also be integrated into the camera. In addition, the program for performing the region segmentation processing of this embodiment can be added and implemented in the existing camera to expand its function.

[0090] In addition, the original image may also be an image obtained by bright field photography of cells, etc. In general, cells are almost transparent, and the difference in refractive index between the cells and the culture medium used to culture the cells is also small, so it is difficult to visually distinguish cells, etc. from other areas in a bright field image. By applying the present invention to such an image, the area of ​​cells, etc. in the image can be extracted well and stably. In addition, since images obtained by bright field photography without staining labeling, etc. can be used, cells, etc. can also be observed and evaluated non-invasively.

[0091] As described above, the image processing method of the present disclosure is described with respect to an image containing a sphere as a subject, but the subject is not limited to a sphere, and may also be a particle composed of an inorganic material. In addition, it may also be the surface of a coated component formed by coating particles on the surface of a substrate.

[0092] This application claims the priority of Japanese Patent Application No. 2022-151608 filed with the Japan Patent Office on September 22, 2022, and all of its contents are incorporated herein by reference.

[0093] [Explanation of Reference Numerals]

[0094] 1: Computer device

[0095] 2: Storage disk (recording medium)

[0096] Ia: Original image

[0097] S1~S4: Sphere

[0098] S101: Original image acquisition step

[0099] S102: Step of obtaining the average color of the entire image

[0100] S103: Judgment step

[0101] S104: Region segmentation method selection step

[0102] S105: Binarization step

[0103] S106: Noise elimination step

[0104] S107: Region segmentation step

[0105] S108: Ellipse approximation step

[0106] S109: Ellipse deletion step

[0107] S110: Background area average color acquisition step

[0108] S111: Processing object image generation step

[0109] S112: Image output step

[0110] S113: Ellipse information saving step

[0111] S201: Binarization step

[0112] S202: Sphere area expansion step

[0113] S203: Background area acquisition step

[0114] S204: Background area average color acquisition step.

Claims

1. An image processing method, comprising: An image acquisition step of acquiring an image including a sphere as a subject; A binarization step of binarizing the obtained image to obtain a binarized image; A region segmentation step, performing region segmentation on the binary image to obtain a sphere candidate region; and The ellipse approximation step applies ellipse approximation to the sphere candidate region.

2. The image processing method according to claim 1, further comprising: The step of obtaining the average color of the entire image is to obtain the average color of the entire image before binarization; A background area average color acquisition step, for an image obtained by applying the ellipse approximation, acquiring the average color of the background area of ​​the image; and The judging step is to compare the average color of the entire image with the average color of the background area.

3. The image processing method according to claim 2, wherein: The background area average color acquisition step comprises: A second binarization step of binarizing the image obtained by applying the ellipse approximation; a dilation step of dilating a white area of ​​the binarized image obtained as a result of the second binarization step; and The average color acquisition step acquires the average color of an area corresponding to a black area of ​​the binarized image obtained as a result of the dilation step, in the image obtained by applying the ellipse approximation.

4. An image processing program for causing a computer to execute: An image acquisition step of acquiring an image including a sphere as a subject; A binarization step of binarizing the obtained image to obtain a binarized image; A region segmentation step, performing region segmentation on the binary image to obtain a sphere candidate region; and The ellipse approximation step applies ellipse approximation to the sphere candidate region.

Citation Information

Patent Citations

  • Image processing method, computer program and recording medium

    JP2020009217A

  • Eye mask

    JP2022151608A