JP5731033B2 - Image processing apparatus, electronic device, and program - Google Patents

Image processing apparatus, electronic device, and program Download PDF

Info

Publication number
JP5731033B2
JP5731033B2 JP2014036006A JP2014036006A JP5731033B2 JP 5731033 B2 JP5731033 B2 JP 5731033B2 JP 2014036006 A JP2014036006 A JP 2014036006A JP 2014036006 A JP2014036006 A JP 2014036006A JP 5731033 B2 JP5731033 B2 JP 5731033B2
Authority
JP
Japan
Prior art keywords
composition
image
grid
weight
weighted
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2014036006A
Other languages
Japanese (ja)
Other versions
JP2014099212A (en
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 JP2014036006A priority Critical patent/JP5731033B2/en
Publication of JP2014099212A publication Critical patent/JP2014099212A/en
Application granted granted Critical
Publication of JP5731033B2 publication Critical patent/JP5731033B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

  The present invention relates to an image processing apparatus, an electronic device, a program, and the like.

  When taking a picture with a camera, there is a need to take a better composition.

  For example, Patent Document 1 discloses a technique for determining whether the composition of an image is good or bad and presenting the determination result to the user. In the method of Patent Document 1, the composition is determined based on whether or not the subject is close to the line of the three-divided line or the intersection.

  In Patent Document 2, a subject of interest (main subject) such as a person is detected from the image, and the image is trimmed so that the subject of interest is located at the intersection of the three-partition lines, and four images that can be as many as the number of intersections. A method of presenting an image to a user and causing the user to select a favorite image is disclosed.

  Further, Patent Document 3 extracts a face, a human body region, a sky region, a vanishing point, and a high saturation region from an image, and includes at least one of a sky region, a vanishing point, and a high saturation region, and at the intersection of three dividing lines. A technique for trimming an image so that a human body region is located is disclosed. Further, in the case of a group photo in which a plurality of persons are detected, trimming is performed so that the person's face is positioned at the left and right center of the image.

JP 2001-167253 A JP2007-295203A JP2008-42800

  However, the method disclosed in Patent Document 1 is for determining whether the composition of the entire image is good or bad, and is not a method for determining which region in the image is a good composition. Further, although an evaluation criterion is whether or not the subject is close to the three-part dividing line, no specific calculation method for determining whether the composition is good or bad has been proposed.

  Further, the method of Patent Document 2 only presents to the user an image in which a subject of interest such as a person is located at the intersection of the three-part dividing lines, and it does not consider which composition is more suitable. Also, the balance between the subject of interest and the background is not taken into consideration.

  In the method of Patent Document 3, a background area other than a person is also used. However, since the objects to be used are limited such as a sky area, a vanishing point, and a high saturation area, it is difficult to deal with the real world. . In addition, since the background area only determines the composition so that they are included, the problem is that the position of the dividing line is not determined so that the positional relationship between both the person and the background is suitable. There is.

  According to some aspects of the present invention, it is possible to provide an image processing device, an electronic device, a program, and the like that can determine a composition such that a target subject or background is in a suitable position.

  One aspect of the present invention is an image processing apparatus that evaluates the composition of an input image, and weights at least one of a target subject region of the input image and an edge of a background region other than the target subject region. A weighted image creating unit for creating a weighted image, a composition grid creating unit for creating a composition grid weighted with respect to the grid lines, and the input based on the created weighted image and the composition grid The present invention relates to an image processing apparatus including a composition evaluation unit that performs a composition evaluation calculation of the obtained image. Another embodiment of the present invention relates to a program that causes a computer to function as each of the above-described units or a computer-readable information storage medium that stores the program.

  According to one aspect of the present invention, a weighted image in which weight is applied to at least one of the target subject region and the edge of the background region of the input image, and a composition grid in which weights are applied to the grid lines are created. The Then, composition evaluation calculation of the input image is performed using the created weight image and composition grid. This makes it possible to determine and present the composition so that the subject of interest and the background are in a suitable position. It is also possible to realize composition evaluation at an arbitrary position of the input image.

  In the aspect of the invention, the composition evaluation unit may perform a correlation calculation between the weighted image and the composition grid, and calculate a composition evaluation value by the correlation calculation.

  In this way, the composition evaluation value can be calculated by evaluating the match between the weighted area in the weighted image and the area weighted in the composition grid by the correlation calculation.

  In the aspect of the invention, the weight image creation unit may create the weight image in which a weight larger than the weight attached to the edge of the background region is given to the target subject region.

  In this way, by making the weight of the target subject area larger than the weight of the background area other than the target subject area, it is possible to realize the composition evaluation calculation with more importance on the target subject area.

  In one aspect of the present invention, the weight image creating unit assigns a greater weight to the face area of the person than the weight assigned to the torso area of the person when a person is detected from the input image. The attached weight image may be created.

  In this way, when the subject of interest is a person, by making the weight of the person's face area greater than that of the body area, composition evaluation processing that places more importance on the person's face area can be realized.

  In the aspect of the invention, the weight image creation unit may create the weight image with a greater weight as it is closer to the center of the subject area of interest.

  As described above, if the weight of the target subject area is set to be larger as it is closer to the center of the target subject area, composition evaluation processing can be realized with more importance on the area near the center of the target subject area.

  In the aspect of the invention, the weight image creation unit may extract an edge of the input image and perform a smoothing process on the extracted edge to create the weight image.

  In this way, if an edge between regions is extracted from the input image and then weighted using the result of smoothing the edge, the closer to the edge of the region, the greater the weight, A weight image with a small weight can be obtained.

  In the aspect of the invention, the composition grid creation unit may create the composition grid with a greater weight as it is closer to the grid line.

  In this way, when the coordinates closer to the grid lines are given higher weights, composition evaluation calculation can be realized with more importance on the grid lines. As the composition grid, for example, a three-part dividing line, a golden parting line, or an arbitrary grid set by a user configured by a plurality of grid lines (line segments) placed at arbitrary coordinates can be used. If a user-set composition grid is used, it is possible to create a composition grid that matches the sensitivity of a person or that matches the sensitivity of an individual person.

  In the aspect of the invention, the composition grid creation unit may create the composition grid in which a weight greater than a weight given to a line other than the intersection is given to the intersection of the composition grid. .

  In this way, if the intersection of the composition grid (in the vicinity of the intersection) is given a higher weight than on the line other than the intersection, composition evaluation calculation with more importance on the intersection of the composition grid can be realized.

  Also, in one aspect of the present invention, the composition evaluation unit performs a composition evaluation value calculation process using a weight attached to an intersection of the composition grid, and the calculated composition evaluation value is equal to or greater than a predetermined threshold value. As a condition, a composition evaluation value calculation process may be performed using weights attached to grid lines.

  If the composition evaluation value is calculated using the weight of the intersection (near the intersection) of the composition grid in this way, and the composition evaluation value is equal to or greater than a predetermined threshold value, the composition evaluation value is calculated using the weight on the grid line. When the composition evaluation value at the intersection is considered to be low, processing time can be saved.

  Further, in one aspect of the present invention, the composition evaluation unit performs a composition evaluation value calculation process using a weight attached to the grid line, and the calculated composition evaluation value is equal to or greater than a predetermined threshold. The composition evaluation value may be calculated using the weights attached to the area around the grid lines.

  In this way, the composition evaluation value is calculated using the weight on the grid line of the composition grid, and when the composition evaluation value is equal to or greater than a predetermined threshold, the composition using the weight around the grid line given along the grid line is used. If the evaluation value is calculated, the processing time can be saved when the composition evaluation value on the grid line seems to be low.

  In the aspect of the invention, the composition evaluation unit may detect the intersection of any of the plurality of intersections of the composition grid when the face area of the person is detected from the input image. The composition evaluation value may be calculated by setting it at the center of the face area.

  In this way, when a person's face is detected from the input image, any one of the intersections of the composition grid is aligned with the center of the person's face area, and the composition evaluation value is calculated using the coordinates in the vicinity thereof. By calculating, it is possible to realize a composition evaluation calculation that emphasizes the face of a person. In addition, processing time can be saved.

  In one aspect of the present invention, the composition evaluation unit sets the size of the composition grid according to the size of the detected human face area when a human face area is detected from the input image. May be.

  In this way, when a human face is detected from the input image, the composition grid size can be determined to be proportional to the size of the human face area, for example, and the composition corresponding to the human face size can be determined. It becomes possible to obtain a grid.

  In the aspect of the invention, the composition evaluation unit may calculate the composition evaluation value while changing the size of the composition grid, and search for the size of the composition grid from which a larger composition evaluation value is calculated. Good.

  In this way, it is possible to calculate the composition evaluation value while changing the size of the composition grid, and to search for the size of the composition grid from which a larger composition evaluation value is calculated. Thereby, the size of the composition grid having a higher composition evaluation value can be obtained.

  In the aspect of the invention, the composition evaluation unit may use the intersection having the highest correlation value of the correlation calculation between the weighted image and the composition grid among the plurality of intersections of the composition grid as the size expansion / contraction center. The size of the composition grid from which a larger composition evaluation value is calculated may be searched by changing the size of the grid.

  In this way, it is possible to search for the size of the composition grid by setting the coordinates at the intersection where the local area around the intersection coordinates has the highest correlation among the intersections of the composition grid, and the composition grid having a high composition evaluation value. It becomes possible to obtain | require the size of more efficiently.

  In the aspect of the invention, the composition evaluation unit may calculate a composition evaluation value while rotating the composition grid, and search for a rotation angle of the composition grid from which a larger composition evaluation value is calculated. .

  In this way, it is possible to calculate the composition evaluation value while rotating the composition grid at an arbitrary rotation angle, and to search for the angle of the composition grid from which a larger composition evaluation value is calculated.

  In the aspect of the invention, the composition evaluation unit may use the composition grid as a rotation center with an intersection having the highest correlation value of the correlation calculation between the weighted image and the composition grid among a plurality of intersections of the composition grid. The rotation angle of the composition grid from which a larger composition evaluation value is calculated by rotation may be searched.

  In this way, it is possible to search for the rotation angle of the composition grid with the intersection having the highest correlation in the local area around the intersection coordinates among the intersections of the composition grid as the center of rotation, and for the composition grid with a high composition evaluation value. The rotation angle can be determined more efficiently.

  Moreover, in one aspect of the present invention, the image processing apparatus includes a composite image creation unit that performs a process of pasting the input first to nth frame images to create a composite image, and the composition evaluation unit includes the created composition evaluation unit. A composition evaluation calculation may be performed based on the weight image created from the combined image and the composition grid.

  In this way, composition evaluation calculation with a suitable composition can be realized even when the desired composition range is outside the angle of view range.

  Further, according to an aspect of the present invention, the image processing apparatus includes a target object setting unit for a user to set a target object, and the weighted image creation unit is configured to add another subject or background to the target subject area set by the user. The weighted image may be created with a weight greater than the weight assigned to the region.

  In this way, when there is a region of the subject of interest that is arbitrarily set in the input image, in the weighted image, the weight of the region can be made larger than the weights of other subjects and the background region. This makes it possible to realize a composition evaluation calculation that places importance on the subject of interest set arbitrarily by the user.

  In one aspect of the present invention, composition presentation is performed in which a composition of an input image is determined based on a result of a composition evaluation calculation using the weighted image and the composition grid, and the determined composition is presented to a user. Part may be included.

  In this way, the user can know a suitable composition of the input image.

  In the aspect of the invention, the composition presentation unit may present the result of the composition evaluation calculation using the weight image and the composition grid to the user using at least one of a character, a graph, and an image effect. Good.

  As described above, the result of the composition evaluation calculation at an arbitrary coordinate can be presented to the user using at least one of a character, a graph, and an image effect, and the user can know the result of the composition evaluation calculation. .

  One embodiment of the present invention relates to an electronic device including the image processing device described above.

FIG. 1A to FIG. 1C are explanatory diagrams of preferable compositions. 1 is a configuration example of an image processing apparatus and an electronic apparatus according to an embodiment. The flowchart for demonstrating the process of this embodiment. The flowchart for demonstrating the creation process of a weight image. FIGS. 5A to 5D are explanatory diagrams of weight images. The flowchart for demonstrating the creation process of a composition grid. 7A to 7C are explanatory diagrams of the composition grid. The figure which shows a mode that the composition grid was superimposed on the weight image. Explanatory drawing of the determination method of the size of a composition grid, a position, and a rotation angle. FIG. 10A to FIG. 10C are explanatory diagrams of a method for determining the size, position, and rotation angle of the composition grid. The flowchart for demonstrating the calculation process of the composition evaluation value in a speed-up method. The flowchart for demonstrating the creation process of the composition grid in the speed-up method. FIGS. 13A and 13B are explanatory diagrams of a method for determining the position of the composition grid based on the human face. FIGS. 14A and 14B are explanatory diagrams of a method for determining the size of the composition grid based on the human face. The flowchart for demonstrating the update process of the position, size, and rotation angle of a composition grid in the speed-up method. FIG. 16A and FIG. 16B are explanatory diagrams of the process of updating the composition grid size and rotation angle in the high-speed technique. Explanatory drawing about a bonding process. An example of a created composite image. Explanatory drawing of the process which determines a composition from a bonded image. The flowchart for demonstrating the bonding process. Explanatory drawing about a bonding process. 2 is a second configuration example of an image processing apparatus and an electronic apparatus according to the present embodiment. The flowchart for demonstrating the process of the 2nd structural example of this embodiment. FIG. 24A to FIG. 24C are explanatory diagrams of a method for presenting the result of the composition evaluation calculation.

  Hereinafter, this embodiment will be described. In addition, this embodiment demonstrated below does not unduly limit the content of this invention described in the claim. In addition, all the configurations described in the present embodiment are not necessarily essential configuration requirements of the present invention.

1. Configuration Example In this embodiment, an example will be described in which a rectangular area in an image having a suitable composition is obtained from an input image and presented to the user.

  First, the definition of a suitable composition is demonstrated using FIG. 1 (A)-FIG.1 (C). In general, it is said that a photograph in which the subject is shifted from the center of the image as shown in FIG. 1 (B) is a preferable composition than a photograph in which the subject is shown in the center of the image as shown in FIG. 1 (A). Yes. A grid line as shown in FIG. 1C is often used as an index for photographing a subject with a suitable composition. As grid lines, there are three division lines obtained by dividing the vertical and horizontal directions into three, and golden division lines that divide the vertical and horizontal directions into about 1: 1.62. A suitable composition can be obtained by aligning the subject of interest or the edge of the background on the intersection or line of the dividing line. In the present embodiment, the suitability of the composition of the input image is evaluated using this grid line. In addition, the most suitable rectangular area in the image is obtained and presented to the user.

  FIG. 2 shows a configuration example of the image processing apparatus 30 according to the present embodiment and an electronic apparatus including the image processing apparatus 30. 2 includes an image input unit 20, an image processing device 30, an operation unit 60, a storage unit 70, a control unit 80, an image output unit 90, and an information storage medium 98. Various modifications may be made such as omitting some of these components or adding other components.

  In FIG. 2, an electronic camera such as a digital camera or a video camera is assumed as the electronic device. However, this embodiment is not limited to an electronic camera, and can be applied to various electronic devices such as a computer, a portable information terminal, a mobile phone, and a portable game machine. For example, the image processing method of this embodiment may be realized by a program of a personal computer, and composition evaluation calculation using image data stored in the storage unit of the personal computer may be performed.

  The image input unit 20 (image acquisition unit) is for inputting (acquiring) an image to be subjected to image processing, and can be realized by, for example, an imaging unit included in an electronic camera. The imaging unit can be realized by an optical system such as a lens or an imaging element such as a CCD or CMOS sensor. The image input unit 20 may be realized by a communication unit that receives image data from the outside wirelessly or by wire, or an external interface that performs interface processing such as a memory card or USB.

  The image processing apparatus 30 performs various processes of the present embodiment, and the function can be realized by an image processing IC, a combination of various processors (CPU) and software, or the like. In the present embodiment, the image processing apparatus 30 performs processing for evaluating the composition of the input image.

  Taking the electronic camera as an example, the operation unit 60 is realized by a shutter, various operation buttons, various dials, and the like. Note that the function of the operation unit 60 may be realized by a touch panel display.

  The storage unit 70 serves as a work area for the image processing apparatus 30 and the control unit 80, and stores various data such as image data. The function of the storage unit 70 can be realized by a RAM, an HDD (hard disk drive), or the like.

  The control unit 80 (control device) performs control processing for the entire device, and can be realized by processors such as various ASICs and microcomputers.

  The image output unit 90 is for outputting an image after image processing, and can be realized by, for example, a display unit provided in an electronic camera. The display unit is realized by an electro-optical panel such as a liquid crystal panel or an organic EL panel, and displays a frame image such as a through image.

  The information storage medium 98 (computer-readable medium) stores programs, data, and the like, and the function can be realized by a memory card, HDD, optical disk (CD, DVD), memory such as ROM, or the like. . The image processing device 30 and the control unit 80 perform various processes of the present embodiment based on a program (data) stored in the information storage medium 98. That is, the information storage medium 98 has a program for causing a computer (an apparatus including an operation unit, a processing unit, a storage unit, and an output unit) to function as each unit of the present embodiment (a program for causing the computer to execute processing of each unit). Is memorized.

  The image processing apparatus 30 includes a weight image creation unit 32, a composition grid creation unit 34, a composition evaluation unit 36, a person recognition unit 38, a composite image creation unit 40, and a composition presentation unit 42. Note that various modifications may be made such as omitting some of these components (for example, a person recognition unit, a combined image creation unit, a composition presentation unit, etc.) or adding other components.

  The weight image creation unit 32 performs weight image creation processing. The created weight image data is stored in the storage unit 70.

  Specifically, the weighted image creating unit 32 includes a target subject region (region of a main subject such as a person or an animal) or a background region other than the target subject region (a background subject region other than the target subject) of the input image. A weight image in which a weight is given to an edge (boundary) is created. For example, a weight image in which weight values (weight coefficient values and weight pixel values) are set for each dot (each pixel) in the subject area of interest and each dot on the edge (and surrounding area) of the background area is created.

  For example, when there is no subject of interest such as a person such as a landscape photograph, a weight value may be set only for the background area. Alternatively, it is possible to perform a modification in which the weight value is set only for the target subject area without setting the weight value for the background area.

  The weighted image creating unit 32 may create a weighted image with a larger weight than the weight attached to the edge of the background region for the target subject region. For example, when WPS is a weight value (for example, an average value or representative value) set for the target subject area and WBK is a weight value (average value or representative value) set for the edge of the background area, WPS> WBK. A weight image is created so that the relationship is established. It is also possible to carry out a modification in which WPS and WBK are made equal.

  Further, the weight image creation unit 32 gives a weight image in which, when a person is detected from the input image by the person recognition unit 38, a weight greater than the weight attached to the person's body region is given to the person's face region. May be created. For example, when WFA is a weight value (average value, representative value) set for a person's face area and WBD is a weight value (average value, representative value) set for a person's body area, WFA> WBD. A weight image is created so that the relationship is established. It is also possible to carry out a modification in which WFA and WBD are made equal.

  In addition, the weight image creation unit 32 may create a weight image with a greater weight as it is closer to the center of the subject area of interest. For example, when the subject of interest is a person and the face area of the person is detected, the weight value is increased as it is closer to the center of the person's face area, and the weight value is decreased as it is closer to the boundary of the face area. Alternatively, when a human torso is detected, the weight value is increased as it is closer to the center of the body region, and the weight value is decreased as it is closer to the boundary of the body region. Note that a constant weight value may be set for the face region and the body region. Further, the central portion in the present embodiment does not have to be the exact center coordinates of each region, and may be any region including the center of each region, for example.

  Further, the weight image creation unit 32 may extract an edge of the input image and perform a smoothing process on the extracted edge to create a weight image. For example, an edge image is filtered by performing edge extraction filtering on the input image, and smoothing filter processing is performed on the extracted edge image, whereby weight values are set for the edge and the surrounding area. Create a weighted image.

  The composition grid creation unit 34 performs composition grid creation processing. The created composition grid data is stored in the storage unit 70.

  Specifically, the composition grid creation unit 34 creates a composition grid with weights applied to grid lines (lines and intersections). For example, a composition grid (composition grid weight image) in which weight values (weight coefficient values, weight pixel values) are set for each dot (each pixel) of the grid line (and its surroundings) is created. This composition grid is composed of, for example, a plurality of grid lines. Specifically, a first grid line group (for example, a horizontal grid line group) and a second grid line group (for example, a vertical grid line group) intersecting (for example, orthogonal to) the first grid line group. The weight value is set for each grid line (and its surroundings) of these grid line groups.

  The composition grid creation unit 34 may create a composition grid with greater weight as it is closer to the grid line. For example, the weight value is increased as it is closer to the grid line coordinate, and the weight value is decreased as it is farther from the grid line coordinate. A fixed weight value may be set for the dots on the grid line and the surrounding dots.

  In addition, the composition grid creation unit 34 may create a composition grid in which a greater weight is given to the intersection of the composition grid than the weight attached to a line other than the intersection among the grid lines. For example, the weight value (average value, representative value) set at the intersection of the composition grid (intersection between grid lines) is WCP, and the weight value (average value, representative value) set on a line other than the intersection is WLN. In this case, a composition grid (composition grid weight image) is created so that a relationship of WCP> WLN is established. It is also possible to make a modification in which WCP and WLN are equal.

  The composition evaluation unit 36 performs a composition evaluation calculation. Specifically, based on the weight image created by the weight image creation unit 32 and the composition grid created by the composition grid creation unit 34, the composition evaluation calculation of the input image is performed, and the composition evaluation value (composition preference value) Calculate the degree of composition evaluation). For example, the correlation calculation between the weight image and the composition grid is performed, and the correlation value obtained by the correlation calculation is calculated as the composition evaluation value.

  Here, the composition evaluation unit 36 performs a composition evaluation value calculation process using the weights attached to the intersections of the composition grid. On the condition that the calculated composition evaluation value is equal to or greater than a predetermined threshold value, A composition evaluation value calculation process using the attached weights may be performed. Also, the composition evaluation value is calculated using the weight attached to the grid line, and the weight attached to the area surrounding the grid line is used on condition that the calculated composition evaluation value is equal to or greater than a predetermined threshold. A composition evaluation value calculation process may be performed.

  For example, when the composition evaluation value calculated using the weight value of the intersection of the composition grid is smaller than a predetermined threshold value (first threshold value), the composition evaluation value using the weight value on the grid line (dot of the grid line) The calculation process is not performed. Then, when the composition evaluation value calculated using the intersection weight value is equal to or greater than a predetermined threshold value, the composition evaluation value calculation process using the weight value on the grid line is performed.

  If the calculated composition evaluation value using the weight value on the grid line is smaller than the predetermined threshold value (second threshold value), the weight value of the area around the grid line (dots around the grid line dot) The composition evaluation value calculation process using is not performed. Then, when the composition evaluation value calculated using the weight value on the grid line is equal to or greater than a predetermined threshold value, the composition evaluation value is calculated using the weight value of the area around the grid line. By doing in this way, the situation where useless processing is performed can be prevented, and the overall speed of processing can be increased.

  In addition, when a person's face area is detected from the input image, the composition evaluation unit 36 selects one of a plurality of intersections (for example, four intersections) of the composition grid as the detected person's face. The composition evaluation value may be calculated by setting the center of the region. That is, the composition evaluation value is calculated so that the intersection of the composition grids is at the center of the person's face area. Alternatively, the size of the composition grid may be set according to the size of the detected human face area. For example, the size of the composition grid is increased when the size of the face region is large, and the size of the composition grid is also decreased when the size of the face region is small.

  The composition evaluation unit 36 may calculate a composition evaluation value while rotating the composition grid, and search (search) for a rotation angle of the composition grid from which a larger composition evaluation value is calculated. For example, the composition evaluation value is calculated while rotating the composition grid at a rotation angle within an arbitrary angle range, the rotation angle at which the composition evaluation value is maximized is obtained, and the rotation angle is set as the rotation angle of the composition grid. In this case, the intersection having the highest correlation value of the correlation calculation between the weighted image and the composition grid (intersection having the highest composition evaluation value) is obtained from the plurality of intersections of the composition grid. Then, it is desirable to rotate the composition grid around the intersection as the rotation center and search for the rotation angle of the composition grid from which a larger composition evaluation value is calculated.

  Alternatively, the composition evaluation unit 36 may calculate the composition evaluation value while changing the size of the composition grid, and search for the size of the composition grid from which a larger composition evaluation value is calculated. For example, the composition evaluation value is calculated while changing the size of the composition grid within an arbitrary size range, the size that maximizes the composition evaluation value is obtained, and the size is set as the size of the composition grid. In this case, the size of the composition grid is changed with the intersection having the highest correlation value in the correlation calculation between the weighted image and the composition grid (the intersection having the highest composition evaluation value) as the center of size expansion / contraction. Let It is desirable to search for the size of the composition grid from which a larger composition evaluation value is calculated.

  The person recognition unit 38 performs a person recognition process. That is, a human region is detected from the input image by image recognition. As the human face region extraction process, for example, Haar-like feature and AdaBoost learning disclosed in “Paul Viola, Michael Jones,“ Rapid Object Detection using a Boosted Cascade of Simple Features ”, CVPR2001” is used. There was a technique of Viola-Jones. In addition, the human region extraction process includes “Mazuto Mitsui, Satoshi Yamauchi, Hironobu Fujiyoshi,“ Human Detection by Two-Stage AdaBoost Using Joint HOG Features ”, 14th Image Sensing Symposium, IN1-06, 2008 And the like.

  The composite image creation unit 40 performs a composite image creation process. For example, the input processing is performed on the first to nth frame images to create a combined image. Then, the composition evaluation unit 36 performs a composition evaluation calculation based on the weight image created from the created composite image and the composition grid. That is, the weight image creation unit 32 creates a weight image from the composite image, and the composition evaluation unit 36 calculates the composition evaluation value by performing a correlation operation between the weight image of the created composite image and the composition grid. To do. Thereby, an arbitrary rectangular area in the combined image can be extracted as a suitable composition candidate.

  The composition presentation unit 42 performs a process of presenting a composition (composition candidate) to the user. For example, a suitable composition of the input image is determined based on a composition evaluation calculation result (composition evaluation value) using a weighted image and a composition grid, and the determined composition is presented to the user. For example, a rectangular area of the weighted image surrounded by the size of the composition grid is determined as a suitable composition in the input image, and the suitable composition position is shown to the user, or the rectangular area of the composition is trimmed. For example, an instruction image of a rectangular area having an optimal composition is generated and displayed to the user.

  The composition presentation unit 42 may present the result of the composition evaluation calculation using the weight image and the composition grid to the user using at least one of a character, a graph, and an image effect. In other words, the suitable degree of composition is presented to the user so as to be visually understood using characters, graphs, image effects, or the like.

