WO2013125239A1 - 画像処理装置、撮像装置及び画像処理プログラム - Google Patents

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

Info

Publication number
WO2013125239A1
WO2013125239A1 PCT/JP2013/001018 JP2013001018W WO2013125239A1 WO 2013125239 A1 WO2013125239 A1 WO 2013125239A1 JP 2013001018 W JP2013001018 W JP 2013001018W WO 2013125239 A1 WO2013125239 A1 WO 2013125239A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
nodes
parameter
image processing
spanning tree
Prior art date
Application number
PCT/JP2013/001018
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 WO2013125239A1 publication Critical patent/WO2013125239A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/2224Studio circuitry; Studio devices; Studio equipment related to virtual studio applications
    • H04N5/2226Determination of depth image, e.g. for foreground/background separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/162Segmentation; Edge detection involving graph-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/174Segmentation; Edge detection involving the use of two or more images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • 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/20072Graph-based image processing

Definitions

  • the present invention relates to an image processing device, an imaging device, and an image processing program.
  • the object Motion information can be taken into account, leading to improved accuracy of scene recognition.
  • a part of the moving object may be hidden by the other object and divided into a plurality of areas.
  • the area is divided for each frame image of the moving image, there is a problem that the movement information of the object cannot be accurately obtained because the divided area may be different for each frame image.
  • the image processing apparatus of the present invention arranges pixels included in a plurality of frame images constituting a moving image as nodes in a three-dimensional space consisting of a spatial direction and a temporal direction, Graph generating means for generating a three-dimensional graph in which a difference value between two adjacent pixels in a spatial direction or at least one direction of the time direction is set as a weight between adjacent nodes; and in the three-dimensional graph, the space Whether the nodes having the minimum weight are connected using the weight between the nodes and the evaluation parameter that are the minimum among the weights between the nodes adjacent in the direction or at least one of the time directions.
  • a minimum spanning tree generation means for obtaining a minimum spanning tree in the three-dimensional graph by repeatedly executing a process for evaluating whether or not in the spatial direction;
  • the first parameter or the second parameter, the second parameter having a value different from the first parameter and set in the time direction.
  • Parameter setting means for setting any one of the above as an evaluation parameter.
  • an imaging apparatus includes an imaging optical system that includes an aperture that adjusts the luminous flux of subject light, an imaging element that acquires an image by receiving subject light captured by the imaging optical system, and the above-described imaging device. And an image processing apparatus.
  • the image processing apparatus of the present invention includes a dividing unit that divides each of a plurality of images captured in time series into a plurality of regions based on a difference value between two adjacent pixels, and the plurality of images. Evaluation means for evaluating whether or not the area including each pixel is the same area, based on a difference value between pixels arranged at corresponding positions in two images that are temporally before and after , Provided.
  • the image processing program of the present invention arranges pixels included in a plurality of frame images constituting a moving image as nodes in a three-dimensional space composed of a spatial direction and a temporal direction, respectively, and the spatial direction or temporal direction
  • the process of repeatedly evaluating whether or not to link the nodes having the smallest weight is performed using the weight between the nodes having the smallest weight and the evaluation parameter among the weights between the adjacent nodes in FIG.
  • a minimum spanning tree generation step for obtaining a minimum spanning tree in the three-dimensional graph, and a setting for the spatial direction.
  • the image processing program of the present invention includes a dividing step of dividing each image of a plurality of images captured in time series into a plurality of regions based on a difference value between two adjacent pixels, and the plurality of images.
  • FIG. 5A shows an example of a still image with a person as a subject
  • FIG. 5B shows an example of a luminance value of each pixel in FIG.
  • FIG. 5B shows an example of a luminance value of each pixel in FIG.
  • FIG. 5B shows an example of a luminance value of each pixel in FIG.
  • FIG. 5 (b) shows an example of the minimum spanning tree using the weighted graph of FIG.
  • FIG. 1 is a functional block diagram showing the configuration of an image processing apparatus using the present invention.
  • the image processing apparatus 10 includes a color space conversion unit 11, a resolution conversion unit 12, a graph generation unit 13, a minimum spanning tree generation unit 14, a parameter setting unit 15, and a region division unit 16.
  • the color space conversion unit 11 converts the color space of the input image data from the RGB color space to the YCbCr color space.
  • the resolution conversion unit 12 converts the resolution of the image data converted into the YCbCr color space.
  • the resolution of the image data is converted to, for example, 640 ⁇ 480 pixels by the resolution conversion processing by the resolution conversion unit 12.
  • the resolution of the image data subjected to the resolution conversion process is 640 ⁇ 480 pixels, the resolution is not limited to this and may be set as appropriate.
  • the graph generation unit 13 generates a weighted graph using each pixel of the image based on the image data as a node (vertex) and an edge between adjacent pixels (side) using the image data subjected to the resolution conversion process. .
  • the graph generation unit 13 calculates a difference between pixel values of adjacent pixels as an edge weight between the pixels.
  • a pixel value of a pixel a luminance value, each gradation value of R, G, B, etc. are mentioned, for example.
  • a luminance value will be described as an example of the pixel value of a pixel.
  • the graph generation unit 13 generates a two-dimensional weighted graph when the input image data is still image data.
  • FIG. 2 is an example of a weighted graph generated based on still image data.
  • N (1,1) to N (6,5) indicate nodes, and symbol e indicates an edge.
  • the X direction and the Y direction in FIG. 2 are the spatial directions.
  • the graph generation unit 13 regards each frame image of the moving image based on the input moving image data as a plurality of still images arranged in the time direction.
  • the graph generation unit 13 uses each pixel of each frame image regarded as a plurality of still images as a node, and is located at the same position (coordinates) between adjacent pixels in the frame image and in two frame images that are temporally related.
  • a three-dimensional weighted graph with an edge between pixels is generated.
  • FIG. 3 is an example of a weighted graph generated based on moving image data.
  • the X direction and the Y direction are spatial directions
  • the Z direction is a time direction.
  • N (1,1,1) to N (6,5,1) are nodes obtained from the frame image FR1
  • N (1,1,2) to N (6,5,2) are frames.
  • the nodes N (1, 1, 3) to N (6, 5, 3) obtained from the image FR2 are nodes obtained from the frame image FR3.
  • the edge between the nodes is indicated by a symbol e.
  • symbols for some of the nodes and symbols for the edges are omitted.
  • the minimum spanning tree generation unit 14 generates a minimum spanning tree using the weighted graph generated by the graph generation unit 13.
  • a method for generating this minimum spanning tree for example, the method of “Efficient Graph-Based Image Segmentation” P. Felzenszwalb, D. Huttenlocher (2004), International Journal of Computer Vision, 59 167-181 can be cited. This method is executed using, for example, the Kruskal method.
  • the above-described method selects one weight w (e) that is the minimum among the weights w (e) of each edge of the weighted graph G (V, E), and includes each of two nodes that connect the edges. Determine whether to combine components.
  • This determination is executed by evaluating a segmentation standard D (C 1 , C 2 ) described later. This determination is repeatedly performed for all edge weights w (e) in descending order of edge weights w (e). After this processing, it is determined whether or not there is an edge whose minimum spanning tree in the component is a closed path. By determining whether or not to combine the components including each of the two nodes connected by the edges described above, a minute component having a certain size or less is combined with another component.
  • the Kruskal method is used as a method for obtaining the minimum spanning tree of the weighted graph, it is not necessary to be limited to this, and other methods such as a prim method can also be used.
  • v ⁇ V is a node of a weighted graph corresponding to each pixel
  • e ⁇ E is an edge between nodes defined for adjacent pixels.
  • MST (C, E) indicates an edge in the minimum spanning tree in the region C.
  • the segmentation standard D (C 1 , C 2 ) between the two regions C 1 and C 2 is defined by the following [Equation 3] and [Equation 4].
  • ⁇ (C) is a coefficient
  • the coefficient ⁇ (C) is a value set by the parameter setting unit 15.
  • the coefficient ⁇ (C) increases as the component area decreases. That is, the smaller the region C, the larger the value of MInt (C 1 , C 2 ). As a result, the segmentation criterion D becomes “false”, and the two regions are easily combined.
  • the coefficient ⁇ (C) becomes smaller as the component area is smaller. As a result, the segmentation criterion D becomes “true” and the two regions are difficult to combine.
  • the parameter setting unit 15 sets the coefficient ⁇ (C) used in the evaluation of the segmentation standard D described above.
  • the parameter setting unit 15 holds table data in which the value of the coefficient ⁇ (C) corresponding to the area of the component is described, for example.
  • the table data held in the parameter setting unit 15 includes table data in the space direction and table data in the time direction.
  • the parameter setting unit 15 reads the table data in the spatial direction. Then, the parameter setting unit 15 selects a coefficient ⁇ s (C) based on the area of the component from the read table data in the spatial direction. Then, the selected coefficient ⁇ s (C) is set as the coefficient ⁇ (C). If the edge direction at the selected edge weight w (e) is the time direction, the parameter setting unit 15 reads the table data in the time direction. Then, the parameter setting unit 15 selects a coefficient ⁇ t (C) based on the component area from the read table data in the time direction. Then, the selected coefficient ⁇ t (C) is set as the coefficient ⁇ (C).
  • the value of the coefficient ⁇ t (C) based on the table data in the time direction is larger than ⁇ s (C) based on the table data in the spatial direction.
  • the parameter setting unit 15 is configured to hold the table data in the spatial direction and the table data in the time direction, but is not limited to this, and the coefficient ⁇ (C) is set to It is also possible to calculate from the area and one value of the coefficient S1 set for the space direction and the coefficient S2 set for the time direction.
  • the region dividing unit 16 uses the minimum spanning tree generated by the minimum spanning tree generating unit 14 to divide the object region included in the image based on the input image data for each object.
  • Step S101 is a color space conversion process.
  • the color space conversion unit 11 converts the input image data from image data represented in the RGB color space to image data represented in the YCbCr color space.
  • Step S102 is resolution conversion processing.
  • the resolution conversion unit 12 performs resolution conversion processing on the image data in the YCbCr color space. As a result, the resolution of the input image data is converted to, for example, 640 ⁇ 480 pixels.
  • Step S103 is a process of generating a weighted graph.
  • the graph generation unit 13 generates a weighted graph using each pixel as a node and each pixel as an edge using the resolution-converted image data. At this time, the graph generation unit 13 calculates the difference between the pixel values of the respective pixels as the edge weight w (e).
  • Step S104 is a process of selecting the minimum value of the edge weight w (e).
  • the minimum spanning tree generation unit 14 refers to the generated weighted graph and selects the minimum value of the weight w (e) of each edge set as the selection target.
  • the weights w (e) of all edges are selected.
  • the remaining edge weights w (e) excluding and are selected.
  • Step S105 is processing for setting the coefficient ⁇ (C).
  • the parameter setting unit 15 reads the table data in the spatial direction. Then, the parameter setting unit 15 selects a coefficient ⁇ s (C) based on the area of the target component. Then, the parameter setting unit 15 sets the selected coefficient ⁇ s (C) as the coefficient ⁇ (C) used when evaluating the segmentation criterion D (C i , C j ).
  • the parameter setting unit 15 reads the table data in the time direction. Then, the parameter setting unit 15 selects a coefficient ⁇ t (C) based on the area of the target component. Then, the parameter setting unit 15 sets the selected coefficient ⁇ t (C) as the coefficient ⁇ (C) used when evaluating the segmentation criterion D (C i , C j ).
  • Step S106 is processing for evaluating the segmentation criterion D (C i , C j ).
  • the minimum spanning tree generation unit 14 evaluates the segmentation criterion D (C i , C j ) using [Equation 3] and [Equation 4]. At this time, the coefficient ⁇ (C) set by the parameter setting unit 15 is used.
  • Step S107 is processing to determine whether or not the evaluation is “false”.
  • step S106 when the evaluation of the segmentation criterion D (C i , C j ) is “false”, the minimum spanning tree generation unit 14 sets the result of the determination process in step S107 to Yes. In this case, the process proceeds to step S108.
  • the minimum spanning tree generation unit 14 sets the result of the determination process in step S107 to No. In this case, the process proceeds to step S109.
  • Step S108 is processing for combining components. It is determined as “false” by the evaluation of the segmentation standard in step S106.
  • the minimum spanning tree generation unit 14 connects the edges between the nodes for which the selected edge weights w (e) are calculated. Thereby, the component C i and the component C j are combined as one component.
  • Step S109 is a process of determining whether there is an edge in which the minimum spanning tree in the component is closed when the edges are not connected among the nodes included in the component.
  • the minimum spanning tree generation unit 14 sets the result of the determination process in step S109 to Yes. In this case, the process proceeds to step S110.
  • the minimum spanning tree generation unit 14 sets the result of the determination process in step S109 to No. In this case, the process proceeds to step S111.
  • Step S110 is processing for setting an edge that is not a selection target.
  • the minimum spanning tree generation unit 14 selects an edge at which the minimum spanning tree in the component is closed among the edges that are not connected between the nodes included in the component, and selects the minimum weight w (e) in step S105. Process to remove from the target edge. Thereby, an edge that is not a selection target is set.
  • Step S111 is a process for determining whether or not all edge weights w (e) have been selected.
  • the minimum spanning tree generation unit 14 determines whether or not there is an edge weight w (e) to be selected. When there is no edge weight w (e) to be selected, the minimum spanning tree generation unit 14 sets the result of the determination process in step S111 to Yes. In this case, the process proceeds to step S112.
  • the minimum spanning tree generation unit 14 determines No as the result of the determination process in step S111 and returns to step S105. That is, if it is determined in the determination process in step S111 that all the edge weights w (e) to be selected have not been selected, it is determined that all the edge weights w (e) to be selected have been selected. Steps S105 to S110 are repeatedly executed until it is done.
  • Step S112 is a region division process.
  • the region dividing unit 16 executes region dividing processing on the still image data using the generated minimum spanning tree data.
  • the area dividing unit 16 performs a smoothing process in the time direction on the data of the generated minimum spanning tree.
  • this time direction smoothing process it is possible to suppress recognition of pixels of different objects as pixels of other objects, which are caused by dividing an area in units of frame images. Then, based on the smoothed minimum spanning tree, an area dividing process is performed on the moving image. Thereby, the area dividing process for the input image data ends.
  • FIG. 6 shows a weighted graph generated using the luminance value of each pixel in the still image SI. Using the weighted graph, the above-described processing for obtaining the minimum spanning tree is executed.
  • node values and edge weight values are described, and symbols indicating the positions of the nodes are omitted.
  • the symbols indicating the position of each node shown in FIG. 6 will be described with reference to FIG. 2 showing the case where the number of pixels is the same.
  • the minimum edge weight is selected.
  • the edge weight w (e) between the node N (3, 3) and the node N (3,4) is “0”. That is, the minimum spanning tree generation unit 14 sets the node N (3, 3) and the node N (3, 4) as components. Then, the minimum spanning tree generation unit 14 evaluates the segmentation criterion D. If the evaluation of the segmentation criterion D is “false”, the minimum spanning tree generation unit 14 combines the node N (3, 3) and the node N (3, 4) set as components. The minimum spanning tree generation unit 14 sets the combined node N (3, 3) and node N (3, 4) as new components.
  • the minimum edge weight node N (3, 3) is “2”.
  • the minimum spanning tree generation unit 14 sets the node N (3, 2) and the node N (4, 2) as components.
  • the area dividing unit 16 evaluates the segmentation criterion D. Also in this case, since the evaluation is “false”, the minimum spanning tree generation unit 14 combines the node N (3, 2) and the node N (4, 2) set as components.
  • the minimum spanning tree generation unit 14 performs the same processing on the node N (4, 5) and the node N (5, 5).
  • the segmentation criterion D is evaluated in order from the smallest edge weight w (e).
  • the minimum spanning tree generation unit 14 combines components only when the evaluation of the segmentation criterion D is “false”. At this time, if there is an edge in which the minimum spanning tree in the component is closed, the minimum spanning tree generation unit 14 excludes the edge from the target when the edge weight w (e) is selected. By repeating these processes for all edge weights w (e), a minimum spanning tree based on a two-dimensional weighted graph is generated (see FIG. 7). Based on the minimum spanning tree, the region dividing unit 16 executes region dividing processing on the still image.
  • the graph generation unit 13 regards a plurality of frame images constituting the moving image based on the moving image data as still images.
  • the graph generation unit 13 uses each pixel of each frame image regarded as a plurality of still images as a node, and is located at the same position (in the two adjacent frame images in the frame image and in two temporally adjacent frame images ( A three-dimensional weighted graph with an edge between pixels at the coordinates) is generated.
  • the area dividing unit 16 obtains the minimum spanning tree using the generated three-dimensional weighted graph.
  • the parameter setting unit 15 sets the coefficient ⁇ (C) used in the evaluation of the segmentation criterion D based on the edge direction at the selected edge weight w (e). For example, if the edge direction at the selected edge weight w (e) is the spatial direction, the parameter setting unit 15 selects the coefficient ⁇ s (C) using the table data in the spatial direction, and the selected coefficient ⁇ s (C) is set as the coefficient ⁇ (C) used in the evaluation of the segmentation criterion D. On the other hand, if the edge direction at the selected edge weight w (e) is the time direction, the parameter setting unit 15 selects the coefficient ⁇ t (C) using the table data in the time direction, and selects the selected coefficient.
  • ⁇ t (C) is set as a coefficient ⁇ (C) used in the evaluation of the segmentation standard D. Then, the minimum spanning tree generation unit 14 performs the evaluation of the segmentation criterion D using the set coefficient ⁇ (C). By repeating this process, the minimum spanning tree based on the three-dimensional weight graph is generated as in the case of the two-dimensional weighted graph.
  • the edge weight w (e) in the time direction may be preferentially selected over the edge weight w (e) in the spatial direction in the processing of step S104 described above.
  • a plurality of frame images constituting the moving image based on the moving image data are regarded as a plurality of still images, and a three-dimensional weighted graph is obtained.
  • a three-dimensional minimum spanning tree For example, when a two-dimensional minimum spanning tree is generated for each frame image of a moving image, appropriate region division may be performed when objects having similar feature amounts are close to each other. Can not.
  • by generating the three-dimensional minimum spanning tree shown in the present embodiment it is possible to identify the relationship between the frame images of the subject included in the frame image, so the region of the object included in the moving image is determined. It becomes possible to divide appropriately.
  • FIG. 8 shows the configuration of each frame image of a moving image.
  • This moving image is a moving image obtained when the person B is photographed while walking.
  • this moving image there is a frame image in which the walking person B enters the back of the pole C closer to the imaging position than the person B (for example, frame images FR 1 , FR n ⁇ 1, etc.).
  • frame images FR 1 , FR n ⁇ 1, etc. For example, frame images FR 1 , FR n ⁇ 1, etc.
  • this three-dimensional minimum spanning tree it becomes possible to recognize the position, shape, temporal change, etc. of the object in the moving image, so that, for example, another moving image that cuts the moving image Editing processing such as connecting to an image can be easily performed.
  • the region division processing is performed.
  • the acquired moving image data may be moving image data having a long recording time (reproduction time).
  • FIG. 8 shows a case where a frame image constituting a moving image is divided into three frame image groups Gr 1 , Gr 2 , and Gr 3 .
  • threshold values are set in advance for the number of frame images to be divided in advance, the elapsed time since the moving image was captured, and the like. Then, the moving image may be divided into a plurality of frame image groups based on the set threshold value.
  • the moving image is divided so that overlapping frame images are included in each of the temporally adjacent frame image groups.
  • the frame image group Gr 1 and the frame image group Gr 2 are divided so that the three frame images of the frame images FR m ⁇ 1 , FR m , and FR m + 1 are overlapped.
  • the frame image group Gr 2 and the frame image group Gr 3 the three frame images of the frame images FR n ⁇ 1 , FR n , FR n + 1 (n> m) are divided so as to overlap.
  • the table data used in the spatial direction and the table data used in the temporal direction is selected.
  • Each table data has a value (fixed value) corresponding to the area of the component.
  • the table data in the time direction may be one table data or a plurality of table data.
  • a plurality of table data in the time direction can be held according to the frame rate set when moving images are acquired. For example, when the frame rate set when acquiring a moving image is low, in the moving image, the amount of change in the position of the object between the frame images preceding and following in time increases. In such a case, the relevance of the object in each of the frame images that move forward and backward in time becomes impossible. On the other hand, when the frame rate set when acquiring the moving image is high, the amount of change in the position of the object between the frame images moving back and forth in time is small in the acquired moving image. In such a case, it becomes easy to relate the objects in each of the frame images that move forward and backward in time.
  • the coefficient is set the value of the coefficient tau t (C) that is set in the table data is selected when the frame rate is low, in table data is selected when the frame rate is high tau t (The value of each table data is set so as to be larger than the value of C).
  • the parameter setting part 15 should just select the table data of the time direction corresponding to the frame rate set when acquiring a moving image among several table data of a time direction.
  • the aperture value may change when moving images are acquired.
  • a plurality of table data in the time direction can be provided so as to cope with such a change in aperture value.
  • each value of the table data used when the absolute value of the change amount of the aperture value is large is larger than each value of the table data used when the absolute value of the change amount of the aperture value is small.
  • Set table data may be configured to select table data in the time direction to be used based on not only the aperture value change but also the magnitude of random noise generated in each frame image.
  • the change in the luminance of the subject in the moving image is not mentioned, but for example, when a moving image is captured, the luminance of the subject or the luminance under the imaging environment may occur.
  • the coefficient ⁇ (C) should be set in consideration of pixel similarity in a plurality of frame images obtained earlier, pixel similarity in a plurality of frame images obtained later, and the like. Is also possible.
  • a difference in luminance value between adjacent pixels in a frame image and between pixels at the same position (coordinates) in a frame image that is temporally changed is used as an edge weight.
  • it need not be limited to this.
  • a difference in luminance difference between pixels in an oblique direction difference between node N (4, 2) and node N (5, 3) shown in FIG. 2, shown in FIG.
  • the difference between the node N (1, 1, 1) and the node N (2, 2, 1), etc.) a specific pixel in the frame image, and a specific pixel in the frame image temporally surrounding the frame image.
  • the difference between the neighboring pixel and the pixel having the same coordinates (such as the difference between the node N (2, 1, 1) and the node N (1, 1, 2) shown in FIG. 3) is obtained, and these differences are used as weights. It is also possible to generate a weighted graph.
  • the image data input to the image processing apparatus 10 is not particularly limited, but the image is subjected to image processing such as pixel interpolation processing, white balance processing, gradation conversion processing, and contour enhancement processing. Preferably it is data. However, among the image processing described above, image data subjected to pixel interpolation processing and white balance processing, or (RAW image data) not subjected to the above-described image processing may be used.
  • the minimum spanning tree is generated using the weighted graph, and then the image processing apparatus performs region division on the moving image based on the generated minimum spanning tree.
  • the present invention is not limited to this. In other words, it is not always necessary to execute the region dividing process when the minimum spanning tree is generated.
  • the generated minimum spanning tree data may be appended as supplementary information of the image data, and read when performing trimming processing or the like on the image data.
  • FIG. 9 is a functional block diagram of an imaging apparatus provided with the image processing apparatus of the present invention.
  • the imaging device 50 includes an imaging optical system 51, an imaging device 52, an A / D conversion unit 53, a timing generator (TG) 54, a buffer memory 55, an image processing device 56, a display control circuit 57, a display device 58, and a connection I / O. F59, CPU 60, built-in memory 61, release button 62, setting operation unit 63, and the like.
  • the A / D converter 53, the buffer memory 55, the image processing device 56, the display control circuit 57, the connection I / F 59, the CPU 60, and the built-in memory 61 are electrically connected by a bus 64.
  • the image processing device 56 provided in the imaging device 50 performs image processing such as pixel interpolation processing, white balance processing, gradation conversion processing, and contour enhancement processing.
  • the image processing apparatus 56 includes the functions of the color space conversion unit 11, the resolution conversion unit 12, the graph generation unit 13, the minimum spanning tree generation unit 14, the parameter setting unit 15, and the region division unit 16 illustrated in FIG. .
  • the image on which the region division processing is performed may be an image output from the image sensor 52 or an image stored in the storage medium 65 connected to the recording I / F 59.
  • examples of the image include a still image obtained by an imaging process executed based on an operation of the release button 62, a moving image, and an image (through image) that is captured when shooting is not performed. For this reason, the process of generating the minimum spanning tree and the area dividing process by the image processing device 56 can be performed on a through image as well as a still image and a moving image obtained by imaging.
  • the data of the minimum spanning tree generated by using the image data obtained by imaging and the data based on the area division process are stored as supplementary information of the image data. It should be noted that whether or not to store the minimum spanning tree data or the data based on the region division processing as the auxiliary information of the image data may be selectable by the operation of the setting operation unit 63.
  • the image processing apparatus 10 is described as an example.
  • the color space conversion unit 11, the resolution conversion unit 12, the graph generation unit 13, and the minimum spanning tree generation unit of the image processing apparatus 10 illustrated in FIG. 14 may be an image processing program capable of causing a computer to execute the functions of the parameter setting unit 15 and the region dividing unit 16 and the processing of the flowchart shown in FIG.
  • the image program is preferably stored in a computer-readable storage medium such as a memory card, an optical disk, or a magnetic disk.

