WO2018193674A1 - Image processing device, image-capturing device, image printing device, control method of image processing device, and image processing program - Google Patents

Image processing device, image-capturing device, image printing device, control method of image processing device, and image processing program Download PDF

Info

Publication number
WO2018193674A1
WO2018193674A1 PCT/JP2018/001063 JP2018001063W WO2018193674A1 WO 2018193674 A1 WO2018193674 A1 WO 2018193674A1 JP 2018001063 W JP2018001063 W JP 2018001063W WO 2018193674 A1 WO2018193674 A1 WO 2018193674A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
region
area
correction
unit
Prior art date
Application number
PCT/JP2018/001063
Other languages
French (fr)
Japanese (ja)
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 US16/606,447 priority Critical patent/US20210112179A1/en
Priority to CN201880026041.4A priority patent/CN110537200A/en
Priority to JP2019513225A priority patent/JP6889774B2/en
Publication of WO2018193674A1 publication Critical patent/WO2018193674A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/393Enlarging or reducing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/409Edge or detail enhancement; Noise or error suppression
    • H04N1/4092Edge or detail enhancement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment

Definitions

  • One embodiment of the present invention relates to an image processing apparatus that performs correction for deforming an image.
  • Patent Document 1 describes a technique for correcting a face to be small by setting an area including a human face area as a deformation area and reducing the deformation area. ing. In the technique described in Patent Literature 1, when the set deformation area is set outside the image, the correction set outside the image is not performed, so that deterioration in image quality is suppressed.
  • Patent Document 1 may or may not be corrected depending on the position of the person's face in the image. Therefore, for example, when the user performs shooting using a camera equipped with a function for correcting a small face, the effect intended by the user may not be obtained. Further, for example, when a plurality of human faces are captured in one image, correction is performed on the face of the person located at the center of the image, and the face of the person located at the end of the image is corrected. There is a case where only a part of the faces of some people has a small impression without correction, and a face of a person without correction has a relatively large impression.
  • One aspect of the present invention has been made in view of the above points, and is an image processing apparatus, an imaging apparatus, an image printing apparatus, an image processing apparatus control method, and image processing that can correct an image more appropriately.
  • the main purpose is to provide a program.
  • An image processing apparatus includes a correction processing unit that corrects the image by reducing a first region in the image and enlarging a second region outside the first region, When the reduction direction of the first region is from the first side of the image toward the inside of the first region, the correction processing unit is responsive to a distance from the first region to the first side. Then, it is determined whether or not to cut out the first side of the image.
  • An image processing apparatus includes a correction processing unit that corrects the image by reducing a first area in the image and enlarging a second area outside the first area. And the correction processing unit sets the distance from the first region to the first side when the reduction direction of the first region is from the first side of the image toward the inside of the first region. Accordingly, it is determined whether or not to change the reduction direction of the first area so as not to go from the first side of the image to the inside of the first area.
  • an image can be corrected more appropriately.
  • FIG. 1 is a functional block diagram illustrating a configuration example of an image printing apparatus according to Embodiment 1 of the present invention. It is a flowchart which shows an example of the flow of the image processing which concerns on Embodiment 1 of this invention. It is a figure for demonstrating an example (processing example 1) of the image processing which concerns on Embodiment 1 of this invention. It is a figure for demonstrating an example (reference example 1) of image processing. It is a figure for demonstrating an example (processing example 2) of the image processing which concerns on Embodiment 1 of this invention. It is a figure for demonstrating an example (processing example 3) of the image processing which concerns on Embodiment 1 of this invention.
  • Embodiment 1 Hereinafter, an embodiment (Embodiment 1) of the present invention will be described in detail with reference to FIGS.
  • FIG. 1 is a functional block diagram showing the configuration of the image printing apparatus 1 of the present embodiment.
  • the image printing apparatus 1 includes an imaging unit 10, an operation unit 20, a display unit 30, a control unit (image processing device) 40, a printing unit 50, and a storage unit 60.
  • the imaging unit 10 and the control unit 40 function as an imaging device.
  • the imaging unit 10 images a subject, and transmits the captured image (an image including a target region including the subject) to the control unit 40 as an input image.
  • the target area is an area to be subjected to the reduction and enlargement processing by the control unit 40.
  • the operation unit 20 receives user input, and is realized by, for example, a touch panel or a mouse. For example, when the operation unit 20 is a touch panel, an input image is displayed on the display unit 30 including the touch panel.
  • the display unit 30 displays various images.
  • the display unit 30 displays, for example, an image captured by the imaging unit 10 or an output image generated by an image correction unit 45 described later.
  • the control unit 40 controls the image printing apparatus 1 in an integrated manner.
  • the control unit 40 functions as an image processing device that performs image processing on an image (input image) captured by the imaging unit 10 and generates an output image after processing (after correction). A specific configuration of the control unit 40 will be described later.
  • the printing unit 50 prints an output image (image) generated by the processing of the control unit 40.
  • the printing unit 50 may further print an image drawn by the user via the operation unit 20 on the output image.
  • the storage unit 60 stores, for example, various control programs executed by the control unit 40, and includes a nonvolatile storage device such as a hard disk or a flash memory. For example, an input image and an output image are stored in the storage unit 60.
  • the storage unit 60 may store parameters and the like necessary for the processing of the control unit 40 such as image processing (correction processing) and subject detection processing.
  • the image printing apparatus 1 does not necessarily include the control unit 40 that functions as an image processing apparatus.
  • an external device that can be communicably connected to the image printing apparatus 1 may have the image processing function of the control unit 40.
  • the image printing apparatus 1 may not include the imaging unit including the imaging unit 10 and the control unit 40 that functions as an image processing device.
  • the imaging apparatus may function as an external apparatus that can be communicably connected to the image printing apparatus 1 or may not have the function.
  • the image printing apparatus 1 may not include the imaging unit 10.
  • the imaging unit 10 functions as an external device that can be connected to the image printing apparatus 1 so as to be communicable.
  • the control unit 40 includes a subject detection unit (target region detection unit) 41, a correction region setting unit (correction processing unit) 42, a correction intensity setting unit (correction processing unit) 43, A cutout setting unit (correction processing unit) 44 and an image correction unit 45 are provided.
  • the correction area setting unit 42, the correction intensity setting unit 43, the cutout setting unit 44, and the image correction unit 45 are collectively referred to as a correction processing unit.
  • the subject detection unit 41 detects a subject (target region) to be corrected from the input image input to the control unit 40.
  • the subject detected by the subject detection unit 41 includes (1) a person, (2) a person's face, (3) each organ of the face such as eyes, mouth or nose, or (4) a face contour.
  • the subject detection unit 41 can detect a subject using existing technology, such as using information on a skin color area detected from an input image.
  • the detection of the subject by the subject detection unit 41 may be manual. In other words, the user may detect the subject from the input image.
  • the subject detection unit 41 (subject selection unit) displays an input image on the display unit 30 and detects (selects) a subject to be corrected designated by a user input via the operation unit 20. To do.
  • the subject detection unit 41 selects a subject to be corrected based on a user input.
  • the operation unit 20 when the operation unit 20 is a touch panel, the subject in the input image displayed on the display unit 30 is selected by touching the touch panel.
  • the operation unit 20 is a mouse
  • a subject is selected based on the mouse operation.
  • the subject detection unit 41 detects a target object to be corrected (in other words, a target region including the target object) included in the image. That is, the subject detection unit 41 functions as a target region detection unit that detects a subject included in the image or a target region including a target other than the subject (in other words, a target region included in the image).
  • the correction area setting unit 42 sets a correction area to be corrected in the input image based on information indicating the subject detected by the subject detection unit 41 (eg, information indicating the position and size of the subject).
  • the correction area setting unit 42 sets an area including the subject included in the input image as a reduced area (first area) in the input image.
  • the correction area setting unit 42 sets an area outside the set reduction area, specifically, an area adjacent to the reduction area as an enlarged area (second area) in the input image. In other words, the correction area setting unit 42 sets a reduction area and an enlargement area as correction areas. Details will be described later.
  • the correction intensity setting unit 43 sets an enlargement ratio and a reduction ratio when correcting an image.
  • the correction intensity setting unit 43 preliminarily uses a magnification ⁇ ( ⁇ 1) for reducing the reduction area set in the input image and a magnification ⁇ (> 1) for enlargement of the enlargement area set in the input image.
  • a set value may be used, or a value set according to an input image or a user operation may be used.
  • the cut setting unit 44 sets a cut region to be cut from the image to be finally output based on the position and size of the reduced region set by the correction region setting unit 42. Details will be described later.
  • the image correction unit 45 corrects the input image by reducing the reduction region, enlarging the enlargement region, and cutting the cut region, and outputs the corrected image to the printing unit 50 and / or the display unit 30 as an output image.
  • the image correction unit 45 has a first magnification ( ⁇ 1) for reducing the reduced area set in the input image and a second magnification (> 1) for enlarging the enlarged area set in the input image.
  • a preset value may be used, or a value set according to an input image or a user operation may be used.
  • FIG. 2 is a flowchart illustrating an example of the flow of image processing in the control unit 40.
  • the subject detection unit 41 When the subject detection unit 41 acquires an image captured by the imaging unit 10 as an input image, the subject detection unit 41 detects a subject to be corrected from the input image (S201: target region detection step).
  • the correction area setting unit 42 sets a reduction area and an enlargement area based on information indicated by the subject detected by the subject detection unit 41 (S202: correction processing step).
  • the correction strength setting unit 43 corrects the correction strength (the reduction magnification ⁇ in the reduction region and the enlargement magnification ⁇ in the enlargement region) based on the information indicating the reduction region and the enlargement region set by the correction region setting unit 42. Is set (S203: correction processing step).
  • the cut setting unit 44 sets a cut region based on the information indicating the reduction region and the enlargement region set by the correction region setting unit 42 and the information indicating the correction strength set by the correction strength setting unit 43 ( S204: Correction processing step). Then, the image correction unit 45 generates an output image by reducing the reduction area, enlarging the enlargement area, and cutting the cut area (S205: correction processing step). Then, the control unit 40 outputs the generated output image to the printing unit 50 or the display unit 30.
  • FIG. 3A shows an input image 300 used in Processing Example 1, and a human face (target region) 301 is shown in the input image 300.
  • a person's face 301 is a subject to be corrected and the person's face 301 is thinned by being reduced in the horizontal direction.
  • FIG. 3B shows correction areas (reduction area and enlargement area) set in the input image 300 by the correction area setting unit 42 in the processing example 1.
  • the correction area setting unit 42 sets an area including the face 301 as a reduced area 302.
  • the width of the reduced area 302 is the same as the width of the human face 301, but the present embodiment is not limited to this.
  • the correction area setting unit 42 sets the reduced area 302 so as to cross the input image 300 in the vertical direction.
  • the shape of the reduced area is not limited to this ( (Refer to Modification 1).
  • the correction area setting unit 42 sets an area outside the reduction area 302 as the enlargement area 303.
  • an enlarged region 303 is provided on both sides of the reduced region 302 so as to sandwich the reduced region 302 therebetween.
  • the width of each enlarged region 303 is 1 ⁇ 2 of the width of the reduced region 302, but the present embodiment is not limited to this.
  • the image correction unit 45 reduces the reduction area 302 in the horizontal direction and enlarges the expansion area 303 in the horizontal direction. More specifically, the coordinate in the direction indicated by the arrow in FIG. 3B is the x coordinate, and the distance from the center line 304 of the reduction area 302 to the boundary between the reduction area 302 and the enlargement area 303 is d1.
  • is a positive constant set by the correction intensity setting unit 43 as a magnification (enlargement / reduction ratio) with respect to the reduction region, and satisfies ⁇ ⁇ 1.
  • the correspondence between the x coordinate in the input image 300 and the x coordinate in the output image is a graph as shown in FIG. Since the magnification ⁇ is set to be less than 1, the inclination of the x coordinate of the output image with respect to the x coordinate of the input image 300 in the reduced area 302 is also less than 1. Therefore, as shown in FIG. 3C, the x coordinate of the output image is smaller than the x coordinate of the input image 300. Further, the x-coordinate of the output image becomes smaller than the x-coordinate of the input image 300 as it approaches the enlarged region 303. This means that the reduction area 302 is reduced toward the center line 304 of the reduction area 302 and the degree of reduction (the amount of movement of the pixel) increases as the distance from the center line 304 increases.
  • the magnification ⁇ is set to be greater than 1
  • the inclination of the x coordinate of the output image with respect to the x coordinate of the input image 300 is also greater than 1. This means that the enlargement area 303 enlarges toward the center line 304 of the reduction area 302 and the degree of enlargement (the amount of movement of the pixel) decreases as the distance from the center line 304 increases.
  • the x coordinate of the input image matches the x coordinate of the output image at the end of the enlargement region 303 opposite to the reduction region 302.
  • the image correction unit 45 can generate the output image so that the image quality does not deteriorate.
  • each point P Is not necessarily proportional to the distance r of the point P from the correction center c.
  • FIG. 4A shows an input image 400 used in Processing Example 2, and a human face 401 is shown in the input image 400.
  • the human face 401 is shown at a position on the right side of the input image 400.
  • FIG. 4B shows correction areas (reduction area and enlargement area) set in the input image 400 by the correction area setting unit 42 in Reference Example 1.
  • the correction area setting unit 42 sets an area including the face 401 as the reduced area 402.
  • the width of the reduced area 402 is the same as the horizontal width of the human face 401.
  • the correction area setting unit 42 sets the enlarged area 403 on both sides of the reduced area 402 so as to sandwich the reduced area 402.
  • the width of the enlarged region 403 on the left side of the reduced region 402 is 1 ⁇ 2 of the width of the reduced region 302 as in Processing Example 1, but the right end of the input image 400 is set to the right end of the reduced region 402. Therefore, the width of the enlarged area 403 on the right side of the reduced area 402 is smaller than that of the processing example 1.
  • the relationship between the x coordinate of the input image 400 and the x coordinate of the output image is as shown in FIG.
  • the graph is as shown in (c).
  • the x coordinate of the input image 400 corresponding to the x coordinate does not exist.
  • FIG. 5 shows the input image 500 used in the processing example 2 and the correction regions (the reduction region 502 and the enlargement region 503) set in the input image 500 by the correction region setting unit 42.
  • the correction area setting unit 42 sets the reduced area 502 so as to contact the right side of the input image 500.
  • the correction area setting unit 42 also sets the enlarged area 503 only on the left side of the reduced area 502, and cannot set the enlarged area 503 on the right side of the reduced area 502.
  • FIG. 5B shows an output image 504 that is corrected so as to reduce the width of the face 505 with respect to the input image 500.
  • the cut setting unit 44 sets an area 508 indicated by shading at the right end of the output image 504 as a cut area.
  • An area 508 is an area where the reference destination is outside the image of the input image 500, and the pixel value is indefinite.
  • the image correction unit 45 can generate an output image 509 in which a region 508 in which the pixel value is indefinite is cut out from the output image 504. As a result, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
  • the control unit 40 compensates for the reduction effect of the reduction area by enlarging the enlargement area as in Processing Example 1, and the image quality is deteriorated.
  • An output image can be generated so as not to occur. That is, the area outside the enlarged area in the image can be an area that is neither reduced nor enlarged. If the control unit 40 cannot set a sufficiently large area, the control unit 40 sets a cut area and cuts the cut area as in Processing Example 2 so that an area with an indefinite pixel value is included. A suitable output image can be obtained.
  • the cut setting unit 44 determines whether the reduction direction of the reduction area depends on the distance from the reduction area to the first side. It is determined whether or not the first side of the image is to be cut out.
  • a cut area is set on the first side.
  • the cropping setting unit 44 has a small space between the reduced area (first area) and one side (first side) of the input image (for example, the reduced area and one side of the input image are in contact with each other). If it is, the cut area is set so as to cut the first side of the image. Otherwise, the cut area is not set.
  • the cutout region can be, for example, an end portion on the one side of the corrected image.
  • cutting a certain side of an image means removing an area having a certain width from a certain side included in the image from the image.
  • the “reduction direction of the reduction area (first area)” means a direction in which pixels in the reduction area move when the reduction area is reduced. Further, “the reduction direction of the reduction area is directed from the one side to the inside of the reduction area” means that the pixel on the one side of the reduction area moves to the inside of the reduction area. At this time, if the reduction direction is represented by a vector and decomposed into a vector in a certain direction and a vector in a direction orthogonal to the certain direction, the obtained vector in the certain direction becomes a positive direction.
  • the reduction direction of the reduction area is from a certain side toward the inside of the reduction area, the reduction area is reduced away from a certain side. Therefore, in order to compensate for the reduction effect, It is preferable to set a sufficient enlarged region on the side of the image.
  • the interval between the reduced area and the certain side is narrow (for example, when the reduced area is in contact with the certain side of the input image), it is not possible to set a sufficient enlarged area.
  • the cropping setting unit 44 sets a cropping region so that the certain side of the image is cropped, thereby obtaining a suitable output image that does not include a region with an indefinite pixel value.
  • the cut setting unit 44 does not set the cut area so that the image quality does not deteriorate. An output image can be generated.
  • the cut setting unit 44 performs correction according to the distance from the reduction area to the certain side. It is determined whether or not to cut out the certain side in the subsequent image, and thus the image can be corrected more appropriately.
  • the cut setting unit 44 sets the most from the center of the reduction area (first area) to the certain side in the reduction area.
  • the distance from the reduced region to a certain side is set to dx, and the scaling ratio of the reduced region is defined as d1.
  • the cropping setting unit 44 sets (1 ⁇ ) d1 ⁇ ( ⁇ 1) dx to the certain side of the corrected image when Expression (1) is satisfied. Set the crop area for the width. Thereby, the control part 40 can cut out an appropriate area
  • the width of the cut region set by the cut setting unit 44 may be wider than (1- ⁇ ) d1- ( ⁇ -1) dx, and even in this case, a region with an indefinite pixel value is included. A suitable output image can be obtained.
  • the cut setting unit 44 is provided so that the cut area is outside the reduced area after reduction.
  • the reduced area is set as a rectangular area that crosses the input image in the vertical direction, and the configuration in which the reduced area is reduced in the horizontal direction has been described.
  • the correction method is not particularly limited.
  • Various methods such as a configuration for enlarging (configurations of processing examples 3 to 5 to be described later) can be used.
  • the straight line may be the center line of the reduction region, or may be another straight line, and the direction of the straight line may also be the vertical direction of the image. It may be a direction, a horizontal direction, or an oblique direction. Further, the shape of the reduced area and the enlarged area is not limited to a rectangle, and a part thereof may be configured by a curve.
  • the point may be the center of the reduction region, or may be another point. May be isotropic, or may be isotropic.
  • the shape of the reduced area and the enlarged area is not limited to a circle, and may be an ellipse or a polygon.
  • a configuration that reduces and enlarges toward a specific point (B) a configuration that reduces and enlarges toward the center of a circular reduction region will be described with a processing example.
  • FIG. 6A is a diagram illustrating an example of a reduced area 551 and an enlarged area 552 set by the correction area setting unit 42 with respect to the target area 550 that is a correction target.
  • the reduced area 551 is a circular area having a radius d1 centered on the correction center c
  • the enlarged area 552 is a circular area having a radius d2 centered on the correction center c. This is an area outside the reduced area 551.
  • the shapes of the reduced region 551 and the enlarged region 552 are not limited to a circle.
  • the distance r from the correction center c of the point P before correction and the correction center c of the point P after correction are The relationship with the distance r ′ is as shown in the graph of FIG.
  • the enlarged region 552 is enlarged inward while maintaining the outer periphery, and the inner periphery of the corrected enlarged region 552 coincides with the outer periphery of the corrected reduced region 551. Further, the area outside the enlarged area 552 does not change before and after correction.
  • each point P Is not necessarily proportional to the distance r of the point P from the correction center c.
  • the image correction unit 45 may be anisotropically reduced by changing the correction amount for each point P in accordance with the angle ⁇ with respect to the reduction region 551. .
  • FIG. 7A shows an input image 600 used in Processing Example 4, and a human face (target region) 601 is located at the right end.
  • the control unit 40 performs correction to reduce the face 601 of the person toward the center of the face.
  • the correction area setting unit 42 sets a circle centered on the center of the face as the reduced area 602.
  • the correction area setting unit 42 sets the reduced area 602 so that the outer periphery of the reduced area 602 is near the contour of the human face 601.
  • the correction area setting unit 42 sets the enlarged area 604 outside the reduced area 602.
  • the human face 601 is located at the right end, the correction area setting unit 42 cannot set the enlarged area 604 on the right side of the face 602.
  • FIG. 7B shows an image 605 obtained by correcting the face 601 of the person so that the face becomes smaller toward the center of the face with respect to the input image 600.
  • the corrected face 606 of the person is corrected to be smaller than the face 601 of the person before correction.
  • the region 508 in which the pixel value is indefinite in the processing example 2 is a rectangle, whereas the region 607 in the processing example 4 is different in that the region is partially surrounded by a curve. This is due to the difference.
  • the cut setting unit 44 sets not the area 607 but the rectangular area 603 including the area 607 as the cut area. As a result, as shown in FIG. 7C, it is possible to obtain a suitable corrected image that does not include a region with an indefinite pixel value and has a rectangular cut image.
  • FIG. 8A shows an input image 700 used in Processing Example 5, and a human face (target region) 701 is located at the upper right end.
  • the control unit 40 performs correction to reduce the human face 701 toward the center of the face.
  • the correction area setting unit 42 sets a circle centered on the center of the face as the reduction area 702.
  • the correction area setting unit 42 sets the reduced area 702 so that the outer periphery of the reduced area 702 is near the outline of the human face 701.
  • the correction area setting unit 42 sets the enlarged area 704 outside the reduced area 702.
  • the human face 701 is located at the upper right end, the correction area setting unit 42 cannot set the enlarged area 704 on the right side of the face 702 and the upper side of the face 702.
  • FIG. 8B shows an image 705 obtained by correcting the face 701 of the person so that the face becomes smaller toward the center of the face with respect to the input image 700.
  • the corrected face 706 of the person is corrected to be smaller than the face 701 of the person before correction.
  • the cut setting unit 44 sets two rectangular areas 703 ((b) and (d) in FIG. 8) including two areas 707 where pixel values are indefinite as cut areas. As a result, as shown in FIG. 8C, it is possible to obtain a suitable corrected image that does not include a region with an indefinite pixel value and that has a rectangular cut-out image.
  • the pixel value is indefinite by referring to the outside of the image.
  • FIG. 9 is a functional block diagram illustrating a configuration of the imaging device 2 according to another aspect of the present embodiment. Similar to the image printing apparatus 1, the imaging apparatus 2 includes the imaging unit 10, the operation unit 20, the display unit 30, the control unit (image processing apparatus) 40, and the storage unit 60, but does not include the printing unit 50. . Further, the image processing apparatus may include only the control unit 40.
  • control unit 40 further cuts out an image after cutting out an area where the pixel value is indefinite, thereby generating a suitable output image having no change in the aspect ratio of the image before and after correction.
  • FIG. 10A shows an image 800 after correction for reducing the face 801 is performed on an input image including a human face (target area) 801.
  • a shaded area 802 is shown in FIG.
  • An area where the pixel value is indefinite is shown.
  • the cut setting unit 44 sets a rectangular area 805 including the area 802 as a cut area.
  • FIG. 10B shows an image 803 in which the region 805 has been cut out.
  • the image 803 has a different aspect ratio from the image 800 because the right side of the image 800 is cut off. For example, if the number of pixels of the image 800 is 1600 pixels wide and 1200 pixels long, the aspect ratio of the image 800 is 4: 3. On the other hand, the image 803 has an aspect ratio different from that of the image 800 because the right side of the image 800 is cut off. If the number of pixels in the rectangular area cut out from the image 800 is 100 pixels wide and 1200 pixels high, the image 803 has 1500 pixels horizontally and 1200 pixels vertically, the aspect ratio is 5: 4, and the aspect ratio of the image 800 is Is different.
  • the cropping setting unit 44 adds the aspect ratio of the output image to the aspect ratio of the input image in addition to the rectangular area 805 including the area 802 where the pixel value is indefinite.
  • a cutout area 806 is set on the upper side of the image 800.
  • the image 804 from which the cut area is cut by the image correction unit 45 is cut off by 1500 pixels in the horizontal direction and 75 pixels in the vertical direction as shown in FIG.
  • the number of pixels is 1500 horizontal and 1125 vertical, and the aspect ratio is 4: 3. Therefore, the aspect ratio is the same as the aspect ratio of the image before correction.
  • the aspect ratio does not change.
  • the entire image can be displayed if the aspect ratios of the display screens match.
  • the aspect ratio of the display screen does not match the aspect ratio of the image to be displayed, there is a region (margin region) where no image is displayed on a part of the display screen.
  • the aspect ratio of each image is different due to image correction (cutout)
  • displaying a plurality of images in sequence on the display screen has a problem that the blank area changes every time the image is switched.
  • the aspect ratios of a plurality of images match, it is preferable that the blank area does not change when the image to be displayed is switched.
  • the aspect ratio of the printing paper matches the aspect ratio of the image, It is preferable that printing can be performed without a blank area.
  • control unit 40 does not necessarily have to proceed with the correction in the order of (a) to (c) in FIG. 10, and the order may be changed or may be performed in parallel.
  • the cropping setting unit 44 sets a cropping region on a certain side of the input image
  • the aspect ratio of the output image after correction is the same as the aspect ratio of the input image before correction.
  • the cropping setting unit 44 assumes that the number of horizontal pixels of the input image before correction is nx, the number of vertical pixels of the input image before correction is ny, and the width of the cropping area is w. If the area is close to the right or left side of the input image and the cut area is set on the right or left side, a cut area having a width of w (ny / nx) may be set on the upper or lower side. , (Ii) When the target area is close to the upper side or the lower side of the input image and the cut area is set on the upper side or the lower side, a cut area having a width of w (nx / ny) is further set on the right side or the left side. Should be set.
  • FIG. 11A shows an image 900 after correction for reducing the face 901 is performed on an input image including the face (target region) 901 of a person and the face 903 of another person.
  • a shaded area 902 represents an area where the pixel value is indefinite.
  • the cut setting unit 44 sets a rectangular area 905 including the area 902 as a cut area.
  • the cropping setting unit 44 adds the aspect ratio of the output image to the aspect ratio of the input image in addition to the rectangular area 905 including the area 902 where the pixel value is indefinite.
  • a cutting area is further set on the upper side or the lower side that is not opposite to the right side where the area 902 is set.
  • the crop setting unit 44 has a region 906 on the lower side of the image 900 as shown in FIG. Is set as the cropping area.
  • the image 904 from which the cut region is cut by the image correction unit 45 includes both the human face 901 and the human face 903, and the input image before correction. This is preferable because it has the same aspect ratio as the above aspect ratio.
  • the criterion for selecting the cropping region from the cropping region candidate regions so that the cropping setting unit 44 does not change the aspect ratio of the image before and after correction is not limited to the criterion of whether or not a human face is included.
  • the cut setting unit 44 determines whether or not a subject of interest other than a person is included in a candidate area of a cut area for which the aspect ratio is not changed before and after correction, A candidate area that does not include the subject of interest may be set as a cut-out area.
  • the cutout setting unit 44 calculates the feature amount of each candidate region and cuts out the candidate region with a small feature amount so as to exclude the candidate face when neither of the candidate regions includes a human face or a target subject. Also good.
  • the cut setting unit 44 can calculate the feature amount using color information such as edge detection and saturation, for example.
  • the cropping setting unit 44 sets a cropping region having a specific width (first width) on the upper side or the lower side (or the right side or the left side) in order not to change the aspect ratio of the image before and after correction.
  • a clipping region is set on the side of the upper side or the lower side (or the right side or the left side) where the target pixel is not included within a specific width from the side.
  • the target pixel means a feature point for detecting a person, a target subject, or a pixel for detecting a feature amount.
  • FIG. 12A shows an image 1000 after correction for reducing the face 1001 is performed on an input image including a human face (target area) 1001, and an area 1002 indicated by shading is shown in FIG. An area where the pixel value is indefinite is shown.
  • the cut setting unit 44 sets a rectangular area 1005 including the area 1002 as a cut area.
  • the cropping setting unit 44 adds the aspect ratio of the output image to the aspect ratio of the input image in addition to the rectangular region 1005 including the region 1002 where the pixel value is indefinite.
  • a cutting area is further set on the upper side or the lower side that is not opposed to the right side where the area 1002 is set.
  • the crop setting unit 44 uses the region 1006 on the upper side of the image 1000, which is the side farther from the reduced region including the person 1001, as the crop region, as illustrated in FIG. Set.
  • the image 1003 from which the crop region has been cut out by the image correction unit 45 is shown in FIG. 12B, in which the person's face 1001 is shown at a position close to the center of the image 1003.
  • the target area to be formed can be made closer to the center of the image, and the same aspect ratio as the aspect ratio of the input image before correction is preferable.
  • the image correction unit when the crop setting unit 44 sets a region 1007 on the lower side of the image 1000, which is the side closer to the reduced region including the person 1001, as the crop region, the image correction unit.
  • the image 1004 in which the cut region is cut out by 45 the face 1001 of the person appears in a position away from the center of the image 1003 as shown in FIG.
  • control unit 40 generates a more suitable output image by performing pixel number conversion on an image whose aspect ratio is adjusted.
  • the details of the correction processing in the present embodiment will be described with reference to processing examples.
  • FIG. 13A shows an image 1100 used in the processing example 9 in which a human face (target region) 1101 is shown.
  • FIG. 13B as in the processing examples 6 to 8, image correction is performed to reduce the human face 1101, and the cropping area 1104 where the pixel value is indefinite and the aspect ratio are adjusted.
  • An image 1102 obtained by cutting the cut area 1105 is shown.
  • the image 1102 shown in FIG. 13B and the image 1100 shown in FIG. 13D have the same aspect ratio, but differ in the number of pixels of the image corresponding to the cut region. In that case, when an image is captured by the imaging apparatus, an image having a smaller number of pixels than the preset number of pixels of the image is output.
  • the image correction unit 45 cuts out the cutout area 1104 in which the pixel value is indefinite and the cutout area 1105 to adjust the aspect ratio, whereby the number of vertical pixels and the horizontal length of the image are adjusted.
  • the number of pixels is different from the number of vertical pixels and the number of horizontal pixels of the input image, an image in which the cut region is cut out so that the number of vertical pixels and the number of horizontal pixels match between the input image and the output image 1102 is enlarged.
  • FIG. 13C shows an image 1103 enlarged from the image 1102 by the image correction unit 45.
  • the image 1103 shown in FIG. 13C and the image 1100 shown in FIG. 13E have the same image size (number of pixels), and the human face 1101 is corrected to be small.
  • the image correction unit 45 can generate an image having the same number of pixels as the input image and in which the correction target subject is preferably corrected.
  • control unit 40 does not necessarily have to adjust the aspect ratio adjustment and the pixel number conversion by cropping in the order of (a) to (c) of FIG. You may do it.
  • the control unit 40 generates a suitable output image having no change in the aspect ratio of the image before and after correction by enlarging a part of the region after cutting out the region where the pixel value is indefinite.
  • FIG. 14A is a diagram showing an image 1500 including a human face (target region) 1501 used in Processing Example 10.
  • the correction area setting unit 42 sets a reduction area 1511 and an enlargement area 1512 for the image 1500.
  • FIG. 14B shows an image 1502 in which a correction for reducing the face 1501 is performed and a region 1505 with an indefinite pixel value is cut out.
  • the image 1502 has a different aspect ratio from the image 1500 because the right side of the image 1500 is cut off.
  • the correction area setting unit 42 applies an image to the reduced area 1511 as shown in FIG. 14B so that the aspect ratio of the output image is the same as the aspect ratio of the input image.
  • a second enlarged region (third region) 1506 is set on the side (left side, third side) opposite to the side (right side, first side) from which is cut off.
  • the image 1508 in which the width of the second enlarged region 1506 is enlarged from the width 1507 to the width 1510 by the image correction unit 45 is cut out as shown in FIG.
  • the aspect ratio becomes the same as the aspect ratio of the image before correction.
  • the aspect ratio can be adjusted without performing unnecessary clipping.
  • the second enlarged region 1506 is preferably wide. If the second enlargement area 1506 is wide, the enlargement / reduction ratio ⁇ of the second enlargement area 1506 becomes a value close to 1, and the output image quality can be prevented from deteriorating.
  • the correction area setting unit 42 sets, as a second enlarged area 1506, an area that does not include the target pixel among areas located on the side opposite to the side where the image is cut out with respect to the reduced area. Is preferred. As a result, it is possible to avoid a human face or the like being included in the second enlarged region 1506 and deforming the face or the like.
  • the reduced area approaches a certain side (first side) of the input image, and an enlarged area having a sufficient width cannot be set on the first side of the reduced area.
  • an enlarged area having a sufficient width cannot be set on the first side of the reduced area.
  • FIG. 15 is a functional block diagram showing a configuration example of the control unit according to the present embodiment.
  • the image printing apparatus according to the present embodiment has the same configuration as that of the image printing apparatus 1 according to the first embodiment, except that the control unit (image processing apparatus) 140 is provided instead of the control unit 40.
  • the control unit 140 includes a subject detection unit 141, a correction area setting unit 142, a correction direction setting unit 143, and an image correction unit 144.
  • the correction area setting unit 142, the correction direction setting unit 143, and the image correction unit 144 are collectively referred to as a correction processing unit.
  • the subject detection unit 141 has the same function as the subject detection unit 41.
  • the correction area setting unit 142 has the same function as the correction area setting unit 42.
  • the correction direction setting unit 143 has the same function as that of the correction intensity setting unit 43, and further has a function of changing the reduction direction and the enlargement area of the reduction area and a function of setting the cut area, as will be described later.
  • the image correction unit 144 has a function equivalent to that of the image correction unit 45.
  • FIG. 16 is a flowchart illustrating an example of the flow of image processing in the control unit 140.
  • the subject detection unit 141 When the subject detection unit 141 acquires the image captured by the imaging unit 10 as an input image, the subject detection unit 141 detects a subject to be corrected from the input image (S201: target region detection step).
  • the correction area setting unit 142 sets a reduction area and an enlargement area based on information indicated by the subject detected by the subject detection unit 41 (S202: correction processing step). Further, the correction direction setting unit 143 corrects the correction strength (the reduction magnification ⁇ in the reduction region and the enlargement magnification ⁇ in the enlargement region) based on the information indicating the reduction region and the enlargement region set by the correction region setting unit 42.
  • the image correction unit 144 generates an output image by reducing the reduction area, expanding the enlargement area, and cutting the cut area as necessary (S205: correction processing step). Then, the control unit 40 outputs the generated output image to the printing unit 50 or the display unit 30.
  • FIG. 17A shows the input image 1700 used in the processing example 11 and the correction areas (the reduction area 1702 and the enlargement area 1703) set in the input image 1700 by the correction area setting unit 142.
  • the correction region setting unit 142 sets the reduced region 1702 so as to be in contact with the right side of the input image 1700. Therefore, the correction area setting unit 142 can set the enlarged area 1703 only on the left side of the reduced area 1702, and cannot set an enlarged area with a sufficient width on the right side of the reduced area 1702.
  • the correction direction setting unit 143 changes the reduction direction of the reduction area 1702 so as not to go from the right side of the input image 1700 to the inside of the reduction area 1702.
  • the correction direction setting unit 143 changes the reduction direction of the reduction area 1702 so as to be directed toward the side (the right side of the input image 1700) to which the reduction area 1702 is close.
  • the correction direction setting unit 143 resets the enlargement area so that the enlargement area is not set on the side close to the reduction area 1702 (the right side of the input image 1700).
  • FIG. 17B shows an output image 1704 obtained by correcting the input image 1700 so that the width of the face 1705 is reduced in the reduction direction changed by the correction direction setting unit 143.
  • a region 1704 indicated by shading at the left end of the corrected output image 1704 is a region with an indefinite pixel value.
  • the correction direction setting unit 143 sets the area 1704 as a cut-out area.
  • the image correction unit 144 can generate an output image 1709 in which a region 1708 in which the pixel value is indefinite is cut out from the output image 1704.
  • correction direction setting unit 143 also sets the pixel value by expanding the region sandwiched between the region 1704 and the enlarged region 1707 so as to supplement the region 1704 instead of setting the region 1704 as a cutout region.
  • a suitable output image that does not include an indefinite area can be obtained.
  • the correction direction setting unit 143 when the reduction direction of the reduction area is directed from one side (first side) side of the input image to the inside of the reduction area, the first direction from the reduction area. It is determined whether to change the reduction direction of the reduction area according to the distance to the side of the image, and when changing the reduction direction of the reduction area, the reduction direction of the reduction area is changed from the first side to the reduction area. Change so that it does not face inward. As a result, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
  • FIG. 18A shows the input image 1800 used in the processing example 12 and the correction regions (the reduction region 1802 and the enlargement region 1803) set in the input image 1800 by the correction region setting unit 142.
  • the correction area setting unit 142 sets the reduced area 1802 so as to be in contact with the right side of the input image 1800. Therefore, the correction area setting unit 142 can set the enlarged area 1803 only on the left side of the reduced area 1802, and cannot set an enlarged area with a sufficient width on the right side of the reduced area 1802.
  • the correction direction setting unit 143 changes the reduction direction of the reduction area 1802 so as not to go to the inside of the reduction area 1802 from the right side of the input image 1800 as in the case of the processing example 11.
  • the enlargement area is reset so that the enlargement area is not set on the side close to the reduction area 1802 (the right side of the input image 1800). Further, the correction direction setting unit 143 increases the enlargement ratio of the enlargement area 1803.
  • FIG. 18B shows an output image 1804 obtained by correcting the input image 1800 so that the width of the face 1805 is reduced in the reduction direction changed by the correction direction setting unit 143.
  • the narrowed width of the reduced area 1802 is supplemented by the enlarged enlarged area 1803, and the area on the left side of the corrected enlarged area 1807 is not enlarged or reduced. As a result, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
  • Control blocks are logic circuits (hardware) formed in an integrated circuit (IC chip) such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • IC chip integrated circuit
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • it may be realized by software, or may be realized by software using a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit).
  • control units (image processing apparatuses) 40 and 140 have a CPU that executes instructions of a program that is software that realizes each function, and the program and various data are recorded so as to be readable by a computer (or CPU).
  • a ROM (Read Only Memory) or a storage device (these are referred to as “recording media”), a RAM (Random Access Memory) for expanding the program, and the like are provided.
  • the objective of this invention is achieved when a computer (or CPU) reads the said program from the said recording medium and runs it.
  • a “non-temporary tangible medium” such as a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used.
  • the program may be supplied to the computer via an arbitrary transmission medium (such as a communication network or a broadcast wave) that can transmit the program.
  • an arbitrary transmission medium such as a communication network or a broadcast wave
  • one embodiment of the present invention can also be realized in the form of a data signal embedded in a carrier wave, in which the program is embodied by electronic transmission.
  • the image processing apparatus reduces the first area (reduction area) in the image and enlarges the second area (enlargement area) outside the first area
  • a correction processing unit (correction region setting unit 42, correction intensity setting unit 43, crop setting unit 44, image correction unit 45) for correcting the image
  • the correction processing unit is configured such that the reduction direction of the first region is Whether to cut out the first side of the image according to the distance from the first region to the first side when going from the first side of the image to the inside of the first region decide.
  • the reduction direction of the first region is from the first side of the image to the inside of the first region, and the distance from the first region to the first side is short,
  • the second region (enlarged region) having a sufficient width cannot be provided on the first side of one region, a region with an indefinite pixel value may occur on the first side of the output image. Therefore, depending on the distance from the first region to the first side, a suitable output image that does not include a region with an indefinite pixel value can be obtained by cutting out the first side of the image. .
  • the image processing apparatus is the image processing apparatus according to aspect 1, wherein the correction processing unit detects the first side of the image when the first region is in contact with the first side. It may be cut out.
  • the first area (reduced area) is in contact with the first side of the input image, and the second area (enlarged area) is completely located on the first side of the first area (reduced area). Even if it is not possible to set, a suitable output image that does not include a region with an indefinite pixel value can be obtained.
  • the image processing device is the image processing apparatus according to aspect 1 or 2, wherein the correction processing unit is configured such that the distance from the first region to the first side is the first region across the first region. When the width of the second region on the opposite side to the side is narrower, the first side of the image may be cut out.
  • the first region (reduced region) is close to the first side of the input image, and the second region (enlarged region) having a sufficient width on the first side of the first region (reduced region). ) Cannot be set, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
  • the image processing apparatus is the image processing apparatus according to aspects 1 to 3, wherein the correction processing unit is configured so that the aspect ratio of the image after correction is the same as the aspect ratio of the image before correction. A second side that is not opposed to the first side in the image may be cut out.
  • the image processing apparatus is the image processing apparatus according to aspect 4, wherein the correction processing unit cuts the second side with a first width, and does not face the first side of the image.
  • a side from which the target pixel is not included within the first width may be the second side.
  • the image processing apparatus is the image processing apparatus according to aspect 4, wherein the correction processing unit selects a side farther from the first region among the sides that do not face the first side in the image.
  • the second side may be used.
  • the correction processing unit corrects the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the image after correction.
  • the entire image obtained by cutting out the first side and the second side may be enlarged so that the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the previous image are the same. .
  • the correction processing unit is configured so that the aspect ratio of the image after correction is the same as the aspect ratio of the image before correction.
  • the third region located on the third side facing the first side with respect to the first region may be enlarged.
  • the image processing device is the image processing apparatus according to aspect 8, wherein the correction processing unit includes an area that does not include a target pixel in an area located on the third side with respect to the first area.
  • the third region may be used.
  • the image processing apparatus reduces the first area (reduction area) in the image and enlarges the second area (enlargement area) outside the first area.
  • a correction processing unit (a correction region setting unit 142, a correction direction setting unit 143, and an image correction unit 144) that corrects the image is provided, and the correction processing unit is configured such that the reduction direction of the first region is the first of the image.
  • the reduction direction of the first region is changed from the first side of the image to the first side according to the distance from the first region to the first side. It is determined whether or not to change so as not to go inside one area.
  • the reduction direction of the first region is from the first side of the image to the inside of the first region, and the distance from the first region to the first side is short
  • the second region enlarged region
  • a region with an indefinite pixel value may occur on the first side of the output image. Therefore, depending on the distance from the first region to the first side, the pixel value is changed by changing the reduction direction of the first region so as not to go from the first side of the image to the inside of the first region.
  • a suitable output image that does not include an indefinite area can be obtained.
  • An imaging apparatus 2 according to an aspect 11 of the present invention includes an imaging unit 10 and an image processing apparatus according to any one of the above aspects 1 to 10 that corrects the image captured by the imaging unit 10. Yes.
  • the user can capture an image of a person's face and suitably perform image processing on the captured image.
  • An image printing apparatus 1 according to an aspect 12 of the present invention includes the image processing apparatus according to any one of the above aspects 1 to 10 and a printing unit 50 that prints the image corrected by the image processing apparatus. Yes.
  • the user can easily print an image subjected to image processing.
  • the image printing apparatus 1 is an image processing apparatus according to any one of the above aspects 1 to 10, which performs image processing on the imaging unit 10 and the image captured by the imaging unit 10. And a printing unit 50 that prints the image corrected by the image processing apparatus.
  • the user can easily print an image obtained by performing image processing on the captured image.
  • a control method of an image processing device includes an image correction step of correcting the image by reducing a first region in the image and enlarging a second region outside the first region.
  • the image correction step when the reduction direction of the first region is directed from the first side to the inside of the first region, according to the distance from the first region to the first side, It is determined whether or not to cut out the first side in the image.
  • the image correction step of correcting the image by reducing the first region in the image and expanding the second region outside the first region when the reduction direction of the first region is directed from the first side to the inside of the first region, the image correction step depends on a distance from the first region to the first side. Then, it is determined whether or not to change the reduction direction of the first region so as not to go from the first side of the image to the inside of the first region.
  • the image processing apparatus may be realized by a computer.
  • the image processing apparatus is operated by causing the computer to operate as each unit (software element) included in the image processing apparatus.
  • An image processing program for an image processing apparatus realized by a computer and a computer-readable recording medium on which the image processing program is recorded also fall within the scope of the present invention.

