WO2010027080A1 - 画像処理装置および方法、撮像装置、並びにプログラム - Google Patents

画像処理装置および方法、撮像装置、並びにプログラム Download PDF

Info

Publication number
WO2010027080A1
WO2010027080A1 PCT/JP2009/065626 JP2009065626W WO2010027080A1 WO 2010027080 A1 WO2010027080 A1 WO 2010027080A1 JP 2009065626 W JP2009065626 W JP 2009065626W WO 2010027080 A1 WO2010027080 A1 WO 2010027080A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
input image
unit
composition
area
Prior art date
Application number
PCT/JP2009/065626
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 ソニー株式会社
Priority to BRPI0905360-3A priority Critical patent/BRPI0905360A2/pt
Priority to US12/740,451 priority patent/US8538074B2/en
Priority to JP2010527850A priority patent/JP5224149B2/ja
Priority to CN200980100857A priority patent/CN101843093A/zh
Priority to EP09811603.1A priority patent/EP2207341B1/en
Publication of WO2010027080A1 publication Critical patent/WO2010027080A1/ja
Priority to US13/914,365 priority patent/US9390466B2/en

Links

Images

Classifications

    • G06T3/10
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3872Repositioning or masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/633Control of cameras or camera modules by using electronic viewfinders for displaying additional information relating to control or operation of the camera
    • H04N23/635Region indicators; Field of view indicators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/22Cropping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2101/00Still video cameras