Landscapes

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

Abstract

 本発明の画像処理装置は、動画像を構成する複数のフレーム画像に含まれる画素を空間方向及び時間方向からなる三次元空間上にそれぞれノードとして配置し、空間方向又は時間方向の少なくとも1方向で隣接する2つの画素間の差分値を隣接するノード間の重みとして設定した3次元のグラフを生成するグラフ生成手段と、3次元のグラフにおいて空間方向又は時間方向の少なくとも1方向で隣接するノード間の重みのうち、最小となるノード間の重みと評価用パラメータとを用いて、重みが最小となるノード間を連結するか否かを評価する処理を繰り返し実行することで、3次元のグラフにおける最小全域木を求める最小全域木生成手段と、空間方向に対して設定される第1のパラメータと、第1のパラメータと異なる値からなり時間方向に対して設定される第2のパラメータとを有し、第1のパラメータ又は第2のパラメータのいずれか一方を、評価用パラメータとして設定するパラメータ設定手段と、を備えたことを特徴とする。

Description

画像処理装置、撮像装置及び画像処理プログラム
 本発明は、画像処理装置、撮像装置及び画像処理プログラムに関する。
 取得される静止画像から被写体や背景などの各領域を分割する技術が種々提案されている。この領域分割の方法としては、各画素の画素値から隣接する画素間のエッジを評価し、隣接する画素を統合するか否かを繰り返し行う方法や、輝度や色成分などの性質が近似する画素の領域(小領域)間のエッジを評価し、隣接する小領域を統合するか否かを繰り返し行う方法などが挙げられる(特許文献1参照)。