2. 2. Method according to this embodiment 2.1 Overall processing Next, a detailed example of the method according to this embodiment will be described. FIG. 3 is a flowchart showing the overall processing flow of this embodiment.

  First, an image is input from the image input unit 20 such as an imaging unit (step S <b> 1), and input image data is once sent to the storage unit 70. Note that the input image data may be image data for a through image that is waiting for photographing by the digital camera, or image data after photographing by the user.

  Next, the person recognition unit 38 detects a person region from the input image by image recognition (step S2). Then, the weight image creation unit 32 performs weight image creation processing (step S3). The composition grid creation unit 34 performs composition grid creation processing (step S4).

  Next, the composition evaluation unit 36 performs a composition evaluation value calculation process using the weight image created in step S3 and the composition grid created in step S4 (step S5). Then, it is determined whether or not the end condition is satisfied (step S6). If not satisfied, the composition grid position / size / rotation angle is updated (changed) (step S7). Then, the composition evaluation value calculation process is performed again using the composition grid and weight image after the update of the position, size, and rotation angle (step S5). If the end condition in step S6 is satisfied, the composition determined based on the composition evaluation value is presented to the user (step S8).

2.2 Weighted Image Creation Processing Next, details of the weighted image creation processing in step S3 of FIG. 3 will be described using the flowchart of FIG.

  As shown in FIG. 4, in the weight image creation process, a weight image is first prepared (step S11). Then, a process of weighting the weighted image area corresponding to the person area of the input image is performed (step S12). Further, a process of applying a weight to the area of the weighted image corresponding to the background area of the input image is performed (step S13).

  5A to 5D show examples of an input image and a weight image corresponding to the input image. As shown in FIGS. 5B to 5D, the weighted image is a coefficient map in which the positional relationship (the positional relationship of the subject such as a person or background) corresponds to the input image in FIG. The weighted image only needs to have a positional relationship with the input image, and need not have the same resolution (the same number of pixels) as the input image. Note that the initial value of all weight values (coefficient values) of the weighted image is zero.

  FIG. 5B is an example of a weighted image in which a person area (target subject area in a broad sense) of the input image is weighted. This weighted image can be created, for example, by specifying a person area from the input image shown in FIG. 5A and setting a weight value for the specified person area. Here, the person area is an area detected in step S2 in FIG. 3, and for example, a face area and a body area are defined separately.

  In FIG. 5B, the weight (weight value) of the face region is set larger than that of the body region. Further, in each of the face area and the body area, the weight value becomes larger as it is closer to the center portion, and the weight value becomes maximum in the center portion, for example. Such weighting can be realized by using, for example, a Gaussian function (blurring function) having a vertex at the center coordinate of each region. Specifically, an image in which a predetermined weight value (for example, weight value = 255) is set for the person area (for example, weight value = 0 for other than the person area) is created. By applying a Gaussian filter to this image, it is possible to create a weight image in which the weight value increases as it is closer to the center of each region and decreases as the distance from the center increases.

  FIG. 5C is an example of a weighted image in which the background area of the input image (the area of the background subject other than the person) is weighted. Specifically, the edge (boundary line) of the background subject is extracted, and the weight is increased as it is closer to the edge, and is decreased as it is farther from the edge. This can be realized, for example, by extracting an edge from the background region with a Sobel filter and applying a smoothing filter to the extracted edge. Further, it is possible to improve the accuracy by extracting the edges after integrating the pixel areas with color / texture information and the like. For example, similar color and texture regions are integrated, and edges of the integrated regions are extracted. In this way, since the edges between the areas before integration are not extracted, but only the edges of the areas after integration are extracted, it is possible to prevent a situation where unnecessary edges are extracted.

  By superimposing the weight image of the person area in FIG. 5B and the weight image of the background area in FIG. 5C, a final weight image as shown in FIG. 5D can be created. In FIGS. 5B to 5D, the weighting in the person region (target subject region) is larger than the weighting in the background region. By doing so, it is possible to realize a composition evaluation calculation in which a person is prioritized.

