WO2015137358A1 - 画像処理方法、画像処理装置、及びプログラム - Google Patents

画像処理方法、画像処理装置、及びプログラム Download PDF

Info

Publication number
WO2015137358A1
WO2015137358A1 PCT/JP2015/057060 JP2015057060W WO2015137358A1 WO 2015137358 A1 WO2015137358 A1 WO 2015137358A1 JP 2015057060 W JP2015057060 W JP 2015057060W WO 2015137358 A1 WO2015137358 A1 WO 2015137358A1
Authority
WO
WIPO (PCT)
Prior art keywords
background
image
background color
pixel
contribution
Prior art date
Application number
PCT/JP2015/057060
Other languages
English (en)
French (fr)
Inventor
野本祥平
Original Assignee
株式会社メガチップス
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 株式会社メガチップス filed Critical 株式会社メガチップス
Publication of WO2015137358A1 publication Critical patent/WO2015137358A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing

Definitions

  • the present invention relates to an image processing method, an image processing apparatus, and a program, and more particularly, to an image separation method for separating a foreground image and a background image from the entire image.
  • An image separation method for separating a foreground image and a background image from the entire image by graph cutting is known for still images taken by a digital camera or the like (see, for example, Patent Document 1 below).
  • a rectangular area including a foreground image is specified in the entire image.
  • a Gaussian mixture distribution for the foreground is created based on the image in the rectangular area
  • a Gaussian mixture distribution for the background is created based on the image outside the rectangular area.
  • each pixel in the rectangular area is classified as either “foreground” or “background” by the graph cut using the Gaussian mixture distribution for foreground and background created as described above.
  • the graph is cut using the Gaussian mixture distribution for the background created based on the image outside the rectangular area.
  • the Gaussian mixture distribution for the background a Gaussian mixture distribution in which the white of the beach and the blue of the sea occupy a large area is created.
  • the sea blue is not included in the rectangular area specified around the face, the Gaussian distribution for the blue component of the Gaussian mixture distribution for the background is wasted, and the expressive power for other color components is reduced. To do.
  • the image separation method according to the background art when the color distribution of the background is greatly different between the entire image and the rectangular area, the power of expressing the background in the rectangular area is reduced, and as a result, the foreground is reduced. The separation accuracy between the image and the background image decreases.
  • the present invention has been made to solve such a problem. Even when the color distribution of the background differs greatly between the entire image and the designated area, the foreground image and the background image in the designated area are separated. It is an object to obtain an image processing method, an image processing apparatus, and a program capable of improving accuracy.
  • a foreground feature model in which a plurality of foreground color distributions are mixed is created based on an image in a designated area designated in the entire image.
  • B creating a first background feature model in which a plurality of background color distributions are mixed based on an image outside the designated area; and
  • C within the designated area for each background color distribution.
  • D generating a second background feature model by correcting each background color distribution using a weight value corresponding to the contribution
  • E And a step of separating an image in the designated area into a foreground image and a background image based on the foreground feature model and the second background feature model.
  • step (B) a first background feature model is created based on an image outside the designated area, and in step (C), each background color distribution is created.
  • step (D) a second background feature model is generated by correcting each background color distribution using a weight value corresponding to the contribution. Is done.
  • the first background feature model created based on the image outside the designated area is corrected to the second background feature model using the weight value corresponding to the contribution to the image inside the designated area. Therefore, even when the background color distribution differs greatly between the entire image and the designated area, it is possible to improve the separation accuracy between the foreground image and the background image in the designated area.
  • the step (C) includes (C-1) each pixel included in the image in the designated area, The step of classifying the background color distribution with the shortest distance among the plurality of background color distributions, and (C-2) calculating the contribution degree as the ranking of the number of pixels classified into each background color distribution And a step of performing.
  • each pixel included in the image in the designated area is one of the backgrounds having the shortest distance among the plurality of background color distributions. It is classified as a color distribution. Therefore, classification can be performed easily.
  • the contribution is calculated as the rank of the number of pixels classified into each background color distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • the step (C) includes (C-1) each pixel included in the image in the designated area, A step of classifying the background color distribution with the shortest distance among the plurality of background color distributions, and (C-2) for each background color distribution with respect to the total number of pixels included in the image in the designated area. And calculating a contribution level as a ratio of the number of classified pixels.
  • each pixel included in the image in the designated area is one of the backgrounds having the shortest distance among the plurality of background color distributions. It is classified as a color distribution. Therefore, classification can be performed easily.
  • the contribution is calculated as the ratio of the number of pixels classified into each background color distribution to the total number of pixels included in the image in the designated area. Thus, by calculating the contribution as a ratio, it is possible to easily determine the weight value.
  • the step (C) relates to (C-1) each pixel included in the image in the designated area.
  • C-3) calculating a contribution degree as a ranking of the cumulative distance regarding each background color distribution.
  • step (C-1) for each pixel included in the image within the designated area, the distance from each background color distribution is calculated, and step (C-2)
  • step (C-1) the distance calculated in step (C-1) is integrated for each background color distribution with respect to all pixels included in the image in the designated area, thereby calculating the cumulative distance for each background color distribution.
  • step (C-3) the contribution is calculated as the rank of the cumulative distance for each background color distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • the step (C) relates to (C-1) each pixel included in the image in the designated area.
  • step (C-1) the distance from each background color distribution is calculated for each pixel included in the image in the designated area, and step (C-2)
  • step (C-1) the distance calculated in step (C-1) is integrated for each background color distribution with respect to all pixels included in the image in the designated area, thereby calculating the cumulative distance for each background color distribution.
  • step (C-2) the distance calculated in step (C-1) is integrated for each background color distribution with respect to all pixels included in the image in the designated area, thereby calculating the cumulative distance for each background color distribution.
  • step (C-3) the contribution is calculated as a ratio of the cumulative distances related to the background color distributions to the sum of the cumulative distances related to the background color distributions.
  • the contribution is calculated as a ratio of the cumulative distances related to the background color distributions to the sum of the cumulative distances related to the background color distributions.
  • the step (C) includes (C-1) each pixel included in the image in the designated area, A step of classifying the pixel into one of an estimated foreground pixel and an estimated background pixel; And (C-3) calculating a contribution degree as a ranking of the number of pixels classified into each background color distribution.
  • each pixel included in the image in the designated area is classified as either an estimated foreground pixel or an estimated background pixel.
  • each pixel classified as the estimated background pixel is classified into one of the background color distributions having the shortest distance among the plurality of background color distributions. Therefore, it is possible to improve the separation accuracy by eliminating the influence of the estimated foreground pixels, and to easily perform classification.
  • the contribution is calculated as the rank of the number of pixels classified into each background color distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • the step (C) includes (C-1) each pixel included in the image in the designated area, A step of classifying the pixel into one of an estimated foreground pixel and an estimated background pixel; And (C-3) calculating a contribution degree as a ratio of the number of pixels classified into each background color distribution to the total number of pixels classified into the estimated background pixels. It is characterized by this.
  • each pixel included in the image in the designated area is classified as either an estimated foreground pixel or an estimated background pixel.
  • each pixel classified as the estimated background pixel is classified into one of the background color distributions having the shortest distance among the plurality of background color distributions. Therefore, it is possible to improve the separation accuracy by eliminating the influence of the estimated foreground pixels, and to easily perform classification.
  • the contribution is calculated as the ratio of the number of pixels classified into each background color distribution to the total number of pixels classified into the estimated background pixels. Thus, by calculating the contribution as a ratio, it is possible to easily determine the weight value.
  • the step (C) includes (C-1) each pixel included in the image in the designated area, (C-3) calculating a distance from each background color distribution with respect to each pixel classified as the estimated background pixel; and (C-3). ) Calculating the cumulative distance for each background color distribution by integrating the distance calculated in step (C-2) for each background color distribution for all pixels classified as estimated background pixels; And C-4) calculating a contribution degree as a ranking of the cumulative distance regarding each background color distribution.
  • step (C-1) each pixel included in the image in the designated area is classified as either an estimated foreground pixel or an estimated background pixel.
  • step (C-2) the distance from each background color distribution is calculated for each pixel classified as the estimated background pixel.
  • step (C-3) the distance calculated in step (C-2) is used as the estimated background.
  • step (C-4) the contribution is calculated as the rank of the cumulative distance for each background color distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • the step (C) includes (C-1) each pixel included in the image in the designated area, (C-3) calculating a distance from each background color distribution with respect to each pixel classified as the estimated background pixel; and (C-3). ) Calculating the cumulative distance for each background color distribution by integrating the distance calculated in step (C-2) for each background color distribution for all pixels classified as estimated background pixels; C-4) calculating a contribution degree as a ratio of the cumulative distance regarding each background color distribution to the sum of the cumulative distances regarding all background color distributions.
  • step (C-1) each pixel included in the image in the designated area is classified as either an estimated foreground pixel or an estimated background pixel.
  • step (C-2) the distance from each background color distribution is calculated for each pixel classified as the estimated background pixel.
  • step (C-3) the distance calculated in step (C-2) is used as the estimated background.
  • step (C-4) the contribution is calculated as the ratio of the cumulative distance for each background color distribution to the sum of the cumulative distances for all background color distributions.
  • the step (B) determines the center coordinates of each background color distribution.
  • new center coordinates are determined based on the weight value corresponding to the contribution calculated in the step (C).
  • step (D) new center coordinates are determined based on the weight value corresponding to the contribution calculated in step (C). Therefore, by setting a new center coordinate reflecting the degree of contribution, the background feature model can be optimized, and as a result, the separation accuracy can be improved.
  • the step (B) determines the center coordinates of each background color distribution.
  • the step (D) the center coordinates common to the center coordinates determined in the step (B) are used.
  • step (D) the center coordinates common to the center coordinates determined in step (B) are used. Therefore, the process of determining a new center coordinate becomes unnecessary, and the processing load can be reduced.
  • the contribution calculated in the step (C) is preferably used.
  • the second background feature model is generated by weighting each background color distribution based on the weight value corresponding to the degree.
  • step (D) by weighting each background color distribution based on the weight value corresponding to the contribution calculated in step (C), A second background feature model is generated. Therefore, the background feature model can be optimized by weighting each background color distribution by reflecting the contribution, and as a result, the separation accuracy can be improved.
  • An image processing apparatus creates a foreground feature model in which a plurality of foreground color distributions are mixed based on an image in a designated area designated in the entire image.
  • a feature model creation unit a background feature model creation unit that creates a first background feature model mixed with a plurality of background color distributions based on an image outside the designated area, and each background color distribution,
  • a background calculation unit that generates a second background feature model by correcting each background color distribution by using a contribution calculation unit that calculates a contribution to the image in the designated area and a weight value corresponding to the contribution;
  • a feature model correction unit and an image separation unit that separates an image in the designated area into a foreground image and a background image based on the foreground feature model and the second background feature model.
  • the background feature model creation unit creates a first background feature model based on an image outside the designated area, and the contribution degree computation unit Regarding the color distribution, a contribution degree to the image in the designated area is calculated, and the background feature model correction unit corrects each background color distribution by using a weight value corresponding to the contribution degree, whereby the second background use Generate a feature model.
  • the first background feature model created based on the image outside the designated area is corrected to the second background feature model using the weight value corresponding to the contribution to the image inside the designated area. Therefore, even when the background color distribution differs greatly between the entire image and the designated area, it is possible to improve the separation accuracy between the foreground image and the background image in the designated area.
  • a program creates (A) a foreground feature model in which a plurality of foreground color distributions are mixed based on an image in a designated area designated in the entire image. (B) creating a first background feature model in which a plurality of background color distributions are mixed based on an image outside the designated area; and (C) a designated area for each background color distribution. (D) generating a second background feature model by correcting each background color distribution using a weight value corresponding to the contribution; E) A program for executing the step of separating the image in the designated area into a foreground image and a background image based on the foreground feature model and the second background feature model.
  • step (B) a first background feature model is created based on an image outside the designated area, and in step (C), for each background color distribution, The contribution to the image in the designated area is calculated, and in step (D), the second background feature model is generated by correcting each background color distribution using a weight value corresponding to the contribution. .
  • the first background feature model created based on the image outside the designated area is corrected to the second background feature model using the weight value corresponding to the contribution to the image inside the designated area. Therefore, even when the background color distribution differs greatly between the entire image and the designated area, it is possible to improve the separation accuracy between the foreground image and the background image in the designated area.
  • the present invention it is possible to improve the separation accuracy between the foreground image and the background image in the designated area even when the background color distribution differs greatly between the entire image and the designated area.
  • FIG. 2 is a diagram illustrating a configuration of a computer that implements the functions of an image processing apparatus. It is a figure which simplifies and shows an example of an input image. It is a flowchart which shows the flow of the process which an image processing apparatus performs. It is a flowchart which shows the 1st example of the calculation method of a contribution degree. It is a figure which shows one Gaussian distribution for backgrounds. It is a flowchart which shows the 2nd example of the calculation method of a contribution degree. It is a flowchart which shows the 3rd example of the calculation method of a contribution degree.
  • FIG. 1 is a diagram showing a configuration of an image processing apparatus 1 according to an embodiment of the present invention.
  • the image processing apparatus 1 includes a foreground Gaussian mixture model creation unit 2, a background Gaussian mixture model creation unit 3, a contribution calculation unit 4, a background Gaussian mixture model correction unit 5, and An image separation unit 6 is provided.
  • the image processing apparatus 1 is configured by hardware such as a dedicated LSI.
  • a still image taken by a digital camera or the like is input as input image data D1.
  • the image processing apparatus 1 separates the foreground image and the background image from the entire image by the graph cut, and outputs output image data D6 related to the foreground image.
  • FIG. 2 is a diagram illustrating the configuration of a computer that implements the functions of the image processing apparatus 1.
  • the CPU 11, RAM 12, and ROM 13 are connected to each other via the bus 10.
  • a program 14 is stored in the ROM 13.
  • the program 14 converts the computer into a foreground Gaussian mixture model creation unit 2, a background Gaussian mixture model creation unit 3, a contribution calculation unit 4, a background Gaussian mixture model correction unit 5, and an image separation unit 6. It is a program to make it function.
  • FIG. 3 is a diagram showing a simplified example of an input image.
  • the user designates a rectangular area 52 including an object 51 to be extracted as a foreground image in the entire image 50 by a mouse operation or the like.
  • the rectangular area 52 may be designated by automatic designation by pattern matching or the like instead of manual designation by the user.
  • FIG. 4 is a flowchart showing a flow of processing executed by the image processing apparatus 1.
  • the foreground Gaussian mixture model creation unit 2 creates a plurality of foreground Gaussian distributions having different color distributions based on the image in the rectangular area 52. Then, a foreground Gaussian mixture model is created by mixing these foreground Gaussian distributions and output as data D2.
  • the background Gaussian mixture model creation unit 3 creates a plurality of K (for example, 5) background Gaussian distributions having different color distributions based on images outside the rectangular area 52. Then, a background Gaussian mixture model is created by mixing these background Gaussian distributions and output as data D3.
  • the contribution degree calculation unit 4 calculates the contribution degree (details will be described later) to the image in the rectangular area 52 for each of the K background Gaussian distributions, and outputs it as data D4.
  • the background Gaussian mixture model correcting unit 5 generates a background Gaussian mixture model by correcting each background Gaussian distribution using a weight value corresponding to the degree of contribution, and outputs it as data D5. . That is, the background Gaussian mixture model correcting unit 5 assigns a high weight value to pixels belonging to the background Gaussian distribution having a high contribution, and assigns a low weight value to pixels belonging to the background Gaussian distribution having a low contribution. Based on the image outside the rectangular area 52, K background Gaussian distributions are recalculated. Then, a corrected background Gaussian mixture model is created by mixing the recalculated background Gaussian distribution and output as data D5. In addition, as a weight value according to the degree of contribution, an optimum value is obtained in advance by experiment, simulation, or the like.
  • step SP104 the image separation unit 6 converts the image in the rectangular area 52 into a foreground image and a background image by graph cutting based on the foreground Gaussian mixture model (data D2) and the background Gaussian mixture model (data D5). And output image data D6 related to the foreground image is output.
  • FIG. 5 is a flowchart showing a first example of a contribution degree calculation method.
  • the contribution calculation unit 4 selects one of the background gausses having the shortest distance L among the K background gaussian distributions obtained in step SP101 for each pixel included in the image in the rectangular area 52. Classify into distribution.
  • FIG. 6 is a diagram showing one background Gaussian distribution. The horizontal axis is the RGB color distribution, and the vertical axis is the pixel frequency.
  • the pixel frequency corresponding to the pixel value (RGB value) of a certain pixel is defined as the distance L, and the closer the pixel value is to the central coordinates of the Gaussian distribution (that is, the larger the value of the distance L), the more the pixel. And the distance from the Gaussian distribution is defined as “close”.
  • the contribution degree calculation unit 4 calculates the contribution degree as the order of the number of pixels classified into each background Gaussian distribution. That is, the background Gaussian distribution to which more pixels belong has a higher rank, and the background Gaussian distribution to which fewer pixels belong has a lower rank.
  • FIG. 7 is a flowchart showing a second example of the contribution calculation method.
  • the contribution calculation unit 4 selects one of the background gausses having the shortest distance L among the K background gaussian distributions obtained in step SP101 for each pixel included in the image in the rectangular area 52. Classify into distribution.
  • the contribution calculation unit 4 calculates the contribution as a ratio of the number of pixels classified into each background Gaussian distribution to the total number of pixels included in the image in the rectangular area 52. That is, the ratio increases as the background Gaussian distribution to which more pixels belong, and decreases as the background Gaussian distribution to which fewer pixels belong.
  • FIG. 8 is a flowchart showing a third example of the contribution calculation method.
  • the contribution calculation unit 4 calculates a distance L between each of the pixels included in the image in the rectangular area 52 and each of the K background Gaussian distributions.
  • step SP402 the contribution calculation unit 4 accumulates the distance between each pixel and each background Gaussian distribution calculated in step SP401 for each background Gaussian distribution for all pixels included in the image in the rectangular area 52. Thus, the cumulative distance for each of the K background Gaussian distributions is calculated.
  • the contribution calculation unit 4 calculates the contribution as the rank of the cumulative distance regarding each Gaussian distribution for background.
  • the background Gaussian distribution with a larger cumulative distance value has a higher rank
  • the background Gaussian distribution with a smaller cumulative distance value has a lower rank.
  • FIG. 9 is a flowchart showing a fourth example of the contribution calculation method.
  • the contribution calculation unit 4 calculates a distance L between each of the pixels included in the image in the rectangular area 52 and each of the K background Gaussian distributions.
  • step SP502 the contribution calculation unit 4 accumulates the distance between each pixel and each background Gaussian distribution calculated in step SP501 for each background Gaussian distribution for all pixels included in the image in the rectangular area 52. Thus, the cumulative distance for each of the K background Gaussian distributions is calculated.
  • the contribution calculation unit 4 calculates the contribution as a ratio of the cumulative distance related to each background Gaussian distribution to the sum of the cumulative distance related to all background Gaussian distributions. That is, the ratio increases as the background Gaussian distribution with a larger cumulative distance value, and the ratio decreases as the background Gaussian distribution with a smaller cumulative distance value.
  • FIG. 10 is a flowchart showing a fifth example of the contribution calculation method.
  • the contribution calculation unit 4 classifies each pixel included in the image in the rectangular area 52 as either an estimated foreground pixel or an estimated background pixel. For a certain pixel, a distance L1 between the foreground Gaussian distribution with the closest distance and a distance L2 with the background Gaussian distribution with the closest distance are obtained, and the two are compared. If the value of the distance L2 is larger than the value of the distance L1, the pixel is classified as an estimated background pixel. On the other hand, if the value of the distance L1 is larger than the value of the distance L2, the pixel is classified as an estimated foreground pixel.
  • step SP201 the contribution degree calculation unit 4 selects one of the background Gaussian distributions having the shortest distance L among the K background Gaussian distributions obtained in step SP101 for each pixel classified as the estimated background pixel. Classify into:
  • the contribution degree calculation unit 4 calculates the contribution degree as the order of the number of pixels classified into each background Gaussian distribution. That is, the background Gaussian distribution to which more pixels belong has a higher rank, and the background Gaussian distribution to which fewer pixels belong has a lower rank.
  • FIG. 11 is a flowchart showing a sixth example of the contribution calculation method.
  • the contribution calculation unit 4 classifies each pixel included in the image in the rectangular area 52 as either an estimated foreground pixel or an estimated background pixel.
  • step SP301 the contribution calculation unit 4 selects one of the background Gaussian distributions having the shortest distance L among the K background Gaussian distributions obtained in step SP101 for each pixel classified as the estimated background pixel. Classify into:
  • the contribution calculation unit 4 calculates the contribution as a ratio of the number of pixels classified into each background Gaussian distribution to the total number of pixels classified into the estimated background pixels. That is, the ratio increases as the background Gaussian distribution to which more pixels belong, and decreases as the background Gaussian distribution to which fewer pixels belong.
  • FIG. 12 is a flowchart showing a seventh example of the contribution calculation method.
  • the contribution calculation unit 4 classifies each pixel included in the image in the rectangular area 52 as either an estimated foreground pixel or an estimated background pixel.
  • step SP401 the contribution calculation unit 4 calculates a distance L from each of the K background Gaussian distributions for each pixel classified as the estimated background pixel.
  • step SP402 the contribution calculation unit 4 accumulates the distance between each pixel and each background Gaussian distribution calculated in step SP401 for each background Gaussian distribution for all pixels included in the image in the rectangular area 52. Thus, the cumulative distance for each of the K background Gaussian distributions is calculated.
  • the contribution calculation unit 4 calculates the contribution as the rank of the cumulative distance regarding each Gaussian distribution for background.
  • the background Gaussian distribution with a larger cumulative distance value has a higher rank
  • the background Gaussian distribution with a smaller cumulative distance value has a lower rank.
  • FIG. 13 is a flowchart showing an eighth example of the contribution degree calculation method.
  • the contribution calculation unit 4 classifies each pixel included in the image in the rectangular area 52 as either an estimated foreground pixel or an estimated background pixel.
  • step SP501 the contribution calculation unit 4 calculates a distance L from each of the K background Gaussian distributions for each pixel classified as the estimated background pixel.
  • step SP502 the contribution calculation unit 4 accumulates the distance between each pixel and each background Gaussian distribution calculated in step SP501 for each background Gaussian distribution for all pixels included in the image in the rectangular area 52. Thus, the cumulative distance for each of the K background Gaussian distributions is calculated.
  • the contribution calculation unit 4 calculates the contribution as a ratio of the cumulative distance related to each background Gaussian distribution to the sum of the cumulative distance related to all background Gaussian distributions. That is, the ratio increases as the background Gaussian distribution with a larger cumulative distance value, and the ratio decreases as the background Gaussian distribution with a smaller cumulative distance value.
  • FIG. 14 is a flowchart showing a first example of a model creation method (step SP103) by the background Gaussian mixture model correction unit 5.
  • the background Gaussian mixture model correcting unit 5 determines K central coordinates (initial values) by clustering based on an image outside the rectangular area 52.
  • the background Gaussian mixture model correcting unit 5 determines K new center coordinates based on the contribution calculated in step SP102. Specifically, for each pixel outside the rectangular area 52, a Gaussian distribution (hereinafter referred to as “most recent Gaussian distribution”) having the closest distance to the pixel among the K background Gaussian distributions created in step SP101 is used. , Identify each.
  • the pixel value (RGB value) of the pixel is weighted by a weight value corresponding to the contribution degree of the nearest Gaussian distribution of the pixel, and the weighted pixel value is used.
  • K new center coordinates are set by clustering such as K-means.
  • the intention is not to prohibit the center coordinates set in step SP101 from being adopted again in step SP601A.
  • the center coordinates are again set in step SP601A. Sometimes adopted.
  • the background Gaussian distribution with a low contribution calculated in step SP102 it is unlikely that the center coordinates are adopted again in step SP601A.
  • the background Gaussian mixture model correction unit 5 selects, for each pixel included in the image outside the rectangular area 52, any one of the K center coordinates that is closest in distance. Each pixel is classified into one of K pixel groups.
  • the background Gaussian mixture model correction unit 5 creates a background Gaussian distribution by calculating center coordinates and variances for each of the K pixel groups.
  • the background Gaussian mixture model correction unit 5 creates a background Gaussian mixture model in which K background Gaussian distributions are mixed by weighting each background Gaussian distribution created in step SP603. To do. At this time, the background Gaussian mixture model correcting unit 5 weights each background Gaussian distribution based on the contribution calculated in step SP102. Specifically, for each of the K background Gaussian distributions created in step SP603, the weight values of all the pixels belonging to the Gaussian distribution (the weight values according to the contribution degree of the most recent Gaussian distribution) are integrated. Thus, the weight integrated value is calculated. A background Gaussian mixture model is obtained by weighting each background Gaussian distribution based on the pixel frequency (or the ratio) of the pixels belonging to each background Gaussian distribution and the weight integrated value of each background Gaussian distribution. Create
  • a Gaussian mixture model may be created by an EM algorithm (EM: Expectation-Maximization) instead of the algorithm of steps SP602 to SP604.
  • EM Expectation-Maximization
  • FIG. 15 is a flowchart showing a second example of the model creation method (step SP103) by the background Gaussian mixture model correction unit 5.
  • the background Gaussian mixture model correction unit 5 determines K central coordinates.
  • the center coordinates of the K background Gaussian distributions used in creating the background Gaussian mixture model in step SP101 are also used as they are in step SP601B.
  • the background Gaussian mixture model correction unit 5 selects, for each pixel included in the image outside the rectangular area 52, any one of the K center coordinates that is closest in distance. Each pixel is classified into one of K pixel groups.
  • the background Gaussian mixture model correction unit 5 creates a background Gaussian distribution by calculating center coordinates and variances for each of the K pixel groups.
  • the background Gaussian mixture model correction unit 5 creates a background Gaussian mixture model in which K background Gaussian distributions are mixed by weighting each background Gaussian distribution created in step SP603. To do.
  • the background Gaussian mixture model correcting unit 5 determines each background based on the pixel frequency (or the ratio) of the pixels belonging to each background Gaussian distribution and the weight integrated value of each background Gaussian distribution.
  • a background Gaussian mixture model is created by weighting the Gaussian distribution.
  • a Gaussian mixture model may be created by an EM algorithm instead of the algorithm of steps SP602 to SP604.
  • the image separation related to the rectangular area 52 is executed only once, but may be executed repeatedly a plurality of times.
  • FIG. 16 is a diagram showing an output image when image separation is executed once for the rectangular area 52. An unnecessary background area 53 remains around the object 51.
  • the second image separation is executed by using the first output image including the object 51 and the remaining background region 53 instead of the entire rectangular area 52 as an input image. If the background area remains even after the second image separation, the third image separation is executed using the second output image as the input image. By repeating the image separation in this manner, the remaining background area gradually decreases, and finally only the object 51 can be appropriately extracted.
  • a background Gaussian mixture model (first background feature model) is generated based on an image outside the rectangular area 52.
  • the contribution to the image in the rectangular area 52 is calculated for each background Gaussian distribution.
  • the background Gaussian distribution is corrected using a weight value corresponding to the contribution.
  • a corrected background Gaussian mixture model (second background feature model) is generated.
  • the first background feature model created based on the image outside the rectangular area 52 uses the weight value corresponding to the contribution to the image in the rectangular area 52 to use the second background feature model. Therefore, even when the background color distribution is greatly different between the entire image and the rectangular area 52, it is possible to improve the separation accuracy between the foreground image and the background image in the rectangular area 52.
  • each pixel included in the image in the rectangular area 52 is a distance among a plurality of background Gaussian distributions. Are classified into one of the closest background Gaussian distributions. Therefore, classification can be performed easily.
  • the contribution is calculated as the rank of the number of pixels classified into each background Gaussian distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • each pixel included in the image in the rectangular area 52 is a distance among a plurality of background Gaussian distributions. Are classified into one of the closest background Gaussian distributions. Therefore, classification can be performed easily.
  • the contribution is calculated as the ratio of the number of pixels classified into each background Gaussian distribution to the total number of pixels included in the image in the rectangular area 52. Thus, by calculating the contribution as a ratio, it is possible to easily determine the weight value.
  • step SP401 the distance from each background Gaussian distribution is calculated for each pixel included in the image in the rectangular area 52.
  • the distance calculated in step SP401 is integrated for each background Gaussian distribution with respect to all the pixels included in the image in the rectangular area 52, whereby the cumulative distance relating to each background Gaussian distribution is calculated.
  • the contribution is calculated as the rank of the cumulative distance regarding each background Gaussian distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • step SP501 the distance from each background Gaussian distribution is calculated for each pixel included in the image in the rectangular area 52.
  • the distance calculated in step SP501 is integrated for each background Gaussian distribution for all the pixels included in the image in the rectangular area 52, whereby the cumulative distance for each background Gaussian distribution is calculated.
  • the background Gaussian that is not the closest distance but is useful is useful.
  • the influence of the distribution can be reflected in the second feature model for background after correction.
  • step SP503 the contribution is calculated as the ratio of the cumulative distances related to the background Gaussian distributions to the sum of the cumulative distances related to the Gaussian distributions for all the backgrounds.
  • each pixel included in the image in the rectangular area 52 is either an estimated foreground pixel or an estimated background pixel.
  • each pixel classified as the estimated background pixel is classified into one of the background Gaussian distributions having the shortest distance among the plurality of background Gaussian distributions. Therefore, it is possible to improve the separation accuracy by eliminating the influence of the estimated foreground pixels, and to easily perform classification.
  • the contribution is calculated as the rank of the number of pixels classified into each background Gaussian distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • each pixel included in the image in the rectangular area 52 is either an estimated foreground pixel or an estimated background pixel.
  • each pixel classified as the estimated background pixel is classified into one of the background Gaussian distributions having the shortest distance among the plurality of background Gaussian distributions. Therefore, it is possible to improve the separation accuracy by eliminating the influence of the estimated foreground pixels, and to easily perform classification.
  • the contribution is calculated as the ratio of the number of pixels classified into each background Gaussian distribution to the total number of pixels classified into the estimated background pixels. Thus, by calculating the contribution as a ratio, it is possible to easily determine the weight value.
  • each pixel included in the image in the rectangular area 52 is either an estimated foreground pixel or an estimated background pixel.
  • the distance from each background Gaussian distribution is calculated.
  • the distance calculated in step SP401 is classified as an estimated background pixel.
  • the background Gaussian distribution that is not the closest but useful is used.
  • the influence can be reflected in the second feature model for background after correction.
  • the contribution is calculated as the rank of the cumulative distance regarding each background Gaussian distribution. In this way, by calculating the contribution degree as a rank, it is possible to arbitrarily determine the weight value.
  • each pixel included in the image in the rectangular area 52 is either an estimated foreground pixel or an estimated background pixel.
  • step SP501 the distance from each background Gaussian distribution is calculated for each pixel classified as the estimated background pixel.
  • step SP502 the distance calculated in step SP501 is classified as the estimated background pixel.
  • the background Gaussian distribution that is not the closest but useful is used.
  • the influence can be reflected in the second feature model for background after correction.
  • the contribution is calculated as the ratio of the cumulative distances related to the background Gaussian distributions to the sum of the cumulative distances related to the Gaussian distributions for all the backgrounds.
  • step SP103 (SP601A)
  • a new value is created based on the weight value corresponding to the contribution calculated in step SP102.
  • the central coordinates are determined. Therefore, by setting a new center coordinate reflecting the degree of contribution, the background feature model can be optimized, and as a result, the separation accuracy can be improved.
  • step SP103 (SP601B)
  • the center coordinates common to the center coordinates determined in step SP101 are used. Therefore, the process of determining a new center coordinate becomes unnecessary, and the processing load can be reduced.
  • step SP ⁇ b> 103 (SP ⁇ b> 604), based on the weight value corresponding to the contribution calculated in step SP ⁇ b> 102.
  • the second background feature model is generated by weighting each background Gaussian distribution. Accordingly, the background feature model can be optimized by weighting each background Gaussian distribution by reflecting the contribution, and as a result, the separation accuracy can be improved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