特開2008-059081号公報
 ここで、静止画像ではなく動画像に対して領域分割を行う場合、動画像を構成する各フレーム画像のそれぞれで領域分割を行って、時間的に前後するフレーム画像間で対応付けることができれば、オブジェクトの動き情報を考慮でき、シーン認識の精度の向上に繋がる。しかしながら、動いているオブジェクトが他のオブジェクトに一時的に隠れるような動画像の場合、動いているオブジェクトの一部が他のオブジェクトに隠れることで、複数の領域に分割されてしまうことがある。また、動画像のフレーム画像毎に領域分割する場合、フレーム画像毎に分割される領域が異なる場合もあることから、オブジェクトの動き情報を正確に取得することができないという問題もある。
 本発明は、動画像に対する領域分割を適切に行うことできるようにした画像処理装置、撮像装置及び画像処理プログラムを提供することを目的とする。
 上述した課題を解決するために、本発明の画像処理装置は、動画像を構成する複数のフレーム画像に含まれる画素を空間方向及び時間方向からなる三次元空間上にそれぞれノードとして配置し、前記空間方向又は前記時間方向の少なくとも1方向で隣接する2つの画素間の差分値を隣接するノード間の重みとして設定した3次元のグラフを生成するグラフ生成手段と、前記3次元のグラフにおいて前記空間方向又は前記時間方向の少なくとも1方向で隣接する前記ノード間の重みのうち、最小となる前記ノード間の重みと評価用パラメータとを用いて、前記重みが最小となる前記ノード間を連結するか否かを評価する処理を繰り返し実行することで、前記3次元のグラフにおける最小全域木を求める最小全域木生成手段と、前記空間方向に対して設定される第1のパラメータと、前記第1のパラメータと異なる値からなり前記時間方向に対して設定される第2のパラメータとを有し、前記第1のパラメータ又は前記第2のパラメータのいずれか一方を、前記評価用パラメータとして設定するパラメータ設定手段と、を備えたことを特徴とする。
 また、本発明の撮像装置は、被写体光の光束を調整する絞りを備えた撮像光学系と、前記撮像光学系により取り込まれた被写体光を受光することで、画像を取得する撮像素子と、上述した画像処理装置と、を備えたことを特徴とする。
 また、本発明の画像処理装置は、時系列に撮像された複数の画像の各画像について、隣接する2つの画素間の差分値に基づいて複数の領域に分割する分割手段と、前記複数の画像のうち、時間的に前後する2つの画像において対応する位置に配置される画素間の差分値に基づいて、それぞれの画素が含まれる領域が同一の領域であるか否かを評価する評価手段と、を備えたことを特徴とする。
 また、本発明の画像処理プログラムは、動画像を構成する複数のフレーム画像に含まれる画素を空間方向及び時間方向からなる三次元空間上にそれぞれノードとして配置し、前記空間方向又は前記時間方向の少なくとも1方向で隣接する2つの画素の差分を隣接するノード間の重みとして設定した3次元のグラフを生成するグラフ生成ステップと、前記3次元のグラフにおいて前記空間方向又は前記時間方向の少なくとも1方向で隣接する前記ノード間の重みのうち、最小となる前記ノード間の重みと評価用パラメータとを用いて、前記重みが最小となる前記ノード間を連結するか否かを評価する処理を繰り返し実行することで、前記3次元のグラフにおける最小全域木を求める最小全域木生成ステップと、前記空間方向に対して設定される第1のパラメータと、前記第1のパラメータと異なる値からなり前記時間方向に対して設定される第2のパラメータとのいずれか一方を、前記評価用パラメータとして設定するパラメータ設定ステップと、をコンピュータに実行させることが可能なものである。
 また、本発明の画像処理プログラムは、時系列に撮像された複数の画像の各画像について、隣接する2つの画素間の差分値に基づいて複数の領域に分割する分割ステップと、前記複数の画像のうち、時間的に前後する2つの画像において対応する位置に配置される画素間の差分値に基づいて、それぞれの画素が含まれる領域が同一の領域であるか否かを評価する評価ステップと、をコンピュータに実行させることが可能なものである。