Definitions

  • the present invention relates to an image processing apparatus and method, an imaging apparatus, and a program, and in particular, an image processing apparatus and method and an imaging apparatus that can cut out an image with an optimal composition even for a subject other than a person. , As well as programs.
  • Patent Document 1 is based on the premise that the subject includes a person, and there is a possibility that optimal trimming cannot be performed on an image including a subject other than the person.
  • the present invention has been made in view of such a situation, and makes it possible to cut out an image having an optimal composition even for a subject other than a person.
  • the image processing apparatus includes a setting unit that sets a composition pattern corresponding to the input image based on the number of regions of interest in the input image and the scene of the input image, Determining means for determining an optimum cutout area in the input image of an image cut out from the input image with the composition pattern based on the composition pattern set by the setting means;
  • the image processing apparatus may further include a cutting unit that cuts out the cut region determined by the determining unit from the input image.
  • the determining means determines a plurality of candidates for an optimal cutout area in the input image of an image cut out from the input image with the composition pattern based on the composition pattern set by the setting means.
  • a display unit for displaying a plurality of candidates for the cutout region on the input image; and a selection unit for selecting any one of the plurality of candidates for the cutout region displayed by the display unit, The cutout unit can cut out the cutout region selected by the selection unit from the input image.
  • the image processing apparatus may further include an extraction unit that extracts the region of interest to be noted in the input image, and a determination unit that determines the scene of the input image.
  • the determination unit can determine the cutout region so that a center position of a minimum rectangular region including all of the target region of interest in the input image approaches a center of the cutout region in the input image.
  • the cutout area becomes larger, and the common area of the cutout area and the smallest rectangular area including all of the attention areas of interest in the input image becomes larger.
  • the cut-out area can be determined.
  • the determining means can determine the cutout region so that the cutout region does not protrude from the input image.
  • the image processing apparatus further includes a determination unit that determines whether or not the input image is a panoramic image by comparing the aspect ratio of the input image with a predetermined threshold, and the determination unit includes: When the determination unit determines that the input image is a panoramic image, an image cut out from the input image with the composition pattern based on the composition pattern set by the setting unit A plurality of candidates for the optimal cutout region can be determined.
  • the image processing apparatus may further include an adding unit that adds information indicating the cut-out area determined by the determining unit to the input image as EXIF information. *
  • the attention area includes a subject to be noticed in the input image
  • the image processing apparatus further includes detection means for detecting the orientation of the subject
  • the determination means is set by the setting means Based on the composition pattern and the orientation of the subject detected by the detection means, it is possible to determine an optimum cut-out area in the input image of an image cut out from the input image with the composition pattern.
  • the attention area includes a subject to be noticed in the input image
  • the image processing apparatus further includes a movement direction determination unit that determines a direction of movement of the subject
  • the determination unit includes the setting unit The optimal cutout in the input image of the image cut out from the input image with the composition pattern based on the composition pattern set by the movement direction and the direction of movement of the subject determined by the movement direction determination means The area can be determined.
  • the image processing apparatus further includes an overall motion calculating unit that determines a motion of the entire input image, and a local motion calculating unit that determines a motion of the region of interest, and the motion direction determining unit includes the overall motion calculating unit.
  • the direction of movement of the subject can be determined based on the direction of movement of the entire input image obtained by the above and the direction of movement of the attention area obtained by the local movement calculating means.
  • the image processing method includes a setting step of setting a composition pattern corresponding to the input image based on the number of regions of interest in the input image and the scene of the input image; And a determining step of determining an optimal cutout region in the input image of an image cut out from the input image with the composition pattern based on the composition pattern set in the setting step.
  • the program according to the first aspect of the present invention includes a setting step of setting a composition pattern corresponding to the input image based on the number of attention areas of interest in the input image and the scene of the input image, and the setting Based on the composition pattern set in the step, the computer is caused to execute a process including a determination step of determining an optimum cutout area in the input image of an image cut out from the input image with the composition pattern.
  • An imaging apparatus includes an imaging unit that captures an image of an object, an acquisition unit that acquires a scene of a captured image captured by the imaging unit, and a region of interest that includes an object of interest in the captured image. Based on the number and the scene acquired by the acquisition means, setting means for setting a composition pattern corresponding to the captured image, and based on the composition pattern set by the setting means, from the captured image Determining means for determining an optimum cut-out area in the captured image of an image cut out with the composition pattern;
  • a composition pattern corresponding to an input image is set based on the number of regions of interest in the input image and the scene of the input image, and based on the set composition pattern, An optimum cut-out area in the input image of the image cut out from the input image with the composition pattern is determined.
  • a subject is imaged, a scene of the captured image is acquired, and imaging is performed based on the number of regions of interest including the subject of interest in the captured image and the acquired scene.
  • a composition pattern corresponding to the image is set, and based on the set composition pattern, an optimum cut-out area in the captured image of an image cut out from the captured image with the composition pattern is determined.
  • an image with an optimal composition can be cut out even for a subject other than a person.
  • FIG. 1 It is a block diagram which shows the function structural example of one Embodiment of the image processing apparatus to which this invention is applied. It is a block diagram which shows the function structural example of an attention area extraction part.
  • 3 is a flowchart for describing image cutout processing of the image processing apparatus in FIG. 1. It is a figure which shows the example of an attention area. It is a figure explaining the composition pattern set based on the number of attention areas, and a scene. It is a figure explaining the example of the composition pattern set by the composition pattern setting part. It is a flowchart explaining the extraction area
  • FIG. 25 is a block diagram illustrating still another configuration example of the image processing apparatus. It is a flowchart explaining the image cutting-out process of the image processing apparatus of FIG. 5 is a diagram for explaining a coefficient of an objective function E. FIG. It is a figure explaining the extraction of the image of the extraction area
  • FIG. 25 is a block diagram illustrating still another configuration example of the image processing apparatus.
  • FIG. 25 is a block diagram illustrating still another configuration example of the image processing apparatus. It is a flowchart explaining the image cutting-out process of the image processing apparatus of FIG. FIG.
  • FIG. 25 is a block diagram illustrating still another configuration example of the image processing apparatus.
  • FIG. 31 is a flowchart for describing image cutting processing of the image processing apparatus of FIG. 30.
  • FIG. It is a block diagram which shows the function structural example of one Embodiment of the imaging device to which this invention is applied.
  • FIG. 33 is a flowchart for describing image cutout processing of the imaging apparatus of FIG. 32.
  • FIG. FIG. 25 is a block diagram illustrating still another configuration example of the image processing apparatus.
  • FIG. 35 is a flowchart for describing image cutting processing of the image processing apparatus of FIG. 34.
  • FIG. It is a flowchart explaining a direction detection process.
  • FIG. 35 is a flowchart for describing cutout region determination processing of the image processing apparatus of FIG. 34.
  • FIG. 35 is a flowchart for describing cutout region determination processing of the image processing apparatus of FIG. 34.
  • FIG. 25 is a block diagram illustrating still another configuration example of the image processing apparatus. It is a flowchart explaining the image cutting-out process of the image processing apparatus of FIG. It is a flowchart explaining a movement direction determination process. It is a flowchart explaining the cutting-out area
  • FIG. 1 shows a functional configuration example of an embodiment of an image processing apparatus to which the present invention is applied.
  • the image processing apparatus 11 in FIG. 1 sets a composition pattern corresponding to a region of interest and a scene of an input image input from an imaging apparatus such as a digital camera, and uses an optimum cutout region based on the composition pattern.
  • the cut image is output as an output image.
  • the image processing apparatus 11 includes an attention area extraction unit 31, a scene determination unit 32, a composition pattern setting unit 33, a composition analysis unit 34, and an image cutout unit 35.
  • the input image input to the image processing apparatus 11 is supplied to the attention area extraction unit 31, the scene determination unit 32, and the image cutout unit 35.
  • the attention area extraction unit 31 extracts the attention area of interest in the input image, and supplies attention area information representing the attention area to the composition pattern setting unit 33.
  • the attention area is a rectangular area including (surrounding) the subject (object) in the input image, and is set and extracted by the number of subjects in the input image.
  • the attention area information is, for example, the position of the vertex of the rectangular area.
  • FIG. 2 shows a functional configuration example of the attention area extraction unit 31.
  • the attention area extraction section 31 includes an attention degree calculation section 51, a attention rectangular area determination section 52, and a face rectangular area determination section 53.
  • the attention level calculation unit 51 calculates a feature amount for each pixel of the input image, and calculates the attention level for each pixel from the feature amount.
  • the feature amount includes the size of the edge component of the image, the difference in hue with neighboring pixels, the color distribution in a predetermined area of the image, the difference in average color of the entire image and the hue of each pixel, and the like.
  • the attention level calculation unit 51 generates an attention level map corresponding to one input image from the attention level (feature amount) for each pixel, and supplies the attention level map to the attention rectangular area determination unit 52.
  • the attention level map generated by the attention level calculation unit 51 is information that represents an area including a subject to be noted in one input image.
  • the attention level calculation unit 51 calculates a facial degree (facialness degree) from the feature amount obtained for each pixel of the input image, generates a facial degree map corresponding to one input image, and generates a facial rectangular area. It supplies to the determination part 53.
  • the face degree map generated by the attention degree calculation unit 51 is information that represents an area including a face to be noticed in one input image.
  • the attention rectangular area determination unit 52 determines the attention rectangular area based on the attention degree map from the attention degree calculation unit 51, and supplies attention rectangle area information representing the attention rectangle area to the composition pattern setting unit 33. More specifically, the attention rectangle area determination unit 52 sets a pixel (position) having a higher attention level than a predetermined threshold as the center of the rectangle in the attention level map, and a pixel having a lower attention level than the other thresholds in the periphery.
  • the target rectangular area is determined by setting (position) as an end point (vertex) of the rectangle.
  • the smallest rectangular region including them together is set as the rectangular region of interest.
  • the face rectangle area determination unit 53 determines a face rectangle area based on the face degree map from the attention level calculation unit 51, and supplies face rectangle area information representing the face rectangle area to the composition pattern setting unit 33. More specifically, the face rectangular area determining unit 53 sets the pixel (position) of the face nose as the center of the rectangle in the face degree map, and the pixel (position) in which the face degree changes (decreases) rapidly around the center. ) Is the end point (vertex) of the rectangle, the face rectangular area is determined.
  • attention rectangle area information obtained by the attention rectangle area determination unit 52 and the face rectangle area information obtained by the face rectangle area determination unit 53 are collectively referred to as attention area information.
  • the scene determination unit 32 extracts frequency information by frequency-converting the input image, determines the scene of the input image using the frequency information as a feature amount (vector), and is obtained as a result of the determination.
  • the scene information representing the scene is supplied to the composition pattern setting unit 33. More specifically, the scene determination unit 32 performs scene determination using a preset learning image and machine learning such as SVM (Support Vector Vector Machine).
  • two-class discrimination (one-to-one discrimination) is performed, for example, “coast” class and other classes, “rural landscape” class and other classes, “sky” class and Other classes, the “mountain” class and the other classes,... Are compared, and the respective scores are compared, and the class with the highest score is taken as the discrimination result.
  • the scene discriminating unit 32 uses SVM.
  • SVM Session-to-Network Interface
  • pattern recognition using a neural network or pattern recognition using pattern matching may be used.
  • the composition pattern setting unit 33 sets a composition pattern corresponding to the input image based on the number of region-of-interest information from the region-of-interest extraction unit 31 and the scene information from the scene determination unit 32, and sends the composition pattern to the composition analysis unit 34. Supply.
  • the composition pattern is determined in advance corresponding to the number of attention areas (subjects) and the scene. Details of the composition pattern will be described later with reference to FIG.
  • the composition analysis unit 34 determines the optimum cutout region in the input image of the image cut out with the composition pattern, and the optimum cutout region is sent to the image cutout unit 35. Supply.
  • the composition analysis unit 34 includes a composition model creation unit 34a, a safety model creation unit 34b, a penalty model creation unit 34c, an objective function creation unit 34d, and an optimization unit 34e.
  • the composition model creation unit 34 a creates a composition model representing a cut-out area based on the composition pattern from the composition pattern setting unit 33.
  • the composition model is represented by a predetermined energy function E c .
  • the safety model creation unit 34b creates a safety model for preventing the cutout region from becoming too small.
  • Safety model is represented by a predetermined energy function E s.
  • the penalty model creation unit 34c creates a penalty model for evaluating the area of the region that protrudes from the input image of the cutout region.
  • the penalty model is represented by a predetermined energy function E p .
  • the objective function creation unit 34d creates the objective function E from the energy function E c representing the composition model, the energy function E s representing the safety model, and the energy function E p representing the penalty model.
  • the optimization unit 34e determines a cutout region that minimizes the objective function E, and supplies it to the image cutout unit 35 as the most appropriate extraction region.
  • the image cutout unit 35 cuts out and outputs an image of the optimum extraction region from the input image based on the optimum extraction region from the composition analysis unit 34.
  • step S11 the attention area extraction unit 31 generates an attention degree map and a face degree map corresponding to the input image. More specifically, the attention level calculation unit 51 generates an attention level map corresponding to the input image, supplies the attention level map to the attention rectangular region determination unit 52, generates a facial degree map corresponding to the input image, and generates a facial rectangular region. It supplies to the determination part 53.
  • the attention area extraction unit 31 extracts and determines an attention area of interest in the input image based on the attention degree map and the face degree map. More specifically, the target rectangular area determination unit 52 determines a target rectangular area based on the attention level map from the attention level calculation unit 51, and displays the target rectangular area information representing the target rectangular area as a composition pattern setting unit. 33. Further, the face rectangular area determining unit 53 determines a face rectangular area based on the face degree map from the attention degree calculating unit 51 and supplies face rectangular area information representing the face rectangular area to the composition pattern setting unit 33. To do.
  • step S12 the target rectangular area and the face rectangular area are determined as the target area.
  • the face rectangular area may be collectively processed as the target rectangular area.
  • FIG. 1 An example of the attention area determined in this way is shown in FIG.
  • an input image P is an image in which one bird (crane) is flying in the sky.
  • step S ⁇ b> 12 attention is paid to one bird, and one attention area L is determined so as to include the bird.
  • step S ⁇ b> 13 the scene determination unit 32 extracts frequency information by performing frequency conversion on the input image, determines the scene of the input image using the frequency information as a feature amount (vector), The scene information representing the scene obtained as a result of the discrimination is supplied to the composition pattern setting unit 33.
  • step S ⁇ b> 14 the composition pattern setting unit 33 sets a composition pattern corresponding to the input image based on the number of attention area information from the attention area extraction unit 31 and the scene information from the scene determination unit 32. It supplies to the analysis part 34.
  • composition pattern set based on the number of attention areas (subjects) and a scene will be described with reference to FIG.
  • a horizontal line composition is set as a composition pattern.
  • the number of attention areas is 1, a three-division composition and a horizontal line composition are set as composition patterns. Further, when the number of attention areas is 2 to 5, a contrast composition and a horizontal line composition are set as composition patterns, and when the number of attention areas is 6 or more, a contrast composition and a horizontal line composition are set. .
  • a radiation composition is set as a composition pattern.
  • the number of attention areas is 1, a three-part composition and a radiation composition are set as the composition pattern.
  • a contrast composition and a radiation composition are set as composition patterns, and when the number of attention areas is 6 or more, a radiation composition and a pattern composition are set as composition patterns. .
  • composition pattern is set according to the number of attention areas in the input image whose scene is “sky”, the input image which is “mountain”, the input image which is “highway”,.
  • composition pattern that satisfies each composition is set.
  • composition pattern described in FIG. 5 and associated with the number of regions of interest and the scene may be set in advance or may be set as appropriate by the user.
  • composition pattern setting unit 33 an example of a composition pattern set by the composition pattern setting unit 33 will be described with reference to FIG.
  • FIG. 6 shows a three-part composition, and a balanced image is obtained by placing a subject at the intersection of a vertical line and a horizontal line.
  • composition 6 is a composition in which a similar subject and similar subjects are arranged.
  • composition B the main subject stands out by placing the main subject large and the other subjects small.
  • the composition C in FIG. 6 shows a hatched composition, and is used when it is desired to give a rhythmic feeling.
  • the composition C is a composition that can efficiently use a small area.
  • the composition D in FIG. 6 shows a radiation composition, and is used when it is desired to provide a sense of openness and spread. Examples of subjects include tree branches and sunlight from between clouds.
  • the composition E in FIG. 6 is a horizontal composition and is used when it is desired to have a lateral expansion.
  • the subject can be changed by shifting the position of the horizon in the vertical direction.
  • 6 is a vertical line composition, and is used when it is desired to emphasize the vertical direction of an image. Examples of subjects include tree trunks and roads.
  • the composition G in FIG. 6 is a perspective composition, and is used when a spread from the vanishing point (intersection of diagonal lines in the figure) is desired.
  • the composition H in FIG. 6 is a pattern composition, and is used when a plurality of similar subjects are regularly arranged to give a sense of rhythm and unity.
  • the composition pattern setting unit 33 is associated with the number of attention areas and scenes in FIG. 5 among the composition patterns shown in FIG. 6 based on the number of attention area information and the scene information. Set the composition pattern. Note that the composition pattern is not limited to the eight types shown in FIG. 6, and there may be more types of patterns.
  • composition pattern setting unit 33 performs the three-part composition associated in FIG. (Composition A) is set.
  • step S ⁇ b> 15 the composition analysis unit 34 executes a cut-out area determination process based on the composition pattern from the composition pattern setting unit 33, and an input image of an image cut out with the composition pattern Determine the optimal cutout area at.
  • step S ⁇ b> 31 the composition model creation unit 34 a of the composition analysis unit 34 creates a composition model representing a cut-out area based on the composition pattern from the composition pattern setting unit 33.
  • the composition model creation unit 34a obtains the energy function E c for the composition model.
  • the energy function E c is given by the following equation (1).
  • S VA represents the area of the region of interest, G DLhn, G DLvn, G DPn is given by the following equation (2).
  • L Dh, L Dv, P D respectively, divided into three lines divided into three horizontal in the composition (three horizontal dividing line), the vertical direction is divided into three in line (vertical 3 dividing line), An intersection (three-part line intersection) between the horizontal three-part line and the vertical three-part line is shown, and P n shows the center position of the region of interest. Further, d is the length of the diagonal line of the cutout region, and is given by the following formula (3).
  • each of G DLhn , G DLvn , and G DPn in Equation (1) increases as the center position of the region of interest approaches each of the horizontal three-part dividing line, vertical three-part dividing line, and three-part dividing line intersection.
  • the coefficients ⁇ hn , ⁇ vn , and ⁇ pn in equation (1) are the aspect ratio VA_aspect_ratio n of the region of interest given by the following equation (4) when the width and height of the region of interest are Crop_width and Crop_height, respectively.
  • the horizontal axis indicates the aspect ratio VA_aspect_ratio n
  • the vertical axis indicates the values of the coefficients ⁇ hn , ⁇ vn , and ⁇ pn .
  • the coefficient ⁇ hn when the aspect ratio VA_aspect_ratio n is 0 to r_min, the coefficient ⁇ hn is 1.0, and when the aspect ratio VA_aspect_ratio n is larger than r_mid1, the coefficient ⁇ hn is 0.0. Further, when the aspect ratio VA_aspect_ratio n is r_min to r_mid1, the coefficient ⁇ hn decreases as the aspect ratio VA_aspect_ratio n increases. That is, in Expression (1), the coefficient ⁇ hn is effective when the attention area is vertically long.
  • the coefficient ⁇ vn is 0.0, and when the aspect ratio VA_aspect_ratio n is greater than r_max, the coefficient ⁇ vn is 1.0. Further, when the aspect ratio VA_aspect_ratio n is r_mid2 to r_max, the coefficient ⁇ vn increases as the aspect ratio VA_aspect_ratio n increases. That is, in Equation (1), when the region of interest is horizontally long, the coefficient ⁇ vn is effective.
  • the coefficient ⁇ pn is 0.0
  • the coefficient ⁇ pn is 1.0
  • the aspect ratio VA_aspect_ratio n is r_min to R_mid1
  • coefficient alpha pn increases
  • the aspect ratio VA_aspect_ratio n is when the r_mid2 to r_max
  • the increase in the aspect ratio VA_aspect_ratio n Accordingly, the coefficient ⁇ pn decreases. That is, in Equation (1), the coefficient ⁇ pn is effective when the region of interest has a shape close to a square.
  • the expression (1) is expressed as a horizontal three-part dividing line if the region of interest is vertically long, a vertical three-part dividing line if it is horizontally long, or a three-part dividing line intersection if it is close to a square. It shows that the value of the energy function E c increases as it gets closer.
  • the attention area R h is vertically long and close to a horizontal dividing line
  • the attention area R v is horizontally long and close to a vertical dividing line
  • the attention area R p is close to a square. Since it is close to the intersection of the three dividing lines, the value of the energy function E c becomes large.
  • the case where the three-division composition is used as the composition pattern has been described.
  • a composition (9-division composition) obtained by further dividing one divided area in the three-division composition into three. You may make it use.
  • the 9-part composition it is expected that the composition will be deeper than the 3-part composition.
  • L dh , L dv , and P d are respectively a line that divides the horizontal direction into 9 (horizontal 9 division line), a line that divides the vertical direction into 9 (vertical 9 division line), The intersection (9 division line intersection) of the horizontal 9 division line and the vertical 9 division line is shown. However, as shown in FIG. 10, it is assumed that the intersection of the horizontal 9 dividing lines h1a and h1b and the vertical 9 dividing lines v1a and v1b in the central divided area in the three divided composition is not included.
  • the safety model creation unit 34b creates a safety model for preventing the cutout region from becoming too small.
  • the safety model creating section 34b obtains the energy function E s of the safety model.
  • Energy function E s is given by the following equation (7).
  • the minimum rectangle including all the attention areas in the input image is defined as all the attention rectangular areas, the area is S WVA , the center position is P WVA, and the area of the cut-out area is S Let Crop be the center position and P Crop . Furthermore, the area of the common area of all the attention rectangular areas and the cut-out areas is assumed to be SWVA & Crop .
  • Equation (7) the energy function E s of Equation (7) becomes an area S WVA & Crop larger the larger the value of the common area of the whole target rectangle region and cutout region (the first term of equation (7)).
  • step S33 the penalty model creation unit 34c creates a penalty model for evaluating the area of the region that protrudes from the input image of the cutout region.
  • the penalty model creating section 34c obtains the energy function E p for the penalty model.
  • the energy function E p is given by the following equation (8).
  • the energy function E p of Expression (8) becomes a larger value as the area S Over of the cutout region protruding from the input image region is larger.
  • step S34 the objective function creation unit 34d creates an objective function E given by the following equation (9) from the energy functions E c , E s , and E p .
  • coefficients C C , C S , and C P are adjustment coefficients for the energy functions E c , E s , and E p , respectively.
  • the objective function E indicates that the smaller the value, the closer the obtained cutout area approaches the optimum cutout area.
  • step S35 the optimization unit 34e determines the most appropriate extraction region based on the position information of the extraction region that minimizes the objective function E, and supplies it to the image extraction unit 35. More specifically, the optimization unit 34e optimizes the objective function E, for example, using particle swarm optimization (ParticlePartSwarm Optimization: PSO).
  • particle swarm optimization PSO
  • the optimization unit 34e sets the objective function E by particle group optimization using the start position (horizontal direction and vertical direction) of the cutout region and the size (width and height) of the cutout region as variables. Find the minimum position information (start position and size of the cutout area). The optimization unit 34e determines the most appropriate extraction area based on the obtained position information, and the process returns to step S15.
  • the optimization unit 34e may use the cutout start position (horizontal direction and vertical direction) of the cutout area and the size (width) of the cutout area as variables. Furthermore, the rotation angle of the cutout area may be added as a variable.
  • FIG. 13 shows an example of the most appropriate extraction area determined in this way.
  • the most appropriate extraction area Pc is determined so that one bird is arranged at the position of the intersection of the three dividing lines in the three divided composition.
  • step S ⁇ b> 16 the image cutout unit 35 cuts out and outputs an image of the optimal extraction region from the input image based on the optimal extraction region from the composition analysis unit 34.
  • the image cutout unit 35 cuts out an image of the optimal extraction region Pc of the three-part composition as shown in FIG. 14 based on the optimal extraction region Pc from the composition analysis unit 34.
  • the cut-out area can be determined based on the number of attention areas in the input image and the composition pattern associated with the scene of the input image. Since the region of interest is determined even if the subject is other than a person, an image with an optimal composition can be cut out even if the subject is other than a person. In addition, since the composition pattern is set based on the number of regions of interest and the scene, it is possible to cut out an image with the optimum composition regardless of the category of the input image.
  • the composition pattern is determined in advance in association with the number of regions of interest and the scene.
  • object recognition is performed on the input image, and a composition pattern corresponding to the object is set. You may make it do.
  • FIG. 15 shows a configuration example of an image processing apparatus in which object recognition is performed on an input image, and a composition pattern corresponding to the object is set.
  • the image processing apparatus 111 in FIG. 15 configurations having the same functions as those provided in the image processing apparatus 11 in FIG. 1 are denoted by the same names and the same reference numerals, and description thereof is omitted as appropriate. It shall be.
  • the image processing apparatus 111 in FIG. 15 differs from the image processing apparatus 11 in FIG. 1 in that a composition pattern setting unit 131 is provided instead of the composition pattern setting unit 33.
  • the scene discriminating unit 32 discriminates the scene of the input image, and supplies scene information representing the scene obtained as a result of the discrimination to the composition pattern setting unit 131 together with the input image.
  • the composition pattern setting unit 131 recognizes an object in the input image from the scene determination unit 32.
  • the composition pattern setting unit 131 sets a composition pattern corresponding to the input image based on the scene represented by the scene information from the scene determination unit 32 and the recognized object, and supplies the composition pattern to the composition analysis unit 34. .
  • the composition pattern setting unit 131 stores a composition pattern in which the arrangement and ratio of objects in the composition are predetermined for each scene, and the composition pattern corresponding to the scene and the object is stored from the stored composition pattern. By selecting, a composition pattern is set.
  • the arrangement and ratio of objects in the composition can be set so as to improve the balance of the composition. Note that a composition pattern in which the arrangement and ratio of objects in the composition for each scene are determined in advance may be stored in a database (not shown) or the like.
  • step S114 the composition pattern setting unit 131 recognizes an object in the input image from the scene determination unit 32.
  • the composition pattern setting unit 131 sets a composition pattern corresponding to the input image based on the scene represented by the scene information from the scene determination unit 32 and the recognized object, and supplies the composition pattern to the composition analysis unit 34. .
  • the composition pattern setting unit 131 recognizes these objects in the input image shown in FIG. 17, the proportion of the sky, rocks, grass, and people in the composition is 30% from the stored composition patterns. , 20%, 40%, 10% composition pattern is selected. As a result, the image having the composition indicated by the frame on the input image in FIG. 17 is finally cut out.
  • an object in the input image can be recognized, and a composition pattern can be set according to the object and the scene. Since the arrangement and ratio of the objects in the composition determined by the composition pattern are set so as to improve the balance of the composition, it is possible to cut out an image having the optimum composition.
  • FIG. 18 shows an example of the configuration of an image processing apparatus in which a plurality of extraction area candidates in an input image are determined.
  • the same name and the same reference numeral are given to the configuration having the same function as that provided in the image processing device 11 of FIG. 1, and the description thereof is omitted as appropriate. It shall be.
  • the image processing apparatus 211 in FIG. 18 differs from the image processing apparatus 11 in FIG. 1 in that a composition analysis unit 231 is provided instead of the composition analysis unit 34, and a display unit 232 and an operation input unit 233 are newly provided. It is a point.
  • the composition analysis unit 231 determines a plurality of candidates (cutout region candidates) of the optimum cutout region in the input image of the image cut out with the composition pattern, This is supplied to the display unit 232. Further, the composition analysis unit 231 supplies the selected cutout region to the image cutout unit 35 based on an operation signal from the operation input unit 233 indicating that any one of the cutout region candidates has been selected.
  • the composition analysis unit 231 includes a composition model creation unit 231a, a safety model creation unit 231b, a penalty model creation unit 231c, an objective function creation unit 231d, and an optimization unit 231e. Note that the composition model creation unit 231a to objective function creation unit 231d have the same functions as the composition model creation unit 34a to objective function creation unit 34d in FIG.
  • the optimization unit 231e determines a cut-out area from which the top n pieces are obtained from the smaller objective function E, and supplies it to the display unit 232 as a cut-out area candidate.
  • the display unit 232 is configured as a monitor in which an operation input unit 233 as a touch panel is stacked, and displays a frame indicating a cut-out area candidate from the composition analysis unit 231 on the input image or instructs the user to perform an operation.
  • the operation image of is displayed.
  • the operation input unit 233 is configured as a touch panel stacked on the display surface of the display unit 232, and supplies an operation signal corresponding to a user operation to the composition analysis unit 231.
  • step S215 the composition analysis unit 231 determines a plurality of candidates for the optimum cutout region in the input image of the image cut out based on the composition pattern from the composition pattern setting unit 33. Then, a cut-out area candidate determination process is performed.
  • composition area candidate determination processing of composition analysis unit [Composition area candidate determination processing of composition analysis unit]
  • the extraction area candidate determination process in step S215 of the flowchart of FIG. 19 will be described. Note that the processing of steps S231 to S234 in the flowchart of FIG. 20 is the same as the processing of steps S31 to S34 described with reference to the flowchart of FIG.
  • step S235 the optimization unit 231e determines a cutout region from which the top n pieces are obtained from the smaller objective function E, and supplies the cutout region candidate to the display unit 232 as a cutout region candidate.
  • the optimization unit 231e holds a local minimum value and position information at that time.
  • n sets whose position information is greatly different are supplied to the display unit 232 from the top in ascending order of the value of the objective function E, and the process returns to step S15.
  • composition analysis unit 231 can determine the extraction region candidate.
  • step S216 the display unit 232 displays a frame indicating the extraction region candidate from the composition analysis unit 231 on the input image, for example, as illustrated in FIG.
  • the 21 displays a frame indicating two cutout area candidates and names of “candidate 1” and “candidate 2” for identifying each frame.
  • the user can select cut-out area candidates indicated by “candidate 1” and “candidate 2” by the operation input unit 233 as a touch panel stacked on the display unit 232.
  • step S217 the composition analysis unit 231 determines whether any one of the extracted region candidates has been selected. That is, the composition analysis unit 231 determines whether or not an operation signal indicating that any one of the cutout region candidates has been selected is supplied from the operation input unit 233.
  • step S217 If it is determined in step S217 that none of the cutout area candidates has been selected, an operation signal indicating that any of the cutout area candidates has been selected from the operation input unit 233 is supplied. The process is repeated.
  • step S217 if it is determined in step S217 that any one of the cutout area candidates has been selected, the composition analysis unit 231 indicates that one of the cutout area candidates from the operation input unit 233 has been selected. Based on the operation signal, the selected cutout region is supplied to the image cutout unit 35.
  • step S218 the image cutout unit 35 cuts out and outputs the image of the selected cutout region from the input image based on the cutout region from the composition analysis unit 231.
  • a plurality of optimal extraction area candidates can be displayed and selected, so that the user can confirm and select the extraction area candidates. Therefore, it is possible to cut out an image having an optimal composition that suits the user's preference.
  • the size of the input image has not been mentioned, but a panoramic image may be input as the input image.
  • FIG. 23 shows a configuration example of an image processing apparatus in which a panoramic image is input as an input image.
  • the same name and the same reference numeral are given to the components having the same functions as those provided in the image processing apparatus 11 in FIG. 1, and the description thereof is omitted as appropriate. It shall be.
  • the image processing apparatus 311 in FIG. 23 differs from the image processing apparatus 11 in FIG. 1 in that a composition analysis unit 332 is provided instead of the composition analysis unit 34 in which the panorama discrimination unit 331 is newly provided. is there.
  • the panorama determination unit 331 determines whether or not the input image is a panorama image, and supplies the determination result to the composition analysis unit 332.
  • the composition analysis unit 332 determines, based on the composition pattern from the composition pattern setting unit 33, an extraction region in the input image of the image extracted based on the composition pattern, according to the determination result from the panorama determination unit 331.
  • the cutout area is supplied to the image cutout unit 35.
  • the composition analysis unit 332 includes a composition model creation unit 332a, a safety model creation unit 332b, a penalty model creation unit 332c, an objective function creation unit 332d, and an optimization unit 332e.
  • the composition model creation unit 332a, the safety model creation unit 332b, and the penalty model creation unit 332c have the same functions as the composition model creation unit 34a, the safety model creation unit 34b, and the penalty model creation unit 34c in FIG. 1, respectively. Since it is provided, the description thereof is omitted.
  • Objective function creating section 332d the discrimination result from the panorama discriminating section 331, if the input image indicates that it is a panorama image, in the objective function E, to disable the term energy function E s.
  • the optimization unit 332e determines a cutout region that minimizes the objective function E, and sets the image cutout unit as the most appropriate extraction region. 35.
  • the optimization unit 231e determines a cut-out region from which the top n pieces are obtained from the smaller objective function E. Then, it is supplied to the image cutout unit 35 as a cutout region candidate.
  • the panorama determining unit 331 determines whether the input image is a panoramic image. More specifically, the panorama discrimination unit 331 compares the aspect ratio In_aspect_ratio expressed by the following formula (10) with a predetermined threshold value In_aspect_ratio_th when the width and height of the input image are In_width and In_height, respectively. To do.
  • step S315 If it is determined in step S315 that the input image is a panoramic image, the panorama determining unit 331 supplies the aspect ratio In_aspect_ratio to the composition analysis unit 332 together with information that the input image is a panoramic image. The process proceeds to step S316.
  • step S316 the composition analysis unit 332 performs extraction region candidate determination processing based on the information that the input image from the panorama determination unit 331 is a panorama image and the aspect ratio In_aspect_ratio.
  • the cut-out area candidate determination process by the image processing apparatus 311 in FIG. 23 is substantially the same as the process of the image processing apparatus 211 in FIG. 18 described with reference to the flowchart in FIG. .
  • the objective function creating section 332d in the objective function E, to disable the term energy function E s. More specifically, the objective function creation unit 332d switches the value of the coefficient C S in the objective function E shown by the equation (9) according to the characteristics shown in FIG.
  • FIG. 25 shows the relationship between the aspect ratio In_aspect_ratio of the input image and the coefficient C S in the objective function E.
  • the aspect ratio In_aspect_ratio is, when the predetermined threshold In_aspect_ratio_th larger, when the value of the coefficient C S in objective function E less than 0.0, and the predetermined threshold In_aspect_ratio_th, the value of the coefficient C S in objective function E 1.0. That is, when the input image is a panoramic image, the energy function for the safety model for preventing the cutout region from becoming too small in the objective function E is set to zero.
  • the cut-out area candidate is supplied to the image cut-out unit 35 as a relatively small cut-out area.
  • step S317 the image cutout unit 35 cuts out from the input image (panoramic image) that is input based on the cutout region candidates from the composition analysis unit 332 as shown in FIG. A region candidate image is cut out and output.
  • FIG. 26 shows an example of extraction region candidates in the panoramic image.
  • a frame indicating three extracted area candidates 1 to 3 is set on a panoramic image as an input image.
  • step S315 when it is determined in step S315 that the input image is not a panorama image, the panorama determination unit 331 supplies information indicating that the input image is not a panorama image to the composition analysis unit 332. Then, the process proceeds to step S318, where the most appropriate extraction area is determined, and in step S319, the image of the optimal extraction area is cut out from the input image.
  • the user can select an image having an optimal composition that suits the user's preference from a plurality of compositions cut out from the panoramic image.
  • FIG. 27 shows a configuration example of an image processing apparatus that outputs an input image as it is together with a cutout region image.
  • components having the same functions as those provided in the image processing apparatus 11 in FIG. 1 are denoted by the same names and the same reference numerals, and description thereof will be omitted as appropriate. It shall be.
  • the image processing apparatus 411 in FIG. 27 is different from the image processing apparatus 11 in FIG. 1 in that the input image is output as it is together with the cut-out area image.
  • the user can compare the input image and the cut-out area image when these are output to the display device. For example, when the input image is an image captured by the user with the imaging device, the user can confirm the difference between the composition of the image captured by the user and the composition of the clipped image.
  • extraction region candidate determination process by the image processing apparatus 411 in FIG. 27 is the same as the process of the image processing apparatus 11 in FIG. 1 described with reference to the flowchart in FIG.
  • FIG. 28 shows an example of the configuration of an image processing apparatus that outputs only information representing a cutout area together with the cutout area image.
  • the same name and the same reference numeral are given to the configuration having the same function as that provided in the image processing device 11 in FIG. 1, and the description thereof is omitted as appropriate. It shall be.
  • the image processing apparatus 511 in FIG. 28 differs from the image processing apparatus 11 in FIG. 1 in that the image cutout unit 35 is deleted and the input image is output as it is.
  • composition analysis unit 34 in FIG. 28 determines the optimum cutout region in the input image of the image cut out based on the composition pattern from the composition pattern setting unit 33, and determines the most suitable extraction region. Information to be output is output to an external device or the like.
  • step S516 the image processing device 511 outputs the input image as it is, and the composition analysis unit 34 outputs information representing the most suitable extraction area in the determined input image to an external device or the like.
  • the capacity of a frame memory (not shown) in the image processing apparatus 511 can be reduced.
  • the configuration has been described in which the input image and the information indicating the most appropriate extraction area are output separately.
  • the input image and the information indicating the optimal extraction area may be output as one data. .
  • FIG. 30 shows a configuration example of an image processing apparatus configured to output an input image and information representing the most appropriate extraction area as one data.
  • the image processing apparatus 611 in FIG. 30 components having the same functions as those provided in the image processing apparatus 11 in FIG. 1 are given the same names and the same reference numerals, and description thereof is omitted as appropriate. It shall be.
  • the image processing apparatus 611 in FIG. 30 differs from the image processing apparatus 11 in FIG. 1 in that an adding unit 631 is provided in place of the image cutout unit 35.
  • composition analysis unit 34 in FIG. 30 determines an optimum cutout region in the input image of the image cut out based on the composition pattern from the composition pattern setting unit 33, and determines the most suitable extraction region. Information to be represented is supplied to the adding unit 631.
  • the adding unit 631 adds information representing the most suitable area from the composition analysis unit 34 to the input image as EXIF information, and outputs it as an output image.
  • step S616 the adding unit 631 adds information representing the most suitable area from the composition analysis unit 34 to the input image that has been input as EXIF information, and outputs it as an output image.
  • information indicating the most suitable extraction area can be added to the input image as EXIF information and output. Therefore, an image of a frame memory (not shown) in the image processing apparatus 611 is generated without generating an image of the extraction area. Capacity can be reduced.
  • an image processing apparatus that outputs an image of a cutout area using an image picked up by an image pickup apparatus or the like as an input image has been described.
  • the image pickup apparatus is configured to determine a cutout area for a picked-up imaged image. You may do it.
  • FIG. 32 shows a configuration example of an imaging apparatus that determines a cutout region for a captured image.
  • components having the same functions as those provided in the image processing device 11 in FIG. 1 are denoted by the same names and the same reference numerals, and description thereof will be omitted as appropriate. Shall.
  • the imaging device 711 in FIG. 32 is different from the image processing device 11 in FIG. 1 in that an imaging unit 731, an image processing unit 732, and a display unit 733 are newly provided.
  • composition analysis unit 34 in FIG. 32 determines an optimum cutout region in the input image of the image cut out based on the composition pattern from the composition pattern setting unit 33, and determines the most suitable extraction region. And supplied to the image cutout unit 35 and the display unit 733.
  • the imaging unit 731 is configured to include an optical lens, an imaging device, and an A / D (Analog / Digital) conversion unit (none of which are shown).
  • the imaging unit 731 captures a subject by photoelectrically converting light incident on the optical lens and receiving an image, and A / D converts the obtained analog image signal.
  • the imaging unit 731 supplies digital image data (captured image) obtained as a result of A / D conversion to the image processing unit 732.
  • the image processing unit 732 performs image processing such as noise removal processing on the captured image from the imaging unit 731, and supplies the processed image to the attention area extraction unit 31, the scene determination unit 32, the image cutout unit 35, and the display unit 733.
  • the display unit 733 displays a frame indicating the most appropriate extraction region from the composition analysis unit 34 on the captured image from the image processing unit 732, or displays an image of the optimal extraction region cut out by the image cutout unit 35. .
  • step S 711 the imaging unit 731 images the subject and supplies the obtained captured image to the image processing unit 732.
  • step S ⁇ b> 712 the image processing unit 732 performs image processing such as noise removal processing on the captured image from the imaging unit 731, and the attention area extraction unit 31, the scene determination unit 32, the image cutout unit 35, and the display unit 733. To supply.
  • step S ⁇ b> 718 the display unit 733 displays a frame indicating the most appropriate extraction area from the composition analysis unit 34 on the captured image from the image processing unit 732.
  • the process proceeds to step S719.
  • step S719 the image cutout unit 35 cuts out the image of the optimal extraction region from the captured image from the image processing unit 732 based on the optimal extraction region from the composition analysis unit 34.
  • step S720 the display unit 733 displays the image of the most appropriate extraction area extracted by the image extraction unit 35.
  • the cut-out area can be determined based on the number of attention areas in the captured image and the composition pattern associated with the scene of the captured image. Since the region of interest is determined even if the subject is other than a person, an image with an optimal composition can be cut out even if the subject is other than a person. In addition, since the composition pattern is set based on the number of regions of interest and the scene, it is possible to cut out an image with the optimum composition regardless of the category of the captured image.
  • the configuration for determining the optimum cutout region has been described regardless of the direction in which the subject included in the attention region is directed.
  • the optimum cutout region may be determined according to the orientation of the subject. Good.
  • FIG. 34 shows an example of the configuration of an image processing apparatus in which the optimum cutout area is determined according to the orientation of the subject.
  • the image processing apparatus 811 in FIG. 34 components having the same functions as those provided in the image processing apparatus 11 in FIG. 1 are denoted by the same names and the same reference numerals, and description thereof is omitted as appropriate. It shall be.
  • composition analysis unit 832 differs from the image processing apparatus 11 in FIG. 1 in that an orientation detection unit 831 is newly provided and a composition analysis unit 832 is provided in place of the composition analysis unit 34. .
  • the attention area extraction unit 31 extracts the attention area of interest in the input image, and supplies attention area information representing the attention area to the composition pattern setting unit 33 and the orientation detection unit 831.
  • the scene discrimination unit 32 discriminates the scene of the input image, supplies the scene information representing the scene obtained as a result of the discrimination to the composition pattern setting unit 131 together with the input image, and sends the scene information to the orientation detection unit. 831.
  • the orientation detection unit 831 detects the orientation of the subject included in the attention area represented by the attention area information from the attention area extraction unit 31 in the input image, and supplies the orientation information indicating the direction to the composition analysis unit 832. .
  • the composition analysis unit 832 determines an optimum cut-out area in the input image of the image cut out with the composition pattern. , And supplied to the image cutout unit 35.
  • the composition analysis unit 832 includes a composition model creation unit 832a, a safety model creation unit 832b, a penalty model creation unit 832c, an objective function creation unit 832d, and an optimization unit 832e.
  • the composition model creation unit 832a to the objective function creation unit 832d have the same functions as the composition model creation unit 34a to the objective function creation unit 34d in FIG.
  • the optimization unit 832e determines a cutout region that minimizes the objective function E based on the direction information from the direction detection unit 831, and supplies the cutout region to the image cutout unit 35 as the most appropriate extraction region.
  • step S815 the orientation detection unit 831 executes orientation detection processing to detect the orientation of the subject included in the attention area represented by the attention area information from the attention area extraction unit 31 in the input image.
  • step S821 the direction detection unit 831 determines whether or not the attention region represented by the attention region information from the attention region extraction unit 31 is a face rectangular region.
  • step S821 If it is determined in step S821 that the attention area is a face rectangular area, that is, if attention area information from the attention area extracting unit 31 is face rectangular area information, the process proceeds to step S822.
  • step S822 the orientation detection unit 831 detects the orientation of the face included in the face rectangular area represented by the face rectangular region information in the input image, and supplies the orientation information indicating the orientation to the composition analysis unit 832.
  • the orientation detection unit 831 uses a tree structure formed by learning face images in various orientations as learning samples in advance, with respect to a face image included in the face rectangular area, Face orientation is identified (detected) by repeating discrimination from the most upstream node of the structure toward the end node. For example, the orientation detection unit 831 learns in advance face images facing nine directions of front, top, bottom, left, right, top right, bottom right, top left, and bottom left, and the face detection unit 831 The direction is selected from the nine directions.
  • orientation detection unit 831 is not limited to the above-described method, and may naturally detect the face orientation by another method.
  • step S821 determines whether the attention area is a face rectangular area. If it is determined in step S821 that the attention area is not a face rectangular area, that is, if attention area information from the attention area extraction unit 31 is attention rectangular area information, the process proceeds to step S823.
  • step S823 the direction detection unit 831 detects the direction of the subject included in the target rectangular area represented by the target rectangular area information in the input image based on the scene information from the scene determination unit 32, and represents the direction.
  • the orientation information is supplied to the composition analysis unit 832.
  • the orientation detection unit 831 is an image in which objects that can exist in the scene face the nine directions of front, top, bottom, left, right, top right, bottom right, top left, and bottom left. Is stored, and a template of an object corresponding to a subject included in the target rectangular area is searched from templates corresponding to the scene represented by the scene information from the scene determination unit 32, and the searched template By performing template matching based on the above, the orientation of the subject included in the target rectangular area is specified (detected).
  • the direction detection unit 831 determines “ The “flower” template is searched, and template matching is performed based on the template to identify the direction of “flower” as the subject.
  • orientation detection unit 831 is not limited to the method described above, and may naturally detect the orientation of the subject by another method.
  • the orientation detection unit 831 identifies the subject and its orientation from the template corresponding to the scene information using the template of the object corresponding to the subject. For example, the orientation detection unit 831 Using a recognizer that recognizes the target object, generated by executing statistical learning processing based on the feature quantity, determines whether the target object exists in the input image based on the feature quantity in the input image By doing so, the subject and its direction may be identified.
  • the orientation detection unit 831 detects the orientation of the subject included in the attention area in the input image.
  • step S816 the composition analysis unit 832 executes the cut-out area determination process based on the composition pattern from the composition pattern setting unit 33 and the direction information from the direction detection unit 831. An optimum cut-out area in an input image of an image cut out with a composition pattern is determined.
  • steps S831 to S834 in the flowchart of FIG. 37 is the same as the processing of steps S31 to S34 described with reference to the flowchart of FIG.
  • step S835 the optimization unit 832e determines the most appropriate extraction region based on the position information of the extraction region that minimizes the objective function E and the orientation information from the orientation detection unit 831, and the image extraction unit 35 To supply.
  • FIG. 38 shows faces D 10 to D 18 facing front, top, top right, right, bottom right, bottom, bottom left, left, top left, respectively, facing each other. It corresponds to the orientation information that represents the orientation. That is, the orientation information D 10 represent respectively the particle diameters in the input image, face represents that faces the front, the orientation information D 11 represents the fact that the face is facing up, orientation information D 12 is It means that the face is facing the upper right.
  • orientation information D 13 represents the fact that the face is facing to the right
  • the orientation information D 14 represents that the face is facing the bottom right.
  • the orientation information D 15 indicates that the face is facing downward
  • the orientation information D 16 indicates that the face is facing lower left
  • the orientation information D 17 indicates that the face is left. it represents that facing
  • orientation information D 18 represents that the face is facing the upper left.
  • the optimization section 832e in accordance with the orientation information D 10 to D 18, and determines the placement of the subject (face) in 3 divided composition, object The position information of the cutout area that minimizes the function E is obtained, and the most appropriate extraction area is determined based on the position information.
  • the optimization unit 832 e is illustrated in FIG. 39. the placement of the face in the three-part composition, a 3 division line intersection P 0.
  • the optimization unit 832 e arranges the face in the three-part composition shown in FIG. and the 3 dividing line intersection P 1.
  • the optimization section 832e when the direction information is information D 12 orientation, i.e., when the face is facing the top right, the optimization section 832e has a placement of the face in the three-part composition shown in Figure 39, 3 division line intersection P 2 And Further, when the direction information is the direction information D 18, that is, when the face is facing to the upper left, the optimization section 832e has a placement of the face in the three-part composition shown in Figure 39, 3 division line intersection P 3 And
  • the optimization unit 832 e arranges the face in the three-part composition shown in FIG. 39. Is one of the three dividing line intersection points P 0 and P 1 . Further, when the direction information is the direction information D 11, that is, when the face is facing up, the optimization section 832e has a placement of the face in the three-part composition shown in Figure 39, 3 division line intersection P 2 , and any of the P 3. As described above, when two or more face arrangements are selected for the orientation information, the objective function E is determined to be smaller.
  • the optimization unit 832e determines the face arrangement in the three-part composition according to the face orientation. In particular, the optimization unit 832e determines the face arrangement so that the space on the side facing the face is widened in the three-part composition. As a result, an object or landscape ahead of the human face (line of sight) as a subject can be included in the cut-out area, so that it is possible to cut out an image with a wider and optimal composition.
  • one of the orientation information D 20 to D 28 shown in FIG. 40 is supplied to the optimizing section 832e from the direction detecting unit 831.
  • FIG 40 toward the figure, front, top, top right, right, lower right, lower, lower left, left, upper left and flowers D 20 to D 28 are shown facing each, each thereof facing to It corresponds to the orientation information that represents the orientation. That is, the orientation information D 20, in the input image, flowers represents that faces the front, the orientation information D 21 represents the fact that flowers are facing up, orientation information D 22 is It indicates that the flower is facing the upper right. Likewise, the orientation information D 23, the flower represents that points to the right, the orientation information D 24 represents that flowers facing lower right.
  • the orientation information D 25 indicates that the flower is facing downward, the orientation information D 26 indicates that the flower is facing lower left, and the orientation information D 27 indicates that the flower is left.
  • the direction information D 28 indicates that the flower is facing the upper left.
  • the optimization section 832e in accordance with the orientation information D 20 to D 28, and determines the placement of the subject (flower) in 3 divided composition, the objective function E The position information of the cut-out area that minimizes the position is obtained, and the most appropriate extraction area is determined based on the position information.
  • the optimization unit 832 e performs the flower arrangement in the three-part composition shown in FIG. 39. Let it be a three-partition line intersection point P0. Further, when the direction information is the direction information D 26, that is, when the flower is oriented left lower saw, optimization unit 832e includes, a placement of the flower in the 3 dividing the composition shown in Figure 39, 3 division line intersection P Set to 1 . Further, when the orientation information is any of the orientation information D 22 and D 23 , that is, when the flower is facing the upper right or the right, the optimization unit 832 e arranges the flowers in the three-part composition shown in FIG. and the 3 dividing line intersection P 2. When the orientation information is any of the orientation information D 27 and D 28 , that is, when the flower is facing left or upper left, the optimization unit 832 e arranges the flowers in the three-part composition shown in FIG. and the 3 dividing line intersection P 3.
  • the optimization unit 832e determines the flower arrangement in the three-division composition shown in FIG. 39 as the three-division line intersection point P 0. , P 1 .
  • the orientation information is any of the orientation information D 20 and D 21 , that is, when the flower is facing frontward or upward
  • the optimization unit 832e arranges the flower in the three-part composition shown in FIG. Is one of the three dividing line intersection points P 2 and P 3 .
  • the arrangement is determined such that the objective function E becomes smaller.
  • the optimization unit 832e determines the arrangement of the flowers in the three-part composition according to the direction of the flowers. In particular, the optimization unit 832e determines the arrangement of the flowers so that the space on the side facing the flowers is widened in the three-divided composition. As a result, an object or landscape at the tip of a flower as a subject can be included in the cutout region, so that it is possible to cut out an image having a wider and optimal composition.
  • the configuration for determining the optimum cutout area according to the direction of the subject has been described, but the optimum cutout area may be decided according to the movement of the subject.
  • FIG. 41 shows a configuration example of an image processing apparatus in which the optimum cutout region is determined according to the movement of the subject.
  • components having the same functions as those provided in the image processing apparatus 11 in FIG. 1 are denoted by the same names and the same reference numerals, and description thereof will be omitted as appropriate. It shall be.
  • the image processing device 861 in FIG. 41 is different from the image processing device 11 in FIG. 1 in that it includes a frame buffer 881, a GMV (Global Motion Vector) calculation unit 882, an LMV (Local Motion Vector) calculation unit 883, and a motion direction.
  • a determination unit 884 is newly provided, and a composition analysis unit 885 is provided instead of the composition analysis unit 34.
  • the attention area extraction unit 31 extracts the attention area of interest in the input image, and supplies attention area information representing the attention area to the composition pattern setting unit 33 and the LMV calculation unit 883.
  • the frame buffer 881 holds an input image for one frame and supplies it to the GMV calculation unit 882 and the LMV calculation unit 883.
  • the GMV calculation unit 882 calculates GMV representing the motion of the entire image from the input image and the input image one frame before from the frame buffer 881 (hereinafter referred to as the previous frame input image), and sends it to the motion direction determination unit 884. Supply.
  • the LMV calculation unit 883 calculates an LMV representing a local motion in the attention area represented by the attention area information from the attention area extraction unit 31 based on the input image and the previous frame input image from the frame buffer 881. It supplies to the direction determination part 884.
  • the movement direction determination unit 884 determines the direction (movement direction) of the subject included in the attention area, and determines the movement direction.
  • the motion direction information to be expressed is supplied to the composition analysis unit 885.
  • the composition analysis unit 885 determines an optimum cut-out area in the input image of the image cut out with the composition pattern. It is determined and supplied to the image cutout unit 35.
  • the composition analysis unit 885 includes a composition model creation unit 885a, a safety model creation unit 885b, a penalty model creation unit 885c, an objective function creation unit 885d, and an optimization unit 885e.
  • the composition model creation unit 885a through the objective function creation unit 885d have the same functions as the composition model creation unit 34a through the objective function creation unit 34d in FIG.
  • the optimization unit 885e determines a cutout region that minimizes the objective function E based on the motion direction information from the motion direction determination unit 884, and supplies it to the image cutout unit 35 as the most appropriate extraction region.
  • step S865 the motion direction determination unit 884 executes a motion direction determination process to determine the motion direction of the subject included in the attention area represented by the attention area information from the attention area extraction unit 31 in the input image. To do.
  • step S871 the GMV calculation unit 882 calculates the GMV from the input image and the previous frame input image from the frame buffer 881, and supplies the GMV to the motion direction determination unit 884.
  • step S872 the LMV calculation unit 883 calculates the LMV of the attention area represented by the attention area information from the attention area extraction unit 31 from the input image and the previous frame input image from the frame buffer 881, and determines the motion direction. Part 884.
  • step S873 the movement direction determination unit 884 determines whether the LMV is 0 or substantially 0.
  • step S873 If it is determined in step S873 that the LMV is not 0 or substantially 0, that is, if the subject included in the region of interest has sufficient movement, the process proceeds to step S874, and the movement direction determination unit 884 selects the LMV direction.
  • the motion direction information representing the motion direction is supplied to the composition analysis unit 885.
  • step S873 determines whether GMV is 0 or substantially 0 is determined. If it is determined in step S873 that the LMV is 0 or substantially 0, that is, if the subject included in the region of interest has no or substantially no movement, the process proceeds to step S875, and the movement direction determination unit 884 , Whether GMV is 0 or substantially 0 is determined.
  • step S875 If it is determined in step S875 that GMV is not 0 or substantially zero, that is, if there is sufficient motion in the entire image, the process proceeds to step S876, and the motion direction determination unit 884 has a direction opposite to the direction of GMV.
  • the motion direction information representing the motion direction is supplied to the composition analysis unit 885.
  • the state in step S875 is a state in which there is movement in the entire input image, but there is no movement in the subject included in the attention area, for example, a state in which the background is moving and the subject is stationary.
  • the subject moves relative to the background in the opposite direction of the background movement. That is, the direction opposite to the direction of GMV is relatively the direction of movement of the subject.
  • step S875 if it is determined in step S875 that GMV is 0 or substantially 0, that is, if there is no or substantially no movement in the entire image, the process proceeds to step S877, and the motion direction determination unit 884 As the absence of the movement direction, the movement direction information indicating the absence of the movement direction is supplied to the composition analysis unit 885.
  • the movement direction determination unit 884 determines the movement direction of the subject included in the attention area in the input image.
  • the motion direction determination unit 884 determines the motion direction from any one of nine types, for example, none, top, bottom, left, right, top right, bottom right, top left, and bottom left. To do.
  • step S866 the composition analysis unit 885 executes the cut-out region determination process based on the composition pattern from the composition pattern setting unit 33 and the movement direction information from the movement direction determination unit 884. Then, an optimum cut-out area in the input image of the image cut out with the composition pattern is determined.
  • steps S881 to S884 in the flowchart of FIG. 44 is the same as the processing of steps S31 to S34 described with reference to the flowchart of FIG.
  • step S885 the optimization unit 885e determines the most appropriate extraction region based on the position information of the extraction region that minimizes the objective function E and the motion direction information from the motion direction determination unit 884, and extracts the image. To the unit 35.
  • the motion direction information D 30 to D 38 shown in FIG. 45 is supplied from the motion direction determination unit 884 to the optimization unit 885e.
  • FIG 45 on the upper right, right, lower right, lower, lower left, left, has been shown arrows represent the movement of the upper left, respectively, including the starting point, the motion direction information D 30 to D 38 It corresponds. That is, the motion direction information D 30, in the input image, and indicates that there is no motion direction of the object, the motion direction information D 31 represents the possible movement direction is upward, the motion direction information D 32 is , Indicating that the direction of movement is upper right. Similarly, the motion direction information D 33, which indicates that the motion direction is right, the motion direction information D 34 represents that the moving direction is the lower right. Further, the movement direction information D 35 indicates that the movement direction is downward, the direction information D 36 indicates that the movement direction is lower left, and the movement direction information D 37 indicates that the movement direction is left. The movement direction information D38 indicates that the movement direction is upper left.
  • the optimization section 885e in accordance with the motion direction information D 30 to D 38, and determines the placement of the object in 3 divided composition Then, the position information of the cutout area that minimizes the objective function E is obtained, and the most appropriate extraction area is determined based on the position information.
  • the optimization section 885e is subject in 3 divided composition shown in Figure 39 Is the three-partition line intersection point P 0 .
  • the motion direction information is the direction information D 36 motion, i.e., when the motion direction of the subject is lower left
  • the optimization section 885e is disposed in the subject in the three-part composition shown in Figure 39, divided into three lines to the intersection P 1.
  • the optimization section 885e is the placement of the subject in 3 divided composition shown in Figure 39, 3 the division line intersection P 2. Further, if the motion direction information is the direction information D 38 motion, i.e., when the motion direction of the subject is the upper left, the optimization section 885e is disposed in the subject in the three-part composition shown in Figure 39, divided into three lines to the intersection P 3.
  • the optimization section 885e is disposed in the subject in the three-part composition shown in Figure 39, divided into three lines One of the intersection points P 2 and P 3 .
  • the motion direction information is the direction information D 33 motion, i.e., when the motion direction of the subject is right
  • the optimization section 885e is disposed in the subject in the three-part composition shown in Figure 39, divided into three lines One of the intersection points P 0 and P 2 is assumed.
  • the optimization section 885e is disposed in the subject in the three-part composition shown in Figure 39, divided into three lines One of the intersection points P 0 and P 1 .
  • the motion direction information is the direction information D 37 motion, i.e., when the motion direction of the subject is the left, the optimization section 885e is disposed in the subject in the three-part composition shown in Figure 39, divided into three lines One of the intersection points P 1 and P 3 .
  • the optimization section 885e is the placement of the subject in 3 divided composition shown in Figure 39, 3 division line intersection P 0 to be either P 3. That is, when there is no movement of the subject, the placement of the subject in the three-part composition may be any of the three-part line intersections.
  • the objective function E is determined to be smaller.
  • the optimization unit 885e determines the placement of the subject in the three-part composition according to the movement direction of the subject. In particular, the optimization unit 885e determines the placement of the subject so that the space in the direction in which the subject moves is widened in the three-part composition. As a result, the object or landscape ahead of the subject can be included in the cutout region, and thus it is possible to cut out an image having a wider and optimum composition.
  • composition is not limited to the three-divided composition, and the contrast composition (composition B) and the pattern composition (composition H) shown in FIG.
  • the subject may be arranged according to the direction and movement of the subject.
  • the number of subjects that is, the number of regions of interest has been described as being one. However, even when the number of subjects is two or more, two or more subjects have different orientations. And arranged according to the direction of movement.
  • the series of processes described above can be executed by hardware or software.
  • a program constituting the software may execute various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a program recording medium in a general-purpose personal computer or the like.
  • FIG. 46 is a block diagram showing an example of the hardware configuration of a computer that executes the above-described series of processes using a program.
  • a CPU Central Processing Unit
  • ROM Read Only Memory
  • RAM Random Access Memory
  • An input / output interface 905 is further connected to the bus 904.
  • the input / output interface 905 includes an input unit 906 made up of a keyboard, mouse, microphone, etc., an output unit 907 made up of a display, a speaker, etc., a storage unit 908 made up of a hard disk, nonvolatile memory, etc., and a communication unit 909 made up of a network interface, etc.
  • a drive 910 for driving a removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is connected.
  • the CPU 901 loads the program stored in the storage unit 908 to the RAM 903 via the input / output interface 905 and the bus 904 and executes the program, for example. Is performed.
  • the program executed by the computer (CPU 901) is, for example, a magnetic disk (including a flexible disk), an optical disk (CD-ROM (Compact Disc-Read Only Memory), DVD (Digital Versatile Disc), etc.), a magneto-optical disc, or a semiconductor
  • the program is recorded on a removable medium 911 which is a package medium including a memory or the like, or is provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital satellite broadcasting.
  • the program can be installed in the storage unit 908 via the input / output interface 905 by attaching the removable medium 911 to the drive 910.
  • the program can be received by the communication unit 909 via a wired or wireless transmission medium and installed in the storage unit 908.
  • the program can be installed in the ROM 902 or the storage unit 908 in advance.
  • the program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