Abstract

The present invention corrects an image more suitably. A control unit (40) corrects an image by reducing a first area in the image and enlarging a second area outside the first area, and determines, according to the distance from the first area to a first side of the image, whether to cut the first side in the image.

Description

画像処理装置、撮像装置、画像印刷装置、画像処理装置の制御方法、および画像処理プログラムImage processing apparatus, imaging apparatus, image printing apparatus, image processing apparatus control method, and image processing program
 本発明の一態様は、画像を変形する補正を行う画像処理装置に関する。 One embodiment of the present invention relates to an image processing apparatus that performs correction for deforming an image.
 画像処理により、画像中の一部を拡大したり縮小したりすることで、被写体の印象を変化させる技術が知られている。例えば、画像中の人物の顔を小さく補正することで、小顔な印象の画像に補正する技術や、人物全体を細く補正することで痩せた印象の画像に補正する技術、脚を長く補正することでスタイルの良い印象の画像に補正する技術が挙げられる。このうち、画像中の顔を小さく補正する技術として、特許文献1には、人物の顔領域を含む領域を変形領域に設定し、変形領域を縮小することで顔を小さく補正する技術が記載されている。特許文献1に記載の技術では、設定した変形領域が画像の外に設定された場合に、画像の外に設定された補正を行わないことで、画質の低下を抑制している。 A technique for changing the impression of a subject by enlarging or reducing a part of the image by image processing is known. For example, by correcting the face of a person in the image to be small, it is possible to correct the image to a small-faced impression, to correct the image of a thin image by correcting the entire person to be thin, and to correct the legs longer In this way, there is a technique for correcting an image having a good style. Among these, as a technique for correcting a face in an image to be small, Patent Document 1 describes a technique for correcting a face to be small by setting an area including a human face area as a deformation area and reducing the deformation area. ing. In the technique described in Patent Literature 1, when the set deformation area is set outside the image, the correction set outside the image is not performed, so that deterioration in image quality is suppressed.