本実施形態の画像処理装置の構成を示す図である。 静止画像に基づいて生成される重み付きグラフの一例である。 動画像に基づいて生成される重み付きグラフの一例である。 画像処理装置における処理の流れを示すフローチャートである。 図5(a)は人物を被写体とした静止画像の一例、図5(b)は図5(a)における各画素の輝度値の一例を示す図である。 図5(b)の各画素の輝度値を用いた重み付きグラフの一例を示す図である。 図6の重み付きグラフを用いた最小全域木の一例を示す図である。 動画像の構成の一例を示す図である。 本発明の画像処理装置を備えた撮像装置の一例を示す図である。
 図1は、本発明を用いた画像処理装置の構成を示す機能ブロック図である。画像処理装置10は、色空間変換部11、解像度変換部12、グラフ生成部13、最小全域木生成部14、パラメータ設定部15及び領域分割部16を備えている。色空間変換部11は、入力される画像データの色空間をRGB色空間からYCbCr色空間に変換する。解像度変換部12は、YCbCr色空間に変換された画像データの解像度を変換する。この解像度変換部12による解像度変換処理により、画像データの解像度が例えば640×480画素に変換される。なお、解像度変換処理が行われた画像データの解像度を640×480画素としているが、これに限定される必要はなく、適宜設定してよい。
 グラフ生成部13は、解像度変換処理が施された画像データを用いて、画像データに基づく画像の各画素をノード(頂点)、隣接する画素間をエッジ(辺)とした重み付きグラフを生成する。グラフ生成部13は、画素間のエッジの重みとして隣接する画素の画素値の差分を算出する。なお、画素の画素値としては、例えば輝度値、R,G,Bの各階調値などが挙げられる。以下、画素の画素値として輝度値を例に挙げて説明する。
 グラフ生成部13は、入力された画像データが静止画像データである場合、2次元の重み付きグラフを生成する。図2は、静止画像データに基づいて生成された重み付きグラフの一例である。図2中、N(1,1)~N(6,5)はノード、記号eはエッジを示している。なお、図2中X方向及びY方向が空間方向となる。
 一方、入力された画像データが動画像データである場合、グラフ生成部13は、入力された動画像データに基づく動画像の各フレーム画像を、時間方向に並べた複数の静止画像とみなす。グラフ生成部13は、複数の静止画像としてみなした各フレーム画像の各画素をノードとし、フレーム画像内の隣接する画素間、及び時間的に前後する2つのフレーム画像において同一位置(座標)にある画素間をエッジとした3次元の重み付きグラフを生成する。図3は、動画像データに基づいて生成された重み付きグラフの一例である。この図3において、X方向及びY方向は空間方向、Z方向は時間方向である。
 この図3において、N(1,1,1)~N(6,5,1)はフレーム画像FR1から得られるノード、N(1,1,2)~N(6,5,2)はフレーム画像FR2から得られるノード、N(1,1,3)~N(6,5、3)は、フレーム画像FR3から得られるノードである。また、図3において、各ノード間のエッジは記号eで示している。なお、図3中の煩雑さを解消するために、ノードの一部に対する記号や、エッジに対する記号を省略している。
 最小全域木生成部14は、グラフ生成部13によって生成された重み付きグラフを用いて最小全域木を生成する。この最小全域木を生成する手法として、例えば“Efficient Graph-Based Image Segmentation” P.Felzenszwalb, D.Huttenlocher(2004),International Journal of Computer Vision,59 167-181の手法が挙げられる。この手法は、例えばクラスカル法を用いて実行される。上述した手法は、重み付きグラフG(V,E)の各エッジの重みw(e)のうち、最小となる重みw(e)を1つ選択し、エッジが結ぶ2つのノードのそれぞれが含まれるコンポーネントを結合するか否かを判定する。この判定は、後述するセグメンテーションの基準D(C,C)の評価を行うことで実行される。この判定をエッジの重みw(e)の低い順に、全てのエッジの重みw(e)に対して繰り返し実行する。この処理の後に、コンポーネントにおける最小全域木が閉路となるエッジがあるか否かが判定される。上述したエッジが結ぶ2つのノードのそれぞれが含まれるコンポーネントを結合するか否かの判定を行うことで、一定サイズ以下の微小なコンポーネントが他のコンポーネントに結合される。なお、重み付きグラフの最小全域木を求める手法としてクラスカル法を用いているが、これに限定される必要はなく、プリム法など、他の手法を用いることも可能である。
 以下、セグメンテーションの基準D(C,C)の評価について説明する。v∈Vは各画素に対応する重み付きグラフのノードであり、e∈Eは隣接する画素間に対して定義したノード間のエッジである。コンポーネントとして領域Cを考慮した場合、領域C内の相違性をInt(C)とすると、Int(C)は[数1]で定義される。