Abstract

本発明は、人物以外の被写体であっても、最適な構図の画像を切出すことができる画像処理装置および方法、撮像装置、並びにプログラムに関する。 構図パターン設定部33は、入力画像において注目する注目領域の数と、入力画像のシーンとに基づいて、入力画像に対応する構図パターンを設定し、構図解析部34は、構図パターン設定部33によって設定された構図パターンを基に、入力画像から構図パターンで切出される画像の、入力画像における最適な切出し領域を決定する。本発明は、例えば、撮像した画像の構図を調整する画像処理装置に適用することができる。

Description

画像処理装置および方法、撮像装置、並びにプログラム
 本発明は、画像処理装置および方法、撮像装置、並びにプログラムに関し、特に、人物以外の被写体であっても、最適な構図の画像を切出すことができるようにする画像処理装置および方法、撮像装置、並びにプログラムに関する。
 デジタルカメラ等の撮像装置によって被写体を撮影するとき、好ましい構図となるように撮影を行うが、撮影時に構図を適切に定めることは熟練を要するため、撮影により取得された画像が必ずしも所望の構図を有するものとはならない。このような場合、所望の構図となるように、画像に対してトリミングを行う技術がある。
 例えば、人体や重要な背景を欠落させることなくトリミングすることが提案されている(例えば、特許文献1参照)。