2.3 Composition Grid Creation Processing Next, details of the composition grid creation processing in step S4 of FIG. 3 will be described using the flowchart of FIG.

  As shown in FIG. 6, in the composition grid creation process, first, the type of composition grid is determined (step S21). Next, composition grid weighting processing is performed (step S22). Then, determination processing of the position / size / rotation angle of the composition grid is performed (step S23).

  7A to 7C show examples of composition grids. The composition grid is a weighting coefficient map equal to or smaller than the size of the input image, and is composed of a plurality of line segments (grid lines). As a form of the line segment of the composition grid, there are a three-part dividing line and a golden parting line that are generally used for determining the composition of a photograph. In the composition grid of FIG. 7A, grid lines are set at locations where the vertical and horizontal directions are each divided into three. The type of composition grid (three-division line, golden division line, division line arbitrarily set by the user, etc.) is determined in step S21 in FIG.

  In step S22 of FIG. 6, a process of weighting is performed along the grid lines of the composition grid. Specifically, the closer to the grid line, the greater the weight, and the farther the weight, the smaller the weight. Also, the intersection of the composition grid is given a greater weight than on the line other than the intersection. Thereby, a composition grid as shown in FIG. 7B is created.

  Note that the size of the weight value for each coordinate is illustrated in a three-dimensional manner as shown in FIG. As shown in FIG. 7C, the weight value decreases as the distance from the dot on the grid line increases, and the weight value at the intersection of the composition grid is greater than the weight value of the grid line.

  As a specific method of weighting the composition grid, as in the case of the weighted image, weighting may be performed using a Gaussian function along the grid line, or weighting is given along the grid line. A smoothing process may be performed later. Specifically, an image in which a predetermined weight value is set for a grid line (grid line area) is created. For example, an image in which a large weight value is set for an intersection of the composition grid and a small weight value is set on a line other than the intersection is generated. Then, a Gaussian filter is applied to this image. As a result, a composition grid is created in which the weight value is the largest on the grid line, the weight value decreases as the distance from the grid line increases, and the weight value of the intersection is greater than the weight values on lines other than the intersection.

  In step S23 of FIG. 6, a composition grid position / size / rotation angle determination process is performed. Here, the position, size, and rotation angle indicate the relationship of the composition grid with respect to the weight image when the composition grid is superimposed on the weight image. In this embodiment, the initial value of the position of the composition grid is the origin of the weighted image (X = 0, Y = 0), the initial value of the size is the same size as the weighted image, and the initial value of the rotation angle is 0 degree. Yes.