Figure JPOXMLDOC01-appb-M000001
 
 MST(C,E)は領域C内の最小全域木におけるエッジを示す。
 次に、2つの領域C、C間の相違性をDif(C,C)とすると、Dif(C,C)は、[数2]で定義される。
Figure JPOXMLDOC01-appb-M000002
 
 2つの領域C、C間におけるセグメンテーションの基準D(C,C)は、以下の[数3]、[数4]で定義される。
Figure JPOXMLDOC01-appb-M000003
 
Figure JPOXMLDOC01-appb-M000004
 
 ここで、τ(C)は係数であり、係数τ(C)は、パラメータ設定部15により設定される値である。この係数τ(C)は、コンポーネントの面積が小さいほど大きい値となる。つまり、領域Cが小さいほど、MInt(C,C)の値が大きくなる。その結果、セグメンテーションの基準Dが「false」となり、2つの領域が結合されやすくなる。また、係数τ(C)は、コンポーネントの面積が小さいほど小さい値となる。その結果、セグメンテーションの基準Dが「true」となり、2つの領域が結合しにくくなる。
 パラメータ設定部15は、上述したセグメンテーションの基準Dの評価にて使用される係数τ(C)を設定する。パラメータ設定部15は、例えばコンポーネントの面積に応じた係数τ(C)の値が記載されたテーブルデータを保持している。なお、パラメータ設定部15に保持されるテーブルデータは、空間方向のテーブルデータと、時間方向のテーブルデータとからなる。
 例えば選択されたエッジの重みw(e)におけるエッジの方向が空間方向であれば、パラメータ設定部15は、空間方向のテーブルデータを読み出す。そして、パラメータ設定部15は、読み出した空間方向のテーブルデータからコンポーネントの面積に基づいた係数τ(C)を選択する。そして、選択した係数τ(C)を係数τ(C)として設定する。また、選択されたエッジの重みw(e)におけるエッジの方向が時間方向であれば、パラメータ設定部15は、時間方向のテーブルデータを読み出す。そして、パラメータ設定部15は、読み出した時間方向のテーブルデータからコンポーネントの面積に基づいた係数τ(C)を選択する。そして、選択した係数τ(C)を係数τ(C)として設定する。
 ここで、コンポーネントの面積が同一となる場合、時間方向のテーブルデータに基づく係数τ(C)の値は、空間方向のテーブルデータに基づくτ(C)よりも大きな値となる。このように空間方向のテーブルデータの値と時間方向のテーブルデータの値とを設定しておくことで、時間的に前後するフレーム画像間のオブジェクトの関連性を高めることができる。
 なお、パラメータ設定部15においては、空間方向のテーブルデータと、時間方向のテーブルデータとを保持している構成としているが、これに限定される必要はなく、係数τ(C)を、コンポーネントの面積と、空間方向に対して設定される係数S1及び時間方向に対して設定される係数S2のいずれか一方の値とから算出することも可能である。
 領域分割部16は、最小全域木生成部14により生成された最小全域木を用いて、入力された画像データに基づく画像に含まれるオブジェクトの領域を、オブジェクト毎に分割する。
 次に、画像処理装置における処理の流れを図4のフローチャートに基づいて説明する。
 ステップS101は、色空間変換処理である。色空間変換部11は、入力された画像データをRGB色空間で示される画像データからYCbCr色空間で示される画像データに変換する。
 ステップS102は、解像度変換処理である。解像度変換部12は、YCbCr色空間の画像データに対して解像度変換処理を施す。これにより、入力される画像データの解像度が例えば640×480画素に変換される。
 ステップS103は、重み付きグラフを生成する処理である。グラフ生成部13は、解像度変換された画像データを用いて、各画素をノード、各画素間をエッジとした重み付きグラフを生成する。この際に、グラフ生成部13は、各画素の画素値の差分をエッジの重みw(e)として算出する。
 ステップS104は、エッジの重みw(e)の最小値を選択する処理である。最小全域木生成部14は、生成された重み付きグラフを参照して、選択対象として設定される各エッジの重みw(e)の最小値を選択する。ここで、1回目の処理においては、全てのエッジの重みw(e)が選択対象となる。また、2回目以降の処理では、先に実行されたステップS104の処理において選択されたエッジの重みw(e)と、後述するステップS110により選択対象外として設定されたエッジの重みw(e)とを除いた、残りのエッジの重みw(e)が選択対象となる。
 ステップS105は、係数τ(C)を設定する処理である。ステップS104によって選択されたエッジの重みw(e)におけるエッジの方向が空間方向である場合、パラメータ設定部15は、空間方向のテーブルデータを読み出す。そして、パラメータ設定部15は、対象となるコンポーネントの面積に基づいた係数τ(C)を選択する。そして、パラメータ設定部15は、選択された係数τ(C)を、セグメンテーション基準D(C,C)の評価時に用いる係数τ(C)として設定する。
 同様にして、選択されたエッジの重みw(e)におけるエッジの方向が時間方向である場合、パラメータ設定部15は、時間方向のテーブルデータを読み出す。そして、パラメータ設定部15は、対象となるコンポーネントの面積に基づいた係数τ(C)を選択する。そして、パラメータ設定部15は、選択された係数τ(C)を、セグメンテーション基準D(C,C)の評価時に用いる係数τ(C)として設定する。
 ステップS106は、セグメンテーション基準D(C,C)を評価する処理である。最小全域木生成部14は、[数3]及び[数4]を用いてセグメンテーション基準D(C,C)を評価する。この際に、パラメータ設定部15により設定された係数τ(C)が使用される。
 ステップS107は、評価が「false」となるか否かを判定する処理である。ステップS106において、セグメンテーション基準D(C,C)の評価が「false」であるとき、最小全域木生成部14はステップS107の判定処理の結果をYesとする。この場合、ステップS108に進む。一方、セグメンテーション基準D(C,C)の評価が「true」であるとき、最小全域木生成部14はステップS107の判定処理の結果をNoとする。この場合、ステップS109に進む。
 ステップS108は、コンポーネントを結合する処理である。ステップS106のセグメンテーション基準の評価により「false」と判定されている。最小全域木生成部14は、選択されたエッジの重みw(e)が算出されたノード間のエッジを連結する。これにより、コンポーネントC及びコンポーネントCが一つのコンポーネントとして結合される。
 ステップS109は、コンポーネントに含まれるノード間において連結されていないエッジのうち、その連結時にコンポーネントにおける最小全域木が閉路となるエッジがあるか否かを判定する処理である。最小全域木が閉路となるエッジがある場合には、最小全域木生成部14は、ステップS109の判定処理の結果をYesとする。この場合、ステップS110に進む。一方、最小全域木が閉路となるエッジがない場合には、最小全域木生成部14は、ステップS109の判定処理の結果をNoとする。この場合、ステップS111に進む。
 ステップS110は、選択対象外のエッジを設定する処理である。最小全域木生成部14は、コンポーネントに含まれるノード間において連結されていないエッジのうち、コンポーネントにおける最小全域木が閉路となるエッジを、ステップS105の最小の重みw(e)を選択する際の対象となるエッジから外す処理を行う。これにより、選択対象外のエッジが設定される。
 ステップS111は、全てのエッジの重みw(e)を選択したか否かを判定する処理である。最小全域木生成部14は、選択対象となるエッジの重みw(e)がないか否かを判定する。選択対象となるエッジの重みw(e)がない場合には、最小全域木生成部14は、ステップS111の判定処理の結果をYesとする。この場合、ステップS112に進む。
 一方、選択対象となるエッジの重みw(e)がある場合には、最小全域木生成部14は、ステップS111の判定処理の結果をNoとして、ステップS105に戻る。つまり、ステップS111の判定処理により選択対象となるエッジの重みw(e)が全て選択されていないと判定された場合には、選択対象となるエッジの重みw(e)が全て選択されたと判定されるまで、ステップS105~ステップS110の処理が繰り返し実行される。
 ステップS112は、領域分割処理である。画像処理装置10に入力される画像データが静止画像データの場合には、領域分割部16は、生成された最小全域木のデータを用いて、静止画像データに対する領域分割処理を実行する。
 一方、画像データが動画像データの場合には、領域分割部16は、生成された最小全域木のデータに対して、時間方向の平滑化処理を行う。この時間方向の平滑化処理により、フレーム画像単位で領域分割することで生じる、異なるオブジェクトの画素が他のオブジェクトの画素と認識されることを抑止することができる。そして、平滑化処理した最小全域木に基づいて、動画像に対する領域分割処理を実行する。これにより、入力される画像データに対する領域分割処理が終了する。
 以下、静止画像データが画像処理装置10に入力される場合について説明する。図5(a)及び図5(b)は、人物Aを撮影することにより得られた静止画像SI、及び静止画像SIの各画素に対する輝度値を示す。この静止画像SIにおける各画素の輝度値を用いて生成される重み付きグラフが図6である。この重み付きグラフを用いて、上述した最小全域木を求める処理が実行される。図6においては、ノードの値と、エッジの重み値とを記載し、各ノードの位置を示す記号を省略している。ここで、図6に示す各ノードの位置を示す記号については、画素数が同一の場合を示す図2を参照して説明する。
 上述したように、最小全域木を求める場合には、最小となるエッジの重みが選択される。図6においては、ノードN(3,3)とノードN(3,4)との間のエッジの重みw(e)が「0」となる。つまり、最小全域木生成部14は、ノードN(3,3)及びノードN(3,4)をそれぞれコンポーネントとして設定する。そして、最小全域木生成部14は、セグメンテーション基準Dを評価する。セグメンテーション基準Dの評価が「false」であれば、最小全域木生成部14は、コンポーネントとして設定されたノードN(3,3)とノードN(3,4)とを結合する。最小全域木生成部14は、結合されたノードN(3,3)とノードN(3,4)とを新たなコンポーネントとして設定する。
 その後、最小となるエッジの重みノードN(3,3)は、「2」となる。最小全域木生成部14は、ノードN(3,2)とノードN(4,2)とをそれぞれコンポーネントとして設定する。領域分割部16は、セグメンテーション基準Dを評価する。この場合も、評価が「false」となるので、最小全域木生成部14は、コンポーネントとして設定されたノードN(3,2)とノードN(4,2)とを結合する。最小全域木生成部14は、ノードN(4,5)とノードN(5,5)とに対しても、同一の処理を実行する。
 このようにして、最小となるエッジの重みw(e)から順に、セグメンテーション基準Dを評価する。そして、セグメンテーション基準Dの評価が「false」である場合にのみ、最小全域木生成部14はコンポーネントを結合する。この際に、コンポーネントにおける最小全域木が閉路となるエッジがあれば、最小全域木生成部14は、そのエッジをエッジの重みw(e)の選択する際の対象から外す。これら処理を全てのエッジの重みw(e)に対して繰り返し実行することで、2次元の重み付きグラフに基づく最小全域木が生成される(図7参照)。この最小全域木に基づいて、領域分割部16は、静止画像に対する領域分割処理を実行する。
 一方、画像処理装置10に入力される画像データが動画像データとなる場合、グラフ生成部13は、動画像データに基づく動画像を構成する複数のフレーム画像をそれぞれ静止画像としてみなす。その上で、グラフ生成部13は、複数の静止画像としてみなした各フレーム画像の各画素をノードとし、フレーム画像内の隣接する画素間、及び時間的に隣り合う2つのフレーム画像において同一位置(座標)にある画素間をエッジとした3次元の重み付きグラフを生成する。領域分割部16は、生成された3次元の重み付きグラフを用いて最小全域木を求める。
 その後、パラメータ設定部15は、選択されたエッジの重みw(e)におけるエッジの方向に基づいてセグメンテーションの基準Dの評価にて使用される係数τ(C)を設定する。例えば選択されたエッジの重みw(e)におけるエッジの方向が空間方向であれば、パラメータ設定部15は、空間方向のテーブルデータを用いて係数τ(C)を選択し、選択した係数τ(C)をセグメンテーションの基準Dの評価にて使用する係数τ(C)として設定する。一方、選択されたエッジの重みw(e)におけるエッジの方向が時間方向であれば、パラメータ設定部15は、時間方向のテーブルデータを用いて係数τ(C)を選択し、選択した係数τ(C)をセグメンテーションの基準Dの評価にて使用する係数τ(C)として設定する。そして、最小全域木生成部14は、設定された係数τ(C)を用いて、セグメンテーション基準Dの評価を実行する。この処理を繰り返し行うことで、2次元の重み付きグラフの場合と同様に、3次元の重みグラフに基づく最小全域木が生成される。
 なお、動画像データを用いて最小全域木を求める場合、時間的に前後するフレーム画像において同一座標に位置する画素間の輝度値の差分と、フレーム画像内で隣接する画素間の輝度値の差分とが同一の値となる場合がある。このような場合には、上述したステップS104の処理において、空間方向におけるエッジの重みw(e)よりも、時間方向におけるエッジの重みw(e)を優先的に選択すればよい。このようなエッジの重みw(e)の選択により、フレーム画像間の関連性をより明確にすることができる。
 このように、入力される画像データが動画像データとなる場合であっても、動画像データに基づく動画像を構成する複数のフレーム画像を、複数の静止画像と見なして3次元の重み付きグラフを生成し、さらに3次元の最小全域木を生成している。例えば、動画像の各フレーム画像のそれぞれに対して、2次元の最小全域木を生成した場合には、類似する特徴量となるオブジェクトが近接している場合には適切な領域分割を行うことができない。しかしながら、本実施形態に示した3次元の最小全域木を生成することで、フレーム画像に含まれる被写体をフレーム画像間の関連性を特定することができるので、動画像に含まれるオブジェクトの領域を適切に分割することが可能となる。
 図8は、動画像の各フレーム画像の構成について示している。この動画像は、人物Bが歩いている様子を撮像したときに得られる動画像である。この動画像においては、歩いている人物Bが、人物Bよりも撮像位置側にあるポールCの背後に入り込むフレーム画像が存在する(例えばフレーム画像FR、FRn-1など)。このようなフレーム画像が含まれる動画像に対して、フレーム画像単位で最小全域木を求めると、人物Bと、人物Bの足の一部とが他のオブジェクトとして分割されてしまうという問題がある。しかしながら、3次元の最小全域木を求めた上で領域分割処理を行うことで、同一の被写体の領域であることが認識できるので、適切な領域分割処理を実行することが可能となる。また、この3次元の最小全域木を生成することで、動画像内のオブジェクトの位置、形状、時間的な変化などを認識することが可能となるので、例えば動画像をカットする、他の動画像とつなげるなどの編集処理を容易に行うことが可能となる。
 本実施形態では、動画像データに対して生成される3次元の重み付きグラフから最小全域木を求めた後、領域分割処理を行っている。しかしながら、取得される動画像データは、録画時間(再生時間)が長い動画像データとなる場合がある。このような場合には、動画像を構成する複数のフレーム画像を複数のフレーム画像群に分割しておき、これらフレーム画像群毎に重み付きグラフの生成処理や領域分割処理を行うことも可能である。図8は、動画像を構成するフレーム画像を、3つのフレーム画像群Gr、Gr、Grに分割した場合について記載している。この場合、予め分割するフレーム画像の数や、動画像を撮像してからの経過時間などに対して予め閾値を設定しておく。そして、設定された閾値に基づいて動画像を複数のフレーム画像群に分割すればよい。
 なお、設定された閾値に基づいて動画像を複数のフレーム画像群に分割する場合には、フレーム画像群毎に最小全域木の生成処理や領域分割処理を実行することになるので、フレーム画像群間の関連性がわからなくなる場合がある。このような問題を解決するために、時間的に隣り合うフレーム画像群のそれぞれで、重複するフレーム画像が含まれるように、動画像を分割する。なお、図8においては、フレーム画像群Grとフレーム画像群Grとにおいて、フレーム画像FRm-1,FR,FRm+1の3つのフレーム画像が重複されるように分割している。また、フレーム画像群Grとフレーム画像群Grとにおいて、フレーム画像FRn-1,FR,FRn+1(n>m)の3つのフレーム画像を重複するように分割している。
 本実施形態では、係数τ(C)の設定時に、空間方向の場合に用いるテーブルデータと、時間方向の場合に用いるテーブルデータとのいずれか一方のテーブルデータを選択している。また、各テーブルデータは、コンポーネントの面積に応じた値(固定値)としている。ここで、時間方向のテーブルデータは、1つのテーブルデータであってもよいし、複数のテーブルデータであってもよい。
 ここで、時間方向におけるテーブルデータは、動画像を取得する際に設定されるフレームレートに応じて複数保持しておくことができる。例えば、動画像を取得する際に設定されるフレームレートが低い場合、動画像においては、時間的に前後するフレーム画像間のオブジェクトの位置の変化量が大きくなる。このような場合には、時間的に前後するフレーム画像のそれぞれにおけるオブジェクトの関連性が図れなくなる。一方、動画像を取得する際に設定されるフレームレートが高い場合、取得される動画像においては、時間的に前後するフレーム画像間のオブジェクトの位置の変化量が小さい。このような場合には、時間的に前後するフレーム画像のそれぞれにおけるオブジェクトの関連性が図りやすくなる。これら理由により、フレームレートが低い場合に選択されるテーブルデータにて設定される係数τ(C)の値を、フレームレートが高い場合に選択されるテーブルデータにて設定される係数τ(C)の値よりも大きくなるように、各テーブルデータの値を設定しておく。そして、パラメータ設定部15は、複数の時間方向のテーブルデータのうち、動画像を取得する際に設定されるフレームレートに対応した時間方向のテーブルデータを選択すればよい。
 さらに、動画像の取得時に、絞り値が変化している場合もある。このような絞り値の変化に対応できるように、時間方向のテーブルデータを複数設けることも可能である。この場合、絞り値の変化量の絶対値が大きいときに用いられるテーブルデータの各値が、絞り値の変化量の絶対値が小さいときに用いられるテーブルデータの各値よりも大きくなるように各テーブルデータを設定しておけばよい。また、絞り値の変化だけでなく、フレーム画像のそれぞれに発生するランダムノイズの大きさに基づいて使用する時間方向のテーブルデータを選択させる構成であってもよい。
 本実施形態では、動画像における被写体の輝度の変化については触れていないが、例えば動画像を撮像する場合、被写体の輝度や撮像環境下の輝度の変化が生じる場合がある。このような動画像においては、同一のオブジェクトであっても、時間方向におけるノード間を連結できずに、他のオブジェクトとして領域分割されてしまう場合も考えられる。このような場合には、先に得られる複数のフレーム画像における画素の類似性や、後から得られる複数のフレーム画像における画素の類似性などを考慮して、係数τ(C)を設定することも可能である。
 本実施形態では、重み付きグラフを生成する場合、フレーム画像内で隣り合う画素間、及び時間的に前後するフレーム画像における同一位置(座標)の画素間の輝度値の差分を、エッジの重みとして算出しているが、これに限定される必要はない。例えば、フレーム画像内において隣接する画素のうち、斜め方向の画素間の輝度差の差分(図2に示すノードN(4,2)とノードN(5,3)との差分、図3に示すノードN(1,1,1)とノードN(2,2,1)との差分など)や、フレーム画像における特定の画素と、該フレーム画像と時間的に前後するフレーム画像において特定の画素の近傍となる画素と同一座標の画素との差分(図3に示すノードN(2,1,1)とノードN(1,1,2)との差分など)を求め、これら差分を重みとした重み付きグラフを生成することも可能である。
 本実施形態では、画像処理装置10に入力される画像データに関しては、特に限定していないが、画素補間処理、ホワイトバランス処理、階調変換処理、輪郭強調処理などの画像処理が施された画像データであることが好ましい。しかしながら、上述した画像処理のうち、画素補間処理、ホワイトバランス処理を施した画像データや、上述した画像処理を施していない、(RAW画像データ)であってもよい。
 本実施形態では、重み付きグラフを用いて最小全域木を生成した後、生成された最小全域木に基づいて、動画像に対する領域分割を行う画像処理装置としているが、これに限定される必要はなく、最小全域木を生成したときに領域分割処理を必ずしも実行する必要はない。この場合、生成される最小全域木のデータを画像データの付帯情報として付帯しておき、画像データに対してトリミング処理などを行う際に読み出すようにしてもよい。
 本実施形態では、画像処理装置10の例を取り上げているが、これに限定される必要はなく、本発明の画像処理装置を備えた撮像装置であってもよい。図9は、本発明の画像処理装置を備えた撮像装置の機能ブロック図である。撮像装置50は、撮像光学系51、撮像素子52、A/D変換部53、タイミングジェネレータ(TG)54、バッファメモリ55、画像処理装置56、表示制御回路57、表示装置58、接続用I/F59、CPU60、内蔵メモリ61、レリーズボタン62、設定操作部63などを備えている。なお、A/D変換部53、バッファメモリ55、画像処理装置56、表示制御回路57、接続用I/F59、CPU60及び内蔵メモリ61は、バス64により電気的に接続される。
 この撮像装置50に設けられる画像処理装置56は、画素補間処理、ホワイトバランス処理、階調変換処理、輪郭強調処理などの画像処理を行う。そして、画像処理装置56は、図1に示す色空間変換部11、解像度変換部12、グラフ生成部13、最小全域木生成部14、パラメータ設定部15及び領域分割部16の機能を備えている。この場合、領域分割処理が実施される画像は、撮像素子52から出力される画像であってもよいし、記録用I/F59に接続された記憶媒体65に記憶された画像であってもよい。さらに、画像としては、レリーズボタン62の操作に基づいて実行される撮像処理により得られる静止画像、動画像の他、撮影が行われていないときに取り込まれる画像(スルー画像)が挙げられる。このため、画像処理装置56による最小全域木を生成する処理や領域分割処理は、撮像により得られる静止画像や動画像の他、スルー画像に対しても実行することが可能である。
 この場合、撮像により得られた画像データを用いて生成される最小全域木のデータや、領域分割処理に基づくデータは、画像データの付帯情報として記憶される。なお、最小全域木のデータや、領域分割処理に基づくデータを画像データの付帯情報として記憶するか否かは、設定操作部63の操作により選択可能としてもよい。
 本実施形態では、画像処理装置10を例に取り上げて説明しているが、図1に示す画像処理装置10の色空間変換部11、解像度変換部12、グラフ生成部13、最小全域木生成部14、パラメータ設定部15及び領域分割部16の機能や、図4に示すフローチャートの処理をコンピュータにて実行させることが可能な画像処理プログラムであってもよい。なお、この画像プログラムは、例えばメモリカード、光学ディスク、磁気ディスクなどコンピュータにて読み取ることが可能な記憶媒体に記憶されていることが好ましい。