画像全体と指定エリア内とで背景の色分布が大きく異なる場合であっても、指定エリア内における前景画像と背景画像との分離精度を向上することが可能な、画像処理方法を得る。第1のステップでは、矩形エリア(52)外の画像に基づいて、背景用ガウス混合モデルが作成され、第2のステップでは、各背景用ガウス分布に関して、矩形エリア(52)内の画像に対する寄与度が算出され、第3のステップでは、寄与度に応じた重み値を用いて各背景用ガウス分布を修正することにより、修正後の背景用ガウス混合モデルが生成される。

Description

画像処理方法、画像処理装置、及びプログラム
 本発明は、画像処理方法、画像処理装置、及びプログラムに関し、特に、画像全体から前景画像と背景画像とを分離する画像分離方法に関する。
 ディジタルカメラ等によって撮影された静止画像を対象として、グラフカットによって画像全体から前景画像と背景画像とを分離する画像分離方法が知られている(例えば下記特許文献1参照)。
 背景技術に係る画像分離方法によると、まず、画像全体の中で前景画像を含む矩形エリアが指定される。次に、矩形エリア内の画像に基づいて前景用のガウス混合分布が作成されるとともに、矩形エリア外の画像に基づいて背景用のガウス混合分布が作成される。次に、上記で作成した前景用及び背景用のガウス混合分布を用いたグラフカットによって、矩形エリア内の各画素が「前景」及び「背景」のいずれかに分類される。