特開2008-42800号公報
 しかしながら、特許文献1の手法においては、被写体に人物が含まれることを前提としており、人物以外の被写体を含む画像に対しては、最適なトリミングを行うことができないおそれがある。
 本発明は、このような状況に鑑みてなされたものであり、人物以外の被写体であっても、最適な構図の画像を切出すことができるようにするものである。
 本発明の第1の側面の画像処理装置は、入力画像において注目する注目領域の数と、前記入力画像のシーンとに基づいて、前記入力画像に対応する構図パターンを設定する設定手段と、前記設定手段によって設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する決定手段とを備える。
 前記画像処理装置には、前記入力画像から、前記決定手段によって決定された前記切出し領域を切出す切出し手段をさらに設けることができる。
 前記決定手段には、前記設定手段によって設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域の、複数の候補を決定させ、前記入力画像上に、複数の前記切出し領域の候補を表示する表示手段と、前記表示手段によって表示された複数の前記切出し領域の候補のうちのいずれかを選択する選択手段とをさらに設け、前記切出し手段には、入力画像から、前記選択手段によって選択された前記切出し領域を切出させることができる。
 前記画像処理装置には、前記入力画像において注目する前記注目領域を抽出する抽出手段と、前記入力画像の前記シーンを判別する判別手段とをさらに設けることができる。
 前記決定手段には、前記入力画像において注目する前記注目領域を全て含む最小の矩形領域の中心位置が、前記入力画像における前記切出し領域の中心に近づくように、前記切出し領域を決定させることができる。
前記決定手段には、前記切出し領域がより大きくなるように、かつ、前記入力画像において注目する前記注目領域を全て含む最小の前記矩形領域と、前記切出し領域との共通領域がより大きくなるように、前記切出し領域を決定させることができる。
 前記決定手段には、前記切出し領域が前記入力画像からはみ出さないように、前記切出し領域を決定させることができる。
 前記画像処理装置には、前記入力画像のアスペクト比と所定の閾値とを比較することで、前記入力画像がパノラマ画像であるか否かを判定する判定手段をさらに設け、前記決定手段には、前記判定手段によって前記入力画像がパノラマ画像であると判定された場合、前記設定手段によって設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域の、複数の候補を決定させることができる。
 前記画像処理装置には、前記決定手段によって決定された前記切出し領域を示す情報を、EXIF情報として前記入力画像に付加する付加手段をさらに設けることができる。 
 前記注目領域には、前記入力画像において注目する被写体が含まれ、前記画像処理装置には、前記被写体の向きを検出する検出手段をさらに設け、前記決定手段には、前記設定手段によって設定された前記構図パターンと、前記検出手段によって検出された前記被写体の向きとを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定させることができる。
 前記注目領域には、前記入力画像において注目する被写体が含まれ、前記画像処理装置には、前記被写体の動きの方向を決定する動き方向決定手段をさらに設け、前記決定手段には、前記設定手段によって設定された前記構図パターンと、前記動き方向決定手段によって決定された前記被写体の動きの方向とを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定させることができる。
 前記画像処理装置には、前記入力画像全体の動きを求める全体動き算出手段と、前記注目領域の動きを求める局所動き算出手段とをさらに設け、前記動き方向決定手段には、前記全体動き算出手段によって求められた前記入力画像全体の動きの向きと、前記局所動き算出手段によって求められた前記注目領域の動きの向きとに基づいて、前記被写体の動きの方向を決定させることができる。
 本発明の第1の側面の画像処理方法は、前記入力画像において注目する注目領域の数と、前記入力画像のシーンとに基づいて、前記入力画像に対応する構図パターンを設定する設定ステップと、前記設定ステップにおいて設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する決定ステップと含む。
 本発明の第1の側面のプログラムは、前記入力画像において注目する注目領域の数と、前記入力画像のシーンとに基づいて、前記入力画像に対応する構図パターンを設定する設定ステップと、前記設定ステップにおいて設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する決定ステップとを含む処理をコンピュータに実行させる。
 本発明の第2の側面の撮像装置は、被写体を撮像する撮像手段と、前記撮像手段によって撮像された撮像画像のシーンを取得する取得手段と、前記撮像画像において注目する被写体を含む注目領域の数と、前記取得手段によって取得された前記シーンとに基づいて、前記撮像画像に対応する構図パターンを設定する設定手段と、前記設定手段によって設定された前記構図パターンを基に、前記撮像画像から前記構図パターンで切出される画像の、前記撮像画像における最適な切出し領域を決定する決定手段とを備える。
 本発明の第1の側面においては、入力画像において注目する注目領域の数と、入力画像のシーンとに基づいて、入力画像に対応する構図パターンが設定され、設定された構図パターンを基に、入力画像から構図パターンで切出される画像の、入力画像における最適な切出し領域が決定される。
 本発明の第2の側面においては、被写体が撮像され、撮像された撮像画像のシーンが取得され、撮像画像において注目する被写体を含む注目領域の数と、取得されたシーンとに基づいて、撮像画像に対応する構図パターンが設定され、設定された構図パターンを基に、撮像画像から構図パターンで切出される画像の、撮像画像における最適な切出し領域が決定される。
 本発明の第1および第2の側面によれば、人物以外の被写体であっても、最適な構図の画像を切出すことが可能となる。
本発明を適用した画像処理装置の一実施の形態の機能構成例を示すブロック図である。 注目領域抽出部の機能構成例を示すブロック図である。 図1の画像処理装置の画像切出し処理について説明するフローチャートである。 注目領域の例を示す図である。 注目領域の数と、シーンとに基づいて設定される構図パターンについて説明する図である。 構図パターン設定部によって設定される構図パターンの例について説明する図である。 切出し領域決定処理について説明するフローチャートである。 エネルギー関数Ecの係数について説明する図である。 3分割構図における注目領域について説明する図である。 9分割構図について説明する図である。 エネルギー関数Esの作成について説明する図である。 エネルギー関数Epの作成について説明する図である。 最適切出し領域の例を示す図である。 最適切出し領域の画像の例を示す図である。 画像処理装置の他の構成例を示すブロック図である。 図15の画像処理装置の画像切出し処理について説明するフローチャートである。 オブジェクトに応じた構図パターンの例について説明する図である。 画像処理装置のさらに他の構成例を示す図である。 図18の画像処理装置の画像切出し処理について説明するフローチャートである。 切出し領域候補決定処理について説明するフローチャートである。 切出し領域候補の表示例を示す図である。 確認画面の表示例を示す図である。 画像処理装置のさらに他の構成例を示すブロック図である。 図23の画像処理装置の画像切出し処理について説明するフローチャートである。 目的関数Eの係数について説明する図である。 パノラマ画像における切出し領域候補の画像の切出しを説明する図である。 画像処理装置のさらに他の構成例を示すブロック図である。 画像処理装置のさらに他の構成例を示すブロック図である。 図28の画像処理装置の画像切出し処理について説明するフローチャートである。 画像処理装置のさらに他の構成例を示すブロック図である。 図30の画像処理装置の画像切出し処理について説明するフローチャートである。 本発明を適用した撮像装置の一実施の形態の機能構成例を示すブロック図である。 図32の撮像装置の画像切出し処理について説明するフローチャートである。 画像処理装置のさらに他の構成例を示すブロック図である。 図34の画像処理装置の画像切出し処理について説明するフローチャートである。 向き検出処理について説明するフローチャートである。 図34の画像処理装置の切出し領域決定処理について説明するフローチャートである。 向き情報について説明する図である。 3分割構図について説明する図である。 向き情報について説明する図である。 画像処理装置のさらに他の構成例を示すブロック図である。 図41の画像処理装置の画像切出し処理について説明するフローチャートである。 動き方向決定処理について説明するフローチャートである。 図41の画像処理装置の切出し領域決定処理について説明するフローチャートである。 動き方向情報について説明する図である。 コンピュータのハードウェアの構成例を示すブロック図である。
 以下、本発明の実施の形態について図を参照して説明する。なお、説明は以下の順序で行う。
 1.第1の実施の形態
 2.第2の実施の形態
 3.第3の実施の形態
 4.第4の実施の形態
 5.第5の実施の形態
 6.第6の実施の形態
 7.第7の実施の形態
 8.第8の実施の形態
 9.第9の実施の形態
 10.第10の実施の形態
 <1.第1の実施の形態>
 [画像処理装置の構成例]
 図1は、本発明を適用した画像処理装置の一実施の形態の機能構成例を示している。
 図1の画像処理装置11は、例えば、デジタルカメラ等の撮像装置から入力された入力画像の注目領域とシーンとに応じた構図パターンを設定し、その構図パターンを基に、最適な切出し領域で切出した画像を、出力画像として出力する。
 画像処理装置11は、注目領域抽出部31、シーン判別部32、構図パターン設定部33、構図解析部34、および画像切出し部35から構成される。
 画像処理装置11に入力された入力画像は、注目領域抽出部31、シーン判別部32、および画像切出し部35に供給される。
 注目領域抽出部31は、入力画像において注目する注目領域を抽出し、その注目領域を表す注目領域情報を、構図パターン設定部33に供給する。注目領域は、入力画像における被写体(物体)を含む(囲む)矩形領域であり、入力画像中の被写体の数だけ設定され、抽出される。また、注目領域情報は、例えば、矩形領域の頂点の位置等とされる。
 図2は、注目領域抽出部31の機能構成例を示している。
 注目領域抽出部31は、注目度算出部51、注目矩形領域決定部52、および顔矩形領域決定部53を備えている。
 注目度算出部51は、入力画像の各画素について特徴量を求め、その特徴量から画素毎の注目度を算出する。ここで、特徴量とは、画像のエッジ成分の大きさ、近傍画素との色相の差、画像の所定の領域における色分布、画像全体の平均色と各画素の色相の差などである。さらに、注目度算出部51は、画素毎の注目度(特徴量)から、1枚の入力画像に対応する注目度マップを生成し、注目矩形領域決定部52に供給する。注目度算出部51によって生成される注目度マップは、いわば、1枚の入力画像において注目すべき被写体が含まれる領域を表す情報である。
 また、注目度算出部51は、入力画像の各画素について求めた特徴量から、顔度(顔らしさ度)を算出し、1枚の入力画像に対応する顔度マップを生成し、顔矩形領域決定部53に供給する。注目度算出部51によって生成される顔度マップは、いわば、1枚の入力画像において注目すべき顔が含まれる領域を表す情報である。
 注目矩形領域決定部52は、注目度算出部51からの注目度マップを基に、注目矩形領域を決定し、その注目矩形領域を表す注目矩形領域情報を、構図パターン設定部33に供給する。より具体的には、注目矩形領域決定部52は、注目度マップにおいて、所定の閾値より高い注目度の画素(位置)を矩形の中心とし、その周辺で、他の閾値より低い注目度の画素(位置)を矩形の端点(頂点)とすることで、注目矩形領域を決定する。
 また、複数の注目矩形領域が決定された場合、矩形の中心同士が所定の距離より小さいときには、それらを併せて含む最小の矩形領域を、注目矩形領域とする。
 顔矩形領域決定部53は、注目度算出部51からの顔度マップを基に、顔矩形領域を決定し、その顔矩形領域を表す顔矩形領域情報を、構図パターン設定部33に供給する。より具体的には、顔矩形領域決定部53は、顔度マップにおいて、顔の鼻の画素(位置)を矩形の中心とし、その周辺で、顔度が急激に変化する(下がる)画素(位置)を矩形の端点(頂点)とすることで、顔矩形領域を決定する。
 なお、注目矩形領域決定部52によって得られる注目矩形領域情報と、顔矩形領域決定部53によって得られる顔矩形領域情報とを併せて注目領域情報という。
 図1に戻り、シーン判別部32は、入力画像を周波数変換することで周波数情報を抽出し、その周波数情報を特徴量(ベクトル)として、入力画像のシーンを判別し、判別の結果得られる、シーンを表すシーン情報を構図パターン設定部33に供給する。より具体的には、シーン判別部32は、予め設定した学習用画像と、例えば、SVM(Support Vector Machines)等の機械学習とを用いてシーン判別を行う。
 SVMにおいては、2クラス判別(1対1の判別)が行われ、例えば、「海岸」のクラスとそれ以外のクラス、「田園風景」のクラスとそれ以外のクラス、「空」のクラスとそれ以外のクラス、「山」のクラスとそれ以外のクラス、・・・のように判定され、それぞれのスコアが比較され、最もスコアの高いクラスが、判別結果とされる。
 なお、シーン判別部32は、SVMを用いることとしたが、これに限らず、例えば、ニューラルネットワークを用いたパターン認識や、パターンマッチング等によるパターン認識を用いるようにしてもよい。
 構図パターン設定部33は、注目領域抽出部31からの注目領域情報の数と、シーン判別部32からのシーン情報とに基づいて、入力画像に対応する構図パターンを設定し、構図解析部34に供給する。構図パターンは、注目領域(被写体)の数と、シーンとに対応して予め決められている。構図パターンの詳細については、図5を参照して後述することとする。
 構図解析部34は、構図パターン設定部33からの構図パターンを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定し、その最適切出し領域を画像切出し部35に供給する。
 構図解析部34は、構図モデル作成部34a、安全モデル作成部34b、ペナルティモデル作成部34c、目的関数作成部34d、および最適化部34eを備えている。
 構図モデル作成部34aは、構図パターン設定部33からの構図パターンに基づいた切出し領域を表す構図モデルを作成する。構図モデルは、所定のエネルギー関数Ecで表される。
 安全モデル作成部34bは、切出し領域が小さくなりすぎるのを防ぐための安全モデルを作成する。安全モデルは、所定のエネルギー関数Esで表される。
 ペナルティモデル作成部34cは、切出し領域の入力画像からはみ出した領域の面積を評価するペナルティモデルを作成する。ペナルティモデルは、所定のエネルギー関数Epで表される。
 目的関数作成部34dは、構図モデルを表すエネルギー関数Ec、安全モデルを表すエネルギー関数Es、ペナルティモデルを表すエネルギー関数Epから、目的関数Eを作成する。
 最適化部34eは、目的関数Eを最小とする切出し領域を決定し、最適切出し領域として、画像切出し部35に供給する。
 エネルギー関数Ec,Es,Ep、および目的関数Eの詳細については、後述することとする。
 画像切出し部35は、構図解析部34からの最適切出し領域に基づいて、入力された入力画像から最適切出し領域の画像を切出し、出力する。
 [画像処理装置の画像切出し処理]
 次に、図3のフローチャートを参照して、図1の画像処理装置11の画像切出し処理について説明する。
 ステップS11において、注目領域抽出部31は、入力画像に対応する注目度マップおよび顔度マップを生成する。より詳細には、注目度算出部51は、入力画像に対応する注目度マップを生成し、注目矩形領域決定部52に供給するとともに、入力画像に対応する顔度マップを生成し、顔矩形領域決定部53に供給する。
 ステップS12において、注目領域抽出部31は、注目度マップおよび顔度マップに基づいて、入力画像において注目する注目領域を抽出し、決定する。より詳細には、注目矩形領域決定部52は、注目度算出部51からの注目度マップを基に、注目矩形領域を決定し、その注目矩形領域を表す注目矩形領域情報を、構図パターン設定部33に供給する。また、顔矩形領域決定部53は、注目度算出部51からの顔度マップを基に、顔矩形領域を決定し、その顔矩形領域を表す顔矩形領域情報を、構図パターン設定部33に供給する。
 なお、ステップS12においては、注目領域として、注目矩形領域と顔矩形領域とを決定するようにしたが、顔矩形領域を、注目矩形領域としてまとめて処理するようにしてもよい。
 このようにして決定される注目領域の例を図4に示す。
 図4において、入力画像Pは、1羽の鳥(鶴)が空を飛んでいる画像である。図4に示されるように、ステップS12の処理によれば、1羽の鳥に注目し、その鳥を含むように、1つの注目領域Lが決定される。
 図3のフローチャートに戻り、ステップS13において、シーン判別部32は、入力画像を周波数変換することで周波数情報を抽出し、その周波数情報を特徴量(ベクトル)として、入力画像のシーンを判別し、判別の結果得られる、シーンを表すシーン情報を構図パターン設定部33に供給する。
 ステップS14において、構図パターン設定部33は、注目領域抽出部31からの注目領域情報の数と、シーン判別部32からのシーン情報とに基づいて、入力画像に対応する構図パターンを設定し、構図解析部34に供給する。
 ここで、図5を参照して、注目領域(被写体)の数と、シーンとに基づいて設定される構図パターンについて説明する。
 図5においては、注目領域(被写体)の数と、シーンである「海岸」、「田園風景」、「空」、「山」、「高速道路」、「街路」、「街中」、「高層ビル」それぞれに対応して、種々の構図パターンが決められている。
 図5によれば、例えば、シーンが「海岸」である入力画像において、注目領域の数が0であるとき(すなわち、海岸の風景のみのとき)には、構図パターンとして水平線構図が設定される。注目領域の数が1であるときには、構図パターンとして3分割構図と水平線構図とが設定される。また、注目領域の数が2乃至5であるときには、構図パターンとして対比構図と水平線構図が設定され、注目領域の数が6以上であるときには、構図パターンとして対比構図と水平線構図とが設定される。
 また、シーンが「田園風景」である入力画像において、注目領域の数が0であるとき(すなわち、田園風景のみのとき)には、構図パターンとして放射線構図が設定される。注目領域の数が1であるときには、構図パターンとして3分割構図と放射線構図とが設定される。また、注目領域の数が2乃至5であるときには、構図パターンとして対比構図と放射線構図が設定され、注目領域の数が6以上であるときには、構図パターンとして放射線構図とパターン構図とが設定される。
 同様にして、シーンが「空」である入力画像、「山」である入力画像、「高速道路」である入力画像、・・・における注目領域の数に応じて、構図パターンが設定される。
 なお、構図パターンが2つ設定されている場合、それぞれの構図を満たすような構図パターンが設定される。
 また、図5で説明した、注目領域の数とシーンとに対応付けられた構図パターンは、予め設定されていてもよいし、ユーザによって適宜設定されるようにしてもよい。
 ここで、図6を参照して、構図パターン設定部33によって設定される構図パターンの例について説明する。
 図6の構図Aは、3分割構図を示しており、垂直線と水平線の交点に被写体を配置することで、バランスのとれた画像となる。
 図6の構図Bは、対比構図を示しており、同じような被写体や似たような被写体を並べる構図である。構図Bにおいて、メインとなる被写体を大きく、他の被写体を小さくなるように配置することで、メインとなる被写体が引き立つ。
 図6の構図Cは、斜線構図を示しており、リズム感を出したいときに用いられる。また、構図Cは、狭い面積を効率的に活用することができる構図である。
 図6の構図Dは、放射線構図を示しており、開放感や広がりを出したいときに用いられる。被写体の例として、木の枝や、雲間からの太陽光などがある。
 図6の構図Eは、水平線構図であり、左右の広がりを持たせたいときに用いられる。水平線の位置を垂直方向にずらすことで主題を変えることができる。
 図6の構図Fは、垂直線構図であり、画像の垂直方向を強調したいときに用いられる。被写体の例として、木の幹や、道路などがある。
 図6の構図Gは、遠近法構図であり、消失点(図中では、対角線の交点)からの広がりを出したいときに用いられる。
 図6の構図Hは、パターン構図であり、同じような被写体が複数、規則的に配置され、リズム感や統一感を出したいときに用いられる。
 すなわち、構図パターン設定部33は、注目領域情報の数と、シーン情報とに基づいて、図6で示される構図パターンのうちの、図5において注目領域の数とシーンとによって対応付けられている構図パターンを設定する。なお、構図パターンは、図6で示される8種類に限られるものではなく、さらに多くの種類のパターンがあってもよい。
 例えば、図4で示された入力画像Pについては、注目領域の数は1であり、シーンは「空」であるので、構図パターン設定部33は、図5において対応付けられている3分割構図(構図A)を設定する。
 なお、以降においては、ステップS14において、入力画像Pの構図パターンとして、3分割構図が設定されたものとして説明する。
 図3のフローチャートに戻り、ステップS15において、構図解析部34は、構図パターン設定部33からの構図パターンを基に、切出し領域決定処理を実行し、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定する。
 [構図解析部の切出し領域決定処理]
 ここで、図7のフローチャートを参照して、図3のフローチャートのステップS15における切出し領域決定処理について説明する。
 ステップS31において、構図解析部34の構図モデル作成部34aは、構図パターン設定部33からの構図パターンに基づいた切出し領域を表す構図モデルを作成する。言い換えると、構図モデル作成部34aは、構図モデルについてのエネルギー関数Ecを求める。エネルギー関数Ecは、以下の式(1)で与えられる。