Claims (14)

  1.  動画像を構成する複数のフレーム画像に含まれる画素を空間方向及び時間方向からなる三次元空間上にそれぞれノードとして配置し、前記空間方向又は前記時間方向の少なくとも1方向で隣接する2つの画素間の差分値を隣接するノード間の重みとして設定した3次元のグラフを生成するグラフ生成手段と、
     前記3次元のグラフにおいて前記空間方向又は前記時間方向の少なくとも1方向で隣接する前記ノード間の重みのうち、最小となる前記ノード間の重みと評価用パラメータとを用いて、前記重みが最小となる前記ノード間を連結するか否かを評価する処理を繰り返し実行することで、前記3次元のグラフにおける最小全域木を求める最小全域木生成手段と、
     前記空間方向に対して設定される第1のパラメータと、前記第1のパラメータと異なる値からなり前記時間方向に対して設定される第2のパラメータとを有し、前記第1のパラメータ又は前記第2のパラメータのいずれか一方を、前記評価用パラメータとして設定するパラメータ設定手段と、
     を備えたことを特徴とする画像処理装置。
  2.  請求項1に記載の画像処理装置において、
     前記パラメータ設定手段は、前記重みが最小となる前記ノード間の方向に基づいて、前記第1のパラメータ又は前記第2のパラメータとのいずれか一方のパラメータを選択することを特徴とする画像処理装置。
  3.  請求項1又は請求項2に記載の画像処理装置において、
     前記最小全域木生成手段は、
     前記パラメータ設定手段により設定された前記評価用パラメータ及び前記ノードが含まれる前記コンポーネントの面積を用いて算出される値と、前記コンポーネントに含まれるノード間の重みの最大値とを加算することで、前記隣接する2つのノードのそれぞれが含まれるコンポーネントにおける評価値をコンポーネント毎に算出する算出手段と、
     前記2つのコンポーネントにおける評価値の最小値と、選択された前記ノード間の重みの値とを比較して、前記隣接するノード間を連結するか否かを評価する評価手段と、
     備えていることを特徴とする画像処理装置。
  4.  請求項3に記載の画像処理装置において、
     前記最小全域木生成手段は、前記コンポーネントに含まれる複数のノード間のうち、連結されていないノード間を連結した場合に前記コンポーネントにおける最小全域木が閉路になるか否かを判定し、前記コンポーネントが閉路になると判定されるノード間の重みを、最小となる前記ノード間の重みを選択する際の選択対象から外すことを特徴とする画像処理装置。
  5.  請求項1から請求項4のいずれか1項に記載の画像処理装置において、
     前記パラメータ設定手段は、前記動画像を取得したときのフレームレートに基づいて、前記第2のパラメータの値を調整することを特徴とする画像処理装置。
  6.  請求項1から請求項5のいずれか1項に記載の画像処理装置において、
     前記パラメータ設定手段は、前記動画像を構成するフレーム画像を取得したときの絞り値に基づいて、前記第2のパラメータの値を調整することを特徴とする画像処理装置。
  7.  請求項1に記載の画像処理装置において、
     前記グラフ生成手段は、前記動画像を構成する複数のフレーム画像を、前記フレーム画像の数に基づいて複数のフレーム画像群に分割した後、分割されたフレーム画像群毎に前記3次元のグラフを生成し、
     前記最小全域木生成手段は、分割されたフレーム画像群毎の前記3次元のグラフを用いて、フレーム画像群毎の最小全域木を生成することを特徴とする画像処理装置。
  8.  請求項7に記載の画像処理装置において、
     前記グラフ生成手段は、分割される複数のフレーム画像群のうち、時間的に前後するフレーム画像群のそれぞれにおいて、少なくとも1つのフレーム画像が時間的に前後するフレーム画像群と重複するように、前記動画像を構成する複数のフレーム画像を分割することを特徴とする画像処理装置。
  9.  請求項1に記載の画像処理装置において、
     前記グラフ生成手段は、入力された画像が静止画像となる場合に、前記静止画像に含まれる各画素を前記空間方向からなる2次元空間上にノードとして配置した2次元のグラフを生成し、
     前記最小全域木生成手段は、生成された前記2次元のグラフにおける複数のノード間の重みのうち、最小となる前記ノード間の重みを選択した後、選択された前記ノード間の重みと前記第1のパラメータとを用いて、選択された前記ノード間を連結するか否かを評価する処理を繰り返し実行することで、前記2次元のグラフにおける最小全域木を求めることを特徴とする画像処理装置。
  10.  請求項1から請求項9のいずれか1項に記載の画像処理装置において、
     前記最小全域木生成手段により生成された最小全域木を用いて、入力された画像に対する領域分割処理を実行する領域分割手段を、さらに備えていることを特徴とする画像処理装置。
  11.  被写体光の光束を調整する絞りを備えた撮像光学系と、
     前記撮像光学系により取り込まれた被写体光を受光することで、画像を取得する撮像素子と、
     請求項1から請求項10のいずれか1項に記載の画像処理装置と、
     を備えたことを特徴とする撮像装置。
  12.  時系列に撮像された複数の画像の各画像について、隣接する2つの画素間の差分値に基づいて複数の領域に分割する分割手段と、
     前記複数の画像のうち、時間的に前後する2つの画像において対応する位置に配置される画素間の差分値に基づいて、それぞれの画素が含まれる領域が同一の領域であるか否かを評価する評価手段と、
     を備えたことを特徴とする画像処理装置。
  13.  動画像を構成する複数のフレーム画像に含まれる画素を空間方向及び時間方向からなる三次元空間上にそれぞれノードとして配置し、前記空間方向又は前記時間方向の少なくとも1方向で隣接する2つの画素の差分を隣接するノード間の重みとして設定した3次元のグラフを生成するグラフ生成ステップと、
     前記3次元のグラフにおいて前記空間方向又は前記時間方向の少なくとも1方向で隣接する前記ノード間の重みのうち、最小となる前記ノード間の重みと評価用パラメータとを用いて、前記重みが最小となる前記ノード間を連結するか否かを評価する処理を繰り返し実行することで、前記3次元のグラフにおける最小全域木を求める最小全域木生成ステップと、
     前記空間方向に対して設定される第1のパラメータと、前記第1のパラメータと異なる値からなり前記時間方向に対して設定される第2のパラメータとのいずれか一方を、前記評価用パラメータとして設定するパラメータ設定ステップと、
     をコンピュータに実行させることが可能な画像処理プログラム。
  14.  時系列に撮像された複数の画像の各画像について、隣接する2つの画素間の差分値に基づいて複数の領域に分割する分割ステップと、
     前記複数の画像のうち、時間的に前後する2つの画像において対応する位置に配置される画素間の差分値に基づいて、それぞれの画素が含まれる領域が同一の領域であるか否かを評価する評価ステップと、
     をコンピュータに実行させることが可能な画像処理プログラム。