特開2011-237907号公報
 上述した背景技術に係る画像分離方法によると、矩形エリア外の画像に基づいて作成された背景用のガウス混合分布を用いてグラフカットが行われる。
 例えば、人物が海と砂浜とをバックにし、顔が砂浜には重なっているが海には重なっていない構図のポートレート写真を想定する。この場合、背景用のガウス混合分布としては、砂浜の白と海の青とが大きな面積を占めるガウス混合分布が作成される。しかし、顔の周りに指定される矩形エリア内には海の青が含まれていないため、背景用のガウス混合分布のうち青成分に関するガウス分布は無駄となり、他の色成分に関する表現力が低下する。このように、背景技術に係る画像分離方法によると、画像全体と矩形エリア内とで背景の色分布が大きく異なる場合には、矩形エリア内での背景に関する表現力が低下し、その結果、前景画像と背景画像との分離精度が低下する。
 本発明はかかる問題を解決するために成されたものであり、画像全体と指定エリア内とで背景の色分布が大きく異なる場合であっても、指定エリア内における前景画像と背景画像との分離精度を向上することが可能な、画像処理方法、画像処理装置、及びプログラムを得ることを目的とする。
 本発明の第1の態様に係る画像処理方法は、(A)画像全体の中で指定された指定エリア内の画像に基づいて、複数の前景用色分布を混合した前景用特徴モデルを作成するステップと、(B)指定エリア外の画像に基づいて、複数の背景用色分布を混合した第1の背景用特徴モデルを作成するステップと、(C)各背景用色分布に関して、指定エリア内の画像に対する寄与度を算出するステップと、(D)寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルを生成するステップと、(E)前景用特徴モデルと第2の背景用特徴モデルとに基づいて、指定エリア内の画像を前景画像と背景画像とに分離するステップと、を備えることを特徴とするものである。
 第1の態様に係る画像処理方法によれば、ステップ(B)では、指定エリア外の画像に基づいて、第1の背景用特徴モデルが作成され、ステップ(C)では、各背景用色分布に関して、指定エリア内の画像に対する寄与度が算出され、ステップ(D)では、寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルが生成される。このように、指定エリア外の画像に基づいて作成された第1の背景用特徴モデルが、指定エリア内の画像に対する寄与度に応じた重み値を用いて、第2の背景用特徴モデルに修正されるため、画像全体と指定エリア内とで背景の色分布が大きく異なる場合であっても、指定エリア内における前景画像と背景画像との分離精度を向上することが可能となる。
 本発明の第2の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、(C-2)各背景用色分布に分類された画素数の順位として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第2の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素が、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類される。従って、簡易に分類を行うことが可能となる。また、ステップ(C-2)では、各背景用色分布に分類された画素数の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 本発明の第3の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、(C-2)指定エリア内の画像に含まれる総画素数に対する、各背景用色分布に分類された画素数の割合として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第3の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素が、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類される。従って、簡易に分類を行うことが可能となる。また、ステップ(C-2)では、指定エリア内の画像に含まれる総画素数に対する、各背景用色分布に分類された画素数の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 本発明の第4の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素に関して、各背景用色分布との距離を算出するステップと、(C-2)前記ステップ(C-1)で算出した距離を、指定エリア内の画像に含まれる全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、(C-3)各背景用色分布に関する累積距離の順位として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第4の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素に関して、各背景用色分布との距離が算出され、ステップ(C-2)では、ステップ(C-1)で算出した距離を、指定エリア内の画像に含まれる全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離が算出される。このように、距離が最も近い背景用色分布だけでなく、全ての背景用色分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用色分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップ(C-3)では、各背景用色分布に関する累積距離の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 本発明の第5の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素に関して、各背景用色分布との距離を算出するステップと、(C-2)前記ステップ(C-1)で算出した距離を、指定エリア内の画像に含まれる全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、(C-3)全背景用色分布に関する累積距離の総和に対する、各背景用色分布に関する累積距離の割合として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第5の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素に関して、各背景用色分布との距離が算出され、ステップ(C-2)では、ステップ(C-1)で算出した距離を、指定エリア内の画像に含まれる全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離が算出される。このように、距離が最も近い背景用色分布だけでなく、全ての背景用色分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用色分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップ(C-3)では、全背景用色分布に関する累積距離の総和に対する、各背景用色分布に関する累積距離の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 本発明の第6の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、(C-2)推定背景画素に分類された各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、(C-3)各背景用色分布に分類された画素数の順位として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第6の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップ(C-2)では、推定背景画素に分類された各画素が、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類される。従って、推定前景画素の影響を排除して分離精度を向上できるとともに、簡易に分類を行うことが可能となる。また、ステップ(C-3)では、各背景用色分布に分類された画素数の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 本発明の第7の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、(C-2)推定背景画素に分類された各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、(C-3)推定背景画素に分類された総画素数に対する、各背景用色分布に分類された画素数の割合として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第7の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップ(C-2)では、推定背景画素に分類された各画素が、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類される。従って、推定前景画素の影響を排除して分離精度を向上できるとともに、簡易に分類を行うことが可能となる。また、ステップ(C-3)では、推定背景画素に分類された総画素数に対する、各背景用色分布に分類された画素数の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 本発明の第8の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、(C-2)推定背景画素に分類された各画素に関して、各背景用色分布との距離を算出するステップと、(C-3)前記ステップ(C-2)で算出した距離を、推定背景画素に分類された全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、(C-4)各背景用色分布に関する累積距離の順位として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第8の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップ(C-2)では、推定背景画素に分類された各画素に関して、各背景用色分布との距離が算出され、ステップ(C-3)では、ステップ(C-2)で算出した距離を、推定背景画素に分類された全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離が算出される。従って、推定前景画素の影響を排除して分離精度を向上することが可能となる。また、距離が最も近い背景用色分布だけでなく、全ての背景用色分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用色分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップ(C-4)では、各背景用色分布に関する累積距離の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 本発明の第9の態様に係る画像処理方法は、第1の態様に係る画像処理方法において特に、前記ステップ(C)は、(C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、(C-2)推定背景画素に分類された各画素に関して、各背景用色分布との距離を算出するステップと、(C-3)前記ステップ(C-2)で算出した距離を、推定背景画素に分類された全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、(C-4)全背景用色分布に関する累積距離の総和に対する、各背景用色分布に関する累積距離の割合として、寄与度を算出するステップと、を含むことを特徴とするものである。
 第9の態様に係る画像処理方法によれば、ステップ(C-1)では、指定エリア内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップ(C-2)では、推定背景画素に分類された各画素に関して、各背景用色分布との距離が算出され、ステップ(C-3)では、ステップ(C-2)で算出した距離を、推定背景画素に分類された全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離が算出される。従って、推定前景画素の影響を排除して分離精度を向上することが可能となる。また、距離が最も近い背景用色分布だけでなく、全ての背景用色分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用色分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップ(C-4)では、全背景用色分布に関する累積距離の総和に対する、各背景用色分布に関する累積距離の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 本発明の第10の態様に係る画像処理方法は、第1~第9のいずれか一つの態様に係る画像処理方法において特に、前記ステップ(B)は、各背景用色分布の中心座標を決定するステップを含み、前記ステップ(D)では、前記ステップ(C)で算出された寄与度に応じた重み値に基づいて、新たな中心座標が決定されることを特徴とするものである。
 第10の態様に係る画像処理方法によれば、ステップ(D)では、ステップ(C)で算出された寄与度に応じた重み値に基づいて、新たな中心座標が決定される。従って、寄与度が反映された新たな中心座標が設定されることによって背景用特徴モデルの適正化を図ることができ、その結果、分離精度を向上することが可能となる。
 本発明の第11の態様に係る画像処理方法は、第1~第9のいずれか一つの態様に係る画像処理方法において特に、前記ステップ(B)は、各背景用色分布の中心座標を決定するステップを含み、前記ステップ(D)では、前記ステップ(B)で決定された中心座標と共通の中心座標が使用されることを特徴とするものである。
 第11の態様に係る画像処理方法によれば、ステップ(D)では、ステップ(B)で決定された中心座標と共通の中心座標が使用される。従って、新たな中心座標を決定する処理が不要となるため、処理負荷を軽減することが可能となる。
 本発明の第12の態様に係る画像処理方法は、第1~第11のいずれか一つの態様に係る画像処理方法において特に、前記ステップ(D)では、前記ステップ(C)で算出された寄与度に応じた重み値に基づいて、各背景用色分布の重み付けを行うことにより、第2の背景用特徴モデルが生成されることを特徴とするものである。
 第12の態様に係る画像処理方法によれば、ステップ(D)では、ステップ(C)で算出された寄与度に応じた重み値に基づいて、各背景用色分布の重み付けを行うことによって、第2の背景用特徴モデルが生成される。従って、寄与度を反映させて各背景用色分布の重み付けを行うことによって背景用特徴モデルの適正化を図ることができ、その結果、分離精度を向上することが可能となる。
 本発明の第13の態様に係る画像処理装置は、画像全体の中で指定された指定エリア内の画像に基づいて、複数の前景用色分布を混合した前景用特徴モデルを作成する、前景用特徴モデル作成部と、指定エリア外の画像に基づいて、複数の背景用色分布を混合した第1の背景用特徴モデルを作成する、背景用特徴モデル作成部と、各背景用色分布に関して、指定エリア内の画像に対する寄与度を算出する寄与度演算部と、寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルを生成する、背景用特徴モデル修正部と、前景用特徴モデルと第2の背景用特徴モデルとに基づいて、指定エリア内の画像を前景画像と背景画像とに分離する画像分離部と、を備えることを特徴とするものである。
 第13の態様に係る画像処理装置によれば、背景用特徴モデル作成部は、指定エリア外の画像に基づいて、第1の背景用特徴モデルを作成し、寄与度演算部は、各背景用色分布に関して、指定エリア内の画像に対する寄与度を算出し、背景用特徴モデル修正部は、寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルを生成する。このように、指定エリア外の画像に基づいて作成された第1の背景用特徴モデルが、指定エリア内の画像に対する寄与度に応じた重み値を用いて、第2の背景用特徴モデルに修正されるため、画像全体と指定エリア内とで背景の色分布が大きく異なる場合であっても、指定エリア内における前景画像と背景画像との分離精度を向上することが可能となる。
 本発明の第14の態様に係るプログラムは、コンピュータに、(A)画像全体の中で指定された指定エリア内の画像に基づいて、複数の前景用色分布を混合した前景用特徴モデルを作成するステップと、(B)指定エリア外の画像に基づいて、複数の背景用色分布を混合した第1の背景用特徴モデルを作成するステップと、(C)各背景用色分布に関して、指定エリア内の画像に対する寄与度を算出するステップと、(D)寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルを生成するステップと、(E)前景用特徴モデルと第2の背景用特徴モデルとに基づいて、指定エリア内の画像を前景画像と背景画像とに分離するステップと、を実行させるためのプログラムである。
 第14の態様に係るプログラムによれば、ステップ(B)では、指定エリア外の画像に基づいて、第1の背景用特徴モデルが作成され、ステップ(C)では、各背景用色分布に関して、指定エリア内の画像に対する寄与度が算出され、ステップ(D)では、寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルが生成される。このように、指定エリア外の画像に基づいて作成された第1の背景用特徴モデルが、指定エリア内の画像に対する寄与度に応じた重み値を用いて、第2の背景用特徴モデルに修正されるため、画像全体と指定エリア内とで背景の色分布が大きく異なる場合であっても、指定エリア内における前景画像と背景画像との分離精度を向上することが可能となる。
 本発明によれば、画像全体と指定エリア内とで背景の色分布が大きく異なる場合であっても、指定エリア内における前景画像と背景画像との分離精度を向上することが可能となる。
 この発明の目的、特徴、局面、および利点は、以下の詳細な説明と添付図面とによって、より明白となる。
本発明の実施の形態に係る画像処理装置の構成を示す図である。 画像処理装置の機能を実現するコンピュータの構成を示す図である。 入力画像の一例を簡略化して示す図である。 画像処理装置が実行する処理の流れを示すフローチャートである。 寄与度の算出手法の第1の例を示すフローチャートである。 一つの背景用ガウス分布を示す図である。 寄与度の算出手法の第2の例を示すフローチャートである。 寄与度の算出手法の第3の例を示すフローチャートである。 寄与度の算出手法の第4の例を示すフローチャートである。 寄与度の算出手法の第5の例を示すフローチャートである。 寄与度の算出手法の第6の例を示すフローチャートである。 寄与度の算出手法の第7の例を示すフローチャートである。 寄与度の算出手法の第8の例を示すフローチャートである。 背景用ガウス混合モデル修正部によるモデル作成手法の第1の例を示すフローチャートである。 背景用ガウス混合モデル修正部によるモデル作成手法の第2の例を示すフローチャートである。 矩形エリアに関して画像分離を1回実行した時点での出力画像を示す図である。
 以下、本発明の実施の形態について、図面を用いて詳細に説明する。なお、異なる図面において同一の符号を付した要素は、同一又は相応する要素を示すものとする。
 図1は、本発明の実施の形態に係る画像処理装置1の構成を示す図である。図1の接続関係で示すように、画像処理装置1は、前景用ガウス混合モデル作成部2、背景用ガウス混合モデル作成部3、寄与度演算部4、背景用ガウス混合モデル修正部5、及び画像分離部6を備えて構成されている。画像処理装置1は、専用LSI等のハードウェアによって構成されている。
 画像処理装置1には、ディジタルカメラ等によって撮影された静止画像が、入力画像データD1として入力される。画像処理装置1は、グラフカットによって画像全体から前景画像と背景画像とを分離し、前景画像に関する出力画像データD6を出力する。
 なお、画像処理装置1は、ソフトウェアによって実現されても良い。図2は、画像処理装置1の機能を実現するコンピュータの構成を示す図である。CPU11、RAM12、及びROM13が、バス10を介して相互に接続されている。ROM13内にはプログラム14が格納されている。CPU11がROM13からRAM12にプログラム14を読み出して実行することにより、CPU11は図1に示した画像処理装置1として動作する。換言すれば、プログラム14は、コンピュータを、前景用ガウス混合モデル作成部2、背景用ガウス混合モデル作成部3、寄与度演算部4、背景用ガウス混合モデル修正部5、及び画像分離部6として機能させるためのプログラムである。
 図3は、入力画像の一例を簡略化して示す図である。ユーザは、画像全体50のうち前景画像として抽出したいオブジェクト51を含む矩形エリア52を、マウス操作等によって指定する。但し、ユーザによる手動指定に代えて、パターンマッチング等による自動指定によって矩形エリア52の指定が行われても良い。
 図4は、画像処理装置1が実行する処理の流れを示すフローチャートである。まずステップSP101において前景用ガウス混合モデル作成部2は、矩形エリア52内の画像に基づいて、色分布が異なる複数の前景用ガウス分布を作成する。そして、それらの前景用ガウス分布を混合することによって前景用ガウス混合モデルを作成し、データD2として出力する。また、背景用ガウス混合モデル作成部3は、矩形エリア52外の画像に基づいて、色分布が異なる複数K個(例えば5個)の背景用ガウス分布を作成する。そして、それらの背景用ガウス分布を混合することによって背景用ガウス混合モデルを作成し、データD3として出力する。
 次にステップSP102において寄与度演算部4は、K個の背景用ガウス分布の各々に関して、矩形エリア52内の画像に対する寄与度(詳細は後述する)を算出し、データD4として出力する。
 次にステップSP103において背景用ガウス混合モデル修正部5は、寄与度に応じた重み値を用いて各背景用ガウス分布を修正することにより、背景用ガウス混合モデルを生成し、データD5として出力する。つまり、背景用ガウス混合モデル修正部5は、寄与度が高い背景用ガウス分布に属する画素には高い重み値を割り当て、寄与度が低い背景用ガウス分布に属する画素には低い重み値を割り当てて、矩形エリア52外の画像に基づいてK個の背景用ガウス分布を再計算する。そして、再計算した背景用ガウス分布を混合することによって修正後の背景用ガウス混合モデルを作成し、データD5として出力する。なお、寄与度に応じた重み値としては、実験やシミュレーション等によって最適値が予め求められている。
 次にステップSP104において画像分離部6は、前景用ガウス混合モデル(データD2)と背景用ガウス混合モデル(データD5)とに基づいて、グラフカットによって矩形エリア52内の画像を前景画像と背景画像とに分離し、前景画像に関する出力画像データD6を出力する。
 図5は、寄与度の算出手法の第1の例を示すフローチャートである。まずステップSP201において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素を、ステップSP101で求めたK個の背景用ガウス分布の中で距離Lが最も近いいずれかの背景用ガウス分布に分類する。図6は、一つの背景用ガウス分布を示す図である。横軸はRGBの色分布であり、縦軸は画素度数である。本明細書では、ある画素の画素値(RGB値)に対応する画素度数を距離Lと定義し、画素値がガウス分布の中心座標に近いほど(つまり距離Lの値が大きいほど)、その画素とそのガウス分布との距離は「近い」と定義する。
 次にステップSP202において寄与度演算部4は、各背景用ガウス分布に分類された画素数の順位として、寄与度を算出する。つまり、より多くの画素が属する背景用ガウス分布ほど順位は上位となり、より少ない画素が属する背景用ガウス分布ほど順位は下位となる。
 図7は、寄与度の算出手法の第2の例を示すフローチャートである。まずステップSP301において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素を、ステップSP101で求めたK個の背景用ガウス分布の中で距離Lが最も近いいずれかの背景用ガウス分布に分類する。
 次にステップSP302において寄与度演算部4は、矩形エリア52内の画像に含まれる総画素数に対する、各背景用ガウス分布に分類された画素数の割合として、寄与度を算出する。つまり、より多くの画素が属する背景用ガウス分布ほど割合は大きくなり、より少ない画素が属する背景用ガウス分布ほど割合は小さくなる。
 図8は、寄与度の算出手法の第3の例を示すフローチャートである。まずステップSP401において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素に関して、K個の背景用ガウス分布の各々との距離Lを算出する。
 次にステップSP402において寄与度演算部4は、ステップSP401で算出した各画素-各背景用ガウス分布間の距離を、矩形エリア52内の画像に含まれる全画素に関して背景用ガウス分布毎に積算することにより、K個の背景用ガウス分布の各々に関する累積距離を算出する。
 次にステップSP403において寄与度演算部4は、各背景用ガウス分布に関する累積距離の順位として、寄与度を算出する。つまり、累積距離の値が大きい背景用ガウス分布ほど順位は上位となり、累積距離の値が小さい背景用ガウス分布ほど順位は下位となる。
 図9は、寄与度の算出手法の第4の例を示すフローチャートである。まずステップSP501において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素に関して、K個の背景用ガウス分布の各々との距離Lを算出する。
 次にステップSP502において寄与度演算部4は、ステップSP501で算出した各画素-各背景用ガウス分布間の距離を、矩形エリア52内の画像に含まれる全画素に関して背景用ガウス分布毎に積算することにより、K個の背景用ガウス分布の各々に関する累積距離を算出する。
 次にステップSP503において寄与度演算部4は、全背景用ガウス分布に関する累積距離の総和に対する、各背景用ガウス分布に関する累積距離の割合として、寄与度を算出する。つまり、累積距離の値が大きい背景用ガウス分布ほど割合は大きくなり、累積距離の値が小さい背景用ガウス分布ほど割合は小さくなる。
 図10は、寄与度の算出手法の第5の例を示すフローチャートである。まずステップSP200において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類する。ある画素に関して、最も距離が近い前景用ガウス分布との間の距離L1と、最も距離が近い背景用ガウス分布との間の距離L2とを求め、両者を比較する。そして、距離L1の値よりも距離L2の値のほうが大きければ、その画素を推定背景画素に分類する。一方、距離L2の値よりも距離L1の値のほうが大きければ、その画素を推定前景画素に分類する。
 次にステップSP201において寄与度演算部4は、推定背景画素に分類された各画素を、ステップSP101で求めたK個の背景用ガウス分布の中で距離Lが最も近いいずれかの背景用ガウス分布に分類する。
 次にステップSP202において寄与度演算部4は、各背景用ガウス分布に分類された画素数の順位として、寄与度を算出する。つまり、より多くの画素が属する背景用ガウス分布ほど順位は上位となり、より少ない画素が属する背景用ガウス分布ほど順位は下位となる。
 図11は、寄与度の算出手法の第6の例を示すフローチャートである。まずステップSP300において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類する。
 次にステップSP301において寄与度演算部4は、推定背景画素に分類された各画素を、ステップSP101で求めたK個の背景用ガウス分布の中で距離Lが最も近いいずれかの背景用ガウス分布に分類する。
 次にステップSP302において寄与度演算部4は、推定背景画素に分類された総画素数に対する、各背景用ガウス分布に分類された画素数の割合として、寄与度を算出する。つまり、より多くの画素が属する背景用ガウス分布ほど割合は大きくなり、より少ない画素が属する背景用ガウス分布ほど割合は小さくなる。
 図12は、寄与度の算出手法の第7の例を示すフローチャートである。まずステップSP400において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類する。
 次にステップSP401において寄与度演算部4は、推定背景画素に分類された各画素に関して、K個の背景用ガウス分布の各々との距離Lを算出する。
 次にステップSP402において寄与度演算部4は、ステップSP401で算出した各画素-各背景用ガウス分布間の距離を、矩形エリア52内の画像に含まれる全画素に関して背景用ガウス分布毎に積算することにより、K個の背景用ガウス分布の各々に関する累積距離を算出する。
 次にステップSP403において寄与度演算部4は、各背景用ガウス分布に関する累積距離の順位として、寄与度を算出する。つまり、累積距離の値が大きい背景用ガウス分布ほど順位は上位となり、累積距離の値が小さい背景用ガウス分布ほど順位は下位となる。
 図13は、寄与度の算出手法の第8の例を示すフローチャートである。まずステップSP500において寄与度演算部4は、矩形エリア52内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類する。
 次にステップSP501において寄与度演算部4は、推定背景画素に分類された各画素に関して、K個の背景用ガウス分布の各々との距離Lを算出する。
 次にステップSP502において寄与度演算部4は、ステップSP501で算出した各画素-各背景用ガウス分布間の距離を、矩形エリア52内の画像に含まれる全画素に関して背景用ガウス分布毎に積算することにより、K個の背景用ガウス分布の各々に関する累積距離を算出する。
 次にステップSP503において寄与度演算部4は、全背景用ガウス分布に関する累積距離の総和に対する、各背景用ガウス分布に関する累積距離の割合として、寄与度を算出する。つまり、累積距離の値が大きい背景用ガウス分布ほど割合は大きくなり、累積距離の値が小さい背景用ガウス分布ほど割合は小さくなる。
 図14は、背景用ガウス混合モデル修正部5によるモデル作成手法(ステップSP103)の第1の例を示すフローチャートである。まずステップSP601Aにおいて背景用ガウス混合モデル修正部5は、矩形エリア52外の画像に基づいて、クラスタリングによってK個の中心座標(初期値)を決定する。このとき背景用ガウス混合モデル修正部5は、ステップSP102で算出した寄与度に基づいて、K個の新たな中心座標を決定する。具体的には、矩形エリア52外の各画素について、ステップSP101で作成したK個の背景用ガウス分布のうち、その画素との距離が最も近いガウス分布(以下「最近ガウス分布」と称す)を、それぞれ特定する。そして、矩形エリア52外の各画素について、その画素の最近ガウス分布の寄与度に応じた重み値によってその画素の画素値(RGB値)を重み付け、重み付けがなされた後の画素値を用いて、K-means等のクラスタリングによってK個の新たな中心座標を設定する。但し、ステップSP101で設定された中心座標がステップSP601Aで再び採用されることを禁止する意図ではなく、ステップSP102で算出した寄与度が高い背景用ガウス分布に関しては、その中心座標がステップSP601Aにおいて再び採用されることもある。一方、ステップSP102で算出した寄与度が低い背景用ガウス分布に関しては、その中心座標がステップSP601Aにおいて再び採用される可能性は低い。
 次にステップSP602において背景用ガウス混合モデル修正部5は、矩形エリア52外の画像に含まれる各画素に関して、K個の中心座標の中で最も距離が近いいずれかの中心座標を選択することにより、各画素をK個の画素群のいずれかに分類する。
 次にステップSP603において背景用ガウス混合モデル修正部5は、K個の画素群の各々に関して、中心座標及び分散を算出することによって背景用ガウス分布を作成する。
 次にステップSP604において背景用ガウス混合モデル修正部5は、ステップSP603で作成した各背景用ガウス分布の重み付けを行うことにより、K個の背景用ガウス分布が混合された背景用ガウス混合モデルを作成する。このとき背景用ガウス混合モデル修正部5は、ステップSP102で算出した寄与度に基づいて、各背景用ガウス分布の重み付けを行う。具体的には、ステップSP603で作成したK個の背景用ガウス分布の各々について、そのガウス分布内に属する全ての画素の重み値(最近ガウス分布の寄与度に応じた上記重み値)を積算することによって、重み積算値を算出する。そして、各背景用ガウス分布に属する画素の画素度数(又はその割合)と、各背景用ガウス分布の重み積算値とに基づいて各背景用ガウス分布の重み付けを行うことにより、背景用ガウス混合モデルを作成する。
 なお、ステップSP602~SP604のアルゴリズムに代えて、EMアルゴリズム(EM:Expectation-Maximization)によってガウス混合モデルを作成しても良い。
 図15は、背景用ガウス混合モデル修正部5によるモデル作成手法(ステップSP103)の第2の例を示すフローチャートである。まずステップSP601Bにおいて背景用ガウス混合モデル修正部5は、K個の中心座標を決定する。このとき、中心座標としては、ステップSP101において背景用ガウス混合モデルを作成する際に使用したK個の背景用ガウス分布の中心座標を、ステップSP601Bでもそのまま使用する。
 次にステップSP602において背景用ガウス混合モデル修正部5は、矩形エリア52外の画像に含まれる各画素に関して、K個の中心座標の中で最も距離が近いいずれかの中心座標を選択することにより、各画素をK個の画素群のいずれかに分類する。
 次にステップSP603において背景用ガウス混合モデル修正部5は、K個の画素群の各々に関して、中心座標及び分散を算出することによって背景用ガウス分布を作成する。
 次にステップSP604において背景用ガウス混合モデル修正部5は、ステップSP603で作成した各背景用ガウス分布の重み付けを行うことにより、K個の背景用ガウス分布が混合された背景用ガウス混合モデルを作成する。このとき、上記と同様に背景用ガウス混合モデル修正部5は、各背景用ガウス分布に属する画素の画素度数(又はその割合)と、各背景用ガウス分布の重み積算値とに基づいて各背景用ガウス分布の重み付けを行うことにより、背景用ガウス混合モデルを作成する。
 なお、ステップSP602~SP604のアルゴリズムに代えて、EMアルゴリズムによってガウス混合モデルを作成しても良い。
 <変形例>
 上記実施の形態では矩形エリア52に関する画像分離を1回のみ実行したが、複数回繰り返して実行しても良い。
 図16は、矩形エリア52に関して画像分離を1回実行した時点での出力画像を示す図である。オブジェクト51の周囲に不要な背景領域53が残っている。
 そこで、矩形エリア52全体ではなく、オブジェクト51と残余の背景領域53とを含む1回目の出力画像を入力画像として用いて、2回目の画像分離を実行する。2回目の画像分離でも背景領域が残っている場合には、2回目の出力画像を入力画像として用いて3回目の画像分離を実行する。このように画像分離を繰り返すことにより、残余の背景領域が次第に減少し、最終的にはオブジェクト51のみを適切に抽出することができる。
 <まとめ>
 本実施の形態に係る画像処理方法によれば、図4に示したように、ステップSP101では、矩形エリア52外の画像に基づいて、背景用ガウス混合モデル(第1の背景用特徴モデル)が作成され、ステップSP102では、各背景用ガウス分布に関して、矩形エリア52内の画像に対する寄与度が算出され、ステップSP103では、寄与度に応じた重み値を用いて各背景用ガウス分布を修正することにより、修正後の背景用ガウス混合モデル(第2の背景用特徴モデル)が生成される。このように、矩形エリア52外の画像に基づいて作成された第1の背景用特徴モデルが、矩形エリア52内の画像に対する寄与度に応じた重み値を用いて、第2の背景用特徴モデルに修正されるため、画像全体と矩形エリア52内とで背景の色分布が大きく異なる場合であっても、矩形エリア52内における前景画像と背景画像との分離精度を向上することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図5に示したように、ステップSP201では、矩形エリア52内の画像に含まれる各画素が、複数の背景用ガウス分布の中で距離が最も近いいずれかの背景用ガウス分布に分類される。従って、簡易に分類を行うことが可能となる。また、ステップSP202では、各背景用ガウス分布に分類された画素数の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図7に示したように、ステップSP301では、矩形エリア52内の画像に含まれる各画素が、複数の背景用ガウス分布の中で距離が最も近いいずれかの背景用ガウス分布に分類される。従って、簡易に分類を行うことが可能となる。また、ステップSP302では、矩形エリア52内の画像に含まれる総画素数に対する、各背景用ガウス分布に分類された画素数の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図8に示したように、ステップSP401では、矩形エリア52内の画像に含まれる各画素に関して、各背景用ガウス分布との距離が算出され、ステップSP402では、ステップSP401で算出した距離を、矩形エリア52内の画像に含まれる全画素に関して背景用ガウス分布毎に積算することにより、各背景用ガウス分布に関する累積距離が算出される。このように、距離が最も近い背景用ガウス分布だけでなく、全ての背景用ガウス分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用ガウス分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップSP403では、各背景用ガウス分布に関する累積距離の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図9に示したように、ステップSP501では、矩形エリア52内の画像に含まれる各画素に関して、各背景用ガウス分布との距離が算出され、ステップSP502では、ステップSP501で算出した距離を、矩形エリア52内の画像に含まれる全画素に関して背景用ガウス分布毎に積算することにより、各背景用ガウス分布に関する累積距離が算出される。このように、距離が最も近い背景用ガウス分布だけでなく、全ての背景用ガウス分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用ガウス分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップSP503では、全背景用ガウス分布に関する累積距離の総和に対する、各背景用ガウス分布に関する累積距離の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図10に示したように、ステップSP200では、矩形エリア52内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップSP201では、推定背景画素に分類された各画素が、複数の背景用ガウス分布の中で距離が最も近いいずれかの背景用ガウス分布に分類される。従って、推定前景画素の影響を排除して分離精度を向上できるとともに、簡易に分類を行うことが可能となる。また、ステップSP202では、各背景用ガウス分布に分類された画素数の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図11に示したように、ステップSP300では、矩形エリア52内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップSP301では、推定背景画素に分類された各画素が、複数の背景用ガウス分布の中で距離が最も近いいずれかの背景用ガウス分布に分類される。従って、推定前景画素の影響を排除して分離精度を向上できるとともに、簡易に分類を行うことが可能となる。また、ステップSP302では、推定背景画素に分類された総画素数に対する、各背景用ガウス分布に分類された画素数の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図12に示したように、ステップSP400では、矩形エリア52内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップSP401では、推定背景画素に分類された各画素に関して、各背景用ガウス分布との距離が算出され、ステップSP402では、ステップSP401で算出した距離を、推定背景画素に分類された全画素に関して背景用ガウス分布毎に積算することにより、各背景用ガウス分布に関する累積距離が算出される。従って、推定前景画素の影響を排除して分離精度を向上することが可能となる。また、距離が最も近い背景用ガウス分布だけでなく、全ての背景用ガウス分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用ガウス分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップSP403では、各背景用ガウス分布に関する累積距離の順位として、寄与度が算出される。このように、順位として寄与度を算出することにより、重み値を恣意的に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図13に示したように、ステップSP500では、矩形エリア52内の画像に含まれる各画素が、推定前景画素及び推定背景画素のいずれかに分類され、ステップSP501では、推定背景画素に分類された各画素に関して、各背景用ガウス分布との距離が算出され、ステップSP502では、ステップSP501で算出した距離を、推定背景画素に分類された全画素に関して背景用ガウス分布毎に積算することにより、各背景用ガウス分布に関する累積距離が算出される。従って、推定前景画素の影響を排除して分離精度を向上することが可能となる。また、距離が最も近い背景用ガウス分布だけでなく、全ての背景用ガウス分布との距離に基づいて寄与度を算出することにより、距離が最も近いわけではないが有用である背景用ガウス分布の影響を、修正後の第2の背景用特徴モデルに反映させることが可能となる。また、ステップSP503では、全背景用ガウス分布に関する累積距離の総和に対する、各背景用ガウス分布に関する累積距離の割合として、寄与度が算出される。このように、割合として寄与度を算出することにより、重み値を簡易に決定することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図4,14に示したように、ステップSP103(SP601A)では、ステップSP102で算出された寄与度に応じた重み値に基づいて、新たな中心座標が決定される。従って、寄与度が反映された新たな中心座標が設定されることによって背景用特徴モデルの適正化を図ることができ、その結果、分離精度を向上することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図4,15に示したように、ステップSP103(SP601B)では、ステップSP101で決定された中心座標と共通の中心座標が使用される。従って、新たな中心座標を決定する処理が不要となるため、処理負荷を軽減することが可能となる。
 また、本実施の形態に係る画像処理方法によれば、図4,14,15に示したように、ステップSP103(SP604)では、ステップSP102で算出された寄与度に応じた重み値に基づいて、各背景用ガウス分布の重み付けを行うことによって、第2の背景用特徴モデルが生成される。従って、寄与度を反映させて各背景用ガウス分布の重み付けを行うことによって背景用特徴モデルの適正化を図ることができ、その結果、分離精度を向上することが可能となる。
 この発明は詳細に説明されたが、上記した説明は、すべての局面において、例示的であって、この発明がそれに限定されるものではない。例示されていない無数の変形例が、この発明の範囲から外れることなく想定され得るものと解される。
 1 画像処理装置
 2 前景用ガウス混合モデル作成部
 3 背景用ガウス混合モデル作成部
 4 寄与度演算部
 5 背景用ガウス混合モデル修正部
 6 画像分離部
 14 プログラム
 
 

Claims (14)

  1.  (A)画像全体の中で指定された指定エリア内の画像に基づいて、複数の前景用色分布を混合した前景用特徴モデルを作成するステップと、
     (B)指定エリア外の画像に基づいて、複数の背景用色分布を混合した第1の背景用特徴モデルを作成するステップと、
     (C)各背景用色分布に関して、指定エリア内の画像に対する寄与度を算出するステップと、
     (D)寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルを生成するステップと、
     (E)前景用特徴モデルと第2の背景用特徴モデルとに基づいて、指定エリア内の画像を前景画像と背景画像とに分離するステップと、
    を備える、画像処理方法。
  2.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、
     (C-2)各背景用色分布に分類された画素数の順位として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  3.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、
     (C-2)指定エリア内の画像に含まれる総画素数に対する、各背景用色分布に分類された画素数の割合として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  4.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素に関して、各背景用色分布との距離を算出するステップと、
     (C-2)前記ステップ(C-1)で算出した距離を、指定エリア内の画像に含まれる全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、
     (C-3)各背景用色分布に関する累積距離の順位として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  5.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素に関して、各背景用色分布との距離を算出するステップと、
     (C-2)前記ステップ(C-1)で算出した距離を、指定エリア内の画像に含まれる全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、
     (C-3)全背景用色分布に関する累積距離の総和に対する、各背景用色分布に関する累積距離の割合として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  6.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、
     (C-2)推定背景画素に分類された各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、
     (C-3)各背景用色分布に分類された画素数の順位として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  7.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、
     (C-2)推定背景画素に分類された各画素を、複数の背景用色分布の中で距離が最も近いいずれかの背景用色分布に分類するステップと、
     (C-3)推定背景画素に分類された総画素数に対する、各背景用色分布に分類された画素数の割合として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  8.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、
     (C-2)推定背景画素に分類された各画素に関して、各背景用色分布との距離を算出するステップと、
     (C-3)前記ステップ(C-2)で算出した距離を、推定背景画素に分類された全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、
     (C-4)各背景用色分布に関する累積距離の順位として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  9.  前記ステップ(C)は、
     (C-1)指定エリア内の画像に含まれる各画素を、推定前景画素及び推定背景画素のいずれかに分類するステップと、
     (C-2)推定背景画素に分類された各画素に関して、各背景用色分布との距離を算出するステップと、
     (C-3)前記ステップ(C-2)で算出した距離を、推定背景画素に分類された全画素に関して背景用色分布毎に積算することにより、各背景用色分布に関する累積距離を算出するステップと、
     (C-4)全背景用色分布に関する累積距離の総和に対する、各背景用色分布に関する累積距離の割合として、寄与度を算出するステップと、
    を含む、請求項1に記載の画像処理方法。
  10.  前記ステップ(B)は、各背景用色分布の中心座標を決定するステップを含み、
     前記ステップ(D)では、前記ステップ(C)で算出された寄与度に応じた重み値に基づいて、新たな中心座標が決定される、請求項1に記載の画像処理方法。
  11.  前記ステップ(B)は、各背景用色分布の中心座標を決定するステップを含み、
     前記ステップ(D)では、前記ステップ(B)で決定された中心座標と共通の中心座標が使用される、請求項1に記載の画像処理方法。
  12.  前記ステップ(D)では、前記ステップ(C)で算出された寄与度に応じた重み値に基づいて、各背景用色分布の重み付けを行うことにより、第2の背景用特徴モデルが生成される、請求項1に記載の画像処理方法。
  13.  画像全体の中で指定された指定エリア内の画像に基づいて、複数の前景用色分布を混合した前景用特徴モデルを作成する、前景用特徴モデル作成部と、
     指定エリア外の画像に基づいて、複数の背景用色分布を混合した第1の背景用特徴モデルを作成する、背景用特徴モデル作成部と、
     各背景用色分布に関して、指定エリア内の画像に対する寄与度を算出する寄与度演算部と、
     寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルを生成する、背景用特徴モデル修正部と、
     前景用特徴モデルと第2の背景用特徴モデルとに基づいて、指定エリア内の画像を前景画像と背景画像とに分離する画像分離部と、
    を備える、画像処理装置。
  14.  コンピュータに、
     (A)画像全体の中で指定された指定エリア内の画像に基づいて、複数の前景用色分布を混合した前景用特徴モデルを作成するステップと、
     (B)指定エリア外の画像に基づいて、複数の背景用色分布を混合した第1の背景用特徴モデルを作成するステップと、
     (C)各背景用色分布に関して、指定エリア内の画像に対する寄与度を算出するステップと、
     (D)寄与度に応じた重み値を用いて各背景用色分布を修正することにより、第2の背景用特徴モデルを生成するステップと、
     (E)前景用特徴モデルと第2の背景用特徴モデルとに基づいて、指定エリア内の画像を前景画像と背景画像とに分離するステップと、
    を実行させるためのプログラム。
     
     
PCT/JP2015/057060 2014-03-12 2015-03-10 画像処理方法、画像処理装置、及びプログラム WO2015137358A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2014049508A JP6334967B2 (ja) 2014-03-12 2014-03-12 画像処理方法、画像処理装置、及びプログラム
JP2014-049508 2014-03-12

Publications (1)

Publication Number Publication Date
WO2015137358A1 true WO2015137358A1 (ja) 2015-09-17

Family

ID=54071801

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/057060 WO2015137358A1 (ja) 2014-03-12 2015-03-10 画像処理方法、画像処理装置、及びプログラム

Country Status (2)

Country Link
JP (1) JP6334967B2 (ja)
WO (1) WO2015137358A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206400A1 (zh) * 2016-05-30 2017-12-07 乐视控股(北京)有限公司 图像处理方法、装置及电子设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017126304A (ja) * 2016-01-15 2017-07-20 富士ゼロックス株式会社 画像処理装置、画像処理方法、画像処理システムおよびプログラム
CN109739220A (zh) * 2018-12-06 2019-05-10 珠海格力电器股份有限公司 一种定位控制方法、装置、存储介质及机器人

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014016885A (ja) * 2012-07-10 2014-01-30 Secom Co Ltd 領域分割装置
JP2014016676A (ja) * 2012-07-05 2014-01-30 Casio Comput Co Ltd 画像領域分割装置、方法、およびプログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014016676A (ja) * 2012-07-05 2014-01-30 Casio Comput Co Ltd 画像領域分割装置、方法、およびプログラム
JP2014016885A (ja) * 2012-07-10 2014-01-30 Secom Co Ltd 領域分割装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ROTHER, C. ET AL.: "GrabCut", INTERACTIVE FOREGROUND EXTRACTION USING ITERATED GRAPH CUTS, ACM TRANSACTIONS ON GRAPHICS (TOG) - PROCEEDINGS OF ACM SIGGRAPH 2004, vol. 23, no. Issue 3, August 2004 (2004-08-01), pages 309 - 314, XP002340109, [retrieved on 20150327], DOI: doi:10.1145/1015706.1015720 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206400A1 (zh) * 2016-05-30 2017-12-07 乐视控股(北京)有限公司 图像处理方法、装置及电子设备

Also Published As

Publication number Publication date
JP2015176163A (ja) 2015-10-05
JP6334967B2 (ja) 2018-05-30

Similar Documents

Publication Publication Date Title
US10186023B2 (en) Unified multi-image fusion approach
CN109191395B (zh) 图像对比度增强方法、装置、设备及存储介质
JP5253835B2 (ja) 画像生成装置、画像生成方法及びコンピュータプログラム
US8457398B2 (en) Image enhancement method and apparatuses utilizing the same
US11615515B2 (en) Superpixel merging
JP6663285B2 (ja) 画像生成方法及び画像生成システム
US9443287B2 (en) Image processing method and apparatus using trained dictionary
JP6818463B2 (ja) 画像処理装置、画像処理方法及びプログラム
WO2015137358A1 (ja) 画像処理方法、画像処理装置、及びプログラム
JP6489761B2 (ja) 画像処理装置及び画像処理方法、プログラム
JP2015232869A (ja) 画像処理装置、画像処理方法及び画像処理プログラム
CN102446347B (zh) 图像白平衡方法和装置
US20170061664A1 (en) Method for generating image and image generation system
JP6548907B2 (ja) 画像処理装置、画像処理方法、及びプログラム
JP2017524404A5 (ja)
CN112837230B (zh) 图像处理装置、图像处理方法和计算机可读介质
JP6486082B2 (ja) 画像処理装置及び画像処理方法、プログラム
WO2021085523A1 (ja) ニューラルネットワーク、演算方法及びプログラム
KR101761641B1 (ko) 엣지 라인을 검출하여 분할선을 획득하는 장치 및 방법
CN102938139B (zh) 一种找茬游戏图像自动合成方法
JP6808575B2 (ja) 配色変換方法、配色変換装置及びプログラム
JP2016024499A (ja) 画像処理装置、画像処理方法、及びプログラム
JP6375778B2 (ja) 画像処理方法および画像処理装置
WO2024057543A1 (ja) 画像データ生成装置、画像データ生成方法、および、画像データ生成プログラム
JP2017183860A (ja) 画像処理装置および画像処理方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15760829

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15760829

Country of ref document: EP

Kind code of ref document: A1