日本国公開特許公報「特開2009-104672号公報」Japanese Patent Publication “JP 2009-104672 A”
 しかしながら、特許文献1に記載の技術では、画像中における人物の顔の位置によって補正が行われる場合と行われない場合とがある。そのため、例えば、ユーザが、小顔に補正する機能を搭載したカメラを用いて撮影を行った場合に、ユーザが意図する効果が得られない場合がある。また、例えば、1枚の画像中に複数の人物の顔が写された場合に、画像中央に位置する人物の顔に対しては補正が行われ、画像端に位置する人物の顔に対して補正が行われずに、一部の人物の顔のみが小顔な印象となり、補正が行われない人物の顔は相対的に大きな印象となる場合がある。 However, the technique described in Patent Document 1 may or may not be corrected depending on the position of the person's face in the image. Therefore, for example, when the user performs shooting using a camera equipped with a function for correcting a small face, the effect intended by the user may not be obtained. Further, for example, when a plurality of human faces are captured in one image, correction is performed on the face of the person located at the center of the image, and the face of the person located at the end of the image is corrected. There is a case where only a part of the faces of some people has a small impression without correction, and a face of a person without correction has a relatively large impression.
 本発明の一態様は、上記の点に鑑みてなされたものであり、より適切に画像を補正することができる画像処理装置、撮像装置、画像印刷装置、画像処理装置の制御方法、および画像処理プログラムを提供することを主たる目的とする。 One aspect of the present invention has been made in view of the above points, and is an image processing apparatus, an imaging apparatus, an image printing apparatus, an image processing apparatus control method, and image processing that can correct an image more appropriately. The main purpose is to provide a program.
 本発明の一態様に係る画像処理装置は、画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する補正処理部を備え、
 前記補正処理部は、前記第1領域の縮小方向が、前記画像の第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記画像における前記第1の辺側を切り取るか否かを決定する。
An image processing apparatus according to an aspect of the present invention includes a correction processing unit that corrects the image by reducing a first region in the image and enlarging a second region outside the first region,
When the reduction direction of the first region is from the first side of the image toward the inside of the first region, the correction processing unit is responsive to a distance from the first region to the first side. Then, it is determined whether or not to cut out the first side of the image.
 また、本発明の他の一態様に係る画像処理装置は、画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する補正処理部を備え、前記補正処理部は、前記第1領域の縮小方向が、前記画像の第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記第1領域の縮小方向を、前記画像の第1の辺側から前記第1領域の内側に向かわないように変更するか否かを決定する。 An image processing apparatus according to another aspect of the present invention includes a correction processing unit that corrects the image by reducing a first area in the image and enlarging a second area outside the first area. And the correction processing unit sets the distance from the first region to the first side when the reduction direction of the first region is from the first side of the image toward the inside of the first region. Accordingly, it is determined whether or not to change the reduction direction of the first area so as not to go from the first side of the image to the inside of the first area.
 本発明の一態様によれば、より適切に画像を補正することができる。 According to one aspect of the present invention, an image can be corrected more appropriately.
本発明の実施形態1に係る画像印刷装置の一構成例を示す機能ブロック図である。1 is a functional block diagram illustrating a configuration example of an image printing apparatus according to Embodiment 1 of the present invention. 本発明の実施形態1に係る画像処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the image processing which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る画像処理の一例(処理例1)を説明するための図である。It is a figure for demonstrating an example (processing example 1) of the image processing which concerns on Embodiment 1 of this invention. 画像処理の一例(参考例1)を説明するための図である。It is a figure for demonstrating an example (reference example 1) of image processing. 本発明の実施形態1に係る画像処理の一例(処理例2)を説明するための図である。It is a figure for demonstrating an example (processing example 2) of the image processing which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る画像処理の一例(処理例3)を説明するための図である。It is a figure for demonstrating an example (processing example 3) of the image processing which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る画像処理の一例(処理例4)を説明するための図である。It is a figure for demonstrating an example (processing example 4) of the image processing which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る画像処理の一例(処理例5)を説明するための図である。It is a figure for demonstrating an example (processing example 5) of the image processing which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る撮像装置の一変形例を示す機能ブロック図である。It is a functional block diagram which shows the modification of the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施形態2に係る画像処理の一例(処理例6)を説明するための図である。It is a figure for demonstrating an example (processing example 6) of the image processing which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る画像処理の一例(処理例7)を説明するための図である。It is a figure for demonstrating an example (processing example 7) of the image processing which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る画像処理の一例(処理例8)を説明するための図である。It is a figure for demonstrating an example (processing example 8) of the image processing which concerns on Embodiment 2 of this invention. 本発明の実施形態3に係る画像処理の一例(処理例9)を説明するための図である。It is a figure for demonstrating an example (processing example 9) of the image processing which concerns on Embodiment 3 of this invention. 本発明の実施形態4に係る画像処理の一例(処理例10)を説明するための図である。It is a figure for demonstrating an example (processing example 10) of the image processing which concerns on Embodiment 4 of this invention. 本発明の実施形態5に係る制御部の一構成例を示す機能ブロック図である。It is a functional block diagram which shows one structural example of the control part which concerns on Embodiment 5 of this invention. 本発明の実施形態5に係る画像処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the image processing which concerns on Embodiment 5 of this invention. 本発明の実施形態5に係る画像処理の一例(処理例11)を説明するための図である。It is a figure for demonstrating an example (processing example 11) of the image processing which concerns on Embodiment 5 of this invention. 本発明の実施形態5に係る画像処理の一例(処理例12)を説明するための図である。It is a figure for demonstrating an example (processing example 12) of the image processing which concerns on Embodiment 5 of this invention.
 〔実施形態1〕
 以下、本発明の一実施形態(実施形態1)について、図1~図9に基づいて詳細に説明する。
Embodiment 1
Hereinafter, an embodiment (Embodiment 1) of the present invention will be described in detail with reference to FIGS.
 ≪画像印刷装置の構成≫
 まず、図1に基づいて、本発明の一実施形態に係る画像印刷装置1の構成の一例について説明する。図1は、本実施形態の画像印刷装置1の構成を示す機能ブロック図である。図1に示すように、画像印刷装置1は、撮像部10、操作部20、表示部30、制御部(画像処理装置)40、印刷部50および記憶部60を備えている。なお、撮像部10および制御部40は撮像装置として機能する。
<Configuration of image printing device>
First, an example of the configuration of an image printing apparatus 1 according to an embodiment of the present invention will be described with reference to FIG. FIG. 1 is a functional block diagram showing the configuration of the image printing apparatus 1 of the present embodiment. As illustrated in FIG. 1, the image printing apparatus 1 includes an imaging unit 10, an operation unit 20, a display unit 30, a control unit (image processing device) 40, a printing unit 50, and a storage unit 60. Note that the imaging unit 10 and the control unit 40 function as an imaging device.
 撮像部10は、被写体を撮像するものであり、撮像した画像(被写体を含む対象領域を含む画像)を入力画像として制御部40に送信する。対象領域とは、制御部40が縮小および拡大処理を行う対象となる領域である。 The imaging unit 10 images a subject, and transmits the captured image (an image including a target region including the subject) to the control unit 40 as an input image. The target area is an area to be subjected to the reduction and enlargement processing by the control unit 40.
 操作部20は、ユーザの入力を受け付けるものであり、例えばタッチパネル、マウスによって実現される。例えば、操作部20がタッチパネルの場合、当該タッチパネルを備えた表示部30に入力画像が表示される。 The operation unit 20 receives user input, and is realized by, for example, a touch panel or a mouse. For example, when the operation unit 20 is a touch panel, an input image is displayed on the display unit 30 including the touch panel.
 表示部30は、各種画像を表示するものである。表示部30は、例えば、撮像部10が撮像した画像、または後述の画像補正部45が生成する出力画像を表示する。 The display unit 30 displays various images. The display unit 30 displays, for example, an image captured by the imaging unit 10 or an output image generated by an image correction unit 45 described later.
 制御部40は、画像印刷装置1を統括的に制御するものである。制御部40は、撮像部10が撮像した画像(入力画像)に対して画像処理を行い、処理後(補正後)の出力画像を生成する画像処理装置として機能する。制御部40の具体的な構成については後述する。 The control unit 40 controls the image printing apparatus 1 in an integrated manner. The control unit 40 functions as an image processing device that performs image processing on an image (input image) captured by the imaging unit 10 and generates an output image after processing (after correction). A specific configuration of the control unit 40 will be described later.
 印刷部50は、制御部40の処理によって生成された出力画像(画像)を印刷する。印刷部50は、当該出力画像に対してさらに、操作部20を介してユーザによって描画された画像を印刷してもよい。 The printing unit 50 prints an output image (image) generated by the processing of the control unit 40. The printing unit 50 may further print an image drawn by the user via the operation unit 20 on the output image.
 記憶部60は、例えば、制御部40が実行する各種の制御プログラム等を記憶するものであり、例えばハードディスク、フラッシュメモリ等の不揮発性の記憶装置によって構成される。記憶部60には、例えば、入力画像および出力画像が記憶される。また、記憶部60には、画像処理(補正処理)、被写体の検出処理等、制御部40の処理に必要なパラメータ等が記憶されていてもよい。 The storage unit 60 stores, for example, various control programs executed by the control unit 40, and includes a nonvolatile storage device such as a hard disk or a flash memory. For example, an input image and an output image are stored in the storage unit 60. The storage unit 60 may store parameters and the like necessary for the processing of the control unit 40 such as image processing (correction processing) and subject detection processing.
 なお、画像印刷装置1が、画像処理装置として機能する制御部40を備えている必要は必ずしもない。例えば、画像印刷装置1と通信可能に接続できる外部装置が、制御部40の画像処理機能を有していてもよい。 Note that the image printing apparatus 1 does not necessarily include the control unit 40 that functions as an image processing apparatus. For example, an external device that can be communicably connected to the image printing apparatus 1 may have the image processing function of the control unit 40.
 また、画像印刷装置1は、撮像部10、および画像処理装置として機能する制御部40を備える撮像装置を備えていなくてもよい。この場合、撮像装置は、画像印刷装置1と通信可能に接続できる外部装置として機能してもよいし、当該機能を有していなくてもよい。さらに、画像印刷装置1は撮像部10を備えていなくてもよく、この場合、例えば、撮像部10が画像印刷装置1と通信可能に接続できる外部装置として機能する。 Further, the image printing apparatus 1 may not include the imaging unit including the imaging unit 10 and the control unit 40 that functions as an image processing device. In this case, the imaging apparatus may function as an external apparatus that can be communicably connected to the image printing apparatus 1 or may not have the function. Furthermore, the image printing apparatus 1 may not include the imaging unit 10. In this case, for example, the imaging unit 10 functions as an external device that can be connected to the image printing apparatus 1 so as to be communicable.
 ≪制御部の構成≫
 次に、図1に基づいて、制御部40の具体的な構成について説明する。制御部40は、上記画像処理装置の機能を実行するために、被写体検出部(対象領域検出部)41、補正領域設定部(補正処理部)42、補正強度設定部(補正処理部)43、切り取り設定部(補正処理部)44および画像補正部45を備えている。補正領域設定部42、補正強度設定部43、切り取り設定部44および画像補正部45を合わせて補正処理部とも称する。
≪Configuration of control part≫
Next, a specific configuration of the control unit 40 will be described with reference to FIG. In order to execute the functions of the image processing apparatus, the control unit 40 includes a subject detection unit (target region detection unit) 41, a correction region setting unit (correction processing unit) 42, a correction intensity setting unit (correction processing unit) 43, A cutout setting unit (correction processing unit) 44 and an image correction unit 45 are provided. The correction area setting unit 42, the correction intensity setting unit 43, the cutout setting unit 44, and the image correction unit 45 are collectively referred to as a correction processing unit.
 被写体検出部41は、制御部40に入力された入力画像中から、補正対象となる被写体(対象領域)を検出する。被写体検出部41が検出する被写体としては、(1)人物、(2)人物の顔、(3)目、口もしくは鼻等の顔の各器官、または(4)顔の輪郭等が挙げられる。被写体検出部41は、例えば顔の検出であれば、入力画像から検出した肌色領域の情報を利用する等、既存の技術を用いて被写体を検出することができる。 The subject detection unit 41 detects a subject (target region) to be corrected from the input image input to the control unit 40. The subject detected by the subject detection unit 41 includes (1) a person, (2) a person's face, (3) each organ of the face such as eyes, mouth or nose, or (4) a face contour. For example, in the case of face detection, the subject detection unit 41 can detect a subject using existing technology, such as using information on a skin color area detected from an input image.
 なお、被写体検出部41による被写体の検出は手動であってもよい。換言すれば、ユーザが入力画像から被写体を検出してもよい。この場合、例えば、被写体検出部41(被写体選択部)は、表示部30に入力画像を表示させ、操作部20を介したユーザの入力によって指定された、補正対象とする被写体を検出(選択)する。被写体検出部41は、入力画像に複数の被写体が存在する場合には、ユーザの入力に基づいて、補正対象とする被写体を選択する。 Note that the detection of the subject by the subject detection unit 41 may be manual. In other words, the user may detect the subject from the input image. In this case, for example, the subject detection unit 41 (subject selection unit) displays an input image on the display unit 30 and detects (selects) a subject to be corrected designated by a user input via the operation unit 20. To do. When there are a plurality of subjects in the input image, the subject detection unit 41 selects a subject to be corrected based on a user input.
 例えば、操作部20がタッチパネルの場合にはタッチパネルに触れることで、表示部30が表示する入力画像内の被写体が選択される。また、操作部20がマウスの場合には、マウス操作に基づいて被写体が選択される。 For example, when the operation unit 20 is a touch panel, the subject in the input image displayed on the display unit 30 is selected by touching the touch panel. When the operation unit 20 is a mouse, a subject is selected based on the mouse operation.
 また、本明細書では、撮像部10にて撮像された画像(すなわち、被写体を含む画像)に対して補正処理を行うものとして説明する。具体的には、画像に含まれる被写体に対して縮小および拡大処理を行うものとして説明する。しかしこれに限られず、補正対象とする画像は、撮像部10が撮像した画像でなくてもよい。この場合、被写体検出部41は、画像に含まれる、補正対象となる対象物(換言すれば、当該対象物を含む対象領域)を検出する。つまり、被写体検出部41は、画像に含まれる被写体、または被写体以外の対象物を含む対象領域(換言すれば、画像に含まれる対象領域)を検出する対象領域検出部として機能する。 Further, in this specification, description will be made assuming that correction processing is performed on an image captured by the imaging unit 10 (that is, an image including a subject). Specifically, description will be made assuming that reduction and enlargement processing is performed on a subject included in an image. However, the present invention is not limited to this, and the image to be corrected may not be an image captured by the imaging unit 10. In this case, the subject detection unit 41 detects a target object to be corrected (in other words, a target region including the target object) included in the image. That is, the subject detection unit 41 functions as a target region detection unit that detects a subject included in the image or a target region including a target other than the subject (in other words, a target region included in the image).
 補正領域設定部42は、被写体検出部41が検出した被写体を示す情報(例:被写体の位置および大きさを示す情報)に基づいて、補正対象とする補正領域を入力画像に設定する。補正領域設定部42は、入力画像に含まれる被写体を含む領域を縮小領域(第1領域)として、当該入力画像に設定する。また、補正領域設定部42は、設定した縮小領域の外側の領域、具体的には縮小領域に隣接する領域を拡大領域(第2領域)として、入力画像に設定する。換言すれば、補正領域設定部42は、補正領域として、縮小領域および拡大領域を設定する。詳細については後述する。 The correction area setting unit 42 sets a correction area to be corrected in the input image based on information indicating the subject detected by the subject detection unit 41 (eg, information indicating the position and size of the subject). The correction area setting unit 42 sets an area including the subject included in the input image as a reduced area (first area) in the input image. The correction area setting unit 42 sets an area outside the set reduction area, specifically, an area adjacent to the reduction area as an enlarged area (second area) in the input image. In other words, the correction area setting unit 42 sets a reduction area and an enlargement area as correction areas. Details will be described later.
 補正強度設定部43は、画像を補正する際の拡大率や縮小率を設定する。補正強度設定部43は、入力画像において設定された縮小領域を縮小するための倍率α(<1)と、入力画像において設定された拡大領域を拡大するための倍率β(>1)として、予め設定された値を用いてもよいし、入力画像またはユーザの操作に応じて設定された値を用いてもよい。 The correction intensity setting unit 43 sets an enlargement ratio and a reduction ratio when correcting an image. The correction intensity setting unit 43 preliminarily uses a magnification α (<1) for reducing the reduction area set in the input image and a magnification β (> 1) for enlargement of the enlargement area set in the input image. A set value may be used, or a value set according to an input image or a user operation may be used.
 切り取り設定部44は、補正領域設定部42が設定した縮小領域の位置及び大きさに基づいて、最終的に出力する画像から切り取る切り取り領域を設定する。詳細については後述する。 The cut setting unit 44 sets a cut region to be cut from the image to be finally output based on the position and size of the reduced region set by the correction region setting unit 42. Details will be described later.
 画像補正部45は、縮小領域を縮小し、拡大領域を拡大し、切り取り領域を切り取ることにより、入力画像を補正して出力画像として、印刷部50および/または表示部30に出力する。 The image correction unit 45 corrects the input image by reducing the reduction region, enlarging the enlargement region, and cutting the cut region, and outputs the corrected image to the printing unit 50 and / or the display unit 30 as an output image.
 なお、画像補正部45は、入力画像において設定された縮小領域を縮小するための第1倍率(<1)と、入力画像において設定された拡大領域を拡大するための第2倍率(>1)として、予め設定された値を用いてもよいし、入力画像またはユーザの操作に応じて設定された値を用いてもよい。 Note that the image correction unit 45 has a first magnification (<1) for reducing the reduced area set in the input image and a second magnification (> 1) for enlarging the enlarged area set in the input image. As such, a preset value may be used, or a value set according to an input image or a user operation may be used.
 ≪制御部による処理の流れ≫
 次に、図2を用いて、本実施形態の画像印刷装置1の制御部40における画像処理の流れを説明する。図2は、制御部40における画像処理の流れの一例を示すフローチャートである。