PCT/JP2013/001018 2012-02-23 2013-02-22 画像処理装置、撮像装置及び画像処理プログラム WO2013125239A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012037745 2012-02-23
JP2012-037745 2012-02-23

Publications (1)

Publication Number Publication Date
WO2013125239A1 true WO2013125239A1 (ja) 2013-08-29

Family

ID=49005433

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/001018 WO2013125239A1 (ja) 2012-02-23 2013-02-22 画像処理装置、撮像装置及び画像処理プログラム

Country Status (1)

Country Link
WO (1) WO2013125239A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787948A (zh) * 2016-03-23 2016-07-20 华中科技大学 一种基于多变形分辨率的快速图像分割方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010140201A (ja) * 2008-12-10 2010-06-24 Toyota Motor Corp 画像処理装置、画像処理方法、画像処理プログラム
JP2011211556A (ja) * 2010-03-30 2011-10-20 Nippon Telegr & Teleph Corp <Ntt> 画像生成装置、画像生成方法、及びプログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010140201A (ja) * 2008-12-10 2010-06-24 Toyota Motor Corp 画像処理装置、画像処理方法、画像処理プログラム
JP2011211556A (ja) * 2010-03-30 2011-10-20 Nippon Telegr & Teleph Corp <Ntt> 画像生成装置、画像生成方法、及びプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PEDRO F. FELZENSZWALB ET AL.: "Efficient Graph-Based Image Segmentation", INTERNATIONAL JOURNAL OF COMPUTER VISION, vol. 59, no. 2, 30 September 2004 (2004-09-30), pages 167 - 181, XP055013351 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787948A (zh) * 2016-03-23 2016-07-20 华中科技大学 一种基于多变形分辨率的快速图像分割方法
CN105787948B (zh) * 2016-03-23 2019-01-04 华中科技大学 一种基于多变形分辨率的快速图像分割方法