2.4 Composition Evaluation Value Calculation Processing, etc. Next, a detailed processing example of steps S5 to S8 in FIG. 3 will be described.

  In step S5 of FIG. 3, a composition evaluation value calculation process is performed. This composition evaluation value calculation process (composition evaluation calculation in a broad sense) is a process of calculating a composition suitability using a weighted image and a composition grid. The composition suitability is the suitability of the rectangular area of the input image corresponding to the rectangular area where the weight image and the composition grid are superimposed.

  FIG. 8 shows a state in which the composition grid is superimposed on the weight image at the position, size, and rotation angle determined in step S23 of FIG. The composition evaluation value (composition suitability) can be obtained by calculating the correlation value between the weighted image and the composition grid at this position, size, and rotation angle. Various methods can be assumed as a method for calculating the correlation value (see, for example, “Digital Image Processing” on page 203 of the CG-ARTS Association). Here, the SSD calculated by the sum of squares of the difference as in the following equation (1) Is used.

  In the above equation (1), the size of the composition grid is M × N (M × N dots). The weight value at the coordinates (i, j) of the composition grid is represented as G (i, j), and the weight value at the coordinates (i, j) of the weighted image superimposed on the composition grid is represented as W (i, j). .

  If such a correlation calculation is performed, the more the weighted image and the weight position of the composition grid match, the higher the composition evaluation value, which is the correlation value obtained by the correlation calculation, and it is determined that the composition suitability is high. For example, when the intersection of the composition grid having a large weight value coincides with the center of the human face having the same weight value, the composition evaluation value is high and it is determined that the composition suitability is high. Alternatively, when the grid line of the composition grid in which the weight value is set coincides with the edge of the background area in which the weight value is also set, the composition evaluation value becomes high and it is determined that the composition suitability is high. Accordingly, the composition suitability can be determined by numerical evaluation by the correlation calculation process. The calculated composition evaluation value is stored in the storage unit 70 together with conditions such as position, size, and rotation angle.

  In step S6 of FIG. 3, it is determined whether the result of the composition evaluation value calculation process (composition evaluation calculation result) satisfies the end condition. Here, the termination condition is a predetermined composition evaluation value threshold, the number of times the composition evaluation value is calculated, and the like, and changes depending on the purpose. For example, it is determined that the end condition is satisfied when the composition evaluation value is equal to or greater than a predetermined threshold value or when the composition evaluation value is calculated more than a predetermined number of times. Alternatively, when it is determined that the composition evaluation value has reached an extreme value, it may be determined that the end condition is satisfied.

  In FIG. 3, the composition grid position / size / rotation angle is updated until the end condition is satisfied, and an iterative process for looping the processes of steps S5, S6, and S7 is performed. Variations without processing are also possible. For example, when it is desired to calculate only the overall composition evaluation value of the input image (composition evaluation value when a standard composition grid is used), the process proceeds to step S8 without performing iterative processing. On the other hand, when the position, size, and rotation angle of the composition grid are variously changed and a partial region having a suitable composition is specified from the input image, the iterative processing of steps S5, S6, and S7 is performed, and the process ends. When the condition is satisfied, the process proceeds to step S8.

  In step S7 in FIG. 3, the composition grid position, size, and rotation angle are updated. That is, the composition grid position / size / rotation angle is changed from the previous position / size / rotation angle, and the composition evaluation value calculation process in step S5 is performed again. For example, by reducing the size of the composition grid, the position of the composition grid can be moved. Next, the composition evaluation value is calculated while sequentially changing the position of the composition grid while maintaining the size of the composition grid. go. Then, the composition evaluation value under each condition of the composition grid (condition of position, size, and rotation angle) is calculated in the manner of image template matching (see “Digital Image Processing” CG-ARTS Association, page 203). This is shown in FIG.

  Then, a composition evaluation value greater than or equal to a predetermined threshold is calculated, the number of composition evaluation value calculation processes is greater than or equal to a predetermined number, or the end condition is satisfied, such as when the size of the composition grid is less than or equal to a predetermined size. Sometimes this iterative process ends.

  In step S8 of FIG. 3, a suitable composition determined based on the calculated composition evaluation value is presented to the user. Specifically, the composition presentation unit 42 reads the composition evaluation value calculated so far and the conditions (position / size / rotation angle) corresponding to the composition evaluation value from the storage unit 70. For example, assuming that the composition evaluation value is the highest in the position, size, and rotation angle of the composition grid shown in FIG. 10A, the composition presentation unit 42 is as shown in FIGS. 10B and 10C. An image illustrating the most suitable composition position is created. The created image is sent to the image output unit 90 and displayed on, for example, a display unit (display) provided in the camera. Alternatively, the composition presentation unit 42 may send the created images of FIG. 10B and FIG. 10C to the storage unit 70 and store them.

  In the present embodiment, an example in which a dividing line is used as the composition grid has been described. However, any user-defined grid may be used. For example, when a composition grid is defined such that the vertical grid lines are inclined upward, a suitable composition can be obtained from an image looking up at a high building group.

  As described above, according to the present embodiment, the composition evaluation calculation is performed using the weight image in which each region of the input image is weighted and the composition grid in which the grid line is weighted, and the input image The suitability of the composition is evaluated. Therefore, for example, by setting the position, size, and rotation angle of the composition grid, it is possible to calculate the suitability of the composition in an arbitrary area of the input image. Further, although the prior art does not show a method for assigning priorities when there are a plurality of composition candidates, according to the present embodiment, a more suitable composition can be obtained by using the composition evaluation value as the composition suitability. Can be provided to the user.

  Further, according to the present embodiment, the composition evaluation value is calculated by the correlation calculation between the weighted image and the composition grid, so that the composition suitability can be obtained as an objective numerical value. Therefore, a more suitable composition can be searched based on the composition evaluation value and presented to the user. It is also possible to present the result of the composition evaluation calculation to the user using characters, graphs, or image effects using the composition evaluation value.

  In the present embodiment, if a weighted image is created by weighting both the target subject area such as the person area and the edge of the background area, and the correlation calculation with the composition grid is performed, both the target subject area and the background are composed. It is possible to obtain a composition that provides a suitable position on the grid line of the grid.

  Note that this embodiment can also be applied to, for example, an image of only a building or a landscape in which no person is shown. That is, according to the present embodiment, it is possible to obtain a suitable composition from the information of the background area even when no person is present in the image.