≪Process flow by the control part≫
Next, the flow of image processing in the control unit 40 of the image printing apparatus 1 according to the present embodiment will be described with reference to FIG. FIG. 2 is a flowchart illustrating an example of the flow of image processing in the control unit 40.
 被写体検出部41は、撮像部10によって撮像された画像を入力画像として取得すると、当該入力画像から、補正対象となる被写体を検出する(S201:対象領域検出工程)。補正領域設定部42は、被写体検出部41が検出した被写体が示す情報に基づいて、縮小領域および拡大領域を設定する(S202:補正処理工程)。また、補正強度設定部43は、補正領域設定部42が設定した縮小領域および拡大領域を示す情報に基づいて、補正強度(縮小領域における縮小の倍率α、および、拡大領域における拡大の倍率β)を設定する(S203:補正処理工程)。また、切り取り設定部44は、補正領域設定部42が設定した縮小領域および拡大領域を示す情報、ならびに、補正強度設定部43が設定した補正強度を示す情報に基づいて、切り取り領域を設定する(S204:補正処理工程)。そして、画像補正部45は、縮小領域を縮小し、拡大領域を拡大し、切り取り領域を切り取ることにより、出力画像を生成する(S205:補正処理工程)。そして、制御部40は、生成した出力画像を、印刷部50または表示部30に出力する。 When the subject detection unit 41 acquires an image captured by the imaging unit 10 as an input image, the subject detection unit 41 detects a subject to be corrected from the input image (S201: target region detection step). The correction area setting unit 42 sets a reduction area and an enlargement area based on information indicated by the subject detected by the subject detection unit 41 (S202: correction processing step). Further, the correction strength setting unit 43 corrects the correction strength (the reduction magnification α in the reduction region and the enlargement magnification β in the enlargement region) based on the information indicating the reduction region and the enlargement region set by the correction region setting unit 42. Is set (S203: correction processing step). Further, the cut setting unit 44 sets a cut region based on the information indicating the reduction region and the enlargement region set by the correction region setting unit 42 and the information indicating the correction strength set by the correction strength setting unit 43 ( S204: Correction processing step). Then, the image correction unit 45 generates an output image by reducing the reduction area, enlarging the enlargement area, and cutting the cut area (S205: correction processing step). Then, the control unit 40 outputs the generated output image to the printing unit 50 or the display unit 30.
 ≪補正処理の詳細≫
 続いて、制御部40による補正処理の詳細について処理例を挙げて説明する。
≪Details of correction process≫
Next, details of the correction processing by the control unit 40 will be described with reference to processing examples.
 <処理例1>
 図3の(a)は、処理例1において用いる入力画像300を示しており、入力画像300中に人物の顔(対象領域)301が写っている。ここでは、人物の顔301を補正対象の被写体とし、人物の顔301を横方向に縮小することで細くする場合を例に挙げて説明する。