Figure JPOXMLDOC01-appb-M000001
 式(1)において、SVAは、注目領域の面積を表しており、GDLhn,GDLvn,GDPnは、以下の式(2)で与えられる。
Figure JPOXMLDOC01-appb-M000002
 式(2)において、LDh,LDv,PDは、それぞれ、3分割構図において水平方向を3分割する線(水平3分割線)、垂直方向を3分割する線(垂直3分割線)、水平3分割線と垂直3分割線との交点(3分割線交点)を示しており、Pnは注目領域の中心位置を示している。また、dは、切出し領域の対角線の長さであり、以下の式(3)で与えられる。
Figure JPOXMLDOC01-appb-M000003
 したがって、式(1)におけるGDLhn,GDLvn,GDPnのそれぞれは、注目領域の中心位置が、水平3分割線、垂直3分割線、3分割線交点のそれぞれに近づくほど大きい値となる。
 また、式(1)における係数αhn,αvn,αpnは、注目領域の幅、高さをそれぞれCrop_width,Crop_heightとしたとき、以下の式(4)で与えられる注目領域のアスペクト比VA_aspect_rationに応じて、それぞれ、図8の上段図乃至下段図で示されるように変化するパラメータである。図8上段図乃至下段図において、横軸はアスペクト比VA_aspect_rationを、縦軸はそれぞれの係数αhn,αvn,αpnの値を示している。
Figure JPOXMLDOC01-appb-M000004
 図8の上段図によれば、アスペクト比VA_aspect_rationが0乃至r_minのとき、係数αhnは1.0となり、アスペクト比VA_aspect_rationがr_mid1より大きいとき、係数αhnは0.0となる。また、アスペクト比VA_aspect_rationがr_min乃至r_mid1のときは、アスペクト比VA_aspect_rationの増加に応じて、係数αhnは減少する。すなわち、式(1)においては、注目領域が縦長であるときに、係数αhnが有効となる。
 図8の中段図によれば、アスペクト比VA_aspect_rationが0乃至r_mid2のとき、係数αvnは0.0となり、アスペクト比VA_aspect_rationがr_maxより大きいとき、係数αvnは1.0となる。また、アスペクト比VA_aspect_rationがr_mid2乃至r_maxのときは、アスペクト比VA_aspect_rationの増加に応じて、係数αvnは増加する。すなわち、式(1)においては、注目領域が横長であるときに、係数αvnが有効となる。
 図8下段図によれば、アスペクト比VA_aspect_rationが0乃至r_min、または、r_maxより大きいとき、係数αpnは0.0となり、アスペクト比VA_aspect_rationがr_mid1乃至r_mid2のとき、係数αpnは1.0となる。また、アスペクト比VA_aspect_rationがr_min乃至r_mid1のときは、アスペクト比VA_aspect_rationの増加に応じて、係数αpnは増加し、アスペクト比VA_aspect_rationがr_mid2乃至r_maxのときは、アスペクト比VA_aspect_rationの増加に応じて、係数αpnは減少する。すなわち、式(1)においては、注目領域が正方形に近い形であるときに、係数αpnが有効となる。
 以上のことより、式(1)は、注目領域が、縦長であるならば水平3分割線に、横長であるならば垂直3分割線に、正方形に近い形であるならば3分割線交点に近づくほど、エネルギー関数Ecの値が大きくなることを示している。
 例えば、図9の例においては、注目領域Rhは、縦長で水平3分割線に近く、注目領域Rvは、横長で垂直3分割線に近く、注目領域Rpは、正方形に近い形で3分割線交点に近いので、エネルギー関数Ecの値は大きくなる。
 以上においては、構図パターンとして3分割構図を用いた場合について説明してきたが、例えば、図10に示されるように、3分割構図における1つの分割領域をさらに3分割した構図(9分割構図)を用いるようにしてもよい。9分割構図によれば、3分割構図と比較して、奥行きのある構図となることが期待される。
 9分割構図についてのエネルギー関数Ecは、以下の式(5)で与えられる。
Figure JPOXMLDOC01-appb-M000005
 式(5)において、GdLhn,GdLvn,GdPnは、以下の式(6)で与えられる。
Figure JPOXMLDOC01-appb-M000006
 式(6)において、Ldh,Ldv,Pdは、それぞれ、9分割構図において水平方向を9分割する線(水平9分割線)、垂直方向を9分割する線(垂直9分割線)、水平9分割線と垂直9分割線との交点(9分割線交点)を示している。ただし、図10に示されるように、3分割構図における中央の分割領域内の、水平9分割線h1a,h1bと垂直9分割線v1a,v1bとの交点は含まれないものとする。
 また、式(5)において、係数α3rdは、0乃至1の値をとり、式(5)における、3分割構図についてのエネルギー関数の値と、9分割構図についてのエネルギー関数の値との割合を決めるパラメータである。例えば、適用する構図パターンを9分割構図のみとする場合は、α3rd=0とすればよい。
 図7のフローチャートに戻り、ステップS32において、安全モデル作成部34bは、切出し領域が小さくなりすぎるのを防ぐための安全モデルを作成する。言い換えると、安全モデル作成部34bは、安全モデルについてのエネルギー関数Esを求める。エネルギー関数Esは、以下の式(7)で与えられる。
Figure JPOXMLDOC01-appb-M000007
 ここで、図11に示されるように、入力画像中の全注目領域を含む最小矩形を全注目矩形領域とし、その面積をSWVA、中心位置をPWVAとし、また、切出し領域の面積をSCrop、中心位置をPCropとする。さらに、全注目矩形領域と切出し領域との共通領域の面積をSWVA&Cropとする。
 このとき、式(7)のエネルギー関数Esは、全注目矩形領域と切出し領域との共通領域の面積SWVA&Cropが大きいほど大きい値となる(式(7)の第1項)。
 また、式(7)のエネルギー関数Esは、切出し領域の中心位置PCropと、全注目矩形領域の中心位置をPWVAとの距離が近いほど大きい値となる(式(7)の第2項)。
 ステップS33において、ペナルティモデル作成部34cは、切出し領域の入力画像からはみ出した領域の面積を評価するペナルティモデルを作成する。言い換えると、ペナルティモデル作成部34cは、ペナルティモデルについてのエネルギー関数Epを求める。エネルギー関数Epは、以下の式(8)で与えられる。
Figure JPOXMLDOC01-appb-M000008
 ここで、図12に示されるように、切出し領域の面積をSCropとし、入力画像領域からはみ出した切出し領域の面積をSOverとする。
 このとき、式(8)のエネルギー関数Epは、入力画像領域からはみ出した切出し領域の面積SOverが大きいほど大きい値となる。なお、演算量を削減するために、切出し領域が入力画像領域からはみ出したときは常に、エネルギー関数Ep=1としてもよい。
 ステップS34において、目的関数作成部34dは、エネルギー関数Ec,Es,Epから、以下の式(9)で与えられる目的関数Eを作成する。
Figure JPOXMLDOC01-appb-M000009
 式(9)において、係数CC,CS,CPは、それぞれ、エネルギー関数Ec,Es,Epについての調整係数である。式(9)によれば、目的関数Eは、その値が小さいほど、得られる切出し領域が最適な切出し領域に近づくことを示している。
 ステップS35において、最適化部34eは、目的関数Eを最小とする切出し領域の位置情報を基に、最適切出し領域を決定して、画像切出し部35に供給する。より具体的には、最適化部34eは、例えば、粒子群最適化(Particle Swarm Optimization:PSO)を用いて、目的関数Eを最適化する。
 粒子群最適化においては、複数の変数がランダムに変化する中で、そのうちの1つの変数が、目的となる最適な値に近づくと、これに伴い他の変数もより最適な値に近づき、これが繰り返されて、複数の変数は、それぞれ最適な値となる。
 すなわち、最適化部34eは、切出し領域の切出しのスタート位置(水平方向、垂直方向)と、切出し領域の大きさ(幅、高さ)とを変数として、粒子群最適化により、目的関数Eが最小となる位置情報(切出し領域のスタート位置および大きさ)を求める。最適化部34eは、求めた位置情報を基に、最適切出し領域を決定し、処理はステップS15に戻る。
 なお、切出し領域のアスペクト比を固定とした場合、最適化部34eは、切出し領域の切出しのスタート位置(水平方向、垂直方向)と、切出し領域の大きさ(幅)とを変数としてもよい。さらに、変数として、切出し領域の回転角度を加えてもよい。
 このようにして決定された最適切出し領域の例を図13に示す。
 図13に示されるように、入力画像Pにおいて、1羽の鳥が、3分割構図の3分割線交点の位置に配置するように、最適切出し領域Pcが決定されている。
 図3のフローチャートに戻り、ステップS16において、画像切出し部35は、構図解析部34からの最適切出し領域に基づいて、入力された入力画像から最適切出し領域の画像を切出し、出力する。例えば、画像切出し部35は、構図解析部34からの最適切出し領域Pcに基づいて、図14に示されるような、3分割構図の最適切出し領域Pcの画像を切出す。
 以上の処理によれば、入力画像における注目領域の数と、入力画像のシーンと対応付けられた構図パターンを基に、切出し領域を決定することができる。注目領域は、被写体が人物以外であっても決定されるので、人物以外の被写体であっても、最適な構図の画像を切出すことが可能となる。また、構図パターンは、注目領域の数とシーンに基づいて設定されるので、入力画像のカテゴリに関わらず、最適な構図の画像を切出すことが可能となる。
 以上においては、構図パターンが、注目領域の数とシーンとに対応付けて予め決められている構成について説明してきたが、入力画像に対してオブジェクト認識をし、そのオブジェクトに応じた構図パターンを設定するようにしてもよい。
 <2.第2の実施の形態>
 [画像処理装置の構成例]
 図15は、入力画像に対してオブジェクト認識をし、そのオブジェクトに応じた構図パターンを設定するようにした画像処理装置の構成例を示している。なお、図15の画像処理装置111において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図15の画像処理装置111において、図1の画像処理装置11と異なるのは、構図パターン設定部33に代えて、構図パターン設定部131を設けた点である。
 なお、図15において、シーン判別部32は、入力画像のシーンを判別し、判別の結果得られる、シーンを表すシーン情報を、入力画像とともに、構図パターン設定部131に供給する。
 構図パターン設定部131は、シーン判別部32からの入力画像において、オブジェクトを認識する。また、構図パターン設定部131は、シーン判別部32からのシーン情報で表されるシーンと、認識したオブジェクトとに基づいて、入力画像に対応する構図パターンを設定し、構図解析部34に供給する。構図パターン設定部131は、シーン毎に、構図内のオブジェクトの配置や割合が予め決められた構図パターンを記憶しており、シーンとオブジェクトとに応じた構図パターンを、記憶している構図パターンから選択することで、構図パターンを設定する。構図内のオブジェクトの配置や割合は、構図のバランスが良くなるように設定することができる。なお、シーン毎に構図内のオブジェクトの配置や割合が予め決められた構図パターンは、図示せぬデータベース等に記憶するようにしてもよい。
 [画像処理装置の画像切出し処理]
 次に、図16のフローチャートを参照して、図15の画像処理装置111の画像切出し処理について説明する。なお、図16のフローチャートにおけるステップS111乃至S113,S115,S116の処理は、図3のフローチャートを参照して説明したステップS11乃至S13,S15,S16の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS114において、構図パターン設定部131は、シーン判別部32からの入力画像において、オブジェクトを認識する。また、構図パターン設定部131は、シーン判別部32からのシーン情報で表されるシーンと、認識したオブジェクトとに基づいて、入力画像に対応する構図パターンを設定し、構図解析部34に供給する。
 ここで、図17を参照して、オブジェクトに応じた構図パターンの例について説明する。
 図17に示される入力画像には、空、岩、草、および人が、オブジェクトとして存在している。構図パターン設定部131は、図17に示される入力画像において、これらのオブジェクトを認識すると、記憶している構図パターンの中から、構図内の空、岩、草、および人の割合がそれぞれ30%,20%,40%,10%となる構図パターンを選択する。この結果、最終的に、図17において入力画像上の枠で示された構図の画像が切出されるようになる。
 以上の処理によれば、入力画像におけるオブジェクトを認識し、そのオブジェクトとシーンとに応じた構図パターンを設定することができる。構図パターンによって決まる構図内のオブジェクトの配置や割合は、構図のバランスが良くなるように設定されるので、最適な構図の画像を切出すことが可能となる。
 以上においては、入力画像における切出し領域をただ1つ決定する構成について説明してきたが、入力画像における切出し領域の候補を複数決定するようにしてもよい。
 <3.第3の実施の形態>
 [画像処理装置の構成例]
 図18は、入力画像における切出し領域の候補を複数決定するようにした画像処理装置の構成例を示している。なお、図18の画像処理装置211において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図18の画像処理装置211において、図1の画像処理装置11と異なるのは、構図解析部34に代えて、構図解析部231を設け、表示部232および操作入力部233を新たに設けた点である。
 構図解析部231は、構図パターン設定部33からの構図パターンを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域の、複数の候補(切出し領域候補)を決定し、表示部232に供給する。また、構図解析部231は、操作入力部233からの、切出し領域候補のうちのいずれかが選択された旨の操作信号に基づいて、選択された切出し領域を画像切出し部35に供給する。
 構図解析部231は、構図モデル作成部231a、安全モデル作成部231b、ペナルティモデル作成部231c、目的関数作成部231d、および最適化部231eを備えている。なお、構図モデル作成部231a乃至目的関数作成部231dは、それぞれ、図1の構図モデル作成部34a乃至目的関数作成部34dと同様の機能を備えるので、その説明は省略する。
 最適化部231eは、目的関数Eの小さいほうから上位n個が得られる切出し領域を決定し、切出し領域候補として、表示部232に供給する。
 表示部232は、タッチパネルとしての操作入力部233が積層されたモニタとして構成され、入力画像上に、構図解析部231からの切出し領域候補を示す枠を表示したり、ユーザに操作を指示するための操作画像を表示する。
 操作入力部233は、表示部232の表示面に積層されたタッチパネルとして構成され、ユーザの操作に応じた操作信号を、構図解析部231に供給する。
 [画像処理装置の画像切出し処理]
 次に、図19のフローチャートを参照して、図18の画像処理装置211の画像切出し処理について説明する。なお、図16のフローチャートにおけるステップS211乃至S114の処理は、図3のフローチャートを参照して説明したステップS11乃至S14の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS215において、構図解析部231は、構図パターン設定部33からの構図パターンを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域の、複数の候補を決定する、切出し領域候補決定処理を行う。
 [構図解析部の切出し領域候補決定処理]
 ここで、図20のフローチャートを参照して、図19のフローチャートのステップS215における切出し領域候補決定処理について説明する。なお、図20のフローチャートにおけるステップS231乃至S234の処理は、図7のフローチャートを参照して説明したステップS31乃至S34の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS235において、最適化部231eは、目的関数Eの小さいほうから上位n個が得られる切出し領域を決定し、切出し領域候補として、表示部232に供給する。
 より具体的には、例えば、最適化部231eは、粒子群最適化(PSO)を用いて目的関数Eの最適化を行った際に、ローカルミニマムの値とそのときの位置情報とを保持しておき、目的関数Eの値が小さい順に上位から、位置情報が大きく異なるものをnセット、表示部232に供給し、処理はステップS15に戻る。
 このようにして、構図解析部231は、切出し領域候補を決定することができる。
 図19のフローチャートに戻り、ステップS216において、表示部232は、入力画像上に、構図解析部231からの切出し領域候補を示す枠を、例えば、図21に示されるように表示する。
 図21に示される表示部232には、2つの切出し領域候補を示す枠と、それぞれを識別する「候補1」、「候補2」の名称が表示されている。ユーザは、表示部232に積層されているタッチパネルとしての操作入力部233により、「候補1」、「候補2」で示される切出し領域候補を選択することができる。
 ステップS217において、構図解析部231は、切出し領域候補のうちのいずれかが選択されたか否かを判定する。すなわち、構図解析部231は、操作入力部233から、切出し領域候補のうちのいずれかが選択された旨の操作信号が供給されたか否かを判定する。
 このとき、ユーザによって、図21に示される「候補1」、「候補2」で示される切出し領域候補のうちのいずれかを選択されると、図22に示されるような、「この画角でよいですか?」「はい」「いいえ」の文言からなる確認画面が表示される。図22の表示部232において、タッチパネルとしての操作入力部233に対するユーザの操作によって、「はい」が選択されると、切出し領域候補のうちのいずれかが選択された旨の操作信号が、構図解析部231に供給される。
 ステップS217において、切出し領域候補のうちのいずれも選択されていないと判定された場合、操作入力部233からの、切出し領域候補のうちのいずれかが選択された旨の操作信号が供給されるまで、処理が繰り返される。
 一方、ステップS217において、切出し領域候補のうちのいずれかが選択されたと判定された場合、構図解析部231は、操作入力部233からの、切出し領域候補のうちのいずれかが選択された旨の操作信号に基づいて、選択された切出し領域を画像切出し部35に供給する。
 ステップS218において、画像切出し部35は、構図解析部231からの切出し領域に基づいて、入力された入力画像から、選択された切出し領域の画像を切出し、出力する。
 以上の処理によれば、最適切出し領域の候補を複数表示し、選択されるようにできるので、ユーザは、切出し領域の候補を確認して、選択することができる。したがって、ユーザの好みにあった、最適な構図の画像を切出すことが可能となる。
 以上においては、入力画像のサイズについて言及してこなかったが、入力画像としてパノラマ画像を入力するようにしてもよい。
 <4.第4の実施の形態>
 [画像処理装置の構成例]
 図23は、入力画像としてパノラマ画像を入力するようにした画像処理装置の構成例を示している。なお、図23の画像処理装置311において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図23の画像処理装置311において、図1の画像処理装置11と異なるのは、パノラマ判別部331を新たに設けた、構図解析部34に代えて、構図解析部332を設けた点である。
 パノラマ判別部331は、入力画像が、パノラマ画像であるか否かを判別し、判別結果を構図解析部332に供給する。
 構図解析部332は、パノラマ判別部331からの判別結果に応じて、構図パターン設定部33からの構図パターンを基に、その構図パターンで切出される画像の、入力画像における切出し領域を決定し、その切出し領域を画像切出し部35に供給する。
 構図解析部332は、構図モデル作成部332a、安全モデル作成部332b、ペナルティモデル作成部332c、目的関数作成部332d、および最適化部332eを備えている。なお、構図モデル作成部332a、安全モデル作成部332b、およびペナルティモデル作成部332cは、それぞれ、図1の構図モデル作成部34a、安全モデル作成部34b、およびペナルティモデル作成部34cと同様の機能を備えるので、その説明は省略する。
 目的関数作成部332dは、パノラマ判別部331からの判別結果が、入力画像がパノラマ画像であることを示している場合、目的関数Eにおいて、エネルギー関数Esの項を無効にする。
 最適化部332eは、パノラマ判別部331からの判別結果が、入力画像がパノラマ画像でないことを示している場合、目的関数Eを最小とする切出し領域を決定し、最適切出し領域として、画像切出し部35に供給する。また、最適化部231eは、パノラマ判別部331からの判別結果が、入力画像がパノラマ画像であることを示している場合、目的関数Eの小さいほうから上位n個が得られる切出し領域を決定し、切出し領域候補として、画像切出し部35に供給する。
 [画像処理装置の画像切出し処理]
 次に、図24のフローチャートを参照して、図23の画像処理装置311の画像切出し処理について説明する。なお、図24のフローチャートにおけるステップS311乃至S314の処理は、図3のフローチャートを参照して説明したステップS11乃至S14の処理と同様であるので、その説明は省略するものとする。また、図24のフローチャートにおけるステップS318,S319の処理は、図3のフローチャートを参照して説明したステップS15,S16の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS315において、パノラマ判別部331は、入力画像が、パノラマ画像であるか否かを判別する。より具体的には、パノラマ判別部331は、入力画像の幅、高さをそれぞれIn_width,In_heightとしたとき、以下の式(10)で表されるアスペクト比In_aspect_ratioと、所定の閾値In_aspect_ratio_thとを比較する。