Similar Documents

Publication Publication Date Title
US9251589B2 (en) Depth measurement apparatus, image pickup apparatus, and depth measurement program
JP5284048B2 (ja) 画像処理装置、撮像装置及び画像処理方法
US10789765B2 (en) Three-dimensional reconstruction method
JP5954668B2 (ja) 画像処理装置、撮像装置および画像処理方法
JP6351238B2 (ja) 画像処理装置、撮像装置および距離補正方法
US20200258196A1 (en) Image processing apparatus, image processing method, and storage medium
US20180061086A1 (en) Image processing apparatus, image processing method, and medium
US9619886B2 (en) Image processing apparatus, imaging apparatus, image processing method and program
JP5374119B2 (ja) 距離情報取得装置、撮像装置、及びプログラム
JP6561512B2 (ja) 視差値導出装置、移動体、ロボット、視差値導出方法、視差値生産方法及びプログラム
EP2395748A2 (en) Apparatus and method creating ghost-free high dynamic range image using filtering
US9367900B2 (en) Image noise removing apparatus and image noise removing method
US9236090B2 (en) Video generating apparatus and video generating method
US20160078598A1 (en) Image processor and image processing method
JP2018195084A (ja) 画像処理装置及び画像処理方法、プログラム、記憶媒体
US20150035828A1 (en) Method for processing a current image of an image sequence, and corresponding computer program and processing device
JP6604908B2 (ja) 画像処理装置、その制御方法、および制御プログラム
KR20110112143A (ko) Ldi 기법 깊이맵을 참조한 2d 동영상의 3d 동영상 전환방법
JP6395429B2 (ja) 画像処理装置、その制御方法及び記憶媒体
JP5772446B2 (ja) 画像処理装置及び画像処理プログラム
JP2016070774A (ja) 視差値導出装置、移動体、ロボット、視差値生産方法、及びプログラム
WO2013125239A1 (ja) 画像処理装置、撮像装置及び画像処理プログラム
KR101592087B1 (ko) 배경 영상의 위치를 이용한 관심맵 생성 방법 및 이를 기록한 기록 매체
JP2020140497A (ja) 演算装置、視差算出方法
JP6044138B2 (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: 13752222

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: 13752222

Country of ref document: EP

Kind code of ref document: A1