<Processing Example 1>
FIG. 3A shows an input image 300 used in Processing Example 1, and a human face (target region) 301 is shown in the input image 300. Here, an example will be described in which a person's face 301 is a subject to be corrected and the person's face 301 is thinned by being reduced in the horizontal direction.
 図3の(b)は、処理例1において、補正領域設定部42が入力画像300に設定する補正領域(縮小領域および拡大領域)を示している。図3の(b)に示すように、補正領域設定部42は、顔301を含む領域を縮小領域302として設定する。なお、処理例1では、縮小領域302の幅は、人物の顔301の横幅と同じ幅であるが、本実施形態はこれに限定されない。また、処理例1において、補正領域設定部42は、縦方向に入力画像300を横断するように縮小領域302を設定しているが、本実施形態において、縮小領域の形状はこれに限定されない(変形例1参照)。 FIG. 3B shows correction areas (reduction area and enlargement area) set in the input image 300 by the correction area setting unit 42 in the processing example 1. As illustrated in FIG. 3B, the correction area setting unit 42 sets an area including the face 301 as a reduced area 302. In the processing example 1, the width of the reduced area 302 is the same as the width of the human face 301, but the present embodiment is not limited to this. In the processing example 1, the correction area setting unit 42 sets the reduced area 302 so as to cross the input image 300 in the vertical direction. However, in the present embodiment, the shape of the reduced area is not limited to this ( (Refer to Modification 1).
 また、補正領域設定部42は、縮小領域302の外側の領域を拡大領域303として設定する。処理例1では、縮小領域302の両隣に、縮小領域302を挟むように拡大領域303が設けられる。処理例1では、個々の拡大領域303の幅は、縮小領域302の幅の1/2であるが、本実施形態はこれに限定されない。 Further, the correction area setting unit 42 sets an area outside the reduction area 302 as the enlargement area 303. In Processing Example 1, an enlarged region 303 is provided on both sides of the reduced region 302 so as to sandwich the reduced region 302 therebetween. In Processing Example 1, the width of each enlarged region 303 is ½ of the width of the reduced region 302, but the present embodiment is not limited to this.
 そして、処理例1では、画像補正部45は、縮小領域302を横方向に縮小すると共に、拡大領域303を横方向に拡大する。より具体的に言うと、図3の(b)の矢印で示す方向の座標をx座標とし、縮小領域302の中心線304から縮小領域302と拡大領域303との境界までの距離をd1、縮小領域302の中心線304から拡大領域303の縮小領域302とは反対側の末端までの幅をd2とすると、縮小領域302の中心線x=cからの距離がlである点P=(l+c,y)を、(1)l≦d1であるときには、点P’=(αl+c,y)に写し、(2)d1<l≦d2であるときには、点P’=(αd1+β(l-d1)+c,y)に写す補正である。ここで、αは、縮小領域に対する倍率(拡縮率)として補正強度設定部43にて設定された正の定数であり、α<1を満たす。一方、βは、拡大領域に対する倍率(拡縮率)として補正強度設定部43にて設定された正の定数であり、β=(d2-αd1)/(d2-d1)により定義され、β>1を満たす。 In the processing example 1, the image correction unit 45 reduces the reduction area 302 in the horizontal direction and enlarges the expansion area 303 in the horizontal direction. More specifically, the coordinate in the direction indicated by the arrow in FIG. 3B is the x coordinate, and the distance from the center line 304 of the reduction area 302 to the boundary between the reduction area 302 and the enlargement area 303 is d1. If the width from the center line 304 of the region 302 to the end of the enlarged region 303 opposite to the reduced region 302 is d2, the point P = (l + c, y) is copied to the point P ′ = (αl + c, y) when (1) l ≦ d1, and (2) the point P ′ = (αd1 + β (1-d1) + c when d1 <l ≦ d2. , Y). Here, α is a positive constant set by the correction intensity setting unit 43 as a magnification (enlargement / reduction ratio) with respect to the reduction region, and satisfies α <1. On the other hand, β is a positive constant set by the correction intensity setting unit 43 as a magnification (enlargement / reduction ratio) with respect to the enlargement region, and is defined by β = (d2−αd1) / (d2−d1), and β> 1 Meet.
 例えば、入力画像300におけるx座標と出力画像におけるx座標との対応関係は、図3の(c)に示すようなグラフになる。倍率αは1未満に設定されるので、縮小領域302における入力画像300のx座標に対する出力画像のx座標の傾きも1未満となる。そのため、図3の(c)に示すように、入力画像300のx座標に対して出力画像のx座標は小さくなる。また、拡大領域303に近づくにつれて、入力画像300のx座標に対して出力画像のx座標はより小さくなる。これは、縮小領域302においては縮小領域302の中心線304に向かって縮小し、かつ中心線304から離れるほど縮小の度合い(画素の移動量)が大きくなることを意味する。 For example, the correspondence between the x coordinate in the input image 300 and the x coordinate in the output image is a graph as shown in FIG. Since the magnification α is set to be less than 1, the inclination of the x coordinate of the output image with respect to the x coordinate of the input image 300 in the reduced area 302 is also less than 1. Therefore, as shown in FIG. 3C, the x coordinate of the output image is smaller than the x coordinate of the input image 300. Further, the x-coordinate of the output image becomes smaller than the x-coordinate of the input image 300 as it approaches the enlarged region 303. This means that the reduction area 302 is reduced toward the center line 304 of the reduction area 302 and the degree of reduction (the amount of movement of the pixel) increases as the distance from the center line 304 increases.
 一方、倍率βは1より大きく設定されるので、入力画像300のx座標に対する出力画像のx座標の傾きも1より大きくなる。これは、拡大領域303においては縮小領域302の中心線304に向かって拡大し、かつ中心線304から離れるほど拡大の度合い(画素の移動量)が小さくなることを意味する。 On the other hand, since the magnification β is set to be greater than 1, the inclination of the x coordinate of the output image with respect to the x coordinate of the input image 300 is also greater than 1. This means that the enlargement area 303 enlarges toward the center line 304 of the reduction area 302 and the degree of enlargement (the amount of movement of the pixel) decreases as the distance from the center line 304 increases.
 そして、拡大領域303の縮小領域302とは反対側の末端において、入力画像のx座標と出力画像のx座標とが一致する。このように、入力画像300における拡大領域303の外側の領域は、拡大も縮小もなされない。そのため、画像補正部45が、画質の劣化が生じないように出力画像を生成することができているといえる。 The x coordinate of the input image matches the x coordinate of the output image at the end of the enlargement region 303 opposite to the reduction region 302. Thus, the area outside the enlarged area 303 in the input image 300 is neither enlarged nor reduced. Therefore, it can be said that the image correction unit 45 can generate the output image so that the image quality does not deteriorate.
 なお、画像補正部45は、縮小領域302に関して、各点Pに対する補正量を、その点Pの中心線304からの距離rに応じて定めるものであればよく、上記のように、各点Pに対する補正量を、その点Pの補正中心cからの距離rに比例させるものでなくともよい。 Note that the image correction unit 45 only needs to determine the correction amount for each point P with respect to the reduced area 302 according to the distance r from the center line 304 of the point P. As described above, each point P Is not necessarily proportional to the distance r of the point P from the correction center c.
 <参考例1>
 次に、補正対象の被写体が画像端に位置する場合、補正対象の大きさが画像に対して大きい場合等に、十分な補正領域を入力画像内に設定することができないケースについて述べる。図4の(a)は、処理例2において用いられる入力画像400を示しており、入力画像400中に人物の顔401が写っている。参考例1では、処理例1とは異なり、人物の顔401が入力画像400の右側に寄った位置に写っている。
<Reference Example 1>
Next, a case where a sufficient correction area cannot be set in the input image when the subject to be corrected is located at the end of the image, or when the size of the correction target is larger than the image will be described. FIG. 4A shows an input image 400 used in Processing Example 2, and a human face 401 is shown in the input image 400. In the first reference example, unlike the first processing example, the human face 401 is shown at a position on the right side of the input image 400.
 図4の(b)は、参考例1において、補正領域設定部42が入力画像400に設定する補正領域(縮小領域および拡大領域)を示している。補正領域設定部42は、顔401を含む領域を縮小領域402として設定する。参考例1では、縮小領域402の幅は、人物の顔401の横幅と同じ幅である。 FIG. 4B shows correction areas (reduction area and enlargement area) set in the input image 400 by the correction area setting unit 42 in Reference Example 1. The correction area setting unit 42 sets an area including the face 401 as the reduced area 402. In Reference Example 1, the width of the reduced area 402 is the same as the horizontal width of the human face 401.
 また、補正領域設定部42は、縮小領域402の両隣に、縮小領域402を挟むように拡大領域403を設定する。参考例1では、縮小領域402の左側の拡大領域403の幅は、処理例1と同様に、縮小領域302の幅の1/2であるが、入力画像400の右端が縮小領域402の右端に近いため、縮小領域402の右側の拡大領域403の幅は、処理例1よりも小さくなっている。 The correction area setting unit 42 sets the enlarged area 403 on both sides of the reduced area 402 so as to sandwich the reduced area 402. In Reference Example 1, the width of the enlarged region 403 on the left side of the reduced region 402 is ½ of the width of the reduced region 302 as in Processing Example 1, but the right end of the input image 400 is set to the right end of the reduced region 402. Therefore, the width of the enlarged area 403 on the right side of the reduced area 402 is smaller than that of the processing example 1.
 参考例1において、処理例1と同様の条件で設定された縮小率および拡大率を用いて補正処理を行うと、入力画像400のx座標と出力画像のx座標との関係は、図4の(c)に示すようなグラフとなる。図4の(c)に示すように、右側の拡大領域403の最も外側(=画像端)で、入力画像400のx座標と出力画像のx座標とが一致せず、出力画像の画像端のx座標に対応する入力画像400のx座標が存在しない状態となっている。出力画像の画像端における点P’=(αd1+β(l-d1)+c,y)に対応する点P=(l+c,y)は入力画像400の画像外となる。したがって、出力画像の画像端は、入力画像400の画像外を参照することになり、参照先の画素値が不定となる。そのため、出力画像の画質が低下してしまう。また、前述した従来技術では、参考例1のように十分な補正領域を設定することができない場合には、補正自体を行わないため、目的の補正効果を得ることができない。 In the reference example 1, when the correction process is performed using the reduction ratio and the enlargement ratio set under the same conditions as in the processing example 1, the relationship between the x coordinate of the input image 400 and the x coordinate of the output image is as shown in FIG. The graph is as shown in (c). As shown in FIG. 4C, the x-coordinate of the input image 400 does not match the x-coordinate of the output image on the outermost side (= image end) of the right enlarged region 403, and the image end of the output image The x coordinate of the input image 400 corresponding to the x coordinate does not exist. The point P = (l + c, y) corresponding to the point P ′ = (αd1 + β (1-d1) + c, y) at the image end of the output image is outside the image of the input image 400. Therefore, the image end of the output image refers to the outside of the input image 400, and the pixel value of the reference destination is indefinite. As a result, the image quality of the output image is degraded. Further, in the above-described prior art, when a sufficient correction area cannot be set as in the first reference example, the correction itself is not performed, and thus the target correction effect cannot be obtained.
 <処理例2>
 これに対し、本実施形態に係る制御部40は、十分な補正領域を設定することができない場合であっても、適切に出力画像の端部側を切り取ることで、補正領域を予め設定した補正強度で補正しつつ、画像端の画質劣化のない好適な出力画像を生成することができる。
<Processing example 2>
On the other hand, even when the control unit 40 according to the present embodiment cannot set a sufficient correction area, the correction area is set in advance by appropriately cutting off the end side of the output image. It is possible to generate a suitable output image without image quality deterioration at the edge of the image while correcting with the intensity.
 図5の(a)は、処理例2において用いる入力画像500、および、補正領域設定部42が入力画像500に設定する補正領域(縮小領域502および拡大領域503)を示している。入力画像500では、人物の顔(対象領域)501が右端に位置しているため、補正領域設定部42は、入力画像500の右側の辺に接するように縮小領域502を設定する。補正領域設定部42はまた、縮小領域502の左側のみに拡大領域503を設定し、縮小領域502の右側には、拡大領域503を設定することができない。 (A) of FIG. 5 shows the input image 500 used in the processing example 2 and the correction regions (the reduction region 502 and the enlargement region 503) set in the input image 500 by the correction region setting unit 42. In the input image 500, since the human face (target area) 501 is located at the right end, the correction area setting unit 42 sets the reduced area 502 so as to contact the right side of the input image 500. The correction area setting unit 42 also sets the enlarged area 503 only on the left side of the reduced area 502, and cannot set the enlarged area 503 on the right side of the reduced area 502.
 図5の(b)は、入力画像500に対し、顔505の幅を小さくするように補正した出力画像504を示している。補正後の人物の顔505の幅(=縮小領域502の補正後の幅)は、補正前の人物の顔501の幅(=縮小領域502の補正前の幅)に対し、細く補正されている。このとき、切り取り設定部44は、出力画像504の右端に網掛で示す領域508を切り取り領域として設定する。領域508は、参照先が入力画像500の画像外となる領域であり、画素値が不定な領域である。すなわち、領域508内のP’=(αd1+β(l-d1)+c,y)に対応する点P=(l+c,y)は入力画像500の画像外となる。その結果、図5の(c)に示すように、画像補正部45は、出力画像504から画素値が不定となる領域508が切り取られた出力画像509を生成することができる。これにより、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 FIG. 5B shows an output image 504 that is corrected so as to reduce the width of the face 505 with respect to the input image 500. The width of the corrected human face 505 (= the corrected width of the reduced area 502) is corrected to be narrower than the width of the corrected human face 501 (= the reduced width of the reduced area 502). . At this time, the cut setting unit 44 sets an area 508 indicated by shading at the right end of the output image 504 as a cut area. An area 508 is an area where the reference destination is outside the image of the input image 500, and the pixel value is indefinite. That is, the point P = (l + c, y) corresponding to P ′ = (αd1 + β (1-d1) + c, y) in the region 508 is outside the image of the input image 500. As a result, as shown in FIG. 5C, the image correction unit 45 can generate an output image 509 in which a region 508 in which the pixel value is indefinite is cut out from the output image 504. As a result, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
 このように、制御部40は、十分な拡大領域を設定することができる場合には、処理例1のように、拡大領域の拡大によって、縮小領域の縮小の影響を補償して、画質の劣化が生じないように出力画像を生成することができる。すなわち、画像における拡大領域の外側の領域を、縮小も拡大もされない領域とすることができる。そして、制御部40は、十分な拡大領域を設定することができない場合には、処理例2のように、切り取り領域を設定し、当該切り取り領域を切り取ることによって、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 As described above, when the sufficient enlargement area can be set, the control unit 40 compensates for the reduction effect of the reduction area by enlarging the enlargement area as in Processing Example 1, and the image quality is deteriorated. An output image can be generated so as not to occur. That is, the area outside the enlarged area in the image can be an area that is neither reduced nor enlarged. If the control unit 40 cannot set a sufficiently large area, the control unit 40 sets a cut area and cuts the cut area as in Processing Example 2 so that an area with an indefinite pixel value is included. A suitable output image can be obtained.
 このような効果を得るために、切り取り設定部44は、縮小領域の縮小方向が、当該1つの辺側から縮小領域の内側に向かう場合、縮小領域から第1の辺までの距離に応じて、画像における第1の辺側を切り取るか否かを決定し、第1の辺側を切り取る場合には、第1の辺側に切り取り領域を設定する。すなわち、切り取り設定部44は、縮小領域(第1領域)と入力画像の1つの辺(第1の辺)との間隔が狭い場合(例えば、縮小領域と入力画像の1つの辺とが接している場合)には、画像における第1の辺側を切り取るように切り取り領域を設定し、そうでない場合には、切り取り領域を設定しない。当該切り取り領域は、例えば、補正後の画像の当該1つの辺側の端部であり得る。 In order to obtain such an effect, when the reduction direction of the reduction area is directed from the one side to the inside of the reduction area, the cut setting unit 44 determines whether the reduction direction of the reduction area depends on the distance from the reduction area to the first side. It is determined whether or not the first side of the image is to be cut out. When the first side is cut out, a cut area is set on the first side. In other words, the cropping setting unit 44 has a small space between the reduced area (first area) and one side (first side) of the input image (for example, the reduced area and one side of the input image are in contact with each other). If it is, the cut area is set so as to cut the first side of the image. Otherwise, the cut area is not set. The cutout region can be, for example, an end portion on the one side of the corrected image.
 なお、「画像の或る辺側を切り取る」とは、画像に含まれる或る辺から一定の幅の領域を、当該画像から除去することを意味する。また、「縮小領域(第1領域)の縮小方向」とは、縮小領域を縮小するときに、縮小領域内の画素が移動する方向を意味する。また、「縮小領域の縮小方向が、当該1つの辺側から縮小領域の内側に向かう」とは、縮小領域の前記1つの辺側の画素が、縮小領域の内側に移動することを意味する。このとき、縮小方向をベクトルで表し、或る方向のベクトルと、当該或る方向に直交する方向のベクトルとに分解すると、得られる当該或る方向のベクトルが正の向きとなる。 It should be noted that “cutting a certain side of an image” means removing an area having a certain width from a certain side included in the image from the image. The “reduction direction of the reduction area (first area)” means a direction in which pixels in the reduction area move when the reduction area is reduced. Further, “the reduction direction of the reduction area is directed from the one side to the inside of the reduction area” means that the pixel on the one side of the reduction area moves to the inside of the reduction area. At this time, if the reduction direction is represented by a vector and decomposed into a vector in a certain direction and a vector in a direction orthogonal to the certain direction, the obtained vector in the certain direction becomes a positive direction.
 縮小領域の縮小方向が、或る辺側から縮小領域の内側に向かう場合、縮小領域は或る辺から離れるように縮小するため、当該縮小の影響を補償するためには、縮小領域の当該或る辺側に十分な拡大領域を設定することが好ましい。しかし、縮小領域と当該或る辺との間隔が狭い場合(例えば、縮小領域と入力画像の当該或る辺とが接している場合)には、十分な拡大領域を設定することができない。このような場合に、参考例1で説明したように、画素値が不定な領域が縮小領域の当該或る辺側に生じることになる。そこで、切り取り設定部44が、画像の当該或る辺側を切り取るように切り取り領域を設定することにより、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 When the reduction direction of the reduction area is from a certain side toward the inside of the reduction area, the reduction area is reduced away from a certain side. Therefore, in order to compensate for the reduction effect, It is preferable to set a sufficient enlarged region on the side of the image. However, when the interval between the reduced area and the certain side is narrow (for example, when the reduced area is in contact with the certain side of the input image), it is not possible to set a sufficient enlarged area. In such a case, as described in Reference Example 1, a region with an indefinite pixel value is generated on the certain side of the reduced region. Therefore, the cropping setting unit 44 sets a cropping region so that the certain side of the image is cropped, thereby obtaining a suitable output image that does not include a region with an indefinite pixel value.
 一方、縮小領域と当該或る辺との間隔が広い場合には、十分な拡大領域を設定することができるため、切り取り設定部44は切り取り領域を設定せずに、画質の劣化が生じないように出力画像を生成することができる。 On the other hand, when the interval between the reduced area and the certain side is wide, a sufficient enlarged area can be set. Therefore, the cut setting unit 44 does not set the cut area so that the image quality does not deteriorate. An output image can be generated.
 換言すれば、切り取り設定部44は、縮小領域(第1領域)の縮小方向が、或る辺側から縮小領域の内側に向かう場合、縮小領域から当該或る辺までの距離に応じて、補正後の画像における当該或る辺側を切り取るか否かを決定するようになっており、これにより、より適切に画像を補正することができる。 In other words, when the reduction direction of the reduction area (first area) is directed from a certain side to the inside of the reduction area, the cut setting unit 44 performs correction according to the distance from the reduction area to the certain side. It is determined whether or not to cut out the certain side in the subsequent image, and thus the image can be corrected more appropriately.
 一実施形態において、切り取り設定部44は、縮小領域の縮小方向が、或る辺側から縮小領域の内側に向かう場合、縮小領域(第1領域)の中心から縮小領域における当該或る辺に最も近い部位までの距離をd1とし、縮小領域から或る辺までの距離(縮小領域における当該或る辺に最も近い部位から、当該或る辺までの距離)をdxとし、縮小領域の拡縮率をαとし、拡大領域の拡縮率をβとすると、以下の式(1)が満たされる場合には、画像の当該或る辺側に切り取り領域を設定し、式(1)が満たされない場合には、切り取り領域を設定しないようになっている。 In one embodiment, when the reduction direction of the reduction area is directed from a certain side to the inside of the reduction area, the cut setting unit 44 sets the most from the center of the reduction area (first area) to the certain side in the reduction area. The distance from the reduced region to a certain side (distance from the region closest to the certain side in the reduced region to the certain side) is set to dx, and the scaling ratio of the reduced region is defined as d1. When α is set and the enlargement / reduction ratio of the enlargement region is β, when the following expression (1) is satisfied, a cropping area is set on the certain side of the image, and when expression (1) is not satisfied The cutting area is not set.
 (1-α)d1>(β-1)dx・・・(1)
 さらに詳細には、一実施形態において、切り取り設定部44は、式(1)が満たされる場合、補正後の画像の前記或る辺側に(1-α)d1-(β-1)dxの幅の切り取り領域を設定する。これにより、制御部40は、補正後の画像から適切な領域を切り取ることができる。なお、切り取り設定部44が設定する切り取り領域の幅は、(1-α)d1-(β-1)dxより狭くてもよく、その場合であっても、画素値が不定な領域が低減した好適な出力画像を得ることができる。また、切り取り設定部44が設定する切り取り領域の幅は、(1-α)d1-(β-1)dxより広くてもよく、その場合であっても、画素値が不定な領域が含まれない好適な出力画像を得ることができる。但し、切り取り設定部44は、切り取り領域を、縮小後の縮小領域の外側になるように設けることが好ましい。
(1-α) d1> (β-1) dx (1)
More specifically, in one embodiment, the cropping setting unit 44 sets (1−α) d1− (β−1) dx to the certain side of the corrected image when Expression (1) is satisfied. Set the crop area for the width. Thereby, the control part 40 can cut out an appropriate area | region from the image after correction | amendment. Note that the width of the cut region set by the cut setting unit 44 may be smaller than (1-α) d1- (β-1) dx, and even in that case, the region where the pixel value is indefinite is reduced. A suitable output image can be obtained. Further, the width of the cut region set by the cut setting unit 44 may be wider than (1-α) d1- (β-1) dx, and even in this case, a region with an indefinite pixel value is included. A suitable output image can be obtained. However, it is preferable that the cut setting unit 44 is provided so that the cut area is outside the reduced area after reduction.
 なお、上述した処理例では、縮小領域は、入力画像を縦方向に横切る矩形領域として設定され、横方向に縮小する構成について説明したが、本実施形態はこれに限定されない。補正の方法としては、特に限定されず、例えば、(A)特定の直線に向かって縮小および拡大をする構成(上述した処理例1~2の構成)、(B)特定の点に向かって縮小および拡大をする構成(後述する処理例3~5の構成)等、様々な方法を用いることができる。(A)特定の直線に向かって縮小および拡大をする構成においても、当該直線は、縮小領域の中心線であってもよいし、その他の直線であってもよく、その方向も、画像の縦方向であってもよいし、横方向であってもよいし、斜め方向であってもよい。また、縮小領域および拡大領域の形状も矩形に限定されず、一部が曲線で構成されていてもよい。また、(B)特定の点に向かって縮小および拡大をする構成においても、当該点は、縮小領域の中心であってもよいし、その他の点であってもよく、拡大および縮小の態様も、等方的であってもよいし、非等方的であってもよい。また、縮小領域および拡大領域の形状も円形に限定されず、楕円形、多角形であってもよい。以下、(B)特定の点に向かって縮小および拡大をする構成の例として、円形の縮小領域の中心に向かって縮小および拡大をする構成について処理例を挙げて説明する。 In the above-described processing example, the reduced area is set as a rectangular area that crosses the input image in the vertical direction, and the configuration in which the reduced area is reduced in the horizontal direction has been described. However, the present embodiment is not limited to this. The correction method is not particularly limited. For example, (A) a configuration in which reduction and enlargement is performed toward a specific straight line (configuration in the above-described processing examples 1 and 2), and (B) a reduction is performed toward a specific point. Various methods such as a configuration for enlarging (configurations of processing examples 3 to 5 to be described later) can be used. (A) Also in the configuration in which reduction and enlargement are performed toward a specific straight line, the straight line may be the center line of the reduction region, or may be another straight line, and the direction of the straight line may also be the vertical direction of the image. It may be a direction, a horizontal direction, or an oblique direction. Further, the shape of the reduced area and the enlarged area is not limited to a rectangle, and a part thereof may be configured by a curve. (B) Also in the configuration in which reduction and enlargement are performed toward a specific point, the point may be the center of the reduction region, or may be another point. May be isotropic, or may be isotropic. Further, the shape of the reduced area and the enlarged area is not limited to a circle, and may be an ellipse or a polygon. Hereinafter, as an example of a configuration that reduces and enlarges toward a specific point (B), a configuration that reduces and enlarges toward the center of a circular reduction region will be described with a processing example.
 <処理例3>
 図6の(a)は、補正対象である対象領域550に対して、補正領域設定部42が設定する縮小領域551および拡大領域552の例を示す図である。図6の(a)に示すように、縮小領域551は、補正中心cを中心とする半径d1の円領域であり、拡大領域552は、補正中心cを中心とする半径d2の円領域のうち、縮小領域551の外側の領域である。なお、上述したように、縮小領域551および拡大領域552の形状は円形に限定されない。
<Processing example 3>
FIG. 6A is a diagram illustrating an example of a reduced area 551 and an enlarged area 552 set by the correction area setting unit 42 with respect to the target area 550 that is a correction target. As shown in FIG. 6A, the reduced area 551 is a circular area having a radius d1 centered on the correction center c, and the enlarged area 552 is a circular area having a radius d2 centered on the correction center c. This is an area outside the reduced area 551. As described above, the shapes of the reduced region 551 and the enlarged region 552 are not limited to a circle.
 画像補正部45が、入力画像に施す補正は、(1)縮小領域551を補正中心cに向かって縮小すると共に、(2)拡大領域552を補正中心cに向かって拡大する補正である。より具体的に言うと、補正中心cからの距離がrであり、補正中心c=(c1,c2)から見た方向がθである点P=(rcosθ,rsinθ)+(c1,c2)を、(1)r≦d1であるときには、補正中心cからの距離がr’=αrであり、補正中心cから見た方向がθである点P’=(r’cosθ,r’sinθ)+(c1,c2)に写し、(2)d1<r≦d2であるときには、補正中心cからの距離がr’=βr-(β‐α)d1であり、補正中心cから見た方向がθである点P’=(r’cosθ,r’sinθ)+(c1,c2)に写す補正である。ここで、αは、縮小領域551に対する拡縮率として補正強度設定部43にて設定された正の定数であり、α<1を満たす。一方、βは、拡大領域552に対する拡縮率として補正強度設定部43にて設定された正の定数であり、β=(d2-αd1)/(d2-d1)により定義され、β>1を満たす。 The correction performed by the image correction unit 45 on the input image is (1) a reduction of the reduction area 551 toward the correction center c and (2) a correction of expanding the enlargement area 552 toward the correction center c. More specifically, a point P = (r cos θ, r sin θ) + (c1, c2) where the distance from the correction center c is r and the direction viewed from the correction center c = (c1, c2) is θ. (1) When r ≦ d1, the point P ′ = (r′cos θ, r′sin θ) + where the distance from the correction center c is r ′ = αr and the direction viewed from the correction center c is θ. (C1, c2), (2) When d1 <r ≦ d2, the distance from the correction center c is r ′ = βr− (β−α) d1, and the direction viewed from the correction center c is θ Is a correction copied to a point P ′ = (r′cos θ, r′sin θ) + (c1, c2). Here, α is a positive constant set by the correction intensity setting unit 43 as the enlargement / reduction ratio for the reduction region 551 and satisfies α <1. On the other hand, β is a positive constant set by the correction intensity setting unit 43 as the enlargement / reduction ratio for the enlargement region 552, is defined by β = (d2-αd1) / (d2-d1), and satisfies β> 1. .
 例えば、α=0.9であり、β=1.1(d2=2d1)である場合、補正前の点Pの補正中心cからの距離rと、補正後の点Pの補正中心cからの距離r’との関係は、図6の(b)に示すグラフのようになる。拡大領域552は、外周を保ったまま内向きに拡大され、補正後の拡大領域552の内周は、補正後の縮小領域551の外周と一致する。また、拡大領域552の外側の領域は、補正前後で変化しない。 For example, when α = 0.9 and β = 1.1 (d2 = 2d1), the distance r from the correction center c of the point P before correction and the correction center c of the point P after correction are The relationship with the distance r ′ is as shown in the graph of FIG. The enlarged region 552 is enlarged inward while maintaining the outer periphery, and the inner periphery of the corrected enlarged region 552 coincides with the outer periphery of the corrected reduced region 551. Further, the area outside the enlarged area 552 does not change before and after correction.
 なお、画像補正部45は、縮小領域551に関して、各点Pに対する補正量を、その点Pの補正中心cからの距離rに応じて定めるものであればよく、上記のように、各点Pに対する補正量を、その点Pの補正中心cからの距離rに比例させるものでなくともよい。 Note that the image correction unit 45 only needs to determine the correction amount for each point P in accordance with the distance r from the correction center c of the point P with respect to the reduced region 551. As described above, each point P Is not necessarily proportional to the distance r of the point P from the correction center c.
 また、上述したように、画像補正部45は、縮小領域551に関して、各点Pに対する補正量を、さらに角度θに応じて変化させることにより、非等方的に縮小するものであってもよい。 Further, as described above, the image correction unit 45 may be anisotropically reduced by changing the correction amount for each point P in accordance with the angle θ with respect to the reduction region 551. .
 <処理例4>
 図7の(a)は、処理例4において用いる入力画像600を示しており、人物の顔(対象領域)601が右端に位置している。処理例4では、制御部40は、人物の顔601を顔の中心に向かって縮小する補正を行う。補正領域設定部42は、顔の中心を中心とした円を縮小領域602として設定する。補正領域設定部42は、縮小領域602の外周が人物の顔601の輪郭付近になるように縮小領域602を設定する。また、補正領域設定部42は、拡大領域604を、縮小領域602の外側に設定する。但し、人物の顔601が右端に位置しているため、補正領域設定部42は、顔602の右側には拡大領域604を設定できない。
<Processing example 4>
FIG. 7A shows an input image 600 used in Processing Example 4, and a human face (target region) 601 is located at the right end. In Processing Example 4, the control unit 40 performs correction to reduce the face 601 of the person toward the center of the face. The correction area setting unit 42 sets a circle centered on the center of the face as the reduced area 602. The correction area setting unit 42 sets the reduced area 602 so that the outer periphery of the reduced area 602 is near the contour of the human face 601. The correction area setting unit 42 sets the enlarged area 604 outside the reduced area 602. However, since the human face 601 is located at the right end, the correction area setting unit 42 cannot set the enlarged area 604 on the right side of the face 602.
 図7の(b)は、入力画像600に対し、人物の顔601を顔の中心に向かって顔を小さくするように補正した画像605を示している。補正後の人物の顔606は、補正前の人物の顔601に対し、小さく補正されている。また、画像605の右端に網掛で示す領域607は、参照先が入力画像600の画像外となる領域を示しており、画素値が不定な領域である。すなわち、領域607内のP’=(r’cosθ,r’sinθ)+(c1,c2)に対応する点P=(rcosθ,rsinθ)+(c1,c2)は入力画像600の画像外となる。なお、処理例2において画素値が不定である領域508は長方形であるに対し、処理例4における領域607は、一部が曲線で囲まれる領域となっている点で異なり、これは補正方法が異なることに起因している。 FIG. 7B shows an image 605 obtained by correcting the face 601 of the person so that the face becomes smaller toward the center of the face with respect to the input image 600. The corrected face 606 of the person is corrected to be smaller than the face 601 of the person before correction. A region 607 indicated by shading at the right end of the image 605 indicates a region where the reference destination is outside the image of the input image 600, and the pixel value is indefinite. That is, the point P = (rcos θ, rsin θ) + (c1, c2) corresponding to P ′ = (r ′ cos θ, r ′ sin θ) + (c1, c2) in the region 607 is outside the input image 600. . The region 508 in which the pixel value is indefinite in the processing example 2 is a rectangle, whereas the region 607 in the processing example 4 is different in that the region is partially surrounded by a curve. This is due to the difference.
 そこで、切り取り設定部44は、領域607ではなく、領域607を含む長方形の領域603を切り取り領域として設定する。これにより、図7の(c)に示すように、画素値が不定な領域が含まれず、かつ、切り出し後の画像が長方形である好適な補正画像を得ることができる。 Therefore, the cut setting unit 44 sets not the area 607 but the rectangular area 603 including the area 607 as the cut area. As a result, as shown in FIG. 7C, it is possible to obtain a suitable corrected image that does not include a region with an indefinite pixel value and has a rectangular cut image.
 <処理例5>
 次に、補正の対象領域が入力画像の隅に位置する場合について述べる。図8の(a)は、処理例5において用いる入力画像700を示しており、人物の顔(対象領域)701が右上端に位置している。処理例5においては、処理例4と同様、制御部40は、人物の顔701を顔の中心に向かって縮小する補正を行う。補正領域設定部42は、顔の中心を中心とした円を縮小領域702として設定する。補正領域設定部42は、縮小領域702の外周が人物の顔701の輪郭付近になるように縮小領域702を設定する。また、補正領域設定部42は、拡大領域704を、縮小領域702の外側に設定する。但し、人物の顔701が右上端に位置しているため、補正領域設定部42は、顔702の右側および顔702の上側には拡大領域704を設定できない。
<Processing example 5>
Next, the case where the correction target region is located at the corner of the input image will be described. FIG. 8A shows an input image 700 used in Processing Example 5, and a human face (target region) 701 is located at the upper right end. In the processing example 5, as in the processing example 4, the control unit 40 performs correction to reduce the human face 701 toward the center of the face. The correction area setting unit 42 sets a circle centered on the center of the face as the reduction area 702. The correction area setting unit 42 sets the reduced area 702 so that the outer periphery of the reduced area 702 is near the outline of the human face 701. The correction area setting unit 42 sets the enlarged area 704 outside the reduced area 702. However, since the human face 701 is located at the upper right end, the correction area setting unit 42 cannot set the enlarged area 704 on the right side of the face 702 and the upper side of the face 702.
 図8の(b)は、入力画像700に対し、人物の顔701を顔の中心に向かって顔を小さくするように補正した画像705を示している。補正後の人物の顔706は、補正前の人物の顔701に対し、小さく補正されている。また、画像705の右端および上端にそれぞれ網掛で示す2個所の領域707は、参照先が入力画像700の画像外となる領域を示しており、画素値が不定な領域である。すなわち、領域707内のP’=(r’cosθ,r’sinθ)+(c1,c2)に対応する点P=(rcosθ,rsinθ)+(c1,c2)は入力画像700の画像外となる。 8B shows an image 705 obtained by correcting the face 701 of the person so that the face becomes smaller toward the center of the face with respect to the input image 700. The corrected face 706 of the person is corrected to be smaller than the face 701 of the person before correction. In addition, two areas 707 indicated by shading at the right end and the upper end of the image 705 are areas where the reference destination is outside the image of the input image 700, and the pixel values are indefinite. That is, the point P = (rcos θ, rsin θ) + (c1, c2) corresponding to P ′ = (r ′ cos θ, r ′ sin θ) + (c1, c2) in the region 707 is outside the image of the input image 700. .
 そこで、切り取り設定部44は、画素値が不定となる2箇所の領域707を含む2つの長方形の領域703(図8の(b)および(d))を切り取り領域として設定する。これにより、図8の(c)に示すように、画素値が不定な領域が含まれず、かつ、切り出し後の画像が長方形である好適な補正画像を得ることができる。 Therefore, the cut setting unit 44 sets two rectangular areas 703 ((b) and (d) in FIG. 8) including two areas 707 where pixel values are indefinite as cut areas. As a result, as shown in FIG. 8C, it is possible to obtain a suitable corrected image that does not include a region with an indefinite pixel value and that has a rectangular cut-out image.
 以上のように、本実施形態では、補正領域が画像端に位置し、出力画像の一部の参照先が入力画像の画像外となる場合に、画像外を参照することで画素値が不定となる領域を除外するように出力画像を切り出すことで、画素値が不定な領域が含まれない好適な補正画像を得ることができる。 As described above, in the present embodiment, when the correction region is located at the edge of the image and the reference destination of a part of the output image is outside the image of the input image, the pixel value is indefinite by referring to the outside of the image. By cutting out the output image so as to exclude the region to be, a suitable corrected image that does not include a region with an indefinite pixel value can be obtained.
 特に、補正領域の位置に依らず予め設定された補正強度で補正を行うことができるため、補正による効果を補正領域の位置に依らず一定とすることができる。これにより、画像内の異なる位置、例えば、画像中央と画像右端に2人の人物の顔が存在し、それぞれの顔を縮小する補正を行う場合に、2人の人物に対して同様の効果が得られ好適である。 In particular, since correction can be performed with a preset correction intensity regardless of the position of the correction area, the effect of the correction can be made constant regardless of the position of the correction area. Thus, when there are two human faces at different positions in the image, for example, at the center of the image and at the right end of the image, and the correction for reducing each face is performed, the same effect is obtained for the two persons. Obtained and preferred.
 <付記事項>
 なお、本実施形態の他の一態様は、印刷機能を有さない画像撮像装置であってもよい。図9は、本実施形態の他の一態様に係る撮像装置2の構成を示す機能ブロック図である。撮像装置2は、画像印刷装置1と同様、撮像部10、操作部20、表示部30、制御部(画像処理装置)40、および記憶部60を備えているが、印刷部50を備えていない。また、制御部40のみを備える画像処理装置として構成してもよい。
<Additional notes>
Note that another aspect of the present embodiment may be an image pickup apparatus that does not have a printing function. FIG. 9 is a functional block diagram illustrating a configuration of the imaging device 2 according to another aspect of the present embodiment. Similar to the image printing apparatus 1, the imaging apparatus 2 includes the imaging unit 10, the operation unit 20, the display unit 30, the control unit (image processing apparatus) 40, and the storage unit 60, but does not include the printing unit 50. . Further, the image processing apparatus may include only the control unit 40.
 〔実施形態2〕
 本発明の他の実施形態(実施形態2)について、図10~図12に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。
[Embodiment 2]
Another embodiment (Embodiment 2) of the present invention will be described below with reference to FIGS. For convenience of explanation, members having the same functions as those described in the embodiment are given the same reference numerals, and descriptions thereof are omitted.
 実施形態2では、制御部40は、画素値が不定な領域を切り取った後の画像を更に切り取ることで、補正前後で画像のアスペクト比の変化のない好適な出力画像を生成する。以下、本実施形態における補正処理の詳細について処理例を挙げて説明する。 In the second embodiment, the control unit 40 further cuts out an image after cutting out an area where the pixel value is indefinite, thereby generating a suitable output image having no change in the aspect ratio of the image before and after correction. Hereinafter, the details of the correction processing in the present embodiment will be described with reference to processing examples.
 <処理例6>
 図10の(a)は、人物の顔(対象領域)801を含む入力画像に対して、顔801を縮小する補正が行われた後の画像800を示しており、網掛で示す領域802は、画素値が不定な領域を示している。切り取り設定部44は、領域802を含む長方形の領域805を切り取り領域として設定する。
<Processing example 6>
FIG. 10A shows an image 800 after correction for reducing the face 801 is performed on an input image including a human face (target area) 801. A shaded area 802 is shown in FIG. An area where the pixel value is indefinite is shown. The cut setting unit 44 sets a rectangular area 805 including the area 802 as a cut area.
 図10の(b)は、領域805が切り取られた画像803を示している。画像803は、画像800の右側が切り取られているため、画像800と画像のアスペクト比が異なる。例えば、画像800の画素数が横1600画素、縦1200画素であるとすると、画像800のアスペクト比は4:3となる。一方、画像803は画像800の右側が切り取られているため、アスペクト比が画像800とは異なっている。画像800から切り取った長方形領域の画素数が、横100画素、縦1200画素だとすると、画像803の画素数は横1500画素、縦1200画素となり、アスペクト比は5:4となり、画像800のアスペクト比とは異なっている。 FIG. 10B shows an image 803 in which the region 805 has been cut out. The image 803 has a different aspect ratio from the image 800 because the right side of the image 800 is cut off. For example, if the number of pixels of the image 800 is 1600 pixels wide and 1200 pixels long, the aspect ratio of the image 800 is 4: 3. On the other hand, the image 803 has an aspect ratio different from that of the image 800 because the right side of the image 800 is cut off. If the number of pixels in the rectangular area cut out from the image 800 is 100 pixels wide and 1200 pixels high, the image 803 has 1500 pixels horizontally and 1200 pixels vertically, the aspect ratio is 5: 4, and the aspect ratio of the image 800 is Is different.
 そこで、本実施形態では、切り取り設定部44は、画素値が不定となる領域802を含む長方形の領域805に加えて、出力画像のアスペクト比が入力画像のアスペクト比と同じになるよう、図10の(d)に示すように、画像800の上辺側に、切り取り領域806を設定する。これにより、画像補正部45によって切り取り領域が切り取られた画像804は、図10の(c)に示すように、画像803の上側が横1500画素、縦75画素分切り取られており、切り取り後の画素数が横1500画素、縦1125画素となり、アスペクト比が4:3となる。したがって、補正前の画像のアスペクト比と同じアスペクト比となる。 Therefore, in this embodiment, the cropping setting unit 44 adds the aspect ratio of the output image to the aspect ratio of the input image in addition to the rectangular area 805 including the area 802 where the pixel value is indefinite. As shown in (d) of FIG. 6, a cutout area 806 is set on the upper side of the image 800. As a result, the image 804 from which the cut area is cut by the image correction unit 45 is cut off by 1500 pixels in the horizontal direction and 75 pixels in the vertical direction as shown in FIG. The number of pixels is 1500 horizontal and 1125 vertical, and the aspect ratio is 4: 3. Therefore, the aspect ratio is the same as the aspect ratio of the image before correction.
 アスペクト比が変化しないことにより、以下の効果がある。液晶ディスプレイなどの表示装置に画像を表示する場合、表示画面のアスペクト比が一致していれば、画像全体を表示することができるという効果がある。一方、表示画面のアスペクト比と表示する画像のアスペクト比が不一致の場合は、表示画面の一部に画像が表示されない領域(余白領域)が存在することになる。また、画像の補正(切り出し)により、各画像のアスペクト比がそれぞれ異なる場合には、複数の画像を表示画面に順に表示すると、画像が切り替わる度に余白領域が変化する問題があるが、表示する複数の画像のアスペクト比が一致していれば、表示する画像を切り替えた際に余白領域が変化せず好適である。また、表示画面に表示する場合の他に、印刷装置で画像を紙に印刷したり、写真として印刷したりする場合にも、印刷用紙のアスペクト比と画像のアスペクト比が一致していれば、余白領域なく印刷することができ好適である。 The following effects can be obtained because the aspect ratio does not change. When an image is displayed on a display device such as a liquid crystal display, the entire image can be displayed if the aspect ratios of the display screens match. On the other hand, when the aspect ratio of the display screen does not match the aspect ratio of the image to be displayed, there is a region (margin region) where no image is displayed on a part of the display screen. Also, if the aspect ratio of each image is different due to image correction (cutout), displaying a plurality of images in sequence on the display screen has a problem that the blank area changes every time the image is switched. If the aspect ratios of a plurality of images match, it is preferable that the blank area does not change when the image to be displayed is switched. In addition to displaying on the display screen, when printing an image on paper with a printing device or printing as a photo, if the aspect ratio of the printing paper matches the aspect ratio of the image, It is preferable that printing can be performed without a blank area.
 なお、制御部40は、必ずしも図10の(a)~(c)の順に補正を進める必要はなく、順番を入れ替えてもよいし、同時並行して行ってもよい。 Note that the control unit 40 does not necessarily have to proceed with the correction in the order of (a) to (c) in FIG. 10, and the order may be changed or may be performed in parallel.
 以上のように、切り取り設定部44は、入力画像の或る辺側に切り取り領域を設定した場合、補正後の出力画像のアスペクト比が、補正前の入力画像のアスペクト比と同じになるように、入力画像における当該或る辺(第1の辺)と対向しない辺(第2の辺)側を切り取ることで、画像のアスペクト比を維持した出力画像を得ることができる。 As described above, when the cropping setting unit 44 sets a cropping region on a certain side of the input image, the aspect ratio of the output image after correction is the same as the aspect ratio of the input image before correction. By cutting out the side (second side) that does not face the certain side (first side) in the input image, an output image maintaining the aspect ratio of the image can be obtained.
 一実施形態において、切り取り設定部44は、補正前の入力画像の横の画素数をnx、補正前の入力画像の縦の画素数をny、切り取り領域の幅をwとすると、(i)対象領域が入力画像の右辺または左辺に近く、右辺側または左辺側に切り取り領域を設定した場合には、さらに、上辺側または下辺側にw(ny/nx)の幅の切り取り領域を設定すればよく、(ii)対象領域が入力画像の上辺または下辺に近く、上辺側または下辺側に切り取り領域を設定した場合には、さらに、右辺側または左辺側にw(nx/ny)の幅の切り取り領域を設定すればよい。 In one embodiment, the cropping setting unit 44 assumes that the number of horizontal pixels of the input image before correction is nx, the number of vertical pixels of the input image before correction is ny, and the width of the cropping area is w. If the area is close to the right or left side of the input image and the cut area is set on the right or left side, a cut area having a width of w (ny / nx) may be set on the upper or lower side. , (Ii) When the target area is close to the upper side or the lower side of the input image and the cut area is set on the upper side or the lower side, a cut area having a width of w (nx / ny) is further set on the right side or the left side. Should be set.
 <処理例7>
 次に、アスペクト比を調整するために、画像の切り取る位置を設定する方法について述べる。図11の(a)は、人物の顔(対象領域)901および他の人物の顔903を含む入力画像に対して、顔901を縮小する補正が行われた後の画像900を示しており、網掛で示す領域902は、画素値が不定な領域を示している。切り取り設定部44は、領域902を含む長方形の領域905を切り取り領域として設定する。
<Processing example 7>
Next, a method for setting a position to cut out an image in order to adjust the aspect ratio will be described. FIG. 11A shows an image 900 after correction for reducing the face 901 is performed on an input image including the face (target region) 901 of a person and the face 903 of another person. A shaded area 902 represents an area where the pixel value is indefinite. The cut setting unit 44 sets a rectangular area 905 including the area 902 as a cut area.
 ここで、本実施形態では、切り取り設定部44は、画素値が不定となる領域902を含む長方形の領域905に加えて、出力画像のアスペクト比が入力画像のアスペクト比と同じになるよう、画像900において領域902が設定された右辺側とは対向しない上辺側または下辺側に、切り取り領域をさらに設定する。 Here, in the present embodiment, the cropping setting unit 44 adds the aspect ratio of the output image to the aspect ratio of the input image in addition to the rectangular area 905 including the area 902 where the pixel value is indefinite. In 900, a cutting area is further set on the upper side or the lower side that is not opposite to the right side where the area 902 is set.
 このとき、処理例7では、切り取り設定部44は、画像900の上辺側には人物の顔903が写っているため、図11の(c)に示すように、画像900の下辺側の領域906を切り取り領域として設定する。これにより、画像補正部45によって切り取り領域が切り取られた画像904は、図11の(b)に示すように、人物の顔901と人物の顔903とがともに写っており、補正前の入力画像のアスペクト比と同じアスペクト比となるため好適である。 At this time, in the processing example 7, since the human face 903 is shown on the upper side of the image 900, the crop setting unit 44 has a region 906 on the lower side of the image 900 as shown in FIG. Is set as the cropping area. As a result, as shown in FIG. 11B, the image 904 from which the cut region is cut by the image correction unit 45 includes both the human face 901 and the human face 903, and the input image before correction. This is preferable because it has the same aspect ratio as the above aspect ratio.
 なお、切り取り設定部44が、画像のアスペクト比を補正前後で変化させないための切り取り領域の候補領域から、切り取り領域を選択する基準は、人物の顔が含まれているか否かという基準に限定されない。例えば、切り取り設定部44は、アスペクト比を補正前後で変化させないための切り取り領域の候補領域に人物の顔が含まれていない場合に、人物以外の注目被写体が含まれるか否かを判定し、注目被写体が含まれない候補領域を切り取り領域として設定してもよい。また、切り取り設定部44は、いずれの候補領域にも人物の顔も注目被写体も含まれない場合に、各候補領域の特徴量を算出し、特徴量の少ない候補領域を除外するように切り出してもよい。切り取り設定部44は、例えば、エッジ検出や彩度等の色情報等を利用して特徴量を算出することができる。 Note that the criterion for selecting the cropping region from the cropping region candidate regions so that the cropping setting unit 44 does not change the aspect ratio of the image before and after correction is not limited to the criterion of whether or not a human face is included. . For example, the cut setting unit 44 determines whether or not a subject of interest other than a person is included in a candidate area of a cut area for which the aspect ratio is not changed before and after correction, A candidate area that does not include the subject of interest may be set as a cut-out area. In addition, the cutout setting unit 44 calculates the feature amount of each candidate region and cuts out the candidate region with a small feature amount so as to exclude the candidate face when neither of the candidate regions includes a human face or a target subject. Also good. The cut setting unit 44 can calculate the feature amount using color information such as edge detection and saturation, for example.
 すなわち、切り取り設定部44は、画像のアスペクト比を補正前後で変化させないために、上辺または下辺(あるいは右辺または左辺)側に、特定の幅(第1の幅)の切り取り領域を設定する場合、上辺または下辺(あるいは右辺または左辺)のうち当該辺から特定の幅内に注目画素が含まれない辺側に切り取り領域を設定する。これにより、切り取り設定部44は、出力画像において、重要な部位が失われることを避けることができる。 That is, the cropping setting unit 44 sets a cropping region having a specific width (first width) on the upper side or the lower side (or the right side or the left side) in order not to change the aspect ratio of the image before and after correction. A clipping region is set on the side of the upper side or the lower side (or the right side or the left side) where the target pixel is not included within a specific width from the side. Thereby, the cropping setting unit 44 can avoid losing important parts in the output image.
 ここで、注目画素とは、人物、注目被写体を検出するための特徴点、または、特徴量を検出するための画素を意味する。 Here, the target pixel means a feature point for detecting a person, a target subject, or a pixel for detecting a feature amount.
 <処理例8>
 次に、アスペクト比を調整するために、画像の切り取る位置を設定する方法として、人物の顔の位置に基づく方法を用いてもよい。図12の(a)は、人物の顔(対象領域)1001を含む入力画像に対して、顔1001を縮小する補正が行われた後の画像1000を示しており、網掛で示す領域1002は、画素値が不定な領域を示している。切り取り設定部44は、領域1002を含む長方形の領域1005を切り取り領域として設定する。
<Processing Example 8>
Next, in order to adjust the aspect ratio, a method based on the position of a person's face may be used as a method for setting a position to cut out an image. FIG. 12A shows an image 1000 after correction for reducing the face 1001 is performed on an input image including a human face (target area) 1001, and an area 1002 indicated by shading is shown in FIG. An area where the pixel value is indefinite is shown. The cut setting unit 44 sets a rectangular area 1005 including the area 1002 as a cut area.
 ここで、本実施形態では、切り取り設定部44は、画素値が不定となる領域1002を含む長方形の領域1005に加えて、出力画像のアスペクト比が入力画像のアスペクト比と同じになるよう、画像1000において領域1002が設定された右辺側とは対向しない上辺側または下辺側に、切り取り領域をさらに設定する。 Here, in the present embodiment, the cropping setting unit 44 adds the aspect ratio of the output image to the aspect ratio of the input image in addition to the rectangular region 1005 including the region 1002 where the pixel value is indefinite. In 1000, a cutting area is further set on the upper side or the lower side that is not opposed to the right side where the area 1002 is set.
 このとき、処理例8では、切り取り設定部44は、図12の(d)に示すように、人物1001を含む縮小領域から遠い方の辺である画像1000の上辺側の領域1006を切り取り領域として設定する。これにより、画像補正部45によって切り取り領域が切り取られた画像1003は、図12の(b)に示すように、人物の顔1001が画像1003の中央に近い位置に写っており、注目の対象となるべき対象領域をより画像の中央に近づけることができるとともに、補正前の入力画像のアスペクト比と同じアスペクト比となるため好適である。 At this time, in the processing example 8, the crop setting unit 44 uses the region 1006 on the upper side of the image 1000, which is the side farther from the reduced region including the person 1001, as the crop region, as illustrated in FIG. Set. As a result, the image 1003 from which the crop region has been cut out by the image correction unit 45 is shown in FIG. 12B, in which the person's face 1001 is shown at a position close to the center of the image 1003. The target area to be formed can be made closer to the center of the image, and the same aspect ratio as the aspect ratio of the input image before correction is preferable.
 なお、切り取り設定部44が、図12の(e)に示すように、人物1001を含む縮小領域から近い方の辺である画像1000の下辺側の領域1007を切り取り領域として設定すると、画像補正部45によって切り取り領域が切り取られた画像1004は、図12の(c)に示すように、人物の顔1001が画像1003の中央から離れた位置に写ってしまう。 As shown in FIG. 12E, when the crop setting unit 44 sets a region 1007 on the lower side of the image 1000, which is the side closer to the reduced region including the person 1001, as the crop region, the image correction unit. In the image 1004 in which the cut region is cut out by 45, the face 1001 of the person appears in a position away from the center of the image 1003 as shown in FIG.
 〔実施形態3〕
 本発明の他の実施形態(実施形態3)について、図13に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。
[Embodiment 3]
Another embodiment (third embodiment) of the present invention will be described below with reference to FIG. For convenience of explanation, members having the same functions as those described in the embodiment are given the same reference numerals, and descriptions thereof are omitted.
 実施形態3では、制御部40は、アスペクト比を調整した画像に対し、画素数変換を行うことで、更に好適な出力画像を生成する。以下、本実施形態における補正処理の詳細について処理例を挙げて説明する。 In the third embodiment, the control unit 40 generates a more suitable output image by performing pixel number conversion on an image whose aspect ratio is adjusted. Hereinafter, the details of the correction processing in the present embodiment will be described with reference to processing examples.
 <処理例9>
 図13の(a)は、処理例9において用いる画像1100を示しており、人物の顔(対象領域)1101が写っている。
<Processing example 9>
FIG. 13A shows an image 1100 used in the processing example 9 in which a human face (target region) 1101 is shown.
 図13の(b)は、処理例6~8と同様に、人物の顔1101を小さくする画像補正を行い、画素値が不定となる領域1104である切り取り領域、および、アスペクト比を調整するため切り取り領域1105を切り取った画像1102を示している。図13の(b)に示す画像1102と、図13の(d)に示す画像1100とでは、アスペクト比は同じであるが、切り取り領域を切り取った分画像の画素数が異なる。その場合、撮像装置で画像を撮影する場合に、予め設定した画像の画素数より画素数の少ない画像を出力されることになる。 In FIG. 13B, as in the processing examples 6 to 8, image correction is performed to reduce the human face 1101, and the cropping area 1104 where the pixel value is indefinite and the aspect ratio are adjusted. An image 1102 obtained by cutting the cut area 1105 is shown. The image 1102 shown in FIG. 13B and the image 1100 shown in FIG. 13D have the same aspect ratio, but differ in the number of pixels of the image corresponding to the cut region. In that case, when an image is captured by the imaging apparatus, an image having a smaller number of pixels than the preset number of pixels of the image is output.
 そこで、本実施形態では、画像補正部45は、画素値が不定となる領域1104である切り取り領域、および、アスペクト比を調整するため切り取り領域1105を切り取ることによって、画像の縦の画素数および横の画素数が、入力画像の縦の画素数および横の画素数と異なる場合に、入力画像と出力画像とで、縦の画素数および横の画素数が一致するよう、切り取り領域を切り取った画像1102を拡大する。 Therefore, in the present embodiment, the image correction unit 45 cuts out the cutout area 1104 in which the pixel value is indefinite and the cutout area 1105 to adjust the aspect ratio, whereby the number of vertical pixels and the horizontal length of the image are adjusted. When the number of pixels is different from the number of vertical pixels and the number of horizontal pixels of the input image, an image in which the cut region is cut out so that the number of vertical pixels and the number of horizontal pixels match between the input image and the output image 1102 is enlarged.
 画像の拡大処理は、ニアレストネイバー法や、バイリニア法、バイキュービック法などの既知の補間方法により実行可能である。図13の(c)は、画像補正部45により画像1102から拡大された画像1103を示している。図13の(c)に示す画像1103と、図13の(e)に示す画像1100とは、画像の大きさ(画素数)が一致し、人物の顔1101が小さく補正されている。これにより、画像補正部45は、入力画像と画素数が同じで、かつ、補正対象被写体が好適に補正された画像を生成することができる。 The image enlargement process can be executed by a known interpolation method such as the nearest neighbor method, the bilinear method, or the bicubic method. FIG. 13C shows an image 1103 enlarged from the image 1102 by the image correction unit 45. The image 1103 shown in FIG. 13C and the image 1100 shown in FIG. 13E have the same image size (number of pixels), and the human face 1101 is corrected to be small. Thereby, the image correction unit 45 can generate an image having the same number of pixels as the input image and in which the correction target subject is preferably corrected.
 なお、制御部40は、切り取りによるアスペクト比の調整と画素数変換とを、必ずしも図13の(a)~(c)の順に補正を進める必要はなく、順番を入れ替えてもよいし、同時並行して行ってもよい。 Note that the control unit 40 does not necessarily have to adjust the aspect ratio adjustment and the pixel number conversion by cropping in the order of (a) to (c) of FIG. You may do it.
 〔実施形態4〕
 本発明の他の実施形態(実施形態4)について、図14に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。
[Embodiment 4]
The following will describe another embodiment (Embodiment 4) of the present invention with reference to FIG. For convenience of explanation, members having the same functions as those described in the embodiment are given the same reference numerals, and descriptions thereof are omitted.
 制御部40は、画素値が不定な領域を切り取った後の画像において、一部の領域を拡大することにより、補正前後で画像のアスペクト比の変化のない好適な出力画像を生成する。以下、本実施形態における補正処理の詳細について処理例を挙げて説明する。 The control unit 40 generates a suitable output image having no change in the aspect ratio of the image before and after correction by enlarging a part of the region after cutting out the region where the pixel value is indefinite. Hereinafter, the details of the correction processing in the present embodiment will be described with reference to processing examples.
 <処理例10>
 図14の(a)は、処理例10において用いられる、人物の顔(対象領域)1501を含む画像1500を示す図である。補正領域設定部42は、画像1500に対し、縮小領域1511および拡大領域1512を設定する。
<Process Example 10>
FIG. 14A is a diagram showing an image 1500 including a human face (target region) 1501 used in Processing Example 10. The correction area setting unit 42 sets a reduction area 1511 and an enlargement area 1512 for the image 1500.
 図14の(b)は、顔1501を縮小する補正が行われ、さらに、画素値が不定な領域1505が切り取られた画像1502を示している。画像1502は、画像1500の右側が切り取られているため、画像1500と画像のアスペクト比が異なる。 FIG. 14B shows an image 1502 in which a correction for reducing the face 1501 is performed and a region 1505 with an indefinite pixel value is cut out. The image 1502 has a different aspect ratio from the image 1500 because the right side of the image 1500 is cut off.
 そこで、本実施形態では、補正領域設定部42は、出力画像のアスペクト比が入力画像のアスペクト比と同じになるよう、図14の(b)に示すように、縮小領域1511に対して、画像が切り取られた辺(右辺、第1の辺)と対向する辺(左辺、第3の辺)側に、第2の拡大領域(第3領域)1506を設定する。これにより、画像補正部45によって、第2の拡大領域1506の幅が、幅1507から幅1510に拡大された画像1508は、図14の(c)に示すように、領域1505が切り取られたことによって減少した横方向の画素数を補い、補正前の画像のアスペクト比と同じアスペクト比となる。 Therefore, in the present embodiment, the correction area setting unit 42 applies an image to the reduced area 1511 as shown in FIG. 14B so that the aspect ratio of the output image is the same as the aspect ratio of the input image. A second enlarged region (third region) 1506 is set on the side (left side, third side) opposite to the side (right side, first side) from which is cut off. As a result, the image 1508 in which the width of the second enlarged region 1506 is enlarged from the width 1507 to the width 1510 by the image correction unit 45 is cut out as shown in FIG. To compensate for the decreased number of pixels in the horizontal direction, and the aspect ratio becomes the same as the aspect ratio of the image before correction.
 これにより、実施形態2とは異なり、不要な切り取りを行うことなく、アスペクト比を調整することができる。なお、第2の拡大領域1506は広い方が好ましい。第2の拡大領域1506が広ければ、第2の拡大領域1506の拡縮率βが1に近い値となり、出力画像の品質が落ちることを抑制することができる。 Thus, unlike the second embodiment, the aspect ratio can be adjusted without performing unnecessary clipping. Note that the second enlarged region 1506 is preferably wide. If the second enlargement area 1506 is wide, the enlargement / reduction ratio β of the second enlargement area 1506 becomes a value close to 1, and the output image quality can be prevented from deteriorating.
 また、補正領域設定部42は、縮小領域に対して、画像が切り取られた辺と対向する辺側に位置する領域のうち、注目画素が含まれない領域を第2の拡大領域1506とすることが好ましい。これにより、第2の拡大領域1506に、人物の顔等が含まれ、当該顔等が変形することを避けることができる。 In addition, the correction area setting unit 42 sets, as a second enlarged area 1506, an area that does not include the target pixel among areas located on the side opposite to the side where the image is cut out with respect to the reduced area. Is preferred. As a result, it is possible to avoid a human face or the like being included in the second enlarged region 1506 and deforming the face or the like.
 〔実施形態5〕
 本発明の他の実施形態(実施形態5)について、図15~18に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。
[Embodiment 5]
The following will describe another embodiment (Embodiment 5) of the present invention with reference to FIGS. For convenience of explanation, members having the same functions as those described in the embodiment are given the same reference numerals, and descriptions thereof are omitted.
 本実施形態に係る画像処理装置は、縮小領域が入力画像の或る辺(第1の辺)に近づき、縮小領域の第1の辺側に十分な幅の拡大領域を設定することができない場合、縮小領域の縮小方向を変更することにより、画素値が不定な領域が発生することを避ける。これは、実施形態1~4に係る画像処理装置が第1の辺側に切り取り領域を設定するのとは異なる。 In the image processing apparatus according to the present embodiment, the reduced area approaches a certain side (first side) of the input image, and an enlarged area having a sufficient width cannot be set on the first side of the reduced area. By changing the reduction direction of the reduction area, it is possible to avoid the generation of an area with an indefinite pixel value. This is different from the case where the image processing apparatuses according to the first to fourth embodiments set the cut region on the first side.
 図15は、本実施形態に係る制御部の一構成例を示す機能ブロック図である。本実施形態に係る画像印刷装置は、制御部40に替えて、制御部(画像処理装置)140を備えている他は、実施形態1に係る画像印刷装置1と同様の構成を備える。図15に示すように、制御部140は、被写体検出部141、補正領域設定部142、補正方向設定部143および画像補正部144を備えている。補正領域設定部142、補正方向設定部143および画像補正部144を合わせて補正処理部とも称する。 FIG. 15 is a functional block diagram showing a configuration example of the control unit according to the present embodiment. The image printing apparatus according to the present embodiment has the same configuration as that of the image printing apparatus 1 according to the first embodiment, except that the control unit (image processing apparatus) 140 is provided instead of the control unit 40. As shown in FIG. 15, the control unit 140 includes a subject detection unit 141, a correction area setting unit 142, a correction direction setting unit 143, and an image correction unit 144. The correction area setting unit 142, the correction direction setting unit 143, and the image correction unit 144 are collectively referred to as a correction processing unit.
 被写体検出部141は、被写体検出部41と同様の機能を有する。補正領域設定部142は、補正領域設定部42と同様の機能を有する。補正方向設定部143は、補正強度設定部43と同様の機能を有し、さらに、後述するように、縮小領域の縮小方向および拡大領域を変更する機能、切り取り領域を設定する機能を有する。画像補正部144は、画像補正部45と同等の機能を有する。 The subject detection unit 141 has the same function as the subject detection unit 41. The correction area setting unit 142 has the same function as the correction area setting unit 42. The correction direction setting unit 143 has the same function as that of the correction intensity setting unit 43, and further has a function of changing the reduction direction and the enlargement area of the reduction area and a function of setting the cut area, as will be described later. The image correction unit 144 has a function equivalent to that of the image correction unit 45.
 次に、図16を用いて、本実施形態の制御部140における画像処理の流れを説明する。図16は、制御部140における画像処理の流れの一例を示すフローチャートである。 Next, the flow of image processing in the control unit 140 of this embodiment will be described with reference to FIG. FIG. 16 is a flowchart illustrating an example of the flow of image processing in the control unit 140.
 被写体検出部141は、撮像部10によって撮像された画像を入力画像として取得すると、当該入力画像から、補正対象となる被写体を検出する(S201:対象領域検出工程)。補正領域設定部142は、被写体検出部41が検出した被写体が示す情報に基づいて、縮小領域および拡大領域を設定する(S202:補正処理工程)。また、補正方向設定部143は、補正領域設定部42が設定した縮小領域および拡大領域を示す情報に基づいて、補正強度(縮小領域における縮小の倍率α、および、拡大領域における拡大の倍率β)を設定すると共に、必要に応じて、縮小領域の縮小方向の変更、拡大領域の変更、および、切り取り領域の設定のうちの幾つかを行う(S1603:補正処理工程)。そして、画像補正部144は、縮小領域を縮小し、拡大領域を拡大し、必要に応じて切り取り領域を切り取ることにより、出力画像を生成する(S205:補正処理工程)。そして、制御部40は、生成した出力画像を、印刷部50または表示部30に出力する。 When the subject detection unit 141 acquires the image captured by the imaging unit 10 as an input image, the subject detection unit 141 detects a subject to be corrected from the input image (S201: target region detection step). The correction area setting unit 142 sets a reduction area and an enlargement area based on information indicated by the subject detected by the subject detection unit 41 (S202: correction processing step). Further, the correction direction setting unit 143 corrects the correction strength (the reduction magnification α in the reduction region and the enlargement magnification β in the enlargement region) based on the information indicating the reduction region and the enlargement region set by the correction region setting unit 42. Are set, and if necessary, some of the change of the reduction direction of the reduction region, the change of the enlargement region, and the setting of the cutout region are performed (S1603: correction processing step). Then, the image correction unit 144 generates an output image by reducing the reduction area, expanding the enlargement area, and cutting the cut area as necessary (S205: correction processing step). Then, the control unit 40 outputs the generated output image to the printing unit 50 or the display unit 30.
 続いて、制御部140による補正処理の詳細について処理例を挙げて説明する。 Subsequently, details of the correction processing by the control unit 140 will be described with reference to processing examples.
 <処理例11>
 図17の(a)は、処理例11において用いる入力画像1700、および、補正領域設定部142が入力画像1700に設定する補正領域(縮小領域1702および拡大領域1703)を示している。入力画像1700では、人物の顔(対象領域)1701が右端に位置しているため、補正領域設定部142は、入力画像1700の右辺に接するように縮小領域1702を設定する。そのため、補正領域設定部142は、縮小領域1702の左側のみに拡大領域1703を設定することができ、縮小領域1702の右側には、十分な幅の拡大領域を設定することができない。
<Process Example 11>
FIG. 17A shows the input image 1700 used in the processing example 11 and the correction areas (the reduction area 1702 and the enlargement area 1703) set in the input image 1700 by the correction area setting unit 142. In the input image 1700, since the human face (target region) 1701 is located at the right end, the correction region setting unit 142 sets the reduced region 1702 so as to be in contact with the right side of the input image 1700. Therefore, the correction area setting unit 142 can set the enlarged area 1703 only on the left side of the reduced area 1702, and cannot set an enlarged area with a sufficient width on the right side of the reduced area 1702.
 このとき、補正方向設定部143は、縮小領域1702の縮小方向を、入力画像1700の右辺から縮小領域1702の内側に向かわないように変更する。例えば、補正方向設定部143は、縮小領域1702の縮小方向を、縮小領域1702が近接する辺(入力画像1700の右辺)側に向かうように変更する。また、補正方向設定部143は、縮小領域1702に対して、縮小領域1702が近接する辺(入力画像1700の右辺)側には、拡大領域が設定されないように、拡大領域を再設定する。 At this time, the correction direction setting unit 143 changes the reduction direction of the reduction area 1702 so as not to go from the right side of the input image 1700 to the inside of the reduction area 1702. For example, the correction direction setting unit 143 changes the reduction direction of the reduction area 1702 so as to be directed toward the side (the right side of the input image 1700) to which the reduction area 1702 is close. Further, the correction direction setting unit 143 resets the enlargement area so that the enlargement area is not set on the side close to the reduction area 1702 (the right side of the input image 1700).
 図17の(b)は、入力画像1700に対し、補正方向設定部143が変更した縮小方向で、顔1705の幅を小さくするように補正した出力画像1704を示している。補正後の人物の顔1705の幅(=補正後の縮小領域1706の幅)は、補正前の人物の顔1701の幅(=補正前の縮小領域1702の幅)に対し、細く補正されている。 FIG. 17B shows an output image 1704 obtained by correcting the input image 1700 so that the width of the face 1705 is reduced in the reduction direction changed by the correction direction setting unit 143. The width of the face 1705 after correction (= the width of the reduced area 1706 after correction) is corrected to be narrower than the width of the face 1701 before correction (= the width of the reduction area 1702 before correction). .
 ここで、縮小領域1702の縮小方向が右方向になるため、縮小領域1702の右端x=eからの距離がlである点P=(e-l,y)を、点P’=(e-αl,y)に写す補正がなされ、補正後の縮小領域1706の右端もx=eとなる。そのため、縮小領域1702の右側には、拡大領域を設定する必要がなくなる。そのため、参考例1のように、縮小領域と、入力画像のある一辺(第1の辺)とが近づき、縮小領域の第1の辺側に十分な拡大領域を設定することができない場合であっても、縮小領域の第1の辺側に画素値が不定な領域が発生することを避けることができる。 Here, since the reduction direction of the reduction region 1702 is rightward, a point P = (e−1, y) whose distance from the right end x = e of the reduction region 1702 is l is a point P ′ = (e− (αl, y) is corrected, and the right end of the reduced area 1706 after correction is also x = e. Therefore, it is not necessary to set an enlarged area on the right side of the reduced area 1702. Therefore, as in Reference Example 1, the reduced area and a certain side (first side) of the input image approach each other, and a sufficient enlarged area cannot be set on the first side of the reduced area. However, it is possible to avoid the occurrence of a region with an indefinite pixel value on the first side of the reduced region.
 なお、補正前の縮小領域1702の左端をx=e-wとすると、補正後の縮小領域1706の左端はx=e-αwとなり、x=e-wよりも右側にずれるため、画像補正部144は、拡大領域1707およびその左側の領域を右側にずらす。その結果、補正後の出力画像1704の左端の網掛けで示す領域1704が、画素値が不定な領域となる。 Note that if the left end of the pre-correction reduced area 1702 is x = ew, the left end of the post-correction reduced area 1706 is x = e−αw, which is shifted to the right side from x = ew, so that the image correction unit 144 shifts the enlarged area 1707 and the left area to the right. As a result, a region 1704 indicated by shading at the left end of the corrected output image 1704 is a region with an indefinite pixel value.
 そこで、補正方向設定部143は、領域1704を切り取り領域として設定する。その結果、図17の(c)に示すように、画像補正部144は、出力画像1704から画素値が不定となる領域1708が切り取られた出力画像1709を生成することができる。これにより、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 Therefore, the correction direction setting unit 143 sets the area 1704 as a cut-out area. As a result, as shown in FIG. 17C, the image correction unit 144 can generate an output image 1709 in which a region 1708 in which the pixel value is indefinite is cut out from the output image 1704. As a result, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
 なお、補正方向設定部143は、領域1704を切り取り領域として設定する代わりに、領域1704と拡大領域1707とに挟まれた領域を、領域1704を補充するように拡大することによっても、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 Note that the correction direction setting unit 143 also sets the pixel value by expanding the region sandwiched between the region 1704 and the enlarged region 1707 so as to supplement the region 1704 instead of setting the region 1704 as a cutout region. A suitable output image that does not include an indefinite area can be obtained.
 このように、本実施例における補正方向設定部143は、縮小領域の縮小方向が、入力画像の1つの辺(第1の辺)側から縮小領域の内側に向かう場合、縮小領域から当該第1の辺までの距離に応じて、縮小領域の縮小方向を変更するか否かを決定し、縮小領域の縮小方向を変更するときには、縮小領域の縮小方向を、第1の辺側から縮小領域の内側に向かわないように変更する。これにより、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 As described above, the correction direction setting unit 143 according to the present embodiment, when the reduction direction of the reduction area is directed from one side (first side) side of the input image to the inside of the reduction area, the first direction from the reduction area. It is determined whether to change the reduction direction of the reduction area according to the distance to the side of the image, and when changing the reduction direction of the reduction area, the reduction direction of the reduction area is changed from the first side to the reduction area. Change so that it does not face inward. As a result, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
 <処理例12>
 図18の(a)は、処理例12において用いる入力画像1800、および、補正領域設定部142が入力画像1800に設定する補正領域(縮小領域1802および拡大領域1803)を示している。入力画像1800では、人物の顔(対象領域)1801が右端に位置しているため、補正領域設定部142は、入力画像1800の右辺に接するように縮小領域1802を設定する。そのため、補正領域設定部142は、縮小領域1802の左側のみに拡大領域1803を設定することができ、縮小領域1802の右側には、十分な幅の拡大領域を設定することができない。
<Processing example 12>
FIG. 18A shows the input image 1800 used in the processing example 12 and the correction regions (the reduction region 1802 and the enlargement region 1803) set in the input image 1800 by the correction region setting unit 142. In the input image 1800, since the human face (target area) 1801 is located at the right end, the correction area setting unit 142 sets the reduced area 1802 so as to be in contact with the right side of the input image 1800. Therefore, the correction area setting unit 142 can set the enlarged area 1803 only on the left side of the reduced area 1802, and cannot set an enlarged area with a sufficient width on the right side of the reduced area 1802.
 このとき、補正方向設定部143は、処理例11と同様、縮小領域1802の縮小方向を、入力画像1800の右辺から縮小領域1802の内側に向かわないように変更し、縮小領域1802に対して、縮小領域1802が近接する辺(入力画像1800の右辺)側には、拡大領域が設定されないように、拡大領域を再設定する。さらに、補正方向設定部143は、拡大領域1803の拡大率を大きくする。 At this time, the correction direction setting unit 143 changes the reduction direction of the reduction area 1802 so as not to go to the inside of the reduction area 1802 from the right side of the input image 1800 as in the case of the processing example 11. The enlargement area is reset so that the enlargement area is not set on the side close to the reduction area 1802 (the right side of the input image 1800). Further, the correction direction setting unit 143 increases the enlargement ratio of the enlargement area 1803.
 図18の(b)は、入力画像1800に対し、補正方向設定部143が変更した縮小方向で、顔1805の幅を小さくするように補正した出力画像1804を示している。補正後の人物の顔1805の幅(=補正後の縮小領域1806の幅)は、補正前の人物の顔1801の幅(=補正前の縮小領域1802の幅)に対し、細く補正されている。また、縮小領域1802の細くなった幅が、拡大領域1803が太くなることによって補充されており、補正後の拡大領域1807から左側の領域は拡大も縮小もされていない。これにより、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 18B shows an output image 1804 obtained by correcting the input image 1800 so that the width of the face 1805 is reduced in the reduction direction changed by the correction direction setting unit 143. The width of the face 1805 after correction (= the width of the reduced area 1806 after correction) is corrected to be narrower than the width of the face 1801 before correction (= the width of the reduction area 1802 before correction). . The narrowed width of the reduced area 1802 is supplemented by the enlarged enlarged area 1803, and the area on the left side of the corrected enlarged area 1807 is not enlarged or reduced. As a result, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
 〔ソフトウェアによる実現例〕
 制御部(画像処理装置)40および140の制御ブロック(特に被写体検出部41、補正領域設定部42、補正強度設定部43、切り取り設定部44、画像補正部45、被写体検出部141、補正領域設定部142、補正方向設定部143および画像補正部144)は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等の集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)を用いてソフトウェアによって実現してもよい。
[Example of software implementation]
Control blocks (particularly subject detection unit 41, correction region setting unit 42, correction strength setting unit 43, cutout setting unit 44, image correction unit 45, subject detection unit 141, correction region setting) of control units (image processing apparatuses) 40 and 140 Unit 142, correction direction setting unit 143, and image correction unit 144) are logic circuits (hardware) formed in an integrated circuit (IC chip) such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Alternatively, it may be realized by software, or may be realized by software using a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit).
 後者の場合、制御部(画像処理装置)40および140は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがコンピュータ(またはCPU)で読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)などを備えている。そして、コンピュータ(またはCPU)が上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記記録媒体としては、「一時的でない有形の媒体」、例えば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明の一態様は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。 In the latter case, the control units (image processing apparatuses) 40 and 140 have a CPU that executes instructions of a program that is software that realizes each function, and the program and various data are recorded so as to be readable by a computer (or CPU). A ROM (Read Only Memory) or a storage device (these are referred to as “recording media”), a RAM (Random Access Memory) for expanding the program, and the like are provided. And the objective of this invention is achieved when a computer (or CPU) reads the said program from the said recording medium and runs it. As the recording medium, a “non-temporary tangible medium” such as a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used. The program may be supplied to the computer via an arbitrary transmission medium (such as a communication network or a broadcast wave) that can transmit the program. Note that one embodiment of the present invention can also be realized in the form of a data signal embedded in a carrier wave, in which the program is embodied by electronic transmission.
 〔まとめ〕
 本発明の態様1に係る画像処理装置(制御部40)は、画像における第1領域(縮小領域)を縮小し、前記第1領域の外側の第2領域(拡大領域)を拡大することにより、前記画像を補正する補正処理部(補正領域設定部42、補正強度設定部43、切り取り設定部44、画像補正部45)を備え、前記補正処理部は、前記第1領域の縮小方向が、前記画像の第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記画像における前記第1の辺側を切り取るか否かを決定する。