Figure JPOXMLDOC01-appb-M000010
 ステップS315において、入力画像が、パノラマ画像であると判別された場合、パノラマ判別部331は、入力画像がパノラマ画像である旨の情報とともに、アスペクト比In_aspect_ratioを構図解析部332に供給し、処理は、ステップS316に進む。
 ステップS316において、構図解析部332は、パノラマ判別部331からの入力画像がパノラマ画像である旨の情報、および、アスペクト比In_aspect_ratioに基づいて、切出し領域候補決定処理を行う。
 なお、図23の画像処理装置311による切出し領域候補決定処理については、図20のフローチャートを参照して説明した、図18の画像処理装置211の処理と略同様であるので、その説明は省略する。
 ただし、画像処理装置311による切出し領域候補決定処理に対応する図20のフローチャートの処理のステップS234においては、目的関数作成部332dは、目的関数Eにおいて、エネルギー関数Esの項を無効にする。より具体的には、目的関数作成部332dは、式(9)で示された目的関数Eにおける係数CSの値を、図25に示す特性にしたがって切り替える。
 図25は、入力画像のアスペクト比In_aspect_ratioと、目的関数Eにおける係数CSとの関係を示している。
 図25によれば、アスペクト比In_aspect_ratioが、所定の閾値In_aspect_ratio_thより大きいとき、目的関数Eにおける係数CSの値は0.0となり、所定の閾値In_aspect_ratio_thより小さいとき、目的関数Eにおける係数CSの値は1.0となり。すなわち、入力画像がパノラマ画像であるとき、目的関数Eにおいて、切出し領域が小さくなりすぎるのを防ぐための安全モデルについてのエネルギー関数は0とされる。
 これにより、切出し領域候補は、比較的小さな切出し領域として、画像切出し部35に供給される。
 図24のフローチャートに戻り、ステップS317において、画像切出し部35は、構図解析部332からの切出し領域候補に基づいて、図26に示されるように、入力された入力画像(パノラマ画像)から、切出し領域候補の画像を切出し、出力する。
 図26は、パノラマ画像における切出し領域候補の例を示している。図26においては、入力画像としてのパノラマ画像上に、候補1乃至3の、3つの切出し領域候補を示す枠が設定されている。
 図24のフローチャートに戻り、ステップS315において、入力画像が、パノラマ画像でないと判別された場合、パノラマ判別部331は、入力画像がパノラマ画像でない旨の情報を構図解析部332に供給する。そして、処理は、ステップS318に進み、最適切出し領域が決定され、ステップS319において、入力画像から最適切出し領域の画像が切出される。
 以上の処理によれば、入力画像がパノラマ画像である場合、複数の、小さな切出し領域候補を決定することができる。したがって、ユーザは、パノラマ画像から切出された、複数の構図の中から、ユーザの好みにあった、最適な構図の画像を選択することが可能となる。
 以上においては、出力画像として、切出し領域画像のみを出力する構成について説明してきたが、切出し領域画像とともに、入力画像をそのまま出力するようにしてもよい。
 <5.第5の実施の形態>
 [画像処理装置の構成例]
 図27は、切出し領域画像とともに、入力画像をそのまま出力するようにした画像処理装置の構成例を示している。なお、図27の画像処理装置411において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図27の画像処理装置411において、図1の画像処理装置11と異なるのは、切出し領域画像とともに、入力画像をそのまま出力する点である。
 以上の構成によれば、切出し領域画像とともに、入力画像をそのまま出力できるので、これらを表示装置に出力した場合には、ユーザは、入力画像と切出し領域画像とを比較することが可能となる。例えば、入力画像が、ユーザが撮像装置によって撮像された画像であった場合、ユーザは、自分が撮影した画像の構図と、切出された画像の構図との違いを確認することができる。
 なお、図27の画像処理装置411による切出し領域候補決定処理については、図3のフローチャートを参照して説明した、図1の画像処理装置11の処理と同様であるので、その説明は省略する。
 以上においては、決定した切出し領域に基づいて、入力画像から切出し領域の画像を切出して出力する構成について説明したが、切出し領域を表す情報のみを出力するようにしてもよい。
 <6.第6の実施の形態>
 [画像処理装置の構成例]
 図28は、切出し領域画像とともに、切出し領域を表す情報のみを出力するようにした画像処理装置の構成例を示している。なお、図28の画像処理装置511において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図28の画像処理装置511において、図1の画像処理装置11と異なるのは、画像切出し部35を削除し、入力画像をそのまま出力する点である。
 なお、図28の構図解析部34は、構図パターン設定部33からの構図パターンを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定し、その最適切出し領域を表す情報を、外部の装置等に出力する。
 [画像処理装置の画像切出し処理]
 次に、図29のフローチャートを参照して、図28の画像処理装置511の画像切出し処理について説明する。なお、図29のフローチャートにおけるステップS511乃至S515の処理は、図3のフローチャートを参照して説明したステップS11乃至S15の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS516において、画像処理装置511は、入力画像をそのまま出力するとともに、構図解析部34は、決定した入力画像における最適切出し領域を表す情報を、外部の装置等に出力する。
 以上の処理によれば、入力画像とともに、切出し領域の画像ではなく、最適切出し領域を表す情報を出力できるので、画像処理装置511内の図示せぬフレームメモリの容量を削減することができる。
 以上においては、入力画像と、最適切出し領域を表す情報とを別個に出力する構成について説明してきたが、入力画像と、最適切出し領域を表す情報とを1つのデータとして出力するようにしてもよい。
 <7.第7の実施の形態>
 [画像処理装置の構成例]
 図30は、入力画像と、最適切出し領域を表す情報とを1つのデータとして出力するようにした画像処理装置の構成例を示している。なお、図30の画像処理装置611において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図30の画像処理装置611において、図1の画像処理装置11と異なるのは、画像切出し部35に代えて、付加部631を設けた点である。
 なお、図30の構図解析部34は、構図パターン設定部33からの構図パターンを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定し、その最適切出し領域を表す情報を、付加部631に供給する。
 付加部631は、入力された入力画像に、構図解析部34からの最適切出し領域を表す情報を、EXIF情報として付加し、出力画像として出力する。
 [画像処理装置の画像切出し処理]
 次に、図31のフローチャートを参照して、図30の画像処理装置611の画像切出し処理について説明する。なお、図31のフローチャートにおけるステップS611乃至S615の処理は、図3のフローチャートを参照して説明したステップS11乃至S15の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS616において、付加部631は、入力された入力画像に、構図解析部34からの最適切出し領域を表す情報を、EXIF情報として付加し、出力画像として出力する。
 以上の処理によれば、入力画像に、最適切出し領域を表す情報をEXIF情報として付加して出力できるので、切出し領域の画像を生成することなく、画像処理装置611内の図示せぬフレームメモリの容量を削減することができる。
 以上においては、撮像装置等で撮像された画像を入力画像として、切出し領域の画像を出力する画像処理装置について説明してきたが、撮像した撮像画像について、切出し領域を決定する構成を撮像装置に設けるようにしてもよい。
 <8.第8の実施の形態>
 [撮像装置の構成例]
 図32は、撮像した撮像画像について、切出し領域を決定するようにした撮像装置の構成例を示している。なお、図32の撮像装置711において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図32の撮像装置711において、図1の画像処理装置11と異なるのは、撮像部731、画像処理部732、および表示部733を新たに設けた点である。
 なお、図32の構図解析部34は、構図パターン設定部33からの構図パターンを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定し、その最適切出し領域を、画像切出し部35および表示部733に供給する。
 撮像部731は、光学レンズ、撮像素子、A/D(Analog/Digital)変換部(いずれも図示せず)を含むように構成される。撮像部731は、光学レンズに入射された光を、撮像素子が受光して光電変換することにより被写体を撮像し、得られたアナログの画像信号をA/D変換する。撮像部731は、A/D変換の結果得られたデジタルの画像データ(撮像画像)を画像処理部732に供給する。
 画像処理部732は、撮像部731からの撮像画像に対し、ノイズ除去処理等の画像処理を施し、注目領域抽出部31、シーン判別部32、画像切出し部35、および表示部733に供給する。
 表示部733は、画像処理部732からの撮像画像上に、構図解析部34からの最適切出し領域を示す枠を表示したり、画像切出し部35によって切出された最適切出し領域の画像を表示する。
 [撮像装置の画像切出し処理]
 次に、図33のフローチャートを参照して、図32の撮像装置711の画像切出し処理について説明する。なお、図33のフローチャートにおけるステップS713乃至S717の処理は、図3のフローチャートを参照して説明したステップS11乃至S15の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS711において、撮像部731は、被写体を撮像し、得られた撮像画像を画像処理部732に供給する。
 ステップS712において、画像処理部732は、撮像部731からの撮像画像に対し、ノイズ除去処理等の画像処理を施し、注目領域抽出部31、シーン判別部32、画像切出し部35、および表示部733に供給する。
 ステップS718において、表示部733は、画像処理部732からの撮像画像上に、構図解析部34からの最適切出し領域を示す枠を表示する。このとき、例えば、ユーザによって図示せぬ操作入力部が操作され、最適切出し領域の画像を切出す指示を表す操作信号が、画像切出し部35に供給されると、処理は、ステップS719に進む。
 ステップS719において、画像切出し部35は、構図解析部34からの最適切出し領域に基づいて、画像処理部732からの撮像画像から最適切出し領域の画像を切出す。
 ステップS720において、表示部733は、画像切出し部35によって切出された最適切出し領域の画像を表示する。
 以上の処理によれば、撮像画像における注目領域の数と、撮像画像のシーンと対応付けられた構図パターンを基に、切出し領域を決定することができる。注目領域は、被写体が人物以外であっても決定されるので、人物以外の被写体であっても、最適な構図の画像を切出すことが可能となる。また、構図パターンは、注目領域の数とシーンに基づいて設定されるので、撮像画像のカテゴリに関わらず、最適な構図の画像を切出すことが可能となる。
 以上においては、注目領域に含まれる被写体がどの方向を向いているかにかかわらず、最適切り出し領域を決定する構成について説明してきたが、被写体の向きに応じて最適切り出し領域を決定するようにしてもよい。
 <9.第9の実施の形態>
 [画像処理装置の構成例]
 図34は、被写体の向きに応じて最適切り出し領域を決定するようにした画像処理装置の構成例を示している。なお、図34の画像処理装置811において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図34の画像処理装置811において、図1の画像処理装置11と異なるのは、向き検出部831を新たに設け、構図解析部34に代えて、構図解析部832を設けた点である。
 なお、図34において、注目領域抽出部31は、入力画像において注目する注目領域を抽出し、その注目領域を表す注目領域情報を、構図パターン設定部33および向き検出部831に供給する。また、シーン判別部32は、入力画像のシーンを判別し、判別の結果得られる、シーンを表すシーン情報を、入力画像とともに、構図パターン設定部131に供給するとともに、そのシーン情報を向き検出部831に供給する。
 向き検出部831は、入力画像において、注目領域抽出部31からの注目領域情報で表わされる注目領域に含まれる被写体の向きを検出し、その向きを表す向き情報を、構図解析部832に供給する。
 構図解析部832は、構図パターン設定部33からの構図パターンと、向き検出部831からの向き情報とを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定し、画像切出し部35に供給する。
 構図解析部832は、構図モデル作成部832a、安全モデル作成部832b、ペナルティモデル作成部832c、目的関数作成部832d、および最適化部832eを備えている。なお、構図モデル作成部832a乃至目的関数作成部832dは、それぞれ、図1の構図モデル作成部34a乃至目的関数作成部34dと同様の機能を備えるので、その説明は省略する。
 最適化部832eは、向き検出部831からの向き情報に基づいて、目的関数Eを最小とする切出し領域を決定し、最適切出し領域として、画像切出し部35に供給する。
 [画像処理装置の画像切出し処理]
 次に、図35のフローチャートを参照して、図34の画像処理装置811の画像切出し処理について説明する。なお、図35のフローチャートにおけるステップS811乃至S814,S817の処理は、図3のフローチャートを参照して説明したステップS11乃至S14,S16の処理と同様であるので、その説明は省略するものとする。また、図35のフローチャートで説明する画像切出し処理においては、被写体の数、すなわち、注目領域の数は1であるものとする。
 すなわち、ステップS815において、向き検出部831は、向き検出処理を実行して、入力画像において、注目領域抽出部31からの注目領域情報で表わされる注目領域に含まれる被写体の向きを検出する。
 [向き検出部の向き検出処理]
 ここで、図36のフローチャートを参照して、図35のフローチャートのステップS815における向き検出処理について説明する。
 ステップS821において、向き検出部831は、注目領域抽出部31からの注目領域情報で表わされる注目領域が、顔矩形領域であるか否かを判定する。
 ステップS821において、注目領域が顔矩形領域であると判定された場合、すなわち、注目領域抽出部31からの注目領域情報が顔矩形領域情報であった場合、処理はステップS822に進む。
 ステップS822において、向き検出部831は、入力画像において、顔矩形領域情報で表わされる顔矩形領域に含まれる顔の向きを検出し、その向きを表す向き情報を、構図解析部832に供給する。
 より具体的には、例えば、向き検出部831は、様々な向きを向いた顔画像を学習サンプルとして予め学習することで形成されたツリー構造において、顔矩形領域に含まれる顔の画像について、ツリー構造の最も上流のノードから末端のノードに向かって判別を繰り返すことによって、顔の向きを識別(検出)する。例えば、向き検出部831は、正面、上、下、左、右、右上、右下、左上、および左下の9方向を向いた顔画像を予め学習しており、顔矩形領域に含まれる顔の向きをその9方向の中から選択する。
 なお、向き検出部831は、上述した手法に限らず、他の手法によって、顔の向きを検出するようにしてももちろんよい。
 一方、ステップS821において、注目領域が顔矩形領域でないと判定された場合、すなわち、注目領域抽出部31からの注目領域情報が注目矩形領域情報であった場合、処理はステップS823に進む。
 ステップS823において、向き検出部831は、シーン判別部32からのシーン情報に基づいて、入力画像において、注目矩形領域情報で表わされる注目矩形領域に含まれる被写体の向きを検出し、その向きを表す向き情報を、構図解析部832に供給する。
 より具体的には、向き検出部831は、シーン毎に、そのシーンに存在し得る物体が、正面、上、下、左、右、右上、右下、左上、左下の9方向を向いた画像からなるテンプレートを記憶しており、シーン判別部32からのシーン情報で表わされるシーンに応じたテンプレートの中から、注目矩形領域に含まれる被写体に対応する物体のテンプレートを検索し、検索されたテンプレートに基づいてテンプレートマッチングを行うことで、注目矩形領域に含まれる被写体の向きを特定(検出)する。
 例えば、シーン判別部32からのシーン情報で表わされるシーンが「草原」であり、注目矩形領域に含まれる被写体が「花」であった場合、向き検出部831は、「草原」のテンプレートから「花」のテンプレートを検索し、そのテンプレートに基づいてテンプレートマッチングを行うことで、被写体としての「花」の向きを特定する。
 なお、向き検出部831は、上述した手法に限らず、他の手法によって、被写体の向きを検出するようにしてももちろんよい。
 また、以上においては、向き検出部831が、シーン情報に応じたテンプレートから、被写体に対応する物体のテンプレートを用いて、被写体とその向きを識別するようにしたが、例えば、向き検出部831は、特徴量を基に統計学習処理を実行して生成した、対象物体を認識する認識器を用いて、入力画像における特徴量に基づいて、入力画像中に対象物体が存在するか否かを判定することで、被写体とその向きを識別するようにしてもよい。
 以上のようにして、向き検出部831は、入力画像における注目領域に含まれる被写体の向きを検出する。
 図35のフローチャートに戻り、ステップS816において、構図解析部832は、構図パターン設定部33からの構図パターンと、向き検出部831からの向き情報とを基に、切出し領域決定処理を実行し、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定する。
 [構図解析部の切出し領域決定処理]
 ここで、図37のフローチャートを参照して、図35のフローチャートのステップS816における切出し領域決定処理について説明する。
 なお、図37のフローチャートにおけるステップS831乃至S834の処理は、図7のフローチャートを参照して説明したステップS31乃至S34の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS835において、最適化部832eは、目的関数Eを最小とする切出し領域の位置情報と、向き検出部831からの向き情報を基に、最適切出し領域を決定して、画像切出し部35に供給する。
 注目領域に含まれる被写体が顔であった場合、例えば、図38に示される向き情報D10乃至D18のいずれかが、向き検出部831から最適化部832eに供給される。図38には、図中向かって、正面、上、右上、右、右下、下、左下、左、左上をそれぞれ向いている顔D10乃至D18が示されており、それぞれがその向いている向きを表す向き情報に対応している。すなわち、向き情報D10は、入力画像において、顔が正面を向いていることを表しており、向き情報D11は、顔が上を向いていることを表しており、向き情報D12は、顔が右上を向いていることを表している。同様に、向き情報D13は、顔が右を向いていることを表しており、向き情報D14は、顔が右下を向いていることを表している。また、向き情報D15は、顔が下を向いていることを表しており、向き情報D16は、顔が左下を向いていることを表しており、向き情報D17は、顔が左を向いていることを表しており、向き情報D18は、顔が左上を向いていることを表している。
 ここで、構図パターンとして3分割構図が設定されているとすると、最適化部832eは、向き情報D10乃至D18に応じて、3分割構図における被写体(顔)の配置を決定するとともに、目的関数Eを最小とする切出し領域の位置情報を求め、その位置情報を基に、最適切出し領域を決定する。
 より具体的には、例えば、向き情報が向き情報D13,D14のいずれかである場合、すなわち、顔が右または右下を向いている場合、最適化部832eは、図39で示される3分割構図における顔の配置を、3分割線交点Pとする。また、向き情報が向き情報D16,D17のいずれかである場合、すなわち、顔が左下または左を向いている場合、最適化部832eは、図39で示される3分割構図における顔の配置を、3分割線交点Pとする。さらに、向き情報が向き情報D12である場合、すなわち、顔が右上を向いている場合、最適化部832eは、図39で示される3分割構図における顔の配置を、3分割線交点Pとする。また、向き情報が向き情報D18である場合、すなわち、顔が左上を向いている場合、最適化部832eは、図39で示される3分割構図における顔の配置を、3分割線交点Pとする。
 なお、向き情報が向き情報D10,D15のいずれかである場合、すなわち、顔が正面または下を向いている場合、最適化部832eは、図39で示される3分割構図における顔の配置を、3分割線交点P,Pのいずれかとする。また、向き情報が向き情報D11である場合、すなわち、顔が上を向いている場合、最適化部832eは、図39で示される3分割構図における顔の配置を、3分割線交点P,Pのいずれかとする。このように、向き情報に対して顔の配置が2以上選ばれる場合、目的関数Eがより小さくなる配置に決定される。
 ここで、図39における3分割線交点P乃至Pにおいて、下側の3分割線交点P,Pに顔が配置される条件としての向き情報が少ないのは、被写体が人全体である場合に、顔は、構図の上の方に位置することが自然であることによるが、向き情報と3分割線交点との対応関係は任意に変更されるようにできる。
 以上のように、最適化部832eは、顔の向きに応じて、3分割構図における顔の配置を決定する。特に、最適化部832eは、3分割構図において、顔の向いている側の空間が広くなるように顔の配置を決定する。これにより、被写体としての人の顔(視線)の先にある物体や風景を切出し領域に含めることができるので、より広がりのある、最適な構図の画像を切出すことが可能となる。
 また、注目領域に含まれる被写体が花であった場合、例えば、図40に示される向き情報D20乃至D28のいずれかが、向き検出部831から最適化部832eに供給される。図40には、図中向かって、正面、上、右上、右、右下、下、左下、左、左上をそれぞれ向いている花D20乃至D28が示されており、それぞれがその向いている向きを表す向き情報に対応している。すなわち、向き情報D20は、入力画像において、花が正面を向いていることを表しており、向き情報D21は、花が上を向いていることを表しており、向き情報D22は、花が右上を向いていることを表している。同様に、向き情報D23は、花が右を向いていることを表しており、向き情報D24は、花が右下を向いていることを表している。また、向き情報D25は、花が下を向いていることを表しており、向き情報D26は、花が左下を向いていることを表しており、向き情報D27は、花が左を向いていることを表しており、向き情報D28は、花が左上を向いていることを表している。
 そして、構図パターンとして3分割構図が設定されている場合、最適化部832eは、向き情報D20乃至D28に応じて、3分割構図における被写体(花)の配置を決定するとともに、目的関数Eを最小とする切出し領域の位置情報を求め、その位置情報を基に、最適切出し領域を決定する。
 より具体的には、例えば、向き情報が向き情報D24である場合、すなわち、花が右下を向いている場合、最適化部832eは、図39で示される3分割構図における花の配置を、3分割線交点Pとする。また、向き情報が向き情報D26である場合、すなわち、花が見左下を向いている場合、最適化部832eは、図39で示される3分割構図における花の配置を、3分割線交点Pとする。さらに、向き情報が向き情報D22,D23のいずれかである場合、すなわち、花が右上または右を向いている場合、最適化部832eは、図39で示される3分割構図における花の配置を、3分割線交点Pとする。また、向き情報が向き情報D27,D28のいずれかである場合、すなわち、花が左または左上を向いている場合、最適化部832eは、図39で示される3分割構図における花の配置を、3分割線交点Pとする。
 なお、向き情報が向き情報D25である場合、すなわち、花が下を向いている場合、最適化部832eは、図39で示される3分割構図における花の配置を、3分割線交点P,Pのいずれかとする。また、向き情報が向き情報D20,D21のいずれかである場合、すなわち、花が正面または上を向いている場合、最適化部832eは、図39で示される3分割構図における花の配置を、3分割線交点P,Pのいずれかとする。このように、向き情報に対して花の配置が2以上選ばれる場合、目的関数Eがより小さくなる配置に決定される。
 ここで、図39における3分割線交点P乃至Pにおいて、上側の3分割線交点P,Pに花が配置される条件としての向き情報が少ないのは、花は、構図の下の方に位置することが自然であることによるが、向き情報と配置される3分割線交点との対応関係は任意に変更されるようにできる。
 以上のように、最適化部832eは、花の向きに応じて、3分割構図における花の配置を決定する。特に、最適化部832eは、3分割構図において、花の向いている側の空間が広くなるように花の配置を決定する。これにより、被写体としての花の先にある物体や風景を切出し領域に含めることができるので、より広がりのある、最適な構図の画像を切出すことが可能となる。
 以上においては、被写体の向きに応じて最適切り出し領域を決定する構成について説明してきたが、被写体の動きに応じて最適切り出し領域を決定するようにしてもよい。
 <10.第10の実施の形態>
 [画像処理装置の構成例]
 図41は、被写体の動きに応じて最適切り出し領域を決定するようにした画像処理装置の構成例を示している。なお、図41の画像処理装置861において、図1の画像処理装置11に設けられたものと同様の機能を備える構成については、同一名称および同一符号を付するものとし、その説明は、適宜省略するものとする。
 すなわち、図41の画像処理装置861において、図1の画像処理装置11と異なるのは、フレームバッファ881、GMV(Global Motion Vector)算出部882、LMV(Local Motion Vector)算出部883、および動き方向決定部884を新たに設け、構図解析部34に代えて、構図解析部885を設けた点である。
 なお、図41において、注目領域抽出部31は、入力画像において注目する注目領域を抽出し、その注目領域を表す注目領域情報を、構図パターン設定部33およびLMV算出部883に供給する。
 フレームバッファ881は、入力画像を1フレーム分保持し、GMV算出部882およびLMV算出部883に供給する。
 GMV算出部882は、入力画像と、フレームバッファ881からの1フレーム前の入力画像(以下、前フレーム入力画像という)とから、画像全体の動きを表すGMVを算出し、動き方向決定部884に供給する。
 LMV算出部883は、入力画像と、フレームバッファ881からの前フレーム入力画像とから、注目領域抽出部31からの注目領域情報で表わされる注目領域における局所的な動きを表すLMVを算出し、動き方向決定部884に供給する。
 動き方向決定部884は、GMV算出部882からのGMV、および、LMV算出部883からのLMVに基づいて、注目領域に含まれる被写体の動きの方向(動き方向)を決定し、その動き方向を表す動き方向情報を、構図解析部885に供給する。
 構図解析部885は、構図パターン設定部33からの構図パターンと、動き方向決定部884からの動き方向情報とを基に、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定し、画像切出し部35に供給する。
 構図解析部885は、構図モデル作成部885a、安全モデル作成部885b、ペナルティモデル作成部885c、目的関数作成部885d、および最適化部885eを備えている。なお、構図モデル作成部885a乃至目的関数作成部885dは、それぞれ、図1の構図モデル作成部34a乃至目的関数作成部34dと同様の機能を備えるので、その説明は省略する。
 最適化部885eは、動き方向決定部884からの動き方向情報に基づいて、目的関数Eを最小とする切出し領域を決定し、最適切出し領域として、画像切出し部35に供給する。
 [画像処理装置の画像切出し処理]
 次に、図42のフローチャートを参照して、図41の画像処理装置861の画像切出し処理について説明する。なお、図42のフローチャートにおけるステップS861乃至S864,S867の処理は、図3のフローチャートを参照して説明したステップS11乃至S14,S16の処理と同様であるので、その説明は省略するものとする。また、図42のフローチャートで説明する画像切出し処理においては、被写体の数、すなわち、注目領域の数は1であるものとする。
 すなわち、ステップS865において、動き方向決定部884は、動き方向決定処理を実行して、入力画像において、注目領域抽出部31からの注目領域情報で表わされる注目領域に含まれる被写体の動き方向を決定する。
 [動き方向決定部の動き方向決定処理]
 ここで、図43のフローチャートを参照して、図42のフローチャートのステップS865における動き方向決定処理について説明する。
 ステップS871において、GMV算出部882は、入力画像と、フレームバッファ881からの前フレーム入力画像とからGMVを算出し、動き方向決定部884に供給する。
 ステップS872において、LMV算出部883は、入力画像と、フレームバッファ881からの前フレーム入力画像とから、注目領域抽出部31からの注目領域情報で表わされる注目領域のLMVを算出し、動き方向決定部884に供給する。
 ステップS873において、動き方向決定部884は、LMVが0または略0であるか否かを判定する。
 ステップS873において、LMVが0または略0でないと判定された場合、すなわち、注目領域に含まれる被写体に十分な動きがある場合、処理はステップS874に進み、動き方向決定部884は、LMVの向きを動き方向とし、その動き方向を表す動き方向情報を構図解析部885に供給する。
 一方、ステップS873において、LMVが0または略0であると判定された場合、すなわち、注目領域に含まれる被写体に全くまたは略動きがない場合、処理はステップS875に進み、動き方向決定部884は、GMVが0または略0であるか否かを判定する。
 ステップS875において、GMVが0または略0でないと判定された場合、すなわち、画像全体に十分な動きがある場合、処理はステップS876に進み、動き方向決定部884は、GMVの向きと反対の向きを被写体の動き方向とし、その動き方向を表す動き方向情報を構図解析部885に供給する。
 ステップS875における状態は、入力画像全体に動きがあるが、注目領域に含まれる被写体に動きがない状態、例えば、背景が動いていて、被写体が静止しているような状態であるが、この場合、被写体は背景に対して相対的に、背景の動きの向きとは反対の向きに動いていることになる。すなわち、GMVの向きと反対の向きは、相対的に、被写体の動き方向となる。
 一方、ステップS875において、GMVが0または略0であると判定された場合、すなわち、画像全体に全くまたは略動きがないとされる場合、処理はステップS877に進み、動き方向決定部884は、動き方向なしとして、動き方向なしを表す動き方向情報を構図解析部885に供給する。
 以上のようにして、動き方向決定部884は、入力画像における注目領域に含まれる被写体の動き方向を決定する。なお、以上の処理においては、動き方向決定部884は、動き方向を、例えば、なし、上、下、左、右、右上、右下、左上、および左下の9種類のうちのいずれかに決定する。
 図42のフローチャートに戻り、ステップS866において、構図解析部885は、構図パターン設定部33からの構図パターンと、動き方向決定部884からの動き方向情報とを基に、切出し領域決定処理を実行し、その構図パターンで切出される画像の、入力画像における最適な切出し領域を決定する。
 [構図解析部の切出し領域決定処理]
 ここで、図44のフローチャートを参照して、図42のフローチャートのステップS866における切出し領域決定処理について説明する。
 なお、図44のフローチャートにおけるステップS881乃至S884の処理は、図7のフローチャートを参照して説明したステップS31乃至S34の処理と同様であるので、その説明は省略するものとする。
 すなわち、ステップS885において、最適化部885eは、目的関数Eを最小とする切出し領域の位置情報と、動き方向決定部884からの動き方向情報を基に、最適切出し領域を決定して、画像切出し部35に供給する。
 より具体的には、例えば、図45に示される動き方向情報D30乃至D38が、動き方向決定部884から最適化部885eに供給される。図45には、上、右上、右、右下、下、左下、左、左上への動きを表す矢印が示されており、その始点を含めたそれぞれが、動き方向情報D30乃至D38に対応している。すなわち、動き方向情報D30は、入力画像において、被写体の動き方向がないことを表しており、動き方向情報D31は、動き方向が上であることを表しており、動き方向情報D32は、動き方向が右上であることを表している。同様に、動き方向情報D33は、動き方向が右であることを表しており、動き方向情報D34は、動き方向が右下であることを表している。また、動き方向情報D35は、動き方向が下であることを表しており、向き情報D36は、動き方向が左下であることを表しており、動き方向情報D37は、動き方向が左であることを表しており、動き方向情報D38は、動き方向が左上であることを表している。
 ここで、構図パターンとして3分割構図(図39)が設定されているとすると、最適化部885eは、動き方向情報D30乃至D38に応じて、3分割構図における被写体の配置を決定するとともに、目的関数Eを最小とする切出し領域の位置情報を求め、その位置情報を基に、最適切出し領域を決定する。
 より具体的には、例えば、動き方向情報が動き方向情報D34である場合、すなわち、被写体の動き方向が右下である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点Pとする。また、動き方向情報が動き方向情報D36である場合、すなわち、被写体の動き方向が左下である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点Pとする。さらに、動き方向情報が動き方向情報D32のいずれかある場合、すなわち、被写体の動き方向が右上である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点Pとする。また、動き方向情報が動き方向情報D38である場合、すなわち、被写体の動き方向が左上である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点Pとする。
 なお、動き方向情報が動き方向情報D31である場合、すなわち、被写体の動き方向が上である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点P,Pのいずれかとする。また、動き方向情報が動き方向情報D33である場合、すなわち、被写体の動き方向が右である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点P,Pのいずれかとする。さらに、動き方向情報が動き方向情報D35である場合、すなわち、被写体の動き方向が下である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点P,Pのいずれかとする。また、動き方向情報が動き方向情報D37である場合、すなわち、被写体の動き方向が左である場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点P,Pのいずれかとする。
 また、動き方向情報が動き方向情報D30である場合、すなわち、被写体の動き方向がない場合、最適化部885eは、図39で示される3分割構図における被写体の配置を、3分割線交点P乃至Pのいずれかとする。すなわち、被写体に動きがない場合は、3分割構図における被写体の配置は、3分割線交点のいずれでもよい。
 このように、動き方向情報に対して被写体の配置が2以上選ばれる場合、目的関数Eがより小さくなる配置に決定される。
 以上のように、最適化部885eは、被写体の動き方向に応じて、3分割構図における被写体の配置を決定する。特に、最適化部885eは、3分割構図において、被写体の動く方向の空間が広くなるように被写体の配置を決定する。これにより、被写体の移動する先にある物体や風景を切出し領域に含めることができるので、より広がりのある、最適な構図の画像を切出すことが可能となる。
 なお、以上においては、3分割構図(図39)における被写体の配置について説明してきたが、3分割構図に限らず、図6で示された対比構図(構図B)やパターン構図(構図H)等の他の構図において、被写体の向きや動きに応じて被写体を配置するようにしてもよい。
 また、以上においては、被写体の数、すなわち、注目領域の数は1であるものとして説明してきたが、被写体の数が2以上である場合であっても、2以上の被写体は、それぞれの向きや動き方向に応じて配置される。
 上述した一連の処理は、ハードウェアにより実行することもできるし、ソフトウェアにより実行することもできる。一連の処理をソフトウェアにより実行する場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータ等に、プログラム記録媒体からインストールされる。
 図46は、上述した一連の処理をプログラムにより実行するコンピュータのハードウェアの構成例を示すブロック図である。
 コンピュータにおいて、CPU(Central Processing Unit)901,ROM(Read Only Memory)902,RAM(Random Access Memory)903は、バス904により相互に接続されている。
 バス904には、さらに、入出力インタフェース905が接続されている。入出力インタフェース905には、キーボード、マウス、マイクロホン等よりなる入力部906、ディスプレイ、スピーカ等よりなる出力部907、ハードディスクや不揮発性のメモリ等よりなる記憶部908、ネットワークインタフェース等よりなる通信部909、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリ等のリムーバブルメディア911を駆動するドライブ910が接続されている。
 以上のように構成されるコンピュータでは、CPU901が、例えば、記憶部908に記憶されているプログラムを、入出力インタフェース905およびバス904を介して、RAM903にロードして実行することにより、上述した一連の処理が行われる。
 コンピュータ(CPU901)が実行するプログラムは、例えば、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)等)、光磁気ディスク、もしくは半導体メモリ等よりなるパッケージメディアであるリムーバブルメディア911に記録して、あるいは、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の伝送媒体を介して提供される。
 そして、プログラムは、リムーバブルメディア911をドライブ910に装着することにより、入出力インタフェース905を介して、記憶部908にインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部909で受信し、記憶部908にインストールすることができる。その他、プログラムは、ROM902や記憶部908に、あらかじめインストールしておくことができる。
 なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。
 また、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。
 11 画像処理装置, 31 注目領域抽出部, 32 シーン判別部, 33 構図パターン設定部, 34 構図解析部, 34a 構図モデル作成部, 34b 安全モデル作成部, 34c ペナルティモデル作成部, 34d 目的関数作成部, 34e 最適化部, 35 画像切出し部, 51 注目度算出部, 52 注目矩形領域決定部, 53 顔矩形領域決定部, 111 画像処理装置, 131 構図パターン設定部, 211 画像処理装置, 231 構図解析部, 231a 構図モデル作成部, 231b 安全モデル作成部, 231c ペナルティモデル作成部, 231d 目的関数作成部, 231e 最適化部, 232 表示部, 233 操作入力部, 311 画像処理装置, 331 パノラマ判別部, 332 構図解析部, 332a 構図モデル作成部, 332b 安全モデル作成部, 332c ペナルティモデル作成部, 332d 目的関数作成部, 332e 最適化部, 631 付加部, 711 撮像装置, 811 画像処理装置, 831 向き検出部, 832 構図解析部, 832e 最適化部, 861 画像処理装置, 881 フレームバッファ, 882 GMV算出部, 883 LMV算出部, 884 動き方向決定部, 885 構図解析部, 885e 最適化部