2.5 High-Speed Method Next, a high-speed (efficiency) method of composition evaluation calculation according to this embodiment will be described. For example, in the above-described method described with reference to FIG. 3, the composition evaluation value is calculated from the weight image and the composition grid by changing the composition grid conditions (position, size, and rotation angle) to crushed. On the other hand, in the speed-up method of the present embodiment described below, calculation is performed while limiting each condition of the composition grid based on information obtained from the input image. The processing other than the composition grid creation processing in step S4 in FIG. 3, the composition evaluation value calculation processing in step S5, and the composition grid position / size / rotation angle update processing in step S7 is the same as the above-described method. Therefore, the description is omitted here.

  FIG. 11 shows a flowchart of a composition evaluation value calculation process in the speed-up method of this embodiment. FIG. 11 is a flowchart in a case where the conditions of the composition grid position, size, and rotation angle are specific conditions.

  First, in step S41, a correlation calculation with the weighted image is performed using only the intersection area of the composition grid, and a composition evaluation value that is a correlation value is calculated. If it is determined in step S42 that the composition evaluation value (correlation value) calculated in step S41 is equal to or greater than a predetermined threshold, it is determined that the composition grid condition is likely to be a suitable condition. Then, the process proceeds to the next step S43. On the other hand, if it is smaller than the predetermined threshold, the correlation calculation process is aborted at that time, and the process proceeds to step S46.

  In step S43, a composition evaluation value is calculated in an area on the composition grid line. If it is determined in step S44 that the composition evaluation value calculated in step S43 is greater than or equal to a predetermined threshold value, the process proceeds to the next step S45. On the other hand, if it is smaller than the predetermined threshold, the correlation calculation process is aborted at that time, and the process proceeds to step S46.

  In step S45, a composition evaluation value is calculated at the intersection of the composition grid and the area around the grid line. That is, as described with reference to FIGS. 7B and 7C, the composition evaluation value is calculated using an area weighted stepwise according to the distance from the grid line. Finally, in step S46, the calculated composition evaluation value is set as a final composition evaluation value under the condition.

  In this way, in FIG. 11, first, composition evaluation value calculation processing is performed using the weights attached to the intersections of the composition grid in step S41. Then, on the condition that the calculated composition evaluation value is equal to or greater than a predetermined threshold value, the composition evaluation value is calculated using the weights assigned to the grid lines as shown in step S43. Then, on the condition that the composition evaluation value calculated in step S43 is equal to or greater than a predetermined threshold, the composition evaluation value is calculated using the weights attached to the area around the grid line as shown in step S45.

  In this way, if the composition evaluation value (correlation value) is unlikely to become too large, the processing is aborted immediately, and only when there is a prospect, the calculation is performed to the end. Increase speed.

  FIG. 12 shows a flowchart of a composition grid creation process in the speed-up method of this embodiment. Steps S51 and S52 are the same as steps S21 and S22 of FIG.

  In step S53 of FIG. 12, the position of the composition grid (the initial position where the composition grid is superimposed on the weighted image) is determined based on the position of the human face. That is, the initial position of the composition grid is determined so that any one of the plurality of intersections of the composition grid matches the center (center coordinates) of the human face. That is, the composition evaluation value is calculated by setting any intersection of the composition grid at the center of the detected face area of the person.

  For example, in FIG. 13A, a human face is detected in the area above the input image. In this case, the initial position of the composition grid is determined so that one of the two intersections above the composition grid is located at the center of the human face. In FIG. 13B, a human face is detected in the area below the input image. In this case, the initial position of the composition grid is determined so that one of the two intersections below the composition grid is located at the center of the human face.

  In step S54 in FIG. 12, the size of the composition grid is determined based on the size of the human face. That is, the composition grid size increases as the size of the area occupied by the human face in the input image increases, and the composition grid size decreases as the area decreases. That is, the composition grid size is set according to the detected size of the human face.

  For example, in FIG. 14A, since the area occupied by the human face in the input image is large, the initial size of the composition grid is also set to a large size. On the other hand, in FIG. 14B, since the size of the area occupied by the human face is small, the initial size of the composition grid is also set to a small size.

  As described above, the initial position and initial size of the composition grid are determined, and if the position and size of the composition grid are determined beforehand, the steps S5, S6, and S7 in FIG. 3 performed while updating the composition grid conditions are performed. The number of iterations can be reduced. As a result, the processing speed and efficiency can be improved.

  If a plurality of human faces are detected as in the group photo, the position of the composition grid may be determined based on the position of the front human face. That is, the position of the composition grid is determined so that the intersection of the composition grids is located at the center of the front person face. Alternatively, as will be described later, this may be solved by setting the subject of interest by the user. As for the rotation angle (angle) of the composition grid, the initial rotation angle is usually set to 0 degree. However, when the face inclination angle is also detected when the human face is detected, the rotation angle is set to the inclination angle. The initial rotation angle of the composition grid may be set so as to match.

  FIG. 15 shows a flowchart of the update process of the position / size / rotation angle of the composition grid in the speed-up method of the present embodiment.

  In step S61 of FIG. 15, a new position of the composition grid is determined. In the initial position set as shown in FIG. 13A and FIG. 13B, the correlation value, which is the composition evaluation value, can be expected to be already high to some extent. Only the surrounding positions are determined as new positions. That is, in the above-described method, the position of the composition grid is changed to be crushed and the iterative processing of steps S5, S6, and S7 in FIG. 3 is executed. On the other hand, in the speed-up method of the present embodiment, the position of the composition grid is changed only in the vicinity of the initial position in FIGS. 13A and 13B, and steps S5, S6, and S7 are performed. Perform an iterative process. By doing so, the number of iterations can be reduced and the process can be made more efficient.

  In step S62 of FIG. 15, the size of the composition grid is determined based on the intersection having a high correlation value. That is, among the four intersections of the composition grid, an intersection having the highest local correlation value in the intersection area is selected, and the intersection is set as the center point of the size change of the composition grid. The size of the composition grid is determined to some extent by the initial size set in FIGS. 14A and 14B, so that the amount of change in size is small.

  That is, in the iterative processing of steps S5, S6, and S7 in FIG. 3, the composition evaluation value is calculated while changing the size of the composition grid, and the composition grid size from which a larger composition evaluation value is calculated is searched. . In this case, according to the speed-up method of the present embodiment, as shown in FIG. 16A, among the four intersections of the composition grid, the intersection having the highest correlation value in the correlation calculation between the weighted image and the composition grid (intersection of A1). ) To change the size of the composition grid. Specifically, for example, the size of the composition grid in which a larger composition evaluation value is calculated is searched by changing the size of the composition grid with the intersection coincident with the center of the human face as the center of enlargement / reduction. In this way, the number of iterations can be reduced compared to the method of executing the iterations of steps S5, S6, and S7 in FIG. Increase efficiency.

  In step S63 in FIG. 15, the rotation angle of the composition grid is determined based on the intersection having a high correlation value. That is, among the four intersections of the composition grid, an intersection having the highest local correlation value in the intersection region is selected, and the intersection is set as the center point of rotation of the composition grid. In this case, since there are few images that are remarkably inclined in a normal input image, it is only necessary to change the rotation angle by several degrees and examine the front and back.

  That is, in the iterative process of steps S5, S6, and S7 in FIG. 3, the composition evaluation value is calculated while changing the rotation angle of the composition grid, and the rotation angle of the composition grid from which a larger composition evaluation value is calculated is searched. ing. In this case, in the speed-up method according to the present embodiment, as shown in FIG. 16B, among the four intersections of the composition grid, the intersection (the intersection of A1) having the highest correlation value in the correlation calculation between the weighted image and the composition grid. ) To rotate the composition grid. Specifically, for example, the rotation angle of the composition grid is calculated by changing the rotation angle of the composition grid with the intersection coincident with the center of the human face as the rotation center, and the rotation angle of the composition grid from which a larger composition evaluation value is calculated is searched. In this way, the number of iterations can be reduced compared to the method of executing the iterations of steps S5, S6, and S7 in FIG. Can be made more efficient.

  Although the method for updating the composition grid conditions (position, size, and rotation angle) has been described above, these processes do not necessarily have to be executed in the order of the flowcharts described in the present embodiment. In practice, if one of the conditions is the target of the update process, it is desirable to calculate and repeat the composition evaluation value with the other conditions fixed.