[Summary]
The image processing apparatus (control unit 40) according to aspect 1 of the present invention reduces the first area (reduction area) in the image and enlarges the second area (enlargement area) outside the first area, A correction processing unit (correction region setting unit 42, correction intensity setting unit 43, crop setting unit 44, image correction unit 45) for correcting the image is provided, and the correction processing unit is configured such that the reduction direction of the first region is Whether to cut out the first side of the image according to the distance from the first region to the first side when going from the first side of the image to the inside of the first region decide.
 上記の構成において、第1領域(縮小領域)の縮小方向が、画像の第1の辺側から第1領域の内側に向かい、かつ、第1領域から第1の辺までの距離が近く、第1領域の第1の辺側に十分な幅の第2領域(拡大領域)を設けることができない場合、出力画像の第1の辺側に画素値が不定な領域が生じ得る。そのため、第1領域から第1の辺までの距離によっては、画像における第1の辺側を切り取るようにすることで、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 In the above configuration, the reduction direction of the first region (reduction region) is from the first side of the image to the inside of the first region, and the distance from the first region to the first side is short, When the second region (enlarged region) having a sufficient width cannot be provided on the first side of one region, a region with an indefinite pixel value may occur on the first side of the output image. Therefore, depending on the distance from the first region to the first side, a suitable output image that does not include a region with an indefinite pixel value can be obtained by cutting out the first side of the image. .
 本発明の態様2に係る画像処理装置は、上記態様1において、前記補正処理部は、前記第1領域と前記第1の辺とが接している場合、前記画像における前記第1の辺側を切り取るようになっていてもよい。 The image processing apparatus according to aspect 2 of the present invention is the image processing apparatus according to aspect 1, wherein the correction processing unit detects the first side of the image when the first region is in contact with the first side. It may be cut out.
 上記の構成によれば、第1領域(縮小領域)が入力画像の第1の辺に接しており、第1領域(縮小領域)の当該第1の辺側に一切第2領域(拡大領域)を設定することができない場合であっても、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 According to the above configuration, the first area (reduced area) is in contact with the first side of the input image, and the second area (enlarged area) is completely located on the first side of the first area (reduced area). Even if it is not possible to set, a suitable output image that does not include a region with an indefinite pixel value can be obtained.
 本発明の態様3に係る画像処理装置は、上記態様1または2において、前記補正処理部は、前記第1領域から前記第1の辺までの距離が、前記第1領域を挟んで前記第1の辺とは反対側の前記第2領域の幅よりも狭い場合、前記画像における前記第1の辺側を切り取るようになっていてもよい。 The image processing device according to aspect 3 of the present invention is the image processing apparatus according to aspect 1 or 2, wherein the correction processing unit is configured such that the distance from the first region to the first side is the first region across the first region. When the width of the second region on the opposite side to the side is narrower, the first side of the image may be cut out.
 上記の構成によれば、第1領域(縮小領域)が入力画像の第1の辺に近く、第1領域(縮小領域)の当該第1の辺側に十分な幅の第2領域(拡大領域)を設定することができない場合であっても、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 According to the above configuration, the first region (reduced region) is close to the first side of the input image, and the second region (enlarged region) having a sufficient width on the first side of the first region (reduced region). ) Cannot be set, it is possible to obtain a suitable output image that does not include a region with an indefinite pixel value.
 本発明の態様4に係る画像処理装置は、上記態様1~3において、前記補正処理部は、補正後の前記画像のアスペクト比が、補正前の前記画像のアスペクト比と同じになるように、前記画像における前記第1の辺と対向しない第2の辺側を切り取るようになっていてもよい。 The image processing apparatus according to aspect 4 of the present invention is the image processing apparatus according to aspects 1 to 3, wherein the correction processing unit is configured so that the aspect ratio of the image after correction is the same as the aspect ratio of the image before correction. A second side that is not opposed to the first side in the image may be cut out.
 上記の構成によれば、画像のアスペクト比を維持した出力画像を得ることができる。 According to the above configuration, an output image maintaining the image aspect ratio can be obtained.
 本発明の態様5に係る画像処理装置は、上記態様4において、前記補正処理部は、前記第2の辺側を第1の幅切り取り、前記画像における前記第1の辺と対向しない各辺のうち、当該辺から前記第1の幅内に注目画素が含まれない辺を前記第2の辺とするようになっていてもよい。 The image processing apparatus according to aspect 5 of the present invention is the image processing apparatus according to aspect 4, wherein the correction processing unit cuts the second side with a first width, and does not face the first side of the image. Of these, a side from which the target pixel is not included within the first width may be the second side.
 上記の構成によれば、出力画像において、重要な部位が失われることを避けることができる。 According to the above configuration, it is possible to avoid losing important parts in the output image.
 本発明の態様6に係る画像処理装置は、上記態様4において、前記補正処理部は、前記画像における前記第1の辺と対向しない各辺のうち、前記第1領域から遠い方の辺を前記第2の辺とするようになっていてもよい。 The image processing apparatus according to aspect 6 of the present invention is the image processing apparatus according to aspect 4, wherein the correction processing unit selects a side farther from the first region among the sides that do not face the first side in the image. The second side may be used.
 上記の構成によれば、出力画像において、注目の対象となるべき対象をより画像の中央に近づけることができる。 According to the above configuration, in the output image, it is possible to bring the target to be noticed closer to the center of the image.
 本発明の態様7に係る画像処理装置は、上記態様4~6の何れか一態様において、前記補正処理部は、補正後の前記画像の縦方向の画素数および横方向の画素数が、補正前の前記画像の縦方向の画素数および横方向の画素数と同じになるように、前記第1の辺および前記第2の辺を切り取った前記画像全体を拡大するようになっていてもよい。 In the image processing device according to aspect 7 of the present invention, in any one of the above aspects 4 to 6, the correction processing unit corrects the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the image after correction. The entire image obtained by cutting out the first side and the second side may be enlarged so that the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the previous image are the same. .
 上記の構成によれば、画像の縦方向の画素数および横方向の画素数を維持した出力画像を得ることができる。 According to the above configuration, it is possible to obtain an output image that maintains the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the image.
 本発明の態様8に係る画像処理装置は、上記態様1~3において、前記補正処理部は、補正後の前記画像のアスペクト比が、補正前の前記画像のアスペクト比と同じになるように、前記第1領域に対して前記第1の辺と対向する第3の辺側に位置する第3領域を拡大するようになっていてもよい。 In the image processing apparatus according to aspect 8 of the present invention, in the above aspects 1 to 3, the correction processing unit is configured so that the aspect ratio of the image after correction is the same as the aspect ratio of the image before correction. The third region located on the third side facing the first side with respect to the first region may be enlarged.
 上記の構成によれば、画像のアスペクト比を維持した出力画像を得ることができる。 According to the above configuration, an output image maintaining the image aspect ratio can be obtained.
 本発明の態様9に係る画像処理装置は、上記態様8において、前記補正処理部は、前記第1領域に対して前記第3の辺側に位置する領域のうち注目画素が含まれない領域を前記第3領域とするようになっていてもよい。 The image processing device according to aspect 9 of the present invention is the image processing apparatus according to aspect 8, wherein the correction processing unit includes an area that does not include a target pixel in an area located on the third side with respect to the first area. The third region may be used.
 上記の構成によれば、重要な部位を変形させずに、アスペクト比を維持した高品質な出力画像を得ることができる。 According to the above configuration, it is possible to obtain a high-quality output image that maintains the aspect ratio without deforming important parts.
 本発明の態様10に係る画像処理装置(制御部140)は、画像における第1領域(縮小領域)を縮小し、前記第1領域の外側の第2領域(拡大領域)を拡大することにより、前記画像を補正する補正処理部(補正領域設定部142、補正方向設定部143、画像補正部144)を備え、前記補正処理部は、前記第1領域の縮小方向が、前記画像の第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記第1領域の縮小方向を、前記画像の第1の辺側から前記第1領域の内側に向かわないように変更するか否かを決定する。 The image processing apparatus (control unit 140) according to the aspect 10 of the present invention reduces the first area (reduction area) in the image and enlarges the second area (enlargement area) outside the first area. A correction processing unit (a correction region setting unit 142, a correction direction setting unit 143, and an image correction unit 144) that corrects the image is provided, and the correction processing unit is configured such that the reduction direction of the first region is the first of the image. When going from the side to the inside of the first region, the reduction direction of the first region is changed from the first side of the image to the first side according to the distance from the first region to the first side. It is determined whether or not to change so as not to go inside one area.
 上記の構成において、第1領域(縮小領域)の縮小方向が、画像の第1の辺側から第1領域の内側に向かい、かつ、第1領域から第1の辺までの距離が近く、第1領域の第1の辺側に十分な幅の第2領域(拡大領域)を設けることができない場合、出力画像の第1の辺側に画素値が不定な領域が生じ得る。そのため、第1領域から第1の辺までの距離によっては、第1領域の縮小方向を、画像の第1の辺側から第1領域の内側に向かわないように変更することで、画素値が不定な領域が含まれない好適な出力画像を得ることができる。 In the above configuration, the reduction direction of the first region (reduction region) is from the first side of the image to the inside of the first region, and the distance from the first region to the first side is short, When the second region (enlarged region) having a sufficient width cannot be provided on the first side of one region, a region with an indefinite pixel value may occur on the first side of the output image. Therefore, depending on the distance from the first region to the first side, the pixel value is changed by changing the reduction direction of the first region so as not to go from the first side of the image to the inside of the first region. A suitable output image that does not include an indefinite area can be obtained.
 本発明の態様11に係る撮像装置2は、撮像部10と、前記撮像部10が撮像した前記画像を補正する、上記態様1~10の何れか一態様に係る画像処理装置と、を備えている。 An imaging apparatus 2 according to an aspect 11 of the present invention includes an imaging unit 10 and an image processing apparatus according to any one of the above aspects 1 to 10 that corrects the image captured by the imaging unit 10. Yes.
 上記の構成によれば、ユーザは、人物の顔を撮像し、撮像した画像に対し画像処理を好適に施すことができる。 According to the above configuration, the user can capture an image of a person's face and suitably perform image processing on the captured image.
 本発明の態様12に係る画像印刷装置1は、上記態様1~10の何れか一態様に係る画像処理装置と、前記画像処理装置が補正した前記画像を印刷する印刷部50と、を備えている。 An image printing apparatus 1 according to an aspect 12 of the present invention includes the image processing apparatus according to any one of the above aspects 1 to 10 and a printing unit 50 that prints the image corrected by the image processing apparatus. Yes.
 上記の構成によれば、ユーザは、画像処理が施された画像を容易に印刷することができる。 According to the above configuration, the user can easily print an image subjected to image processing.
 本発明の態様13に係る画像印刷装置1は、撮像部10と、前記撮像部10が撮像した前記画像に対して画像処理を行う、上記態様1~10の何れか一態様に係る画像処理装置と、前記画像処理装置が補正した前記画像を印刷する印刷部50と、を備えている。 The image printing apparatus 1 according to the aspect 13 of the present invention is an image processing apparatus according to any one of the above aspects 1 to 10, which performs image processing on the imaging unit 10 and the image captured by the imaging unit 10. And a printing unit 50 that prints the image corrected by the image processing apparatus.
 上記の構成によれば、ユーザは、撮像した画像に対し画像処理が施された画像を容易に印刷することができる。 According to the above configuration, the user can easily print an image obtained by performing image processing on the captured image.
 本発明の態様14に係る画像処理装置の制御方法は、画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する画像補正工程を含み、前記画像補正工程では、前記第1領域の縮小方向が、当該第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記画像における当該第1の辺側を切り取るか否かを決定する。 A control method of an image processing device according to aspect 14 of the present invention includes an image correction step of correcting the image by reducing a first region in the image and enlarging a second region outside the first region. In the image correction step, when the reduction direction of the first region is directed from the first side to the inside of the first region, according to the distance from the first region to the first side, It is determined whether or not to cut out the first side in the image.
 また、本発明の態様15に係る画像処理装置の制御方法は、画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する画像補正工程を含み、前記画像補正工程では、前記第1領域の縮小方向が、当該第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記第1領域の縮小方向を、前記画像の第1の辺側から前記第1領域の内側に向かわないように変更するか否かを決定する。 In addition, in the control method of the image processing device according to the aspect 15 of the present invention, the image correction step of correcting the image by reducing the first region in the image and expanding the second region outside the first region. In the image correction step, when the reduction direction of the first region is directed from the first side to the inside of the first region, the image correction step depends on a distance from the first region to the first side. Then, it is determined whether or not to change the reduction direction of the first region so as not to go from the first side of the image to the inside of the first region.
 上記の構成によれば、本発明の一態様に係る画像処理装置と同等の効果を奏する。 According to the above configuration, the same effects as those of the image processing apparatus according to one aspect of the present invention can be obtained.
 さらに、本発明の各態様に係る画像処理装置は、コンピュータによって実現してもよく、この場合には、コンピュータを前記画像処理装置が備える各部(ソフトウェア要素)として動作させることにより前記画像処理装置をコンピュータにて実現させる画像処理装置の画像処理プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。 Furthermore, the image processing apparatus according to each aspect of the present invention may be realized by a computer. In this case, the image processing apparatus is operated by causing the computer to operate as each unit (software element) included in the image processing apparatus. An image processing program for an image processing apparatus realized by a computer and a computer-readable recording medium on which the image processing program is recorded also fall within the scope of the present invention.
 〔付記事項〕
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。さらに、各実施形態にそれぞれ開示された技術的手段を組み合わせることにより、新しい技術的特徴を形成することができる。
[Additional Notes]
The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention. Furthermore, a new technical feature can be formed by combining the technical means disclosed in each embodiment.
 (関連出願の相互参照)
 本出願は、2017年4月20日に出願された日本国特許出願:特願2017-084003に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
