Image processing device, method, and imaging apparatus
The image processing device enhances subject area extraction accuracy by using subject detection and distance information to separate subjects from backgrounds, ensuring precise image processing for each region.
Patent Information
- Application Number
- JP2024143347
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-10-31
- Estimated Expiration
- 2040-03-19
AI Technical Summary
Existing image processing techniques struggle to accurately extract subject areas from images, particularly when different processing is required for subjects and backgrounds, leading to inaccurate application of image corrections.
An image processing device that utilizes subject detection and distance information to identify and extract subject areas by employing a detection unit that satisfies predetermined conditions based on distance information, allowing for precise separation of subjects from backgrounds.
Improves the accuracy of extracting subject areas, enabling targeted image processing for each region, thereby enhancing the effectiveness of image corrections.
Smart Images

Figure 2024155969000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device and method, and an imaging device, and more particularly to an image processing technique for images captured by a digital camera or the like. [Background technology]
[0002] Conventionally, image processing for correcting image clarity or brightness is known, which is applied to a partial area of an image. In such processing, there is a technique for determining the subject area based on, for example, the size of a face by referring to subject detection information in order to extract the partial area to which the processing is applied.
[0003] Patent Document 1 discloses a technique for selecting a reference face from detected human faces and determining a human region that encompasses all faces based on the size of the reference face. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2005-208732 A Summary of the Invention [Problem to be solved by the invention]
[0005] The configuration disclosed in Patent Document 1 is suitable for determining a rough area, such as a rectangle, that is likely to contain a person, and it is difficult to extract the subject area with the precision required to apply image processing to each area.
[0006] Furthermore, for example, when it is desired to perform different image processing on a subject and background, depending on the scene, it may not be possible to extract the subject area with sufficient accuracy, and the desired image processing effect may not be obtained.
[0007] The present invention has been made in consideration of the above problems, and has an object to improve the accuracy of extracting a subject area from an image. [Means for solving the problem]
[0008] In order to achieve the above-mentioned object, the image processing device of the present invention comprises a detection means for detecting a predetermined subject from an image, a selection means for selecting a first subject from the detected subjects that satisfies a predetermined first condition, an acquisition means for acquiring distance information indicating subject distance for each of a plurality of regions constituting the image, and an extraction means for extracting a first region including the first subject and a second region not including the first subject based on the first subject, wherein the first condition is that the subject is the smallest among the subjects having a size equal to or larger than a predetermined first size, and the extraction means is characterized in that when the image satisfies a predetermined second condition, the extraction means extracts a region from the image that is closer than the first subject as the first region based on the distance information. Effect of the Invention
[0009] According to the present invention, it is possible to improve the accuracy of extracting a subject area from an image. [Brief description of the drawings]
[0010] [Figure 1] 1 is a block diagram showing an example of the arrangement of an imaging apparatus according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram showing an example of the arrangement of an imaging unit in the embodiment. [Diagram 3] FIG. 4 is a diagram showing an example of an input image in the embodiment. [Figure 4] 4 is a flowchart showing a process according to the embodiment. [Diagram 5] 5A to 5C are diagrams showing examples of subject detection results in the embodiment. [Figure 6] FIG. 4 is a diagram showing an example of a defocus map in the embodiment. [Figure 7] FIG. 4 is a diagram showing an example of a region map in the embodiment. [Figure 8] FIG. 4 is a diagram showing an example of a region map in the embodiment. [Figure 9] 1A to 1C are diagrams showing an example of a human silhouette generation method and a region map according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.
[0012] In this embodiment, a use case will be described in which contrast is corrected for each region using various image information and distance information for an image captured by an imaging device such as a digital camera. In the following description, an imaging device will be described as an example of an image processing device, but the image processing device of this embodiment is not limited to an imaging device and may be, for example, a personal computer (PC), etc.
[0013] Fig. 1 is a block diagram showing a configuration example in which the image processing device of the present invention is applied to an imaging device 100. In Fig. 1, a control unit 101 is, for example, a CPU, which reads out an operation program of each block included in the imaging device 100 from a ROM 102, expands it into a RAM 103, and executes it to control the operation of each block included in the imaging device 100. The ROM 102 is a rewritable non-volatile memory, and stores parameters and the like required for the operation of each block in addition to the operation program of each block included in the imaging device 100. The RAM 103 is a rewritable volatile memory, and is used as a temporary storage area for data output in the operation of each block included in the imaging device 100.
[0014] The optical system 104 forms an image of a subject on the imaging unit 105. The imaging unit 105 is an imaging element such as a CCD or CMOS sensor, which photoelectrically converts the optical image formed on the imaging unit 105 by the optical system 104 and outputs the obtained analog image signal to the A / D conversion unit 106. The A / D conversion unit 106 applies A / D conversion processing to the input analog image signal and outputs the obtained digital image data to the RAM 103 for storage.
[0015] The image processing unit 107 applies various image processing, including normal signal processing such as white balance adjustment, reduction / enlargement, noise reduction processing, and development processing, to the image data stored in the RAM 103, and stores the processed image back in the RAM 103.
[0016] The recording medium 108 is a removable memory card or the like, and images processed by the image processing unit 107 stored in the RAM 103, images A / D converted by the A / D conversion unit 106, etc. are recorded as recorded images.
[0017] The display unit 109 is a display device such as an LCD, and displays various information, such as a through display of the subject image captured by the imaging unit 105 . The operation unit 110 is a plurality of operation members including a release switch, and issues instructions for setting the shooting mode, focal length, aperture value, exposure time, etc., as well as autofocus, release, and other operations. The evaluation value acquisition unit 111 calculates evaluation values such as the subject distance and the defocus value from the obtained image data.
[0018] The subject detection unit 112 detects whether a specific subject exists in the image from the obtained image data, and if so, outputs the position (coordinates in the image) and size of the subject. Specific subjects can be various things such as a person's face or entire body, various animals, vehicles, etc.
[0019] 2 is a diagram showing a pixel array configuration of the imaging unit 105 of FIG. 1. As shown in FIG. 2, a plurality of pixels 202 are regularly arranged two-dimensionally in the imaging unit 105. Each pixel 202 includes one microlens 201 and a pair of photoelectric conversion units 203, 204. Note that the planar shape of the photoelectric conversion units 203, 204 is not limited to this, and other planar shapes and arrangements may be used. Also, the number of photodiodes provided in each pixel 202 is not limited to two, and may be three or more (for example, four).
[0020] In this embodiment, signals are read out from the photoelectric conversion units 203 and 204 that are regularly arranged two-dimensionally. Then, the signals (hereinafter referred to as "signals A") read out from the photoelectric conversion units 203 of the plurality of pixels 202 are connected to form an image A, and the signals (hereinafter referred to as "signals B") read out from the photoelectric conversion units 204 of the plurality of pixels 202 are connected to form an image B, and thus the images A and B, which are parallax images, are output. In addition, the signals A and B output from the photoelectric conversion units 203 and 204 of the same pixel 202, respectively, are added to generate an A+B signal that can be used as a signal for a still image, and the generated A+B signal is recorded on the recording medium 108. Note that the method of reading out from the photoelectric conversion units 203 and 204 is not limited to this. For example, the signals A and A+B may be read out from each pixel 202, and the A signal may be subtracted from the A+B signal to obtain the B signal.
[0021] By configuring the imaging unit 105 as shown in Fig. 2, a pair of light beams passing through different regions of the pupil of the optical system 104 can be formed into a pair of optical images, which can be output as images A and B. Note that the method of acquiring images A and B is not limited to the above, and various methods can be used. For example, images having parallax with respect to each other acquired by an imaging device such as a plurality of cameras installed at spatial intervals may be used as images A and B. Also, parallax images acquired by an imaging device such as a single camera having a plurality of optical systems and imaging units may be used as images A and B, respectively.
[0022] Fig. 3 shows an example of an image captured by the imaging device 100, and as an example, shows a case where multiple people are captured in different positions as main subjects. In an image 300 shown in Fig. 3(a), people 301, 302, and 303 are captured side by side near the imaging device 100. In an image 310 shown in Fig. 3(b), people 313, 311, and 312 are captured at different positions in the depth direction from the foreground as viewed from the imaging device 100. In an image 320 shown in Fig. 3(c), people 321, 322, 323, and 324 who are located away from the imaging device 100 are captured.
[0023] Next, the process of extracting a person area and a foreground area in this embodiment will be described with reference to the flowchart in Fig. 4. As a specific example of the process, images 300, 310, and 320 shown in Fig. 3 will be used as examples, and the image size will be described as 6000 pixels wide x 4000 pixels high.
[0024] In S401, human faces are detected as subjects included in the input image. As a specific detection method, for example, a known method such as that disclosed in Japanese Patent Application Laid-Open No. 10-162118 is used to detect faces, and the coordinates and size of each detected face in the image are output.
[0025] Fig. 5 shows an example of performing the process of S401 on each of the images 300, 310, and 320 shown in Fig. 3, and shows a frame 500 showing each face based on the position (center coordinates of the rectangle) and size (length of one side of the rectangle) of each face. Here, the size of the detected face is set to 670 pixels for person 301 in image 300, 700 pixels for person 302, and 680 pixels for person 303. Similarly, the size is set to 660 pixels for person 311, 610 pixels for person 312, and 800 pixels for person 313 in image 310. Also, the size is set to 320 pixels for person 321, 280 pixels for person 322, 350 pixels for person 323, and 120 pixels for person 324 in image 320.
[0026] In S402, a pair of parallax images, image A and image B, are acquired from the imaging unit 105, and data representing a spatial distribution of defocus values in the shooting range is output based on the acquired parallax images. In the following description, the data representing the spatial distribution of defocus values is called a defocus map. The defocus value is a type of distance information since it is an amount of focus deviation from the distance at which the optical system 104 is focused. Note that, as a method for acquiring the defocus value, for example, a method for calculating a phase difference between parallax images, such as the method disclosed in JP 2008-15754 A, can be used.
[0027] Defocus maps for images 300, 310, and 320 are shown in Fig. 6. The defocus map in Fig. 6 is expressed in a continuous grayscale value in which the smaller the defocus value, the whiter the image (the higher the pixel value), and the area of person 302 in image 300 is expressed in gray, indicating an in-focus area (defocus value of zero). In image 310, the areas of people 312 and 313 have relatively large defocus values compared to the area of person 311. In image 320, the person in focus is far away and the depth of field is deep, so it can be seen that the defocus value of the background parts other than the people is smaller than in images 300 and 310.
[0028] In S403, one face to be used as a reference (hereinafter referred to as "reference face") is selected from the faces detected in each image. The selection method involves first selecting all detected faces that have a predetermined size Th1 (for example, Th1 = 10% of the long side of the image) or more, and then selecting the smallest face from among them as the reference face. In the example shown in this embodiment, the image size is 6000 pixels horizontally, so the predetermined size Th1 is set to 600 pixels, and faces of 600 pixels or more are selected.
[0029] In image 300, person 301 is selected as the reference face, and in image 310, person 312 is selected as the reference face. In image 320, all the people are smaller than Th1, so no reference face is selected here.
[0030] In S404, it is determined whether or not to refer to the defocus value in order to extract the person region. Specifically, if all the faces detected in S401 are smaller than a predetermined size Th1, the defocus value is not referenced, and if even one face with a size equal to or larger than Th1 is detected, the defocus value is referenced. This is because, when all the faces are small, that is, when the person is far from the imaging device 100, the image becomes pan-focused and the defocus value tends to be small overall, so it is considered difficult to separate the region based on the defocus value. In this embodiment, in the case of images 300 and 310, it is determined that the defocus value is referenced and the process proceeds to S405, and in the case of image 320, it is determined that the defocus value is not referenced because all the faces are smaller than Th1, and the process proceeds to S408.
[0031] However, the method of determination is not limited to this, and various image information such as shooting conditions may be used. For example, when the F-number is narrowed down to a predetermined value or more, the depth is similarly deep and the defocus value is likely to be small, and when the ISO sensitivity is high, it becomes difficult to separate the parallax between the A and B images and noise, and the accuracy of the defocus value is likely to be insufficient. Therefore, when the F-number or ISO sensitivity is a predetermined value or more, the defocus value may not be referred to.
[0032] In S405, the defocus value of the reference face is calculated. Specifically, in the defocus map generated in S402, the average value Def_base of the defocus values in the face detection frame of the reference face selected in S404 is calculated.
[0033] In S406, the range of defocus values for extraction as a person region is determined. The range is determined by calculating the upper and lower limit values of the defocus value that is treated as the same distance as the reference face based on the defocus value Def_base of the reference face calculated in S405. The lower limit value, i.e., the threshold value on the far side of the reference face, is set to Def_base-5%, and the upper limit value, i.e., the threshold value on the near side of the reference face, is set to Def_base+5%. Therefore, the region with a defocus value of Def_base±5% is determined as the person region.
[0034] The method of determining the range of defocus values indicating a person region is not limited to the method of comparing with a threshold calculated based on the average defocus value of the face region as described above, and may be calculated based on other evaluation values. For example, various methods are possible, such as a method using statistics, in which a defocus histogram is generated, the range is expanded while adding counts from the average defocus value of the reference face, and the values at the time when the accumulated count value reaches a predetermined ratio (for example, 5% of the total count number) are set as the upper and lower limit values.
[0035] In S407, a region map showing the person region and the foreground region is generated based on the threshold calculated in S406. First, in the defocus map generated in S402, a region where the defocus value is within the range calculated in S406 is extracted as the person region, and a region on the foreground side where the defocus value is greater than the threshold is extracted as the foreground region, and a binarized version is generated.
[0036] In S406, even if the size of a face is less than Th1, it is extracted as a person area if the defocus value is within the range calculated in S406. This is because a face at a distance almost equal to that of the reference face (in this embodiment, the defocus value is within the range of Def_base ±5%) is presumed to be the face of a person related to the reference face, not a stranger unrelated to the reference face. This idea is important when the reference face is almost equal to Th1. For example, there may be an image in which face A, whose size is slightly larger than Th1, and face B, whose size is slightly smaller than Th1, are side by side. In such a case, face A is not corrected as a person area, and face B is corrected as a background area, resulting in an unnatural image.
[0037] Therefore, in this embodiment, a face that exists within a certain distance range from the reference face is set as a person area. In the above example, face B is set as a person area and is not corrected. On the other hand, if face B exists at the same size but face A does not exist at the same size (if face B is not within a certain distance range from the reference image), face B is not set as a person area. This is because face B is a size that does not exceed Th1 slightly.
[0038] The results of extraction in S407 for image 300 are shown in Fig. 7. In image 300, people 301, 302, and 303 are approximately equidistant and have similar defocus values, so all three people are extracted as person regions 701, as shown in Fig. 7.
[0039] FIG. 8(a) shows a person area extracted from an image 310. A person 312 selected as a reference face and a person 311 located at a close distance are extracted as person areas, and a person 313 located at the foreground side is not extracted as a person area because it is located at a distance away from the person 312. FIG. 8(b) shows a result of extracting a foreground area of the image 310, and a value larger than the range calculated in S406, that is, a person 313 located at the foreground, is extracted. A region map is generated by integrating a region 710 extracted as a person area and a region 711 extracted as a foreground area. FIG. 8(c) shows the result, and it can be seen that all three people are extracted. In order to make the region map more suitable to the contour of the subject, a shaping process may be performed by referring to each pixel value of the images 300 and 310, as described in JP 2017-11652 A, for example.
[0040] Meanwhile, in S408, it is determined whether or not all detected faces are the faces of the main subject. As a method of determination, first, faces having a predetermined size Th2 (for example, Th2=5% of the long side of the image) or more are selected from the detected faces, and the smallest face among them is set as the reference face. Therefore, in the case of image 320, person 321, which is the smallest face among the faces having a size of 6000x0.05=300 pixels or more, is selected as the reference face. Furthermore, a size threshold value of 300x0.8=240 pixels, which is a value obtained by multiplying the size of the face selected as the reference face by a predetermined ratio (for example, 0.8), is calculated, and only faces having a size equal to or larger than the calculated threshold value are determined to be the main face.
[0041] Person 321, the reference face, and person 323, whose face is larger than that of person 321, are determined to be the main face, and person 322, whose face is smaller than person 321, is also determined to be the main face because the size of his face is equal to or larger than the threshold value of 240 pixels. On the other hand, person 324 is not determined to be the main face because his face is small enough to fall below the threshold. This is to avoid the determination results becoming scattered when there are multiple people with slightly different face sizes when a fixed value Th2 is used as the threshold value for determination, or the determination that a person who is not actually the main face is the main face if Th2 is set too small.
[0042] In S409, a region map is generated based on the determination result in S408. Specifically, first, a silhouette of a simple human model is assigned to each person determined to be a main face. FIG. 9 shows an example of the allocation of silhouettes in S409. FIG. 9(a) shows an input image 800 and a frame 801 showing a detected face, and FIG. 9(b) shows an example of a silhouette image 810 consisting of a face portion 902 and a torso portion 903 generated for a region where a person is assumed to exist based on the position and size of the detected face. Note that the information to be referenced is not limited to the face detection result, and may be the detection result of a region including the entire body of a person.
[0043] Fig. 9(c) is a diagram showing the result of performing the above process on image 320, where human silhouettes are generated for the three main faces detected in S408. Note that by performing shaping processing on image 320 with reference to each pixel value, as described in JP 2017-11652 A, for example, the region map can be made to fit the contours of the subject even more closely, and this becomes the final region map. An example of the obtained region map is shown in Fig. 9(d).
[0044] In S410, an image in which the contrast is corrected only in a part of the image is generated using the area map generated in S407 or S409. Here, the part of the image is the background area 702 in the image 300 that does not include a person in the generated area map shown in FIG. 7. As a specific correction method, an image in which the contrast of the entire image 300 is corrected is first generated. As a contrast correction method, for example, an existing technology such as a method of correcting only local contrast without changing the brightness of the low-frequency area as described in JP 2019-28537 A may be used. Based on the area map shown in FIG. 7, an image in which the contrast is not corrected in the person area 701 and an image in which the contrast is corrected in the background area are selected and synthesized. At this time, both may be weighted and added. The weight of the weighted addition may be changed according to the position in the image. For example, the weight of the uncorrected image and the corrected image may be made equal at the boundary of the area, and the weight of the uncorrected image in the person area 701 and the corrected image in the background area may be increased as the distance from the boundary of the area increases. This makes it possible to generate an image in which the contrast of only the background region 702 in the region map is corrected. Images 310 and 320 are also processed in a similar manner based on the region map.
[0045] In this way, the human region is extracted from the captured image using the subject detection information and distance information to generate a region map, and gradation processing is performed for each region, after which the process ends.
[0046] As described above, according to this embodiment, when multiple subjects are present, by extracting an area including only the main subject based on the smallest face among faces having a predetermined size, it is possible to obtain the desired effect in image processing for each area.
[0047] In this embodiment, as described with reference to Fig. 2, a configuration has been described in which distance information is generated based on the phase difference between multiple subject images generated by light beams arriving from different regions of the pupil of the imaging optical system, but other configurations or means may be used instead or in combination. For example, by using a configuration in which distance can be measured using a TOF (Time Of Flight) camera or ultrasonic waves, it is possible to improve the distance measurement performance for subjects with little change in pattern.
[0048] In addition, in this embodiment, the main subject is a person and the contrast of the background is corrected, but the area to be corrected and the correction method are not limited to this, and other combinations may be used. For example, the main subject may be an animal, a building, a vehicle, etc., and the present invention can be applied by using a technology for detecting the subject.
[0049] In addition, in the present embodiment, a case has been described in which the background region is corrected and the person region is not corrected, but the present invention is not limited to this and can be applied to various processes that utilize the divided (extracted) region information. For example, after region division as in the present embodiment, it can be used in a process in which the person region is corrected and the background region is not corrected (for example, a process in which the contrast of the skin region is lowered to provide a skin beautifying effect).
[0050] Furthermore, image processing is not limited to contrast correction, and may include correction of brightness, hue, saturation, sharpness, etc. For example, by correcting brightness only for a person area, it is possible to adjust the face of a person that has become dark due to backlighting or the like after shooting.
[0051] <Other embodiments> The present invention may be applied to a system made up of a plurality of devices, or to an apparatus made up of a single device.
[0052] The present invention can also be realized by supplying a program for implementing one or more of the functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
[0053] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]
[0054] 100: imaging device, 101: control unit, 102: ROM, 103: RAM, 104: optical system, 105: imaging unit, 106: A / D conversion unit, 107: image processing unit, 108: recording medium, 109: display unit, 110: operation unit, 111: evaluation value acquisition unit, 112: subject detection unit, 201: microlens, 202: pixel, 203, 204: photoelectric conversion unit
Claims
1. A detection means for detecting a predetermined subject from an image; a selection means for selecting a first object that satisfies a first predetermined condition from the detected objects; an acquisition means for acquiring distance information indicating a subject distance for each of a plurality of regions constituting the image; an extraction unit that extracts a first region including the first object and a second region not including the first object based on the first object; the first condition is that the subject is the smallest among the subjects having a size equal to or larger than a predetermined first size; The image processing device is characterized in that the extraction means extracts an area from the image that is closer than the first subject as the first area based on the distance information when the image satisfies a predetermined second condition.
2. 2. The image processing apparatus according to claim 1, wherein the extraction means extracts, as the first region, a region having a distance within a predetermined first range from the first subject.
3. 3. The image processing apparatus according to claim 2, wherein the extraction means extracts, as the second area, an area farther from the first subject than the first distance range.
4. 4. The image processing device according to claim 1, wherein the second condition includes at least one of the following: at least one of the detected subjects is larger than a predetermined size; the F-number when the image was captured is not narrower than a predetermined value; and the ISO sensitivity when the image was captured is lower than a predetermined sensitivity.
5. 5. The image processing apparatus according to claim 4, wherein said extraction means extracts said first area based on a size of said detected subject when said image does not satisfy said second condition.
6. When the image does not satisfy the second condition, the extraction means Detecting a second object that is the smallest among the detected objects having a size equal to or larger than a second size that is smaller than the first size; 6. The image processing device according to claim 5, wherein, from among the detected subjects, a region of the second subject and a region of a subject whose size is within a predetermined range from the size of the second subject are extracted as the first region.
7. 7. The image processing apparatus according to claim 5, wherein the second area is an area other than the first area.
8. 8. The image processing apparatus according to claim 1, wherein the subject is any one of a face, a person, an animal, a building, and a vehicle.
9. 9. The image processing device according to claim 1, further comprising an image processing unit for performing image processing on the first area or the second area.
10. 9. The image processing apparatus according to claim 1, further comprising image processing means for performing different image processes on the first area and the second area.
11. 11. The image processing device according to claim 9, wherein the image processing includes at least one of brightness, contrast, hue, saturation, and sharpness.
12. A detection means for detecting a predetermined subject from an image; a selection means for selecting a first object that satisfies a first predetermined condition from the detected objects; an acquisition means for acquiring distance information indicating a subject distance for each of a plurality of regions constituting the image; an extraction unit that extracts a first region including the first object and a second region not including the first object based on the first object; the first condition is that the subject is the smallest among the subjects having a size equal to or larger than a predetermined first size; The image processing device according to claim 1, wherein the extraction means changes a method for extracting the first region depending on whether or not the distance information is referred to.
13. The image processing device according to claim 12, characterized in that the extraction means extracts the first region based on the distance information with the first subject as a reference when referring to the distance information, and extracts the first region based on a size with the detected subject as a reference when not referring to the distance information.
14. An imaging means for capturing an image; The image processing device according to any one of claims 1 to 13, The imaging device, wherein the image processing device processes an image captured by the imaging means.
15. A detection step in which a detection means detects a predetermined subject from an image; a selection step in which a selection means selects a first subject that satisfies a predetermined first condition from the detected subjects; an acquisition step in which an acquisition means acquires distance information indicating a subject distance for each of a plurality of regions constituting the image; The extraction means extracts a first region including the first object based on the first object; and an extraction step of extracting a second region not including the first subject, the first condition is that the subject is the smallest among the subjects having a size equal to or larger than a predetermined first size; An image processing method characterized in that, in the extraction step, when the image satisfies a predetermined second condition, an area closer than the first subject is extracted from the image based on the distance information as the first area.
16. A detection step in which a detection means detects a predetermined subject from an image; a selection step in which a selection means selects a first subject that satisfies a predetermined first condition from the detected subjects; an acquisition step in which an acquisition means acquires distance information indicating a subject distance for each of a plurality of regions constituting the image; The extraction means extracts a first region including the first object based on the first object; and an extraction step of extracting a second region not including the first subject, the first condition is that the subject is the smallest among the subjects having a size equal to or larger than a predetermined first size; 2. An image processing method according to claim 1, wherein said extraction step changes a method for extracting said first region depending on whether or not said distance information is referred to.
17. A program for causing a computer to function as each of the means of the image processing apparatus according to any one of claims 1 to 13.
Citation Information
Patent Citations
Camera
JP2007300221A
Imaging apparatus, its control method, program, and storage medium
JP2008011264A
Imaging apparatus and imaging method, and imaging control program
JP2009253925A
Electronic camera and image processing apparatus
JP2010104061A
Imaging apparatus
JP2011040990A