2.6 Bonding Process Now, when a suitable composition is determined from an input image, a suitable composition may be determined from one input frame image, but a plurality of input frame images (first ˜n frame images) may be performed, a composition evaluation operation may be performed using the created composite image, and a suitable composition may be determined. Hereinafter, this bonding process will be described in detail.

  For example, it is assumed that the first frame image IM1 (IMOB) and the second frame image IM2 (IMi) input when the user holds the camera are pasted together. Then, a combined image including a subject in a wider range than one frame image (through image) is acquired by the amount that the user moves the camera between frames 1 and 2. This is shown in FIG.

  For example, in FIG. 17, in the real world, an image region that enters one frame image (through image) when the camera is pointed at the subject (person), that is, the shooting angle of view, is the first and second frame images IM1 and IM2. This is indicated by a rectangular area. In addition, a combined image IMZ created by performing the combining process on the first and second frame images IM1, 1M2 is shown. As shown in FIG. 17, the combined image IMZ has an image area wider than one frame image.

  In this way, the final combined image IMZ as shown in FIG. 18 is completed by performing the process of combining the first to nth frame images IM1 to IMn. While holding the camera, the user moves the camera back and forth, left and right or up and down and left and right to find a suitable composition. Therefore, as shown in FIG. 18, the combined image IMZ results in an image reflecting a wider angle of view than the shooting angle of view of the camera.

  In the present embodiment, a suitable composition (composition candidate) is determined based on the created composite image IMZ. For example, as shown in FIG. 19, a suitable composition RCM (composition area) is determined from a composite image IMZ having an image area wider than the frame image. Specifically, composition evaluation calculation is performed based on the composite image IMZ in FIG. 18 and the composition grid described with reference to FIGS. 7A to 7C to calculate a composition evaluation value. Then, for example, a suitable composition RCM in FIG. 19 is determined from the position / size / rotation angle of the composition grid where the composition evaluation value is the largest. Then, an instruction image for informing the user that the composition RCM is the optimum composition is created. Specifically, the color, brightness, and texture of the composition RCM area (composition candidate area) are changed, or an instruction image on which an arrow indicating the position of the composition RCM is displayed is created.

  Then, the created instruction image is displayed on a display unit provided in a camera or the like, and the user is informed of a suitable composition position. A user who views such an instruction image moves the camera or performs a zoom operation so as to match the presented composition, and then presses the shutter button to take a picture. This makes it possible to take a photograph with a suitable composition even when the desired composition range is outside the range of the angle of view of the camera.

  FIG. 20 shows a flowchart of an example of the bonding process. First, matching processing (template matching) between the image to be pasted IMOB and the frame image IMi is performed (step S31). For example, in FIG. 21, the matching process is performed while sequentially shifting the position of the frame image IMi in the X and Y coordinate directions with reference to the position of the image to be combined IMOB to obtain the correlation value. The correlation value calculation method uses a commonly used SSD or the like.

  Next, the position where the correlation value of the matching process is maximized is determined as the bonding position PCM (step S32). For example, in FIG. 21, when the images IMOB and IMi have the positional relationship indicated by C1, the correlation value is the highest, and the position of the image IMi (the position of the representative point) at this time is the bonding position PCM. Then, the image IMi is bonded to the image IMOB at the determined bonding position PCM (step S33). Specifically, the pixel value of the image IMOB or IMi is set for a region (region having the same or similar pixel value) where the images IMOB and IMi match as in C2 of FIG. Further, the pixel value of the image IMOB is set for an area where only the image IMOB exists like C3, and the pixel value of the image IMi is set for an area where only the image IMi exists like C4.

  If the bonding process is realized by such a matching process, the two images IMOB and IMi can be bonded without reducing the resolution.

  Note that the matching process between the image to be pasted IMOB and the frame image IMi is not necessarily performed with images having the same resolution. For example, assume that the user performs a zoom operation on the camera between the time when the previous frame image IMi-1 is acquired (photographed) and the time when the current frame image IMi is acquired, and the magnification is doubled. In this case, matching processing is performed between the image to be combined IMOB and an image obtained by reducing the resolution of the frame image IMi to ½, and the image IMi with a reduced resolution is combined with the image IMOB. .

  Moreover, the bonding method of this embodiment is not limited to the method of FIG. 20, A various method is employable. For example, a face area is detected from the image to be combined IMOB and the frame image IMi, a weight image with a high weight (weight value) in the face area is created, and matching processing of these weight images is performed to perform the bonding. The position may be determined.