Claims (15)

  1.  入力画像において注目する注目領域の数と、前記入力画像のシーンとに基づいて、前記入力画像に対応する構図パターンを設定する設定手段と、
     前記設定手段によって設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する決定手段と
     を備える画像処理装置。
  2.  前記入力画像から、前記決定手段によって決定された前記切出し領域を切出す切出し手段をさらに備える
     請求項1に記載の画像処理装置。
  3.  前記決定手段は、前記設定手段によって設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域の、複数の候補を決定し、
     前記入力画像上に、複数の前記切出し領域の候補を表示する表示手段と、
     前記表示手段によって表示された複数の前記切出し領域の候補のうちのいずれかを選択する選択手段と
     をさらに備え、
     前記切出し手段は、入力画像から、前記選択手段によって選択された前記切出し領域を切出す
     請求項2に記載の画像処理装置。
  4.  前記入力画像において注目する前記注目領域を抽出する抽出手段と、
     前記入力画像の前記シーンを判別する判別手段と
     をさらに備える
     請求項1に記載の画像処理装置。
  5.  前記決定手段は、前記入力画像において注目する前記注目領域を全て含む最小の矩形領域の中心位置が、前記入力画像における前記切出し領域の中心に近づくように、前記切出し領域を決定する
     請求項1に記載の画像処理装置。
  6.  前記決定手段は、前記切出し領域がより大きくなるように、かつ、前記入力画像において注目する前記注目領域を全て含む最小の前記矩形領域と、前記切出し領域との共通領域がより大きくなるように、前記切出し領域を決定する
     請求項5に記載の画像処理装置。
  7.  前記決定手段は、前記切出し領域が前記入力画像からはみ出さないように、前記切出し領域を決定する
     請求項1に記載の画像処理装置。
  8.  前記入力画像のアスペクト比と所定の閾値とを比較することで、前記入力画像がパノラマ画像であるか否かを判定する判定手段をさらに備え、
     前記決定手段は、前記判定手段によって前記入力画像がパノラマ画像であると判定された場合、前記設定手段によって設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域の、複数の候補を決定する
     請求項1に記載の画像処理装置。
  9.  前記決定手段によって決定された前記切出し領域を示す情報を、EXIF情報として前記入力画像に付加する付加手段をさらに備える
     請求項1に記載の画像処理装置。
  10.  前記注目領域には、前記入力画像において注目する被写体が含まれ、
     前記被写体の向きを検出する検出手段をさらに備え、
     前記決定手段は、前記設定手段によって設定された前記構図パターンと、前記検出手段によって検出された前記被写体の向きとを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する
     請求項1に記載の画像処理装置。
  11.  前記注目領域には、前記入力画像において注目する被写体が含まれ、
     前記被写体の動きの方向を決定する動き方向決定手段をさらに備え、
     前記決定手段は、前記設定手段によって設定された前記構図パターンと、前記動き方向決定手段によって決定された前記被写体の動きの方向とを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する
     請求項1に記載の画像処理装置。
  12.  前記入力画像全体の動きを求める全体動き算出手段と、
     前記注目領域の動きを求める局所動き算出手段と
     をさらに備え、
     前記動き方向決定手段は、前記全体動き算出手段によって求められた前記入力画像全体の動きの向きと、前記局所動き算出手段によって求められた前記注目領域の動きの向きとに基づいて、前記被写体の動きの方向を決定する
     請求項11に記載の画像処理装置。
  13.  入力画像において注目する注目領域の数と、前記入力画像のシーンとに基づいて、前記入力画像に対応する構図パターンを設定する設定ステップと、
     前記設定ステップにおいて設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する決定ステップと
     含む画像処理方法。
  14.  前記入力画像において注目する注目領域の数と、前記入力画像のシーンとに基づいて、前記入力画像に対応する構図パターンを設定する設定ステップと、
     前記設定ステップにおいて設定された前記構図パターンを基に、前記入力画像から前記構図パターンで切出される画像の、前記入力画像における最適な切出し領域を決定する決定ステップと
     を含む処理をコンピュータに実行させるプログラム。
  15.  被写体を撮像する撮像手段と、
     前記撮像手段によって撮像された撮像画像のシーンを取得する取得手段と、
     前記撮像画像において注目する被写体を含む注目領域の数と、前記取得手段によって取得された前記シーンとに基づいて、前記撮像画像に対応する構図パターンを設定する設定手段と、
     前記設定手段によって設定された前記構図パターンを基に、前記撮像画像から前記構図パターンで切出される画像の、前記撮像画像における最適な切出し領域を決定する決定手段と
     を備える撮像装置。