(Cross-reference of related applications)
This application claims the benefit of priority to the Japanese patent application filed on Apr. 20, 2017: Japanese Patent Application No. 2017-084003. Included in this document.
  1  画像印刷装置
  2  撮像装置
 10  撮像部
 40、140  制御部(画像処理装置)
 41、141  被写体検出部(対象領域検出部)
 42、142  補正領域設定部(補正処理部)
 43  補正強度設定部(補正処理部)
 44  切り取り設定部(補正処理部)
 45、144  画像補正部(補正処理部)
 143  補正方向設定部(補正処理部)
 50  印刷部
DESCRIPTION OF SYMBOLS 1 Image printing apparatus 2 Imaging device 10 Imaging part 40,140 Control part (image processing apparatus)
41, 141 Subject detection unit (target region detection unit)
42, 142 Correction area setting section (correction processing section)
43 Correction strength setting section (correction processing section)
44 Cutting setting section (correction processing section)
45, 144 Image correction unit (correction processing unit)
143 Correction direction setting unit (correction processing unit)
50 printing section

Claims (16)

  1.  画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する補正処理部を備え、
     前記補正処理部は、前記第1領域の縮小方向が、前記画像の第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記画像における前記第1の辺側を切り取るか否かを決定することを特徴とする画像処理装置。
    A correction processing unit that corrects the image by reducing the first region in the image and enlarging the second region outside the first region;
    When the reduction direction of the first region is from the first side of the image toward the inside of the first region, the correction processing unit is responsive to a distance from the first region to the first side. An image processing apparatus that determines whether to cut out the first side of the image.
  2.  前記補正処理部は、前記第1領域と前記第1の辺とが接している場合、前記画像における前記第1の辺側を切り取ることを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the correction processing unit cuts out the first side of the image when the first region and the first side are in contact with each other.
  3.  前記補正処理部は、前記第1領域から前記第1の辺までの距離が、前記第1領域を挟んで前記第1の辺とは反対側の前記第2領域の幅よりも狭い場合、前記画像における前記第1の辺側を切り取ることを特徴とする請求項1または2に記載の画像処理装置。 When the distance from the first region to the first side is narrower than the width of the second region opposite to the first side across the first region, the correction processing unit, The image processing apparatus according to claim 1, wherein the first side of the image is cut out.
  4.  前記補正処理部は、補正後の前記画像のアスペクト比が、補正前の前記画像のアスペクト比と同じになるように、前記画像における前記第1の辺と対向しない第2の辺側を切り取ることを特徴とする請求項1~3の何れか一項に記載の画像処理装置。 The correction processing unit cuts a second side of the image that does not face the first side so that the aspect ratio of the image after correction is the same as the aspect ratio of the image before correction. The image processing apparatus according to any one of claims 1 to 3, wherein:
  5.  前記補正処理部は、前記第2の辺側を第1の幅切り取り、前記画像における前記第1の辺と対向しない各辺のうち、当該辺から前記第1の幅内に注目画素が含まれない辺を前記第2の辺とすることを特徴とする請求項4に記載の画像処理装置。 The correction processing unit cuts out the second side with a first width, and among the sides that do not face the first side in the image, the pixel of interest is included in the first width from the side. The image processing apparatus according to claim 4, wherein a side that does not exist is the second side.
  6.  前記補正処理部は、前記画像における前記第1の辺と対向しない各辺のうち、前記第1領域から遠い方の辺を前記第2の辺とすることを特徴とする請求項4に記載の画像処理装置。 5. The correction processing unit according to claim 4, wherein among the sides that do not face the first side in the image, the side farther from the first region is set as the second side. 6. Image processing device.
  7.  前記補正処理部は、補正後の前記画像の縦方向の画素数および横方向の画素数が、補正前の前記画像の縦方向の画素数および横方向の画素数と同じになるように、前記第1の辺および前記第2の辺側を切り取った前記画像全体を拡大することを特徴とする請求項4~6の何れか一項に記載の画像処理装置。 The correction processing unit is configured so that the number of vertical pixels and the number of horizontal pixels of the image after correction are the same as the number of vertical pixels and the number of horizontal pixels of the image before correction. The image processing apparatus according to any one of claims 4 to 6, wherein the entire image obtained by cutting out the first side and the second side is enlarged.
  8.  前記補正処理部は、補正後の前記画像のアスペクト比が、補正前の前記画像のアスペクト比と同じになるように、前記第1領域に対して前記第1の辺と対向する第3の辺側に位置する第3領域を拡大することを特徴とする請求項1~3の何れか一項に記載の画像処理装置。 The correction processing unit has a third side facing the first side with respect to the first region so that the aspect ratio of the image after correction is the same as the aspect ratio of the image before correction. The image processing apparatus according to any one of claims 1 to 3, wherein the third region located on the side is enlarged.
  9.  前記補正処理部は、前記第1領域に対して前記第3の辺側に位置する領域のうち注目画素が含まれない領域を前記第3領域とすることを特徴とする請求項8に記載の画像処理装置。 The said correction process part makes the area | region which does not contain a pixel of interest among the area | regions located in the said 3rd edge | side side with respect to the said 1st area | region as said 3rd area | region. Image processing device.
  10.  画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する補正処理部を備え、
     前記補正処理部は、前記第1領域の縮小方向が、前記画像の第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記第1領域の縮小方向を、前記画像の第1の辺側から前記第1領域の内側に向かわないように変更するか否かを決定することを特徴とする画像処理装置。
    A correction processing unit that corrects the image by reducing the first region in the image and enlarging the second region outside the first region;
    When the reduction direction of the first region is from the first side of the image toward the inside of the first region, the correction processing unit is responsive to a distance from the first region to the first side. An image processing apparatus that determines whether or not to change the reduction direction of the first area so as not to go from the first side of the image to the inside of the first area.
  11.  撮像部と、
     前記撮像部が撮像した前記画像を補正する、請求項1~10の何れか1項に記載の画像処理装置と、を備えていることを特徴とする撮像装置。
    An imaging unit;
    An image processing apparatus comprising: the image processing apparatus according to claim 1 that corrects the image captured by the image capturing unit.
  12.  請求項1~10の何れか1項に記載の画像処理装置と、
     前記画像処理装置が補正した前記画像を印刷する印刷部と、を備えていることを特徴とする画像印刷装置。
    The image processing apparatus according to any one of claims 1 to 10,
    An image printing apparatus comprising: a printing unit that prints the image corrected by the image processing apparatus.
  13.  撮像部と、
     前記撮像部が撮像した前記画像に対して画像処理を行う、請求項1~10の何れか1項に記載の画像処理装置と、
     前記画像処理装置が補正した前記画像を印刷する印刷部と、を備えていることを特徴とする画像印刷装置。
    An imaging unit;
    The image processing apparatus according to any one of claims 1 to 10, wherein image processing is performed on the image captured by the imaging unit.
    An image printing apparatus comprising: a printing unit that prints the image corrected by the image processing apparatus.
  14.  画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する画像補正工程を含み、
     前記画像補正工程では、前記第1領域の縮小方向が、当該第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記画像における当該第1の辺側を切り取るか否かを決定することを特徴とする画像処理装置の制御方法。
    Including an image correction step of correcting the image by reducing a first region in the image and enlarging a second region outside the first region;
    In the image correction step, when the reduction direction of the first region is directed from the first side to the inside of the first region, according to the distance from the first region to the first side, A method for controlling an image processing apparatus, comprising: determining whether or not to cut out the first side in an image.
  15.  画像における第1領域を縮小し、前記第1領域の外側の第2領域を拡大することにより、前記画像を補正する画像補正工程を含み、
     前記画像補正工程では、前記第1領域の縮小方向が、当該第1の辺側から前記第1領域の内側に向かう場合、前記第1領域から前記第1の辺までの距離に応じて、前記第1領域の縮小方向を、前記画像の第1の辺側から前記第1領域の内側に向かわないように変更するか否かを決定することを特徴とする画像処理装置の制御方法。
    Including an image correction step of correcting the image by reducing a first region in the image and enlarging a second region outside the first region;
    In the image correction step, when the reduction direction of the first region is directed from the first side to the inside of the first region, according to the distance from the first region to the first side, A method for controlling an image processing apparatus, comprising: determining whether or not to change the reduction direction of the first area so as not to go from the first side of the image toward the inside of the first area.
  16.  請求項1~10の何れか一項に記載の画像処理装置としてコンピュータを機能させるための画像処理プログラムであって、上記補正処理部としてコンピュータを機能させるための画像処理プログラム。 An image processing program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 10, wherein the image processing program causes the computer to function as the correction processing unit.