2.7 Setting of Subject of Interest Next, a method in which the user arbitrarily selects a subject of interest and presents a suitable composition considering the subject of interest will be described. FIG. 22 shows a second configuration example of the image processing apparatus 30 and the like of the present embodiment that realizes this technique. FIG. 22 is different from FIG. 2 in that a target subject setting unit 44 is further provided in the image processing apparatus 30.

  In FIG. 22, the user uses the operation unit 60 to set a target subject desired by the user. The operation unit 60 is a user interface for operating an electronic device such as a camera, and a subject of interest is set using an operation of a dial key, a button, a touch panel, or voice.

  In FIG. 22, the target subject setting unit 44 performs processing for the user to set a target subject. Then, the weighted image creating unit 32 applies another subject (for example, another person) or background to the region of the target subject (for example, an animal such as a dog / cat, a specific person among a plurality of persons) set by the user. A weighted image is created with a weight greater than the weight assigned to the area (for example, background subject). Then, the composition evaluation unit 36 performs a composition evaluation calculation based on the weight image created in this way and the composition grid created by the composition grid creation unit 34, calculates a composition evaluation value, and obtains a suitable composition. Judging.

  FIG. 23 shows a flowchart for explaining the processing of the second configuration example. After the image is input in step S70, the subject of interest is set in step S71. Specifically, the user operates the camera with the operation unit 60 to set the subject of interest in the current angle of view range. The subject of interest is a subject that the user wants to obtain a suitable composition by placing importance on the subject, and may be an object, an animal, a specific person among a plurality of persons, or the like. The subject of interest is not limited to one, but can be set as much as the user likes. The method of specifying the area of the subject of interest may be a single point on the image, or a rectangle or an ellipse range.

  In step S72 of FIG. 23, a person region is detected from the image as described above. In the weighted image creation process in step S73, the person area is weighted as described with reference to FIG. Here, the region of the subject of interest set in step S71 is also weighted by the same processing procedure as that of the person region. In this case, weighting is performed so that the weight of the region of the subject of interest designated by the user is larger than the person region detected in step S72.

  In this way, for example, when the user attaches importance to the dog as a subject of the photograph, it is possible to take a photograph that makes the dog dog have an optimal composition as compared to other people near the dog. It becomes possible. Or, when the user places importance on a background subject such as a mountain as the subject of a photograph, the background subject may be optimally composed even if the surrounding person happens to fall within the range of the angle of view. It becomes possible to take a picture. In addition, since the process of step S74-S78 is the same as that of step S4-S8 of FIG. 3, description is abbreviate | omitted.

  According to the second configuration example described above, it is possible to obtain a suitable composition in consideration of the subject of interest arbitrarily set by the user.

2.8 Display of Composition Evaluation Calculation Result Next, a method for presenting a composition evaluation calculation result (composition suitability) when a suitable composition is presented to the user will be described.

  For example, in step S8 of FIG. 3, the optimum composition determined based on the composition evaluation value is presented to the user. At this time, the result of the composition evaluation calculation is also presented to the user. Examples thereof are shown in FIGS. 24 (A) to 24 (C).

  In FIG. 24A, the composition evaluation calculation result is presented using a score (characters in a broad sense). Since the composition evaluation calculation result is obtained as a numerical value called a composition evaluation value, a conversion table for determining how much composition suitability is to be used is stored in advance in the storage unit 70 of FIG. . By using this conversion table, a score can be obtained from the composition evaluation value and presented to the user as shown in FIG.

  Such a composition evaluation calculation result is not limited to characters such as the score shown in FIG. 24A, and may be presented using a graph or an image effect. FIG. 24B and FIG. 24C show examples of presentation using graphs and image effects.

  By adopting a method as shown in FIGS. 24 (A) to 24 (C), the user can determine how well the composition suitability obtained by the composition evaluation calculation is suitable for characters, graphs, Visually recognized by image effects. As a result, an unprecedented type of interface environment can be provided to the user.

  In the above, an example in which a suitable composition is searched for by composition evaluation calculation and then the result of the composition evaluation calculation is displayed has been described. However, the composition evaluation value of the entire input image is calculated and presented to the user. It may be. In this case, a through image at the current time acquired by the camera or a composition evaluation calculation result of the entire image taken by the user is presented, and the user confirms the image suitability while moving the camera. Can be used.

  For example, when the user sets the camera to the composition evaluation mode and presses the shutter button of the camera halfway, a composition grid having the same size as the frame image is created for the frame image of the through image. Then, composition evaluation calculation is performed between the frame image of the through image and the composition grid, and the result of the composition evaluation calculation is presented to the user in real time by the presentation method shown in FIGS. 24 (A) to 24 (C). Then, the user can take a picture with a suitable composition by pressing the shutter button when the composition evaluation result is satisfactory.

  Although the present embodiment has been described in detail as described above, it will be easily understood by those skilled in the art that many modifications can be made without departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, a term (person, composition evaluation value calculation process, etc.) described together with a different term (a subject of interest, composition evaluation calculation, etc.) in a broader or synonymous manner at least once in the specification or drawing It can be replaced by the different terms at any point. Further, the configurations and operations of the image processing apparatus and the electronic device are not limited to those described in this embodiment, and various modifications can be made.

20 image input unit, 30 image processing device, 32 weight image creation unit,
34 composition grid creation unit, 36 composition evaluation unit, 38 person recognition unit,
40 composite image creation unit, 42 composition presentation unit, 44 attention subject setting unit,
60 operation unit, 70 storage unit, 80 control unit, 90 image output unit, 98 information storage medium