PCT/JP2009/065626 2008-09-08 2009-09-08 画像処理装置および方法、撮像装置、並びにプログラム WO2010027080A1 (ja)

Priority Applications (6)

Application Number Priority Date Filing Date Title
BRPI0905360-3A BRPI0905360A2 (pt) 2008-09-08 2009-09-08 Aparelho e método de processamento de imagem, programa, e, aparelo de captura de imagem
US12/740,451 US8538074B2 (en) 2008-09-08 2009-09-08 Image processing apparatus and method, image capturing apparatus, and program
JP2010527850A JP5224149B2 (ja) 2008-09-08 2009-09-08 画像処理装置および方法、撮像装置、並びにプログラム
CN200980100857A CN101843093A (zh) 2008-09-08 2009-09-08 图像处理设备和方法、图像捕捉设备、以及程序
EP09811603.1A EP2207341B1 (en) 2008-09-08 2009-09-08 Image processing apparatus and method, imaging apparatus, and program
US13/914,365 US9390466B2 (en) 2008-09-08 2013-06-10 Image processing apparatus and method, image capturing apparatus and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008229310 2008-09-08
JP2008-229310 2008-09-08

Related Child Applications (3)

Application Number Title Priority Date Filing Date
US12/740,451 A-371-Of-International US8538074B2 (en) 2008-09-08 2009-09-08 Image processing apparatus and method, image capturing apparatus, and program
US74045110A Substitution 2008-09-08 2010-04-29
US13/914,365 Continuation US9390466B2 (en) 2008-09-08 2013-06-10 Image processing apparatus and method, image capturing apparatus and program

Publications (1)

Publication Number Publication Date
WO2010027080A1 true WO2010027080A1 (ja) 2010-03-11

Family

ID=41797242

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/065626 WO2010027080A1 (ja) 2008-09-08 2009-09-08 画像処理装置および方法、撮像装置、並びにプログラム

Country Status (7)

Country Link
US (2) US8538074B2 (ja)
EP (1) EP2207341B1 (ja)
JP (1) JP5224149B2 (ja)
CN (1) CN101843093A (ja)
BR (1) BRPI0905360A2 (ja)
RU (1) RU2462757C2 (ja)
WO (1) WO2010027080A1 (ja)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011193125A (ja) * 2010-03-12 2011-09-29 Sony Corp 画像処理装置および方法、プログラム、並びに撮像装置
KR20130120841A (ko) * 2012-04-26 2013-11-05 엘지전자 주식회사 영상표시기기 및 그 영상표시방법
CN104243801A (zh) * 2013-06-17 2014-12-24 索尼公司 显示控制装置、显示控制方法、程序和成像设备
WO2018189961A1 (ja) * 2017-04-14 2018-10-18 シャープ株式会社 画像処理装置、端末装置、および画像処理プログラム
JP2020123894A (ja) * 2019-01-31 2020-08-13 オリンパス株式会社 撮像装置、撮像方法及び撮像プログラム
WO2023286367A1 (ja) * 2021-07-15 2023-01-19 ソニーグループ株式会社 情報処理装置、情報処理方法、プログラム

Families Citing this family (49)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8538074B2 (en) * 2008-09-08 2013-09-17 Sony Corporation Image processing apparatus and method, image capturing apparatus, and program
US8494259B2 (en) * 2009-12-28 2013-07-23 Teledyne Scientific & Imaging, Llc Biologically-inspired metadata extraction (BIME) of visual data using a multi-level universal scene descriptor (USD)
JP2012042720A (ja) * 2010-08-19 2012-03-01 Sony Corp 画像処理装置および方法、並びにプログラム
US8692907B2 (en) * 2010-09-13 2014-04-08 Sony Corporation Image capturing apparatus and image capturing method
US9325804B2 (en) 2010-11-08 2016-04-26 Microsoft Technology Licensing, Llc Dynamic image result stitching
JP5841538B2 (ja) * 2011-02-04 2016-01-13 パナソニック インテレクチュアル プロパティ コーポレーション オブアメリカPanasonic Intellectual Property Corporation of America 関心度推定装置および関心度推定方法
JP2012205037A (ja) * 2011-03-25 2012-10-22 Olympus Imaging Corp 画像処理装置および画像処理方法
JP5000781B1 (ja) * 2011-11-09 2012-08-15 楽天株式会社 画像処理装置、画像処理装置の制御方法、プログラム、及び情報記憶媒体
US9025873B2 (en) * 2011-11-10 2015-05-05 Canon Kabushiki Kaisha Image processing apparatus and control method therefor
JP2013153375A (ja) * 2012-01-26 2013-08-08 Sony Corp 画像処理装置、画像処理方法および記録媒体
US8773543B2 (en) * 2012-01-27 2014-07-08 Nokia Corporation Method and apparatus for image data transfer in digital photographing
JP5393927B1 (ja) * 2012-02-16 2014-01-22 パナソニック株式会社 映像生成装置
US9595298B2 (en) 2012-07-18 2017-03-14 Microsoft Technology Licensing, Llc Transforming data to create layouts
JP6137800B2 (ja) * 2012-09-26 2017-05-31 オリンパス株式会社 画像処理装置、画像処理方法、及び、画像処理プログラム
JP5882975B2 (ja) * 2012-12-26 2016-03-09 キヤノン株式会社 画像処理装置、撮像装置、画像処理方法、及び記録媒体
US9582610B2 (en) * 2013-03-15 2017-02-28 Microsoft Technology Licensing, Llc Visual post builder
US10019823B2 (en) * 2013-10-24 2018-07-10 Adobe Systems Incorporated Combined composition and change-based models for image cropping
US9330334B2 (en) 2013-10-24 2016-05-03 Adobe Systems Incorporated Iterative saliency map estimation
US9299004B2 (en) 2013-10-24 2016-03-29 Adobe Systems Incorporated Image foreground detection
JP6381892B2 (ja) * 2013-10-28 2018-08-29 オリンパス株式会社 画像処理装置、画像処理方法及び画像処理プログラム
US9195903B2 (en) * 2014-04-29 2015-11-24 International Business Machines Corporation Extracting salient features from video using a neurosynaptic system
FR3021768B1 (fr) * 2014-05-28 2017-12-01 Dxo Sa Procede parametrable de traitement d'un fichier representatif d'au moins une image
US9373058B2 (en) 2014-05-29 2016-06-21 International Business Machines Corporation Scene understanding using a neurosynaptic system
US9798972B2 (en) 2014-07-02 2017-10-24 International Business Machines Corporation Feature extraction using a neurosynaptic system for object classification
US10115054B2 (en) 2014-07-02 2018-10-30 International Business Machines Corporation Classifying features using a neurosynaptic system
US10282069B2 (en) 2014-09-30 2019-05-07 Microsoft Technology Licensing, Llc Dynamic presentation of suggested content
US9626768B2 (en) * 2014-09-30 2017-04-18 Microsoft Technology Licensing, Llc Optimizing a visual perspective of media
US9626584B2 (en) * 2014-10-09 2017-04-18 Adobe Systems Incorporated Image cropping suggestion using multiple saliency maps
GB201501311D0 (en) 2015-01-27 2015-03-11 Apical Ltd Method, system and computer program product
CN105989572B (zh) * 2015-02-10 2020-04-24 腾讯科技(深圳)有限公司 图片处理方法及装置
WO2016207875A1 (en) 2015-06-22 2016-12-29 Photomyne Ltd. System and method for detecting objects in an image
CN105357436B (zh) * 2015-11-03 2018-07-03 广东欧珀移动通信有限公司 用于图像拍摄中的图像裁剪方法和系统
CN105323491B (zh) * 2015-11-27 2019-04-23 小米科技有限责任公司 图像拍摄方法及装置
JP2017099616A (ja) * 2015-12-01 2017-06-08 ソニー株式会社 手術用制御装置、手術用制御方法、およびプログラム、並びに手術システム
KR102147230B1 (ko) * 2015-12-16 2020-08-25 그레이스노트, 인코포레이티드 동적 비디오 오버레이
CN105912259A (zh) * 2016-04-14 2016-08-31 深圳天珑无线科技有限公司 照片优化的方法及设备
CN106162146B (zh) * 2016-07-29 2017-12-08 暴风集团股份有限公司 自动识别并播放全景视频的方法及系统
WO2018094648A1 (zh) * 2016-11-24 2018-05-31 华为技术有限公司 拍摄构图引导方法及装置
WO2018106213A1 (en) * 2016-12-05 2018-06-14 Google Llc Method for converting landscape video to portrait mobile layout
US10380228B2 (en) 2017-02-10 2019-08-13 Microsoft Technology Licensing, Llc Output generation based on semantic expressions
US10218901B2 (en) * 2017-04-05 2019-02-26 International Business Machines Corporation Picture composition adjustment
CN107545576A (zh) * 2017-07-31 2018-01-05 华南农业大学 基于构图规则的图像编辑方法
US11282163B2 (en) 2017-12-05 2022-03-22 Google Llc Method for converting landscape video to portrait mobile layout using a selection interface
JP7013272B2 (ja) * 2018-02-13 2022-01-31 キヤノン株式会社 画像処理装置
CN108810418B (zh) * 2018-07-16 2020-09-11 Oppo广东移动通信有限公司 图像处理方法、装置、移动终端及计算机可读存储介质
CN109246351B (zh) * 2018-07-20 2021-04-06 维沃移动通信有限公司 一种构图方法及终端设备
CN117880607A (zh) 2019-02-28 2024-04-12 斯塔特斯公司 可跟踪视频帧的生成方法、识别系统和介质
US11373407B2 (en) * 2019-10-25 2022-06-28 International Business Machines Corporation Attention generation
CN116097308A (zh) * 2020-08-21 2023-05-09 华为技术有限公司 自动摄影构图推荐

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001211315A (ja) * 1999-11-18 2001-08-03 Fuji Photo Film Co Ltd 出力画像領域調整方法
JP2004274428A (ja) * 2003-03-10 2004-09-30 Konica Minolta Holdings Inc 画像処理方法、画像処理装置、記憶媒体及びプログラム
JP2005175684A (ja) * 2003-12-09 2005-06-30 Nikon Corp デジタルカメラおよびデジタルカメラの画像取得方法
JP2008042800A (ja) 2006-08-10 2008-02-21 Fujifilm Corp トリミング装置および方法並びにプログラム
JP2008147997A (ja) * 2006-12-11 2008-06-26 Fujifilm Corp 撮像装置、撮像方法、監視システム、監視方法、及びプログラム

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6834127B1 (en) * 1999-11-18 2004-12-21 Fuji Photo Film Co., Ltd. Method of adjusting output image areas
US20020063725A1 (en) * 2000-11-30 2002-05-30 Virtuallylisted Llc Method and apparatus for capturing and presenting panoramic images for websites
US7561288B2 (en) * 2002-07-05 2009-07-14 Canon Kabushiki Kaisha Recording system and controlling method therefor
JP4605345B2 (ja) * 2004-06-18 2011-01-05 富士フイルム株式会社 画像処理方法及び装置
JP2006121298A (ja) * 2004-10-20 2006-05-11 Canon Inc トリミングの実行方法及び装置
US7529390B2 (en) * 2005-10-03 2009-05-05 Microsoft Corporation Automatically cropping an image
US8218830B2 (en) * 2007-01-29 2012-07-10 Myspace Llc Image editing system and method
JP4854539B2 (ja) * 2007-02-21 2012-01-18 キヤノン株式会社 画像処理装置、その制御方法、及びプログラム
US8538074B2 (en) * 2008-09-08 2013-09-17 Sony Corporation Image processing apparatus and method, image capturing apparatus, and program
US8406515B2 (en) * 2009-06-24 2013-03-26 Hewlett-Packard Development Company, L.P. Method for automatically cropping digital images

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001211315A (ja) * 1999-11-18 2001-08-03 Fuji Photo Film Co Ltd 出力画像領域調整方法
JP2004274428A (ja) * 2003-03-10 2004-09-30 Konica Minolta Holdings Inc 画像処理方法、画像処理装置、記憶媒体及びプログラム
JP2005175684A (ja) * 2003-12-09 2005-06-30 Nikon Corp デジタルカメラおよびデジタルカメラの画像取得方法
JP2008042800A (ja) 2006-08-10 2008-02-21 Fujifilm Corp トリミング装置および方法並びにプログラム
JP2008147997A (ja) * 2006-12-11 2008-06-26 Fujifilm Corp 撮像装置、撮像方法、監視システム、監視方法、及びプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2207341A4

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011193125A (ja) * 2010-03-12 2011-09-29 Sony Corp 画像処理装置および方法、プログラム、並びに撮像装置
KR20130120841A (ko) * 2012-04-26 2013-11-05 엘지전자 주식회사 영상표시기기 및 그 영상표시방법
KR101952174B1 (ko) * 2012-04-26 2019-05-22 엘지전자 주식회사 영상표시기기 및 그 영상표시방법
CN104243801A (zh) * 2013-06-17 2014-12-24 索尼公司 显示控制装置、显示控制方法、程序和成像设备
CN104243801B (zh) * 2013-06-17 2019-09-03 索尼公司 显示控制装置、显示控制方法、记录介质和成像设备
WO2018189961A1 (ja) * 2017-04-14 2018-10-18 シャープ株式会社 画像処理装置、端末装置、および画像処理プログラム
JPWO2018189961A1 (ja) * 2017-04-14 2020-02-27 シャープ株式会社 画像処理装置、端末装置、および画像処理プログラム
JP2020123894A (ja) * 2019-01-31 2020-08-13 オリンパス株式会社 撮像装置、撮像方法及び撮像プログラム
JP7236869B2 (ja) 2019-01-31 2023-03-10 オリンパス株式会社 撮像装置、撮像方法及び撮像プログラム
WO2023286367A1 (ja) * 2021-07-15 2023-01-19 ソニーグループ株式会社 情報処理装置、情報処理方法、プログラム

Also Published As

Publication number Publication date
BRPI0905360A2 (pt) 2015-06-30
US8538074B2 (en) 2013-09-17
US9390466B2 (en) 2016-07-12
US20130272611A1 (en) 2013-10-17
EP2207341A1 (en) 2010-07-14
RU2010117215A (ru) 2011-11-10
EP2207341A4 (en) 2012-04-11
JP5224149B2 (ja) 2013-07-03
US20100290705A1 (en) 2010-11-18
CN101843093A (zh) 2010-09-22
US20160171647A9 (en) 2016-06-16
JPWO2010027080A1 (ja) 2012-02-02
RU2462757C2 (ru) 2012-09-27
EP2207341B1 (en) 2013-11-06

Similar Documents

Publication Publication Date Title
JP5224149B2 (ja) 画像処理装置および方法、撮像装置、並びにプログラム
JP5016541B2 (ja) 画像処理装置および方法並びにプログラム
JP4844657B2 (ja) 画像処理装置及び方法
JP5136474B2 (ja) 画像処理装置および方法、学習装置および方法、並びに、プログラム
US20130058579A1 (en) Image information processing apparatus
JP5609425B2 (ja) 画像処理装置、撮像装置、及び画像処理プログラム
EP2112817A1 (en) Composition analysis method, image device having composition analysis function, composition analysis program, and computer-readable recording medium
JP5525757B2 (ja) 画像処理装置、電子機器、及びプログラム
US8565491B2 (en) Image processing apparatus, image processing method, program, and imaging apparatus
JP2011054071A (ja) 画像処理装置、画像処理方法及びプログラム
KR20090087670A (ko) 촬영 정보 자동 추출 시스템 및 방법
CN110909724B (zh) 一种多目标图像的缩略图生成方法
WO2015156149A1 (ja) 画像処理装置および画像処理方法
CN111881849A (zh) 图像场景检测方法、装置、电子设备及存储介质
US9332196B2 (en) Image processing device, method and program
JP5016540B2 (ja) 画像処理装置および方法並びにプログラム
JP7000921B2 (ja) 撮像装置、撮像方法、及びプログラム
CN112017120A (zh) 一种图像合成方法及装置
JP5871175B2 (ja) 領域抽出装置、撮像装置、及び領域抽出プログラム
CN112348822A (zh) 图像处理设备和图像处理方法
JP5287965B2 (ja) 画像処理装置、画像処理方法及びプログラム
JP6996347B2 (ja) 撮像装置、撮像方法、及びプログラム
WO2011086901A1 (ja) 画像処理装置、撮像装置、および画像処理プログラム
JP2005071389A (ja) 画像処理装置及び方法
CN112070672A (zh) 一种图像合成方法及装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980100857.8

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2010527850

Country of ref document: JP

Ref document number: 2009811603

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2870/DELNP/2010

Country of ref document: IN

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

Ref document number: 09811603

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 12740451

Country of ref document: US

Ref document number: 2010117215

Country of ref document: RU

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: PI0905360

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20100430