PCT/JP2018/001063 2017-04-20 2018-01-16 Image processing device, image-capturing device, image printing device, control method of image processing device, and image processing program WO2018193674A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US16/606,447 US20210112179A1 (en) 2017-04-20 2018-01-16 Image processing apparatus, imaging apparatus, image printing apparatus, method for controlling image processing apparatus, and image processing program
CN201880026041.4A CN110537200A (en) 2017-04-20 2018-01-16 Image processing apparatus, filming apparatus, image printer, the control method of image processing apparatus and image processing program
JP2019513225A JP6889774B2 (en) 2017-04-20 2018-01-16 Image processing device, imaging device, image printing device, control method of image processing device, and image processing program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017-084003 2017-04-20
JP2017084003 2017-04-20

Publications (1)

Publication Number Publication Date
WO2018193674A1 true WO2018193674A1 (en) 2018-10-25

Family

ID=63856514

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/001063 WO2018193674A1 (en) 2017-04-20 2018-01-16 Image processing device, image-capturing device, image printing device, control method of image processing device, and image processing program

Country Status (4)

Country Link
US (1) US20210112179A1 (en)
JP (1) JP6889774B2 (en)
CN (1) CN110537200A (en)
WO (1) WO2018193674A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113628229B (en) * 2021-08-04 2022-12-09 展讯通信(上海)有限公司 Image cropping method and related product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242921A (en) * 2007-03-28 2008-10-09 Seiko Epson Corp Image processor and image processing method
JP2009151825A (en) * 2009-04-02 2009-07-09 Seiko Epson Corp Image processor and image processing method
JP2009232246A (en) * 2008-03-24 2009-10-08 Seiko Epson Corp Image processing unit and image processing method
JP2010166624A (en) * 2010-04-30 2010-07-29 Seiko Epson Corp Image processing apparatus, and image processing method
JP2010170219A (en) * 2009-01-20 2010-08-05 Seiko Epson Corp Apparatus, method and program for processing image, and printer

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7995239B2 (en) * 2004-03-29 2011-08-09 Fujifilm Corporation Image output apparatus, method and program
CN105075235B (en) * 2013-03-27 2018-07-06 富士胶片株式会社 Image processing apparatus, photographic device and image processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242921A (en) * 2007-03-28 2008-10-09 Seiko Epson Corp Image processor and image processing method
JP2009232246A (en) * 2008-03-24 2009-10-08 Seiko Epson Corp Image processing unit and image processing method
JP2010170219A (en) * 2009-01-20 2010-08-05 Seiko Epson Corp Apparatus, method and program for processing image, and printer
JP2009151825A (en) * 2009-04-02 2009-07-09 Seiko Epson Corp Image processor and image processing method
JP2010166624A (en) * 2010-04-30 2010-07-29 Seiko Epson Corp Image processing apparatus, and image processing method

Also Published As

Publication number Publication date
CN110537200A (en) 2019-12-03
US20210112179A1 (en) 2021-04-15
JPWO2018193674A1 (en) 2020-02-27
JP6889774B2 (en) 2021-06-18

Similar Documents

Publication Publication Date Title
TWI637230B (en) Projector system and display image calibration method thereof
US20050162620A1 (en) Image processing apparatus
JP4811462B2 (en) Image processing method, image processing program, image processing apparatus, and imaging apparatus
JP2009290661A (en) Image processing apparatus, image processing method, image processing program and printer
WO2015032185A1 (en) Image super-resolution reconfiguration system and method
JP2010049578A (en) Image processor, image processing method, and image processing program
JP2009237619A (en) Detection of face area and organ area in image
WO2017122810A1 (en) Image processing device, image processing method, image processing program, and storage medium
JP2009211450A (en) Image processing apparatus, image processing method, and computer program for image processing
JP2009075646A (en) Video display system and parameter generation method of same
JP5541679B2 (en) Image processing apparatus and method, and program
JP5968088B2 (en) Image processing apparatus, image processing method, and program
WO2018193674A1 (en) Image processing device, image-capturing device, image printing device, control method of image processing device, and image processing program
JP6731073B2 (en) Image processing apparatus, imaging apparatus, image printing apparatus, image processing apparatus control method, and image processing program
EP2654304A2 (en) Image processing apparatus and image processing method
JP2010086379A (en) Image processor, image processing method, and program
JPWO2018189971A1 (en) Image processing device, imaging device, terminal device, image correction method, and image processing program
JP5042251B2 (en) Image processing apparatus and image processing method
JP6846440B2 (en) Image processing equipment, image printing equipment, imaging equipment, and image processing programs
JP5340021B2 (en) Image processing apparatus, image processing method, and program
JP6905588B2 (en) Image processing device, imaging device, image printing device, control method of image processing device, and image processing program
JP2018182539A (en) Video processing apparatus, video processing method, and program
JP2015106318A (en) Image processor and image processing method
JP2006203716A (en) Formation of high resolution image using a plurality of low resolution images
JP6937722B2 (en) Image processing device and image processing method

Legal Events

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

Ref document number: 18787972

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019513225

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18787972

Country of ref document: EP

Kind code of ref document: A1