Claims (20)

  1. An image processing apparatus for evaluating the composition of an input image,
    A weighted image creating unit that creates weighted images weighted to both edges of the target subject region of the input image and the background region other than the target subject region;
    A composition grid creation unit for creating a composition grid weighted with respect to the grid lines;
    A composition evaluation unit that performs a composition evaluation operation on the input image based on the created weight image and the composition grid;
    Including
    The weight image creation unit
    Creating the weighted image with a weight greater than the weight attached to the edge of the background region for the target subject region ;
    The composition evaluation unit
    An image processing apparatus that calculates a composition evaluation value while changing a size of the composition grid, and searches for a size of the composition grid from which a larger composition evaluation value is calculated .
  2. In claim 1 ,
    The composition evaluation unit
    Of the plurality of intersections of the composition grid, the composition grid is changed in size with the intersection having the highest correlation value of the correlation calculation between the weighted image and the composition grid as the size expansion / contraction center, and a larger composition evaluation value is calculated. An image processing apparatus for searching for a size of the composition grid to be performed.
  3. In claim 1 or 2 ,
    The composition evaluation unit
    An image processing apparatus that performs a correlation calculation between the weighted image and the composition grid and calculates a composition evaluation value by the correlation calculation.
  4. In any one of Claims 1 thru | or 3 ,
    The weight image creation unit
    Image processing characterized in that, when a person is detected from an input image, the weighted image is created with a weight greater than the weight attached to the body area of the person for the face area of the person apparatus.
  5. In any one of Claims 1 thru | or 4 ,
    The weight image creation unit
    An image processing apparatus that creates the weighted image with a greater weight as it is closer to the center of the subject area of interest.
  6. In any one of Claims 1 thru | or 5 ,
    The weight image creation unit
    An image processing apparatus, wherein an edge of an input image is extracted, and the weighted image is created by performing a smoothing process on the extracted edge.
  7. In any one of Claims 1 thru | or 6 .
    The composition grid creation unit
    An image processing apparatus that creates the composition grid with a greater weight as it is closer to a grid line.
  8. In any one of Claims 1 thru | or 7 ,
    The composition grid creation unit
    An image processing apparatus that creates the composition grid in which a weight greater than a weight given to a line other than the intersection is given to an intersection of the composition grid.
  9. An image processing apparatus for evaluating the composition of an input image,
    A weighted image creating unit that creates weighted images weighted to both edges of the target subject region of the input image and the background region other than the target subject region;
    A composition grid creation unit for creating a composition grid weighted with respect to the grid lines;
    A composition evaluation unit that performs a composition evaluation operation on the input image based on the created weight image and the composition grid;
    Including
    The weight image creation unit
    Creating the weighted image with a weight greater than the weight attached to the edge of the background region for the target subject region ;
    The composition evaluation unit
    The composition evaluation value is calculated using the weight assigned to the intersection of the composition grid, and the composition using the weight attached to the grid line on condition that the calculated composition evaluation value is equal to or greater than a predetermined threshold. An image processing apparatus that performs evaluation value calculation processing .
  10. An image processing apparatus for evaluating the composition of an input image,
    A weighted image creating unit that creates weighted images weighted to both edges of the target subject region of the input image and the background region other than the target subject region;
    A composition grid creation unit for creating a composition grid weighted with respect to the grid lines;
    A composition evaluation unit that performs a composition evaluation operation on the input image based on the created weight image and the composition grid;
    Including
    The weight image creation unit
    Creating the weighted image with a weight greater than the weight attached to the edge of the background region for the target subject region ;
    The composition evaluation unit
    The composition evaluation value is calculated using the weights attached to the grid lines, and the weights attached to the areas around the grid lines are used on condition that the calculated composition evaluation values are equal to or greater than a predetermined threshold. An image processing apparatus that performs a composition evaluation value calculation process .
  11. In any one of Claims 1 thru | or 10 .
    The composition evaluation unit
    When a face area of a person is detected from the input image, one of the intersections of the composition grid is set at the center of the detected face area of the person, and the composition evaluation value An image processing apparatus characterized by calculating
  12. In any one of Claims 1 thru | or 11 ,
    The composition evaluation unit
    An image processing apparatus, wherein when a face area of a person is detected from an input image, the size of the composition grid is set according to the size of the detected face area of the person.
  13. An image processing apparatus for evaluating the composition of an input image,
    A weighted image creating unit that creates weighted images weighted to both edges of the target subject region of the input image and the background region other than the target subject region;
    A composition grid creation unit for creating a composition grid weighted with respect to the grid lines;
    A composition evaluation unit that performs a composition evaluation operation on the input image based on the created weight image and the composition grid;
    Including
    The weight image creation unit
    Creating the weighted image with a weight greater than the weight attached to the edge of the background region for the target subject region ;
    The composition evaluation unit
    The composition evaluation value is calculated while rotating the composition grid around the intersection having the highest correlation value of the correlation calculation between the weighted image and the composition grid among the plurality of intersections of the composition grid, and a larger composition evaluation An image processing apparatus for searching for a rotation angle of the composition grid from which a value is calculated .
  14. In any one of Claims 1 thru | or 13 .
    Including a composite image creation unit that performs a process of pasting the input first to nth frame images and creates a composite image;
    The composition evaluation unit
    An image processing apparatus that performs a composition evaluation calculation based on the weight image created from the created composite image and the composition grid.
  15. In any one of Claims 1 thru | or 14 .
    A target subject setting unit for the user to set a target subject;
    The weight image creation unit
    An image processing apparatus, wherein the weighted image is created by assigning a weight greater than a weight assigned to another subject or a background region to a region of a subject of interest set by a user.
  16. In any one of Claims 1 thru | or 15 ,
    A composition presentation unit that determines a composition of an input image based on a composition evaluation calculation result using the weighted image and the composition grid, and presents the determined composition to a user is included. Image processing device.
  17. In claim 16 ,
    The composition presentation unit
    An image processing apparatus that presents a result of a composition evaluation calculation using the weighted image and the composition grid to a user using at least one of a character, a graph, and an image effect.
  18. An electronic apparatus comprising the image processing apparatus according to any one of claims 1 to 17.
  19. A program for evaluating the composition of an input image,
    A weighted image creating unit that creates weighted images weighted to both edges of the target subject region of the input image and the background region other than the target subject region;
    A composition grid creation unit for creating a composition grid weighted with respect to the grid lines;
    As a composition evaluation unit for performing composition evaluation calculation of the input image based on the created weight image and the composition grid,
    Make the computer work,
    The weight image creation unit
    Creating the weighted image with a weight greater than the weight attached to the edge of the background region for the target subject region;
    The composition evaluation unit
    A program for calculating a composition evaluation value while changing a size of the composition grid, and searching for a size of the composition grid from which a larger composition evaluation value is calculated .
  20. In claim 19,
      The composition evaluation unit
      Of the plurality of intersections of the composition grid, the composition grid is changed in size with the intersection having the highest correlation value of the correlation calculation between the weighted image and the composition grid as the size expansion / contraction center, and a larger composition evaluation value is calculated. And searching for the size of the composition grid.
JP2014036006A 2014-02-26 2014-02-26 Image processing apparatus, electronic device, and program Active JP5731033B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014036006A JP5731033B2 (en) 2014-02-26 2014-02-26 Image processing apparatus, electronic device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014036006A JP5731033B2 (en) 2014-02-26 2014-02-26 Image processing apparatus, electronic device, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2009119468 Division 2009-05-18

Publications (2)

Publication Number Publication Date
JP2014099212A JP2014099212A (en) 2014-05-29
JP5731033B2 true JP5731033B2 (en) 2015-06-10

Family

ID=50941104

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014036006A Active JP5731033B2 (en) 2014-02-26 2014-02-26 Image processing apparatus, electronic device, and program

Country Status (1)

Country Link
JP (1) JP5731033B2 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3482923B2 (en) * 1999-10-28 2004-01-06 セイコーエプソン株式会社 Automatic composition determination device
JP2001167253A (en) * 1999-12-10 2001-06-22 Fuji Photo Film Co Ltd Image pickup device for evaluating picked-up image and recording medium
GB2370438A (en) * 2000-12-22 2002-06-26 Hewlett Packard Co Automated image cropping using selected compositional rules.
JP2006254107A (en) * 2005-03-10 2006-09-21 Olympus Imaging Corp Image evaluation device, image evaluation program, recording medium with image evaluation program recorded thereon, and image evaluation method
JP4624947B2 (en) * 2006-03-22 2011-02-02 富士フイルム株式会社 Image trimming method, apparatus and program
JP4902562B2 (en) * 2007-02-07 2012-03-21 パナソニック株式会社 Imaging apparatus, image processing apparatus, control method, and program
JP5432714B2 (en) * 2007-08-03 2014-03-05 学校法人慶應義塾 Composition analysis method, image apparatus having composition analysis function, composition analysis program, and computer-readable recording medium
JP4842232B2 (en) * 2007-09-25 2011-12-21 富士フイルム株式会社 Imaging apparatus and image reproduction apparatus

Also Published As

Publication number Publication date
JP2014099212A (en) 2014-05-29

Similar Documents

Publication Publication Date Title
AU2017261537B2 (en) Automated selection of keeper images from a burst photo captured set
US20190026312A1 (en) Smart camera for sharing pictures automatically
CN104580878B (en) Electronic device and the method for automatically determining image effect
US9767359B2 (en) Method for recognizing a specific object inside an image and electronic device thereof
US9554030B2 (en) Mobile device image acquisition using objects of interest recognition
US9667860B2 (en) Photo composition and position guidance in a camera or augmented reality system
US9355486B2 (en) Image compositing device and image compositing method
US8081844B2 (en) Detecting orientation of digital images using face detection information
US20150154776A1 (en) Image splicing method and apparatus
US9262696B2 (en) Image capture feedback
CN107087107B (en) Image processing apparatus and method based on dual camera
US9710698B2 (en) Method, apparatus and computer program product for human-face features extraction
US8391615B2 (en) Image recognition algorithm, method of identifying a target image using same, and method of selecting data for transmission to a portable electronic device
KR102022444B1 (en) Method for synthesizing valid images in mobile terminal having multi camera and the mobile terminal therefor
WO2016101883A1 (en) Method for face beautification in real-time video and electronic equipment
KR102000536B1 (en) Photographing device for making a composion image and method thereof
JP4735742B2 (en) Imaging apparatus, strobe image generation method, and program
JP5567235B2 (en) Image processing apparatus, photographing apparatus, program, and image processing method
US9036072B2 (en) Image processing apparatus and image processing method
JP4814375B2 (en) Detection device, detection method, and integrated circuit for detection
WO2014088871A1 (en) Facial expression editing in images based on collections of images
JP2012530994A (en) Method and apparatus for half-face detection
KR101411593B1 (en) Method for providing User Interface and display apparatus applying the same
US9491366B2 (en) Electronic device and image composition method thereof
CN103617432A (en) Method and device for recognizing scenes

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140320

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140320

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150227

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150317

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150408

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250