WO2004015987A1 - 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体 - Google Patents

画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体 Download PDF

Info

Publication number
WO2004015987A1
WO2004015987A1 PCT/JP2003/008510 JP0308510W WO2004015987A1 WO 2004015987 A1 WO2004015987 A1 WO 2004015987A1 JP 0308510 W JP0308510 W JP 0308510W WO 2004015987 A1 WO2004015987 A1 WO 2004015987A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
subject
background
overlap
area
Prior art date
Application number
PCT/JP2003/008510
Other languages
English (en)
French (fr)
Inventor
Masashi Hirosawa
Original Assignee
Sharp Kabushiki Kaisha
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
Priority claimed from JP2002233130A external-priority patent/JP3983624B2/ja
Priority claimed from JP2002233012A external-priority patent/JP3983623B2/ja
Application filed by Sharp Kabushiki Kaisha filed Critical Sharp Kabushiki Kaisha
Priority to US10/523,770 priority Critical patent/US7623733B2/en
Priority to AU2003246268A priority patent/AU2003246268A1/en
Publication of WO2004015987A1 publication Critical patent/WO2004015987A1/ja

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Definitions

  • Image compositing apparatus Description Image compositing apparatus, image compositing method, image compositing program, and recording medium recording image compositing program
  • the present invention relates to an apparatus and a method for combining a plurality of separately photographed subjects into a single image as if they exist simultaneously, and at this time, assisting the photographing and compositing without overlapping the subjects. And programs and program media.
  • Japanese Patent Application Laid-Open No. 2000-310316 discloses that the area of a subject is obtained from a plurality of images taken at the same place.
  • an image synthesizing apparatus that can extract an image of a subject or not and combine it with a background to synthesize an image of only the background or an image as if a subject of another image exists simultaneously. I have.
  • the specified area (subject area) in the captured reference image can be displayed on the monitor screen or in the viewfinder, superimposed on the image being captured, and the image in the subject area
  • a digital camera and an image processing method capable of creating image data of a combined image combined with a digital camera are disclosed.
  • the first problem is that if the subject area in the reference image is simply cut out and superimposed on another image, the subject area is incorrectly specified. (3) Unnecessary things are synthesized, and (3) Even if the specification is correct, the synthesis boundary may be slightly unnatural.
  • the subject area specified in the reference image is less than the actual subject area (hereinafter referred to as the designated subject area), the subject is also missing on the composite image. Obviously unnatural.
  • the designated subject area in the reference image is too large in (2) above the actual subject area, it means that the background surrounding the subject on the reference image is also included.
  • the “extra” above is the background that is included.
  • the reference image and the photographed image may be photographed in different places.
  • the image (background on the reference image) may be different from the surrounding background on the composite image (background on the captured image). In this case, the synthesized image is unnatural because the background suddenly changes in the specified subject area.
  • Japanese Patent Laid-Open No. 0 1 — 3 3 3 3 27 With the synthesizing method described in the publication, the specified subject area in the reference image can be arranged at an arbitrary position on the captured image, and the composition can be included in the specified subject area.
  • the background image (background on the reference image) and the background around the composite position on the captured image (background of the captured image) are not necessarily the same background, and the composite result is similarly unnatural .
  • the outline of the specified subject area is not sufficiently accurate if specified in pixel units, and in fact, if it has more than one pixel, it can only be expressed in fine units.
  • the contour pixels originally consist of (0.X) pixels for the subject part and (1.0-0.X) pixels for the background part.
  • the pixel value of the background portion is a value added according to the ratio, that is, an averaged value.
  • the ratio between the subject portion and the background portion cannot be calculated back from the averaged pixel value.
  • the pixel values of the outline of the composite image include the background values of the reference image. It becomes unfamiliar with the background of the surrounding shot image.
  • the above problems (1) to (3) cannot be solved even by the synthesis method disclosed in Japanese Patent Application Laid-Open No. 2000-316125.
  • the publication discloses that registration is performed before superimposing a plurality of images taken at the same place or at places close to each other.
  • the second problem is that if you try to combine a subject area in the reference image with a captured image that contains another subject, take care of the position of the subject at the time of shooting. Otherwise, the subject areas in each image may overlap with each other on the composite image, or one of the subjects may protrude from the composite image.
  • Japanese Patent Laid-Open Publication No. 2000-311 only mainly describes a synthesizing method using a photographed image. It does not mention how to take pictures or prevent them from protruding from composite images.
  • a subject region in a reference image (the user designates an outline using a tablet or the like) And the image being captured can be superimposed and displayed, so that whether the subject overlaps the subject area in the reference image and the subject area in the image being captured when combining,
  • the image processing method disclosed in Japanese Patent Application Laid-Open No. 2000-3333327 a subject region in a reference image (the user designates an outline using a tablet or the like) And the image being captured can be superimposed and displayed, so that whether the subject overlaps the subject area in the reference image and the subject area in the image being captured when combining,
  • the image When shooting, you can know whether the area is outside the composite image. If the subject overlaps or protrudes, you can change the position of the subject in the image being shot by moving the subject or the camera, so that images that do not overlap or protrude can be shot and recorded. become.
  • the present invention has been made in view of the above problems, and a first object is to provide an image synthesizing apparatus (image synthesizing method) that performs synthesis so that a synthesis result does not become unnatural.
  • image synthesizing apparatus image synthesizing method
  • a first image synthesizing device provides a background image which is a background image, and a first object which is an image including at least a part of the background and a first object.
  • the background relative to the image and a second subject image which is an image including at least a part of the background and the second subject.
  • a background correction amount calculating means for calculating a correction amount comprising one or a combination of a moving amount, a rotation amount, an enlargement / reduction ratio, and a distortion correction amount, or reading out the calculated and recorded correction amount;
  • One of the subject image and the second subject image is used as a reference image, and the other two images are corrected by the background correction amount calculating means so that at least a part of the background other than the subject overlaps.
  • a superimposed image generating means for generating an image in which the reference image and one or two other captured images are superimposed.
  • the “first subject” and the “second subject” are objects that are to be synthesized, and are generally a person, but may be an object in general.
  • the “first subject” has an area where the pixel values do not match when the background portion and the first subject image at least partially overlap with each other, that is, there is a change. All areas have the potential to be “areas of the first subject”. Therefore, the background image is obtained for the purpose of extracting the “first subject area” by comparison processing with the first subject image. (Note that the background image may be used to fill in the nonexistent background portion if there is no overlapping background portion between the two images of the first subject image and the second subject image.)
  • the subject when the subject is a person, the subject is not necessarily one person, and a plurality of persons may be collectively referred to as a “first subject” or a “second subject”. In other words, even if there are multiple people, PC leak 00 fine 510
  • the subject is not always limited to one area, and may include a plurality of areas.
  • the “first” and “second” are simply used to distinguish different frame images, and do not indicate the order in which they were shot, and there is no essential difference. Also, for example, if a person has clothes and things,
  • first subject image and “second subject image” are separate images including the above “first subject” and “second subject”.
  • the subject is captured by a camera or the like. This is a photographed image.
  • the background part common to the background image is not shown at all, it is not suitable for synthesis, and at least a part of the background part common to the background image is shown. Need to be.
  • the first subject image and the second subject image are often taken using the same background, that is, without moving the camera very much.
  • the camera that shoots the subject need not be a still camera that records images as still images, but may be a video camera that records images as moving images.
  • a still camera that records images as still images
  • a video camera that records images as moving images.
  • one frame image that composes the captured moving image is extracted as a subject image and used for composition.
  • the “background” is a part of the landscape excluding the “first subject” and the “ second subject”.
  • Background image refers to the background of each of the first subject image and the second subject image.
  • the image includes at least a part of the image of the scenery portion, and the first subject and the second subject are not shown.
  • shooting is performed using the same background as the first subject image and the second subject image, that is, without moving the camera so much that the first subject and the second subject are separated from the front of the camera.
  • the “background other than the first and second objects” is the remaining part of the first object image and the second object image excluding the first object area and the second object area.
  • the “movement amount” is the amount by which another image is translated to a position where at least a part of the background overlaps the reference image, but it may be said that the movement amount of the corresponding point at the center of rotation or enlargement / reduction.
  • the “distortion correction amount” is a correction amount for correcting the remaining changes that cannot be corrected by translation, rotation, or scaling among changes in the captured image due to changes in the position or direction of the camera or lens. is there. For example, this includes cases where when photographing a tall building, the upper part is reduced in size due to the perspective effect, even if it is the same size.
  • the ⁇ superimposed image generation means '' generates a superimposed image, but it is not necessary to generate it as one image data, and it may look as if it were combined with image data of other means. Absent. For example, when displaying an image on the display means, if another image is partially displayed so as to overwrite the image, one composite image data is generated from two image data, and the composite image It looks as though it is displaying data, but in reality, there is only an image based on the two image data, Does not exist.
  • the background correction amount calculation means for example, a method of calculating a partial correspondence between two images, such as block matching, can be adopted.
  • a method of calculating a partial correspondence between two images such as block matching.
  • the superimposed image generating means creates an image in which the other two images are corrected so that the background portions coincide with each other based on the correction amount calculated by the background correction amount calculating means.
  • the obtained correction amount means the relationship between the two images. For example, if the relationship between A and B and the relationship between B and C are known, the relationship between A and C can be understood. Even if is selected as the reference image, the relationship between the image and the other two images can be calculated as the correction amount by the background correction amount calculating means.
  • the superimposed image generation means generates an image in which one or two captured images are superimposed on the reference image.
  • the image data of the pixels corresponding to the positions of the three images may be mixed at an arbitrary ratio proportionally distributed in the range of 0 to 1. For example, if the ratio of the background image is 0, the ratio of the first subject image is 1, and the ratio of the second subject image is 0, the pixel Only the image data of the first subject image is written in the. Assuming that the mixing ratio of the three images is 1: 1: 1, the pixel is written with image data obtained by uniformly combining the image data of the three images.
  • How to set the mixture ratio is not essential to the present invention, but depends on the purpose of the user who wants to display or output the superimposed image.
  • the first subject and the second subject can be synthesized on one image with the background portions thereof being matched.
  • the background image When the background image is used as the reference image, at least “the first subject area” and “the second subject area” extracted from the corrected first subject image and the corrected second subject image.
  • the force S is combined with the background image.
  • each background portion other than the “region of the ith subject” and the “region of the second subject” may be synthesized with the corresponding pixel of the background image at a predetermined ratio, or at all. It is not necessary to combine them.
  • the area of the subject extracted from the other corrected subject image is set as the reference image by comparison processing with the corrected background image.
  • a superimposed image may be generated simply by synthesizing, or a corresponding pixel of the background image may be synthesized with the background portion of the reference image at an appropriate ratio between 0 and 1.
  • the outer part ie, the background part
  • the outer part has almost the same combined result no matter how they are overlapped, and the combined result does not look unnatural.
  • the background part around the subject area deviates from the part of the image to be synthesized. Since there is no distortion or distortion, the inside and outside of the inaccurate area are synthesized as a continuous landscape, which has the effect of reducing the unnatural appearance.
  • the unnaturalness at a level finer than one pixel will be revealed by the method of the prior art as described in the problem section, but in the present invention, Since the background part is combined before the composition, the pixels around the contour pixel are pixels at the same background part position, so even if they are composed, the connection is almost natural. In this way, the effect of preventing or reducing unnaturalness at a level finer than one pixel is obtained.
  • the camera since the background is corrected and combined, the camera does not need to be fixed with a tripod or the like when shooting the background image or the first and second object images. The better it is, the easier it is to shoot.
  • the background correction amount calculation means The correction amount cannot be calculated.
  • the background image and the background image of the first subject image do overlap, even if the background portion does not overlap between the first subject image and the second subject image. If there is an overlap in the background portion, the correction amount between the first subject image and the second subject image can be calculated.
  • the background between the background portion of the first subject image and the background portion of the second subject image is missing, if the background portion of the background image fills the missing background portion, the background portion does not overlap. The effect of being able to combine the first subject image and the second subject image that do not have a continuous background is obtained.
  • the first image synthesizing device extracts a first subject region and a second subject region from a difference image between the reference image and another corrected one or two images. Further comprising a subject area extracting means for performing the correction in the area obtained from the reference image and the subject area extracting means, instead of overlapping the reference image with one or two other corrected images. It is also possible to adopt a configuration in which one or two other images are overlapped.
  • the “subject region” is a region separated by a boundary where the subject is separated from the background. For example, if a person has clothes and things and they do not appear in the background image, they are also subjects and are included in the subject area. It should be noted that the area of the subject is not necessarily limited to one connected area, and may be divided into a plurality of areas.
  • “Overlapping the ' ⁇ ' image in the area obtained from the subject area extracting means” does not mean that no image is generated except for that area, and that the other area is filled with a reference image or the like. means. Since the background part is corrected to match, what appears as the difference is mainly the subject part. Therefore, the subject region included in the difference image can be extracted by the subject region extracting means. At this time, if processing such as removing noise or the like from the difference image (for example, excluding a pixel whose difference pixel value is equal to or less than a threshold value) is performed, the subject region can be more accurately extracted.
  • the pixel value of each pixel position is determined, but the image of the subject is superimposed only when the pixel position is within the subject area obtained from the subject area extracting means.
  • composition is performed by changing the transmittance of the subject area, it is easy for the user to understand which area is being combined, and if there is overlap between the subjects, the effect becomes even easier to understand. Come out. In addition, this has the effect of assisting shooting so that overlapping does not occur.
  • the background correction amount by using only the first subject image and the second subject image without using the background image, correcting one of them, generating a difference image, and obtaining the difference region requires the background portion to be calculated. It is possible if there is an appropriate amount of overlap. At that time, if there is no overlap between the area of the first subject and the area of the second subject, the difference area is an area having the outline of the first subject (here, referred to as “first area” for the sake of explanation). And a region having the outline of the second subject (also called the “second region”).
  • the first region or the second region is the subject portion, and the other is the background portion. Background part).
  • the first subject image one is the first subject portion and the other is the background portion.
  • the first region one of the first region in the first subject image and the first region in the second subject image is the subject portion, and the other is the background portion.
  • the subject region obtained from the background image and the corrected first subject image is only the first region.
  • the corrected The first region in one subject image is the subject portion
  • the first region in the background image is the background portion.
  • the second subject image Since the first area and the second area are not detected at the same time from the difference image, it is possible to immediately determine which is the subject and which is the background.
  • the first subject region or the second subject region can be easily extracted.
  • the area of the first object or the area of the second object can be respectively extracted, when each object has an overlap, which one is prioritized to be synthesized, that is, in the overlapping portion, the first object is This also has the effect of allowing you to decide whether to combine the subject above or below the subject.
  • a second image synthesizing device includes: a first subject image which is an image including a background and a first subject; and at least a part of the background and a second subject image. Calculates any of the relative movement amount, rotation amount, enlargement / reduction ratio, and distortion correction amount of the background portion with respect to the second subject image which is the image containing Or a background correction amount calculating means for reading out a correction amount calculated in advance, and using one of the first subject image and the second subject image as a reference image, and using the other image as a background portion other than the subject.
  • the image processing apparatus further includes a superimposed image generation unit that generates an image in which the reference image and the corrected image are superimposed by performing correction with the correction amount obtained from the background correction amount calculation unit so that the image overlaps at least partially.
  • the “first subject” and the “second subject” are objects that are to be synthesized, and are generally a person, but may be an object in general. Strictly speaking, the “subject” is composed of the first subject image and the second subject image. When the background part at least partially overlaps with the object image, the area where the pixel values do not match, that is, the area where there is a change, may all be the “subject area”.
  • the subject when the subject is a person, the subject is not necessarily one person, and a plurality of persons may be collectively referred to as a “first subject” or a “second subject”. In other words, even if there are multiple people, what is treated collectively as a unit of synthesis processing is one “subject”. The same applies to objects other than people.
  • the subject is not always limited to one area, and may include a plurality of areas.
  • the “first” and “second” are simply used to distinguish different frame images, and do not indicate the order in which they were shot, and there is no essential difference. Also, for example, if a person has clothes and things,
  • first subject image and “second subject image” are separate images including the above “first subject” and “second subject”.
  • the subject is captured by a camera or the like. This is a photographed image.
  • the first subject image and the second subject image are In many cases, shooting is performed using the same background, that is, without moving the camera very much.
  • the camera that shoots the subject need not be a still camera that records images as still images, but may be a video camera that records images as moving images.
  • a video camera When a video camera generates a superimposed image as a still image, an image of one frame constituting the captured moving image is extracted as a subject image and used for composition.
  • the “background portion” is a portion obtained by removing the “first subject” and the “second subject” from the first subject image and the second subject image.
  • the “movement amount” and the “distortion correction amount” are as described in the first image combining device.
  • the “superimposed image generating means” generates a superimposed image, but does not necessarily have to generate it as one image data, and may look as if it were synthesized with image data of another means. For example, when displaying an image on the display means, if another image is partially displayed so as to overwrite the image, one composite image data is generated from two image data, and the composite image It looks as though it is displaying data, but in reality there is only an image based on the two image data, and there is no composite image data.
  • the background correction amount calculation means for example, a method of calculating a partial correspondence between two images, such as block matching, can be adopted. If the correspondence between the two images, the first subject image and the second subject image, is obtained using these methods, if there is a part that matches the background part, the positional correspondence of that part can be calculated. it can. Suffered Since the object part does not exist in other images, that part will get the wrong correspondence. From the correct correspondence of the background part and the wrong correspondence of the subject part, only the correct correspondence of the background part is obtained by using a statistical method or the like. From the remaining correct correspondence, the correction amount consisting of any or a combination of the relative movement amount, rotation amount, enlargement / reduction ratio, and distortion correction amount of the background part can be calculated.
  • the superimposed image generation means creates an image in which the other image is corrected so that the background portion matches the reference image, based on the correction amount calculated by the background correction amount calculation means. Then, the superimposed image generating means generates an image in which the corrected image is superimposed on the reference image.
  • the image data of the pixels corresponding to the positions of the two images may be mixed at an arbitrary ratio proportionally distributed in the range of 0 to 1. For example, if the ratio of the first subject image is 1 and the ratio of the second subject image is 0, only the image data of the first subject image is written to the pixel. If the mixing ratio of the two images is 1: 1, the image data that is obtained by uniformly combining the image data of the two images is written to the pixel.
  • How to set the mixing ratio is not essential for the present invention. It depends on the purpose of the user who wants to display or output a superimposed image.
  • the first subject and the second subject can be combined on one image with the background portions matched.
  • the unnaturalness at a level finer than one pixel can be obtained by the method of the related art as described in the problem section.
  • the pixels surrounding the contour pixels are pixels at the same background part position, so that the composition is almost natural even when composed. In this way, the effect of preventing or reducing unnaturalness at a level finer than one pixel is obtained.
  • composition is corrected by correcting the background displacement and distortion, it is not necessary to fix the camera or the like with a tripod when taking the first and second subject images. The effect is that shooting becomes easier.
  • the operation of the background correction amount calculating means of calculating the correction amount including any or a combination of the relative movement amount, the rotation amount, the enlargement / reduction ratio, and the distortion correction amount of the background portion is referred to as the background portion.
  • the correction amount may be calculated by combining one or more of the relative rotation amount, the relative rotation amount, the enlargement / reduction ratio, and the distortion correction amount. As a result, the accuracy of correction is further improved, and a more natural synthesis result can be obtained.
  • the user wants to emphasize the accuracy of the correction and the processing speed or the processing load. Use different cases Operability of the image synthesizing apparatus is improved.
  • a subject area extracting means for extracting a first subject area and a second subject area from a difference image between the reference image and the corrected image.
  • the superimposed image generating means may superimpose a reference image or a captured image and an image in an area obtained from the subject area extracting means, instead of superimposing the reference image and the corrected image. it can.
  • the “subject region” is a region separated by a boundary where the subject is separated from the background. For example, if a person has clothes and objects in the first subject image and they do not appear in the second subject image, they are also subjects and are included in the subject area. It should be noted that the area of the subject is not necessarily a block of connected areas and may be divided into a plurality of areas.
  • “Overlapping the ' ⁇ ' image in the area obtained from the subject area extracting means” does not mean that no image is generated except for that area, and that the other area is filled with a reference image or the like. means.
  • the subject region included in the difference image can be extracted by the subject region extracting means. At this time, if processing such as removing noise or the like from the difference image (for example, excluding a pixel whose difference pixel value is equal to or less than a threshold value) is performed, the subject region can be more accurately extracted.
  • the pixel value at each pixel position is determined, but only when the pixel position is within the subject area obtained from the subject area extraction means PC hibernation 08510
  • FIG. 1 is a block diagram showing a functional configuration of a first image synthesizing apparatus according to the present invention.
  • FIG. 2 shows a configuration example of a device that specifically realizes each unit of the above-mentioned image composition device.
  • Fig. 3 (a) is a schematic perspective view showing an example of the outer appearance of the back of the image synthesizing device
  • Fig. 3 (b) is a schematic perspective view showing an example of the outer appearance of the front surface of the image synthesizing device. is there.
  • FIG. 4 is an explanatory diagram illustrating a data structure example of image data.
  • FIG. 5 is a flowchart showing the flow of the entire image synthesizing method.
  • Fig. 6 (a) is an explanatory diagram showing an example of a background image
  • Fig. 6 (b) is an explanatory diagram explaining the arrangement of reference blocks in the background image
  • Fig. 6 (c) is an illustration showing the background.
  • FIG. 6D is an explanatory diagram illustrating a corrected background image obtained by correcting an image
  • FIG. 6D is an explanatory diagram illustrating a mask image of the corrected background image.
  • FIG. 7A is an explanatory diagram showing an example of the first subject image
  • FIG. 7B is an explanatory diagram for explaining the arrangement of the remaining matching books in the first subject image.
  • FIG. 8 (a) is an explanatory diagram showing an example of the second subject image
  • FIG. 8 (b) is an explanatory diagram showing the arrangement of the remaining matching blocks in the second subject image
  • FIG. 8 (c) is an explanatory diagram for explaining a corrected second object image obtained by correcting the second object image
  • FIG. 8D is an explanatory diagram for explaining a mask image of the corrected second object image.
  • Fig. 9 (a) is an explanatory diagram showing an example of a difference image between the first subject image and the corrected background image
  • Fig. 9 (b) is an explanatory diagram showing an example of a label image generated from the above difference image.
  • c) is an explanatory diagram showing an example of a label image in which a noise portion has been removed from the label image
  • FIG. 9 (d) is an explanatory diagram showing an example of a first subject region image in which a first subject region has been extracted from the label image. It is.
  • Figure 10 (a) shows an example of the difference image between the second subject image and the corrected background image.
  • FIG. 10 (b) is an explanatory diagram showing an example of a label image generated from the above difference image
  • Fig. 10 (c) is an explanatory diagram showing an example of a label image obtained by removing noise from the label image
  • FIG. 10D is an explanatory diagram showing an example of a second subject area image in which a second subject area is extracted from the label image
  • FIG. 11 (a) is an explanatory diagram showing an example of a superimposed image in which the first subject region portion of FIG. 9 (d), the second subject region portion of FIG. 10 (d), and the background portion are superimposed and synthesized.
  • 1 (b) is an explanatory diagram showing an example of a superimposed image in which the first subject region is made translucent and superimposed
  • FIG. 11 (c) is a diagram in which the second subject region is translucent and superimposed. It is an explanatory view showing an example of a superimposed image.
  • FIG. 12 is an explanatory diagram showing an example of an overlapping image of the first subject area in FIG. 9D and the second subject area in FIG. 20B.
  • Fig. 13 (a) the first subject area in Fig. 9 (d), the second subject area in Fig. 20 (b), and the background are superimposed and synthesized, and the overlap is prominently displayed.
  • FIG. 13 (b) is an explanatory diagram showing an example of a superimposed image.
  • FIG. 13C is an explanatory diagram showing an example of a superimposed image synthesized by superimposing and transposing the L5 mapping object region portion
  • FIG. 13C is an explanatory diagram showing an example in which an overlapping warning message is displayed.
  • FIG. 14 is a flowchart illustrating a method of acquiring a second subject image.
  • FIG. 15 is a flowchart illustrating a method of calculating the background correction amount.
  • FIG. 16 (a) is an explanatory diagram showing an example of a reference image for explaining block matching
  • FIG. 16 (b) is an explanatory diagram showing an example of a search image for explaining block matching.
  • FIG. 17 is a flowchart illustrating a method of generating a background image and a corrected image of the second subject image, and generating a difference image from the first subject image.
  • FIG. 18 (a) is an explanatory diagram showing an example of a rotating second subject image.
  • FIG. 18 (b) is an explanatory diagram showing the arrangement of remaining matching blocks in the second subject image.
  • FIG. 18 (c) is an explanatory diagram illustrating a corrected second subject image obtained by correcting the second subject image, and
  • FIG. 18 (d) is a diagram illustrating a mask image of the corrected second subject image.
  • FIG. 19 is a flowchart illustrating a method of extracting a subject region.
  • FIG. 20 (a) is an explanatory diagram showing an example of the second subject image in which the first subject and the subject region overlap each other in FIG. 7 (a), and FIG. 20 (b) is extracted from the second subject image.
  • FIG. 9 is an explanatory diagram showing an example of a second subject area image.
  • FIG. 21 is a flowchart illustrating one method of performing a process of warning that the subject areas overlap.
  • FIG. 22 is a flowchart illustrating a method of notifying a photo opportunity when there is no overlap in the subject areas.
  • FIG. 23 is a flowchart illustrating a method of performing an automatic shutter when there is no overlap in the subject areas.
  • FIG. 24 is a flowchart illustrating a method of notifying a direction in which the overlap is eliminated when the subject areas overlap.
  • FIG. 25 is an explanatory diagram for explaining a direction in which the subject region does not overlap.
  • FIG. 26 (a) shows that when the subject area has an overlap, the overlap disappears
  • FIG. 26 (b) is an explanatory diagram for explaining an example of notifying the direction
  • FIG. 26 (b) is an explanatory diagram for explaining an example of notifying the position and the direction where the overlap is eliminated when the subject regions overlap.
  • FIG. 27 is a flowchart illustrating a method of notifying a position where the overlap is eliminated when the subject area has an overlap.
  • FIGS. 28 (a) to 28 (d) are explanatory diagrams illustrating examples in which the second subject area is moved up, down, left, and right.
  • FIGS. 29 (a) to 29 (d) show the overlapping areas of the first subject area of FIG. 9 (d) and the second subject areas of FIGS. 28 (a) to 28 (d).
  • FIG. 29 (a) to 29 (d) show the overlapping areas of the first subject area of FIG. 9 (d) and the second subject areas of FIGS. 28 (a) to 28 (d).
  • FIG. 30 is a flowchart illustrating a method of generating an overlapping image.
  • FIG. 31 is an explanatory diagram illustrating a display example in a case where a superimposed image is generated with priority given to the first subject.
  • FIG. 32 is an explanatory diagram illustrating a display example in a case where a superimposed image is generated with priority given to the second subject.
  • FIG. 33 is a block diagram showing a functional configuration of the second image composition device of the present invention.
  • FIG. 34 is a block diagram illustrating a configuration example of a device that specifically realizes each unit of the second image composition device.
  • FIG. 35 (a) is a schematic perspective view showing an example of the back surface of the second image synthesizing device
  • FIG. 35 (b) is a schematic diagram showing an example of the front surface of the second image synthesizing device.
  • FIG. 36 shows the overall flow of the image composition method in the second image composition device.
  • FIG. 37 (a) is an explanatory diagram showing an example of the first subject image
  • FIG. 37 (b) is an explanatory diagram explaining the arrangement of the reference matching blocks in the first subject image of FIG. 37 (a).
  • FIG. 38 (a) is an explanatory diagram showing an example of the second subject image
  • FIG. 38 (b) is an illustration of the arrangement of the matching blocks detected in the second subject image of FIG. 38 (a).
  • FIG. 38 (c) is an explanatory diagram illustrating a corrected second subject image obtained by capturing the second subject image of FIG. 38 (a)
  • FIG. 38 (d) is a diagram illustrating FIG.
  • FIG. 9C is an explanatory diagram illustrating a mask image of the corrected second subject image in c).
  • FIG. 39 (a) is an explanatory diagram showing an example of a difference image between the first subject image of FIG. 37 (a) and the corrected second subject image of FIG. 38 (c)
  • FIG. 39 (b) is Fig.
  • Fig. 39 (a) is an explanatory diagram showing an example of a label image generated from the difference image.
  • Fig. 39 (c) is an explanatory diagram showing an example of a label image obtained by removing noise from the label image of Fig. 39 (b). It is.
  • FIG. 40 (a) is an explanatory diagram showing an example of a superimposed image obtained by superimposing the first subject image of FIG. 37 (a) on the second subject area portion of FIG. 49 (d), and FIG. ) Is overlaid on the first subject image in Fig. 37 (a) by making the first subject area in Fig. 49 (b) translucent, and the second subject area in Fig. 49 (d) is overlaid.
  • FIG. 40 (c) is an explanatory diagram showing an example of a superimposed image obtained by superimposing and combining the first subject image of FIG. 37 (a) and the second subject area portion of FIG. 49 (d) by making it semi-transparent.
  • FIG. 10 is an explanatory diagram showing an example of a superimposed image obtained by overlapping and superimposing.
  • FIG. 41 is an explanatory diagram illustrating an example of the second subject image in which the first subject and the subject region overlap each other in FIG. 37 (a).
  • Figure 42 (a) shows the first subject image of Figure 37 (a) and the second subject image of Figure 41.
  • Fig. 42 (b) is an explanatory diagram showing an example of a difference image of the body image from the corrected image
  • Fig. 42 (b) is an explanatory diagram showing an example of a label image generated from the difference image of Fig. 42 (a)
  • Fig. 42 (c) is FIG. 42 is an explanatory diagram showing an example of a label image in which a noise portion has been removed from the label image of FIG. 42 (b).
  • FIG. 43 is an explanatory diagram showing an example in which the subject region portion of FIG. 42 (c) is overlapped with a half transmittance and synthesized, and an overlap warning message is displayed.
  • FIG. 44 is a flowchart illustrating a method of acquiring the second subject image.
  • FIG. 45 is a flowchart illustrating a method of calculating the background correction amount.
  • FIG. 46 is a flowchart illustrating a method of generating a corrected image of the second subject image and generating a difference image from the first subject image.
  • Fig. 47 (a) is an explanatory diagram showing an example of a rotating second subject image
  • Fig. 47 (b) is a diagram of a detected matching block in the second subject image in Fig. 47 (a).
  • FIG. 47 (c) is an explanatory diagram for explaining the arrangement
  • FIG. 47 (c) is an explanatory diagram for explaining a corrected second subject image obtained by correcting the second subject image of FIG. 47 (a).
  • FIG. 7 is an explanatory diagram for explaining a mask image of the corrected second subject image image of (c).
  • FIG. 48 is a flowchart illustrating a method of extracting a subject region.
  • FIG. 49 (a) is an explanatory view showing an image of the first subject area in the first subject image of FIG. 37 (a), and FIG. 49 (b) is a second subject of FIG. 38 (a).
  • FIG. 49 (c) is an explanatory diagram showing an image of the first subject region in the image.
  • FIG. 49 (c) is an explanatory diagram showing an image of the second subject region in the first subject image in FIG. 37 (a).
  • 9 (d) is an explanatory diagram showing an image of the second subject area in the second subject image of FIG. 38 (a).
  • FIG. 50 is a flowchart for explaining one method of processing to warn of overlapping of subject areas.
  • FIG. 51 is a flowchart illustrating a method of notifying a photo opportunity when there is no overlap in the subject areas.
  • FIG. 52 is a flowchart illustrating a method of performing an automatic shutter when there is no overlap in the subject areas.
  • FIG. 53 is a flowchart illustrating a method of generating an overlapping image.
  • first subject and the “second subject” are objects to be combined, and are generally a person, but may be an object. Strictly speaking, the “first subject” is an area where the pixel values do not match when the background portion and the first subject image at least partially overlap the background, that is, the change There is a possibility that all areas will be "areas of the first subject”. However, even small changes such as the leaves swaying due to the wind in the background will be areas where there is a change. It is preferable to ignore it. The same applies to the “second subject”.
  • the subject when the subject is a person, the subject is not necessarily one person, and a plurality of persons may be collectively referred to as a “first subject” or a “second subject”. In other words, even if there are multiple people, what is treated collectively as a unit of the synthesis processing is one “subject”.
  • the subject is not always limited to one area, and may include a plurality of areas.
  • the “first” and “second” are simply used to distinguish different frame images, and do not indicate the order of shooting, etc., and have no essential difference. Also, for example, if a person has clothes and things, and they do not appear in the “image of only the background that does not include the first and second subjects”, they are also included in the subject.
  • the “first subject image” and the “second subject image” are separate images including the “first subject J” and the “second subject”.
  • the subject is captured by a camera or the like. These are images taken separately.
  • the first subject image and the second subject image are often taken using the same background, that is, without moving the camera much.
  • the “background portion” is a portion obtained by removing the “first subject” and the “second subject” from the landscape.
  • the “background image” is an image that includes at least a part of the background image of each of the first subject image and the second subject image, and does not include the first subject and the second subject. Things.
  • the first subject image and the second subject image are often taken using the same background as the first subject image, that is, without moving the camera so much that the first subject and the second subject are separated from the front of the camera.
  • first subject image and the second subject image may each include a background portion common to the background image to such an extent that the first subject image and the second subject image can be aligned with the background image. Therefore, the relationship between the background portions of the first subject image and the second subject image includes all cases of complete match, partial match, and complete mismatch.
  • the “background portion other than the first and second subjects” is the remaining portion of the first and second subject images excluding the first and second subject regions.
  • the “movement amount” is the amount of translation, but it can also be said to be the movement amount of the corresponding point at the center of rotation or scaling.
  • the “distortion correction amount” is a correction amount for correcting the remaining changes that cannot be corrected by translation, rotation, or scaling among changes in the captured image due to changes in the position or direction of the camera or lens. is there. For example, this includes cases where when photographing a tall building, the upper part is reduced in size due to the perspective effect, even if it is the same size.
  • the “superimposed image generation means” generates a superimposed image, but it is not always necessary to generate the superimposed image as a single image.
  • Pigment value is the value of a pixel, and is generally expressed using a predetermined number of bits. For example, black and white binary is represented by 1 bit, and 256 grayscale monochrome is 8-bit, red, green, and blue colors. Expressed in bits. In the case of color, it is often expressed in the three primary colors of red, green, and blue.
  • the “transmittance” is a “predetermined ratio value” to be multiplied in a process of multiplying the pixel values of a plurality of pixels by a predetermined ratio value and setting the sum thereof as a new pixel value.
  • the value is 0 or more and 1 or less.
  • the sum of the transmittance of each pixel used in one new pixel value is 1. It is sometimes called “opacity” instead of “transmittance”.
  • Transparency is 1 minus "Opacity”.
  • the “predetermined transmittance” includes a fixed value, a value that changes according to the region, and a value that gradually changes near the boundary of the region.
  • a “difference image” is a comparison of the pixel values at the same position in two images, and Difficult 08510
  • the difference value often takes an absolute value.
  • Pigment value different from the original pixel value means, for example, translucent to make it translucent, inverting the brightness or hue of the pixel value, inverting the pixel value, or displaying a conspicuous color such as red, white, or black It is a pixel value that realizes the following. Also, try changing the pixel value between the boundary and the inside of the area as described above, encircling the boundary with a dotted line, and blinking (changing the pixel value over time). This includes cases such as
  • the “subject area” is an area delimited by a boundary where the subject is separated from the background. For example, if a person has clothes or objects in the first subject image and they do not appear in the background image, they are also subjects and are included in the area of the subject. It should be noted that the subject area is not necessarily a connected block, and may be divided into a plurality of areas.
  • “Overlapping only the region obtained from the subject region extracting means” does not mean that no image is generated except for the region, but means that the other region is filled with a reference image or the like.
  • Warning '' includes warnings with characters or images on display means, etc., as well as any method that can be sensed by the user or subject, such as light from a lamp, sound from a speaker, or vibration from a vibrator. It is.
  • Notification like “warning”, includes any method that can be detected by the user or the subject.
  • “Frame” refers to the rectangle of the entire image. If the subject is partly on the edge (outline outline) of the image, And cut off from the frame.
  • FIG. 1 is a configuration diagram illustrating an image synthesizing apparatus that performs an image synthesizing method according to an embodiment of the present invention.
  • the main parts of the image synthesizing apparatus are divided into a first subject image acquiring unit 1, a background image acquiring unit 2, a second subject image acquiring unit 3, a background correction amount calculating unit 4, a corrected image generating unit 5, a difference image generating unit 6.
  • FIG. 2 is a configuration example of a device that specifically realizes each of the units 1 to 16 in FIG.
  • CPU (central processing singing unit) 70 0 is a background correction amount calculating means 4 a captured image generating means 5, a difference image generating means 6, a subject area extracting means 7, an overlap detecting means 8, an overlapping image generating means 9, Overlay image display means 10, overlap avoidance method calculation means 11, overlap avoidance method notification means 12, overlap warning means 13, shutter chance notification means 14, function as automatic shutter means 15, and each of these means
  • a program in which the processing steps 1 to 16 are described is obtained from the main memory 74, the external memory 75, a network destination via the communication device 77, and the like.
  • the first subject image acquiring unit 1, the background image acquiring unit 2, the second subject image acquiring unit 3, and the imaging unit 16 also include an image sensor and internal control for various processes of image data output by the image sensor.
  • a CPU is used for this purpose.
  • the CPU 70 includes a display 71, an image sensor 72, a tablet 73, a main memory 74, an external memory 75, and a shutter button 76 interconnected through a path 79 including the CPU 70. Processing is performed while exchanging data with the communication device 77, the lamp 78, and the speaker 80.
  • the data exchange may be performed not only via the bus 79 but also via a communication cable or a wireless communication device such as a wireless communication device capable of transmitting and receiving data.
  • the means for realizing each of the means 1 to 16 is not limited to CPU, but may be a digital signal processor (DSP) or a logic circuit in which a processing procedure is incorporated as a circuit.
  • DSP digital signal processor
  • the display 71 is usually realized in combination with a graphic card or the like, has a video random access memory (VRAM) on the graphic card, converts data in the VRAM into a display signal, and outputs the data to a display such as a monitor. (Display Z output medium), and the display displays the display signal as an image.
  • VRAM video random access memory
  • the imaging device 72 is a device that obtains an image signal by photographing a landscape or the like, and usually includes an optical system component such as a lens, a light receiving device, and an electronic circuit associated therewith.
  • the image sensor 72 includes a portion up to conversion into digital image data through an A / D converter or the like. It is assumed that the captured image data is sent to the acquisition unit 2, the second subject image acquisition unit 3, and the like.
  • a general device as an image sensor there is, for example, a CCD (charge coupled device). However, any other device that can obtain scenery or the like as image data may be used.
  • the user's instruction is input to each of the means 1 to 16 via the bus 79.
  • various input means such as various operation buttons and voice input by a microphone can be used.
  • the tablet 73 includes a pen and a detecting device for detecting the pen position.
  • the shutter button 76 is made up of a mechanical or electronic switch. When a user presses a button, an image captured by the image sensor 72 is usually stored in a main memory 74 or an external memory 75. A start signal is generated to start a series of processes such as recording.
  • a memory or a register included in the CPU may be interpreted as a kind of main memory.
  • the external memory 75 is a removable storage means such as a hard disk drive (HDD) or a personal computer (PC) card. Or other network connected to CPU 70 via a wired or wireless network
  • L5 Main memory or external memory attached to the work equipment can be used as external memory 75.
  • the communication device 77 is realized by a network interface card or the like, and exchanges data with other network devices connected by wireless or wired communication.
  • the speaker 80 interprets voice data transmitted via the path 79 or the like as a voice signal and outputs it as voice.
  • the output voice can be a simple single-wavelength sound, or it can be complex, such as music or human voice. If the audio to be output is predetermined, the transmitted data may not be an audio signal but merely an ON / OFF operation control signal.
  • 03 008510
  • each of the means 1 to 16 in FIG. 1 will be described from the viewpoint of data transfer between the means.
  • the data exchange between each means is mainly expressed by buses when the expressions “* obtained from the means” and “sends (passes) to the * means” are used without any particular annotation.
  • data may be exchanged directly between each means, or data may be exchanged between the main memory 74, external memory 75, and the network via the communication device 77. In some cases.
  • the first subject image obtaining means 1 includes, for example, an imaging means 16 including an image sensor 72, a main memory 74, an external memory 75, and the like, and captures the first subject image in the imaging means 16 and the main memory 7. 4. External storage 75, obtained from a network destination via communication device 77, etc.
  • the first subject image obtaining means 1 may include an image sensor 72 or a CPU for internal control of various processes of image data output from the image sensor 72, for example.
  • the imaging means 16 the current scenery (the first subject image) including the first subject is photographed by the image sensor 72, and usually, the timing when the shutter button 1 6 or the like is pressed is used.
  • the captured images are recorded in the main memory ⁇ 4, the external memory ⁇ ⁇ 75, and the network via the communication device 777.
  • the first subject image obtaining means 1 obtains the first subject image from a network destination via the main memory 74, the external memory 75, and / or the communication device 77, the image has already been taken. Then, an image prepared in advance is read. In addition, there is a camera at a network destination or the like via the communication device 77, and an image may be taken through the network.
  • the first subject image is sent to background correction amount calculating means 4, corrected image generating means 5, difference image generating means 6, subject area extracting means 7, and / or superimposed image generating means 9, and the like.
  • the background image acquiring means 2 includes, for example, an imaging means 16 including an imaging element 72, a main storage 74, and Z or an external storage 75, and the like. Obtained from an external storage 75 and a network destination via Z or a communication device 77.
  • the background image acquiring means 2 may include a CPU or the like for the above-described internal control. Except for the content of the image, the method of acquiring the image is the same as that of the first subject image acquiring means 1.
  • the background image is sent to the background correction amount calculating means 4, the corrected image generating means 5, and / or the difference image generating means 6.
  • the second subject image acquiring means 3 includes, for example, an imaging means 16 including an image sensor 72, a main memory 74, and Z or an external memory 75, and includes an image including a second subject (second object). Image) from the imaging means 16, the main memory 74, the external memory 75, and / or a network via the communication device 77.
  • the second subject image acquiring means 3 may include a CPU or the like for the purpose of external control or the like. Except for the content of the image, the method of acquiring the image is the same as that of the first subject image acquiring means 1.
  • the second subject image is sent to the background correction amount calculating means 4, the corrected image generating means 5, the difference image generating means 6, the subject area extracting means 7, and / or the superimposed image generating means 9, and the like.
  • the CPU 70 as the background correction amount calculation means 4 includes a relative movement amount of the first object image, the second object image, and the background other than the object in the background image, Calculate the correction amount consisting of any one or combination of rotation amount, enlargement / reduction ratio and distortion correction amount.
  • the minimum correction amount between the reference image and the other images may be obtained.
  • the correction amount for the reference image can be finally calculated as long as at least one of the reference image and the other images, or both, has a background that is at least partially common.
  • the correction amount between the reference image and another image may be calculated indirectly instead of directly. For example, when the first subject image is the reference image, even if the correction amount between the reference image and the second subject image or the correction amount between the reference image and the background image is not directly obtained, the reference image and the background image are not obtained. If the correction amount between images and the correction amount between the second subject image and the background image can be directly obtained, the correction amount between the reference image and the second subject image should be calculated from the two correction amounts. Is also possible.
  • the background correction amount calculation means 4 sends the calculated correction amount to the correction image generation means 5.
  • the correction amount is obtained from the main memory 74, the external memory 75, and / or a network destination via the communication device 77. A positive amount will be read.
  • the CPU 70 as the corrected image generation means 5 uses any one of the first subject image, the second subject image, and the background image as a reference image, and uses the other two images as background portions other than the subject.
  • An image corrected by the correction amount obtained from the background correction amount calculation means 4 so as to be overlapped is generated and sent to the difference image generation means 6 and the superimposed image generation means 9.
  • the correction image generation means 5 reads out the corrected image generated in advance, the main storage 74, the external storage 75, and Z or the communication data are read. It will be read out from the network destination via the PIC77.
  • the CPU 70 as the difference image generation means 6 is configured to calculate the difference between the reference image determined by the correction image generation means 5 and another corrected one or two images obtained from the correction image generation means 5. An image is generated, and the generated difference image is sent to the subject region extracting means 7 and the superimposed image generating means 9.
  • the reference image is one of a first subject image, a second subject image, and a background image.
  • the CPU 70 as the subject area extracting means 7 extracts the first and second subject areas from the difference image obtained from the difference image generating means 6 and overlaps the extracted areas with the overlap detecting means 8 and This is sent to the superimposed image generating means 9.
  • the CPU 70 as the overlap detecting means 8 detects the overlap between the first and second subjects from the first and second subject areas obtained from the subject area extracting means 7, and determines the overlap.
  • the information on whether or not there is an object and the information on the overlapping area are sent to the superimposed image generating means 9, the overlapping avoiding method calculating means 11, the overlapping warning means 13, the photo opportunity notifying means 14 and the automatic shirting means 15.
  • the CPU 70 as the superimposed image generating means 9 obtains the first subject image obtained from the first subject image obtaining means 1, the second subject image obtained from the second subject image obtaining means 3, and the second subject image obtained from the background image obtaining means 2. An image in which the background image obtained from the corrected image generation means 5 is entirely or partially superimposed is generated, and the generated image is sent to the superimposed image display means 10.
  • the superimposed image generation means 9 generates an area having a difference in the difference image obtained from the difference image generation means 6 as an image having a pixel value different from the original pixel value.
  • the superimposed image generating means 9 is the second image obtained from the subject area extracting means 7. In some cases, only the area of the first subject and the area of the second subject are superimposed on the reference image or the like.
  • the superimposed image generating means 9 may generate the overlapping area obtained from the overlap detecting means 8 as an image having a pixel value different from the original pixel value as c superimposed image displaying means 10.
  • the CPU 70 displays the superimposed image obtained from the superimposed image generation means 9 on a display 71 or the like.
  • the superimposed image display means 10 displays the overlap avoidance method according to the information of the overlap avoidance method obtained from the overlap avoidance method notifying means 12 and the warning information obtained from the overlap warning means 13.
  • the shutter chance information obtained from the shutter change notification means 14 is displayed to indicate that it is a photo opportunity, or the shutter information obtained from the automatic shutter means 15 is used. In some cases, an indication that the automatic shutter has been performed may be displayed.
  • the CPU 70 as the overlap avoiding method calculating means 11 uses the information on the overlap obtained from the overlap detecting means 8 to reduce or eliminate the overlap between the first and second objects.
  • the position or direction of the position is calculated, and information indicating the calculated position and direction is passed to the overlap avoiding method notifying means 12 as an overlap avoiding method.
  • the subject whose position and direction are required can be either the first or the second subject, but the subject currently being shot (or last shot) is more convenient.
  • the CPU 70 as the overlap avoiding method notifying means 12 notifies the user, the object, or both of the above-described overlap avoiding method obtained from the overlap avoiding method calculating means 11.
  • the CPU 70 as the overlap warning means 13 notifies the user, the subject, or both of the overlaps from the overlap information obtained from the overlap detection means 8 when the overlap exists.
  • the notification method is the same as the description of the overlap prevention method notification means 12.
  • the CPU 70 as the photo opportunity notification means 14 notifies the overlap information obtained from the overlap detection means 8 that no overlap exists between the user and the subject or both when no overlap exists.
  • the notification method is the same as the description of the overlap prevention method notification means 12.
  • the CPU 70 as the automatic shutter means 15 is obtained from the overlap information obtained from the overlap detection means 8 and from the imaging means 16 with respect to the second subject image acquisition means 3 if no overlap exists. Automatically instructs to record images in main memory 74 or external memory 75.
  • the image obtained from the imaging unit 16 is finally recorded, stored, and synthesized as a background image, a first subject image, or a second subject image in the main memory 74, the external memory 75, or the like. It mainly assumes such usage. Until it is finally recorded and stored, the background image and the first subject image are obtained from the imaging means 16 and are recorded and stored each time they are obtained, but the second subject image is obtained from the imaging means 16 Are not saved immediately.
  • the overlap detection and the overlap are performed using the obtained second object image, the stored background image and the first object image.
  • Perform processing such as avoidance, and overlay A series of processes such as performing various displays on the image display means 10 and processing such as warnings and notifications are repeated. Then, when recording and saving are instructed by the automatic shutter means 15, the second subject image is finally recorded and saved.
  • the second subject image may be recorded and stored when there is an instruction to permit shooting by the automatic shutter unit 15 and the shutter button 76 is pressed by the user.
  • the automatic shutter unit 15 may notify the user, the subject, or both that the captured image has been recorded as a result of issuing the instruction.
  • the notification method is the same as the description of the overlap avoiding method notification means 12.
  • the CPU 70 as the automatic shirting means 15 not only gives a recording instruction, but also, based on the overlap information obtained from the overlap detecting means 8, when there is an overlap, the second subject image acquiring means Automatically instruct 3 to prohibit recording the image obtained from the imaging means 16 in the main memory 74 or the external memory 75. This operation is the reverse of the automatic recording described above.
  • the imaging means 16 includes an imaging element 72 as a main component, and acquires the first subject image acquiring means 1, the second subject image acquiring means 3 and / or the background image as image data such as a photographed scene. Send to means 2.
  • FIG. 3 (a) shows an example of the appearance of the image synthesizing apparatus according to the present invention as viewed from the back.
  • On the main unit 140 there is a display / tablet 141, a lamp 144, and a shutter button 144.
  • the display and tablet 1414 corresponds to the input / output device (display 71 and tablet 73, etc.) and the superimposed image display means 10.
  • the composite image generated by the superimposed image generation means 9 and the overlap avoiding method notification means 12, the overlap warning means 13, the shutter Notification / warning information from the chance notification means 14 and the automatic shutter means 15 are displayed. It is also used to display various setting menus of the image compositing device and change settings with a finger or pen using a tablet.
  • buttons and the like may be used as operation means for various settings.
  • the display / tablet 1414 can be viewed not only by the photographer but also by the subject using a method such as rotation or separation with respect to the main body 140.
  • the lamp 14 2 is used for notification or warning from the overlap avoiding method notifying means 12, the overlapping warning means 13, the photo opportunity notifying means 14, or the automatic shutter means 15.
  • the shutter button 1 4 3 is used to instruct the first subject image acquiring unit 1, the background image acquiring unit 2 or the second subject image acquiring unit 3 to capture / record a captured image from the imaging unit 16. Mainly used.
  • a built-in speaker or the like may be used as the notification Z warning means.
  • FIG. 3 (b) shows an example of the appearance of the image synthesizing apparatus according to the present invention from the front.
  • the lens unit 144 is a part of the imaging unit 16.
  • the information can be transmitted to the subject in the front, There may be a display, a lamp, a speaker, and the like.
  • FIG. 4 is an explanatory diagram illustrating a data structure example of image data.
  • Image data is a two-dimensional array of pixel data, and “pixel” has a position and a pixel value as attributes.
  • the pixel values have R, G, and B values corresponding to the three primary colors of light (red, green, and blue).
  • the set of R, G, and B arranged side by side in Fig. 4 is data for one pixel.
  • the luminance value is stored as one pixel data instead of R, G, and B.
  • the position is represented by X—Y coordinates (x, y).
  • the upper left origin is the origin
  • the right direction is the + X direction
  • the lower direction is the + Y direction.
  • the pixel at the position (x, y) is represented as “P (x, y)”, but the pixel value of the pixel P (x, y) is also referred to as “pixel value P (x, y)” or simply It may be expressed as "P (x, y)".
  • pixel value P (x, y) When the pixel value is divided into R, G, and B, the calculation is performed for each color. However, if there is no special processing related to the color, the same calculation process may be performed for each of the R, G, and B values. Therefore, in the following, description will be made using “pixel value P (x, y)” as a common calculation method.
  • FIG. 5 is a flowchart showing an example of the adaptive output method according to the embodiment of the present invention.
  • step S1 the background image acquiring means 2 acquires a background image, and the process proceeds to S2.
  • the background image may be captured using the imaging means 16, or an image prepared in advance in a network destination via the main storage 74, the external storage 75, and the communication device 77 may be read. Is also good.
  • connection point P is abbreviated as “P”.
  • the method of acquiring the first subject image is the same as that of the background image. Note that the order of the processing of S 1 and S 2 may be reversed.
  • the second subject image acquiring means 3 acquires a second subject image having a background portion at least partially common to the background image or the first subject image, and passes through P30 to S4 The process proceeds to.
  • the process here will be described in detail later using FIG. 14, but the method of acquiring the second subject image itself is the same as that of the background image.
  • the background correction amount calculation means 4 calculates a background correction amount from the first subject image, the second subject image, and the background image, and the process proceeds to S5 via P40.
  • the first subject image, the second subject image, and the background image are obtained from the first subject image acquiring unit 1 (S2), the second subject image acquiring unit 3 (S3), and the background image acquiring unit 2 (S1), respectively.
  • the means / steps from which these images are obtained are the same as the means / steps obtained in S4 unless otherwise specified. In the following, the means of acquiring these images will not be described.
  • the corrected image generation unit 5 uses the background correction amount obtained from the background correction amount calculation unit 4 to select two images other than the reference image from the first subject image, the second subject image, and the background image.
  • the difference image generating means 6 generates a mutual difference image between the images captured by the corrected image generating means 5 and the reference image, and the processing proceeds to S 6 via P 50. move on. Details of the processing of S5 will be shown later 4 6
  • the subject area extracting means 7 extracts the first and second subject areas (hereinafter, the first subject area and the second subject area) from the difference image obtained from the difference image generating means 6 (S5). ), And the process proceeds to S7 via P60. Details of the processing in S6 will be described later with reference to FIG.
  • the overlap detection means 8 obtains information on the overlap of those areas from the first and second object areas obtained from the object area extraction means 7 (S6), and calculates P70. Then, the process proceeds to S8. Details of the processing in S7 will be described later with reference to the drawings.
  • one or more of the overlap avoiding method calculating means 11, the overlapping avoiding method notifying means 12, the overlap warning means 13, the shutter change notifying means 14, and the automatic shuttering means 15 are used for overlapping.
  • Various processes are performed according to the information on the overlap obtained from the detection means 8 (S7), and the process proceeds to S9 via P80. Details of the processing of S8 will be described later with reference to FIGS. 21 to 24 and FIG.
  • the superimposed image generating means 9 outputs the first subject image, the second subject image, the background image, the image obtained by correcting the images by the corrected image generating means 5 (S5), and the subject area extracting means 7 (
  • the plurality of images are overlapped based on the first and second object regions obtained from S6), the information on the overlap of the first and second objects obtained from the overlap detection means 8 (S8), and the like.
  • a superimposed image J is generated, and the process proceeds to S10 via P90.Details of the process of S9 will be described later with reference to FIG.
  • the superimposed image display means 10 displays the superimposed image obtained from the superimposed image generation means 9 (S9) on the display 71 or the like, and ends the processing. I do.
  • the first subject and the second subject are combined into one image using the first subject image, the second subject image, and the background image, and the subjects are combined with each other.
  • Various processing can be performed according to the degree of overlap between the objects.
  • FIG. 6 (a) is an example of the background image obtained in S1.
  • the building and the road leading to it are shown as a background scenery, and there is no person as the subject.
  • FIG. 7A is an example of the first subject image obtained in S2.
  • the first subject (1) stands on the left side.
  • “1” is written on the face of the person (1).
  • “right side” or “left side” when referring to “right side” or “left side”, “right side”
  • FIG. 8 (a) is an example of the second subject image obtained in S3.
  • a second subject (2) stands on the right side.
  • the face of the person (2) is marked with "2".
  • Fig. 6 (c) shows the amount of background correction between the background image in Fig. 6 (a) and the first subject image in Fig. 7 (a), and corrects the background image using the first subject image as the reference image.
  • FIG. 8 (c) shows the background correction amount between the first subject image shown in FIG. 7 (a) and the second subject image shown in FIG. 8 (a). In this case, the second subject image is corrected.
  • the captured image is the area surrounded by the solid frame, and it is not clear how the correction is performed.
  • the range of the original background image in Fig. 6 (a) and the range of the second subject image in Fig. 8 (a) are indicated by dotted frames on Fig. 6 (c) and Fig. 8 (c), respectively.
  • the background image in FIG. 6 (a) is obtained by photographing a scene slightly to the right of the background in FIG. 7 (a). Therefore, in order to capture the background image of FIG. 6 (a) so as to overlap with the background of FIG. 7 (a), it is necessary to select the scenery slightly to the left of FIG. 6 (a). Therefore, FIG. 6 (c) has been corrected so that the scenery is slightly to the left of FIG. 6 (a).
  • the original range in Figure 6 (a) is shown by the dotted line. Since there is no image of the landscape on the left side of Fig. 6 (a), the left part from the leftmost dotted line is blank in Fig. 6 (c). Conversely, the rightmost part in Fig. 6 (a) is truncated.
  • the background correction amount obtained in S4 is the translation amount indicated by the shift between the solid frame and the dotted frame here.
  • FIG. 9 (a) is a difference image generated in S5 between the first subject image of FIG. 7 (a) and the corrected background image of FIG. 6 (c).
  • Figure 10 is a difference image generated in S5 between the first subject image of FIG. 7 (a) and the corrected background image of FIG. 6 (c).
  • (a) is a difference image generated between the corrected second subject image of FIG. 8 (c) and the corrected background image of FIG. 6 (c).
  • the portion where the difference amount is 0 (that is, the matching portion of the background) is indicated by a black region.
  • the part where there is a difference is within the subject area and the noise part, and the subject area part is a strange image in which the background image and the subject part image overlap.
  • the region where only one of the images has pixels due to the correction (for example, the region between the solid line and the dotted line located on the left or right side of Fig. 6 (c)) is excluded from the target of the difference, and the difference amount is set to 0 Yes)
  • Fig. 9 (d) shows the result of extracting the first subject area from Fig. 9 (a) in S6.
  • FIG. 10 (d) shows the result of extracting the second subject area from FIG. 10 (a).
  • the region 122 in the shape of a black human in the figure is the second subject region.
  • FIG. 11 (a) shows an image of a portion corresponding to the second object region of FIG. 10 (d) extracted from the corrected second object image of FIG. 8 (c), and FIG. This is an image generated by superimposing (overwriting) one subject image.
  • FIG. 11 (a) the subjects shown separately in FIG. 7 (a) and FIG. 8 (a) are arranged without overlapping on the same image.
  • the image of FIG. 11A is displayed as a composite image on the superimposed image display means 10.
  • FIG. 20 (a) is an example of a second subject image different from FIG. 8 (a). Compared to Fig. 8 (a), the second subject is located slightly to the left of the same background. The background image and the first subject image are shown in Fig. 6 (a) and Fig. 7 The same as (a) is used.
  • FIG. 20 (b) shows the second subject area.
  • the area 130 in the figure is the second subject area.
  • the area 130 as the second object area is, as described above, the background correction between the first object image in FIG. 7 (a) and the second object image in FIG. 20 (a).
  • the second subject image is corrected using the first subject image as a reference image, and the difference image generated between the corrected image and the corrected background image in FIG. Has been extracted.
  • FIG. 12 shows an overlapping area of each subject detected in S7 using the area 112 of FIG. 9D and the area 130 of FIG. 20B.
  • a black-out area 13 1 is an overlapping area
  • the first subject area 112 and the second subject area 130 are indicated by dotted lines for easy understanding.
  • FIG. 13A shows an example of the superimposed image generated in S9 when there is an overlap in S8.
  • a portion corresponding to the overlapping area 13 1 where the first subject and the second subject overlap is displayed prominently.
  • the original pixel value of the overlapping area 13 1 is changed, for example, to a pixel value that is painted black.
  • the overlapping of the first subject and the second subject makes it easier for the user and the subject to understand the effect of the shooting assistance. Come out.
  • the background image is captured by a camera (image synthesizing device) and recorded.
  • the first subject as shown in Fig. 7 (a) is photographed and recorded with the same background.
  • a second subject as shown in Fig. 8 (a) is photographed with the same background.
  • the first subject and the second subject are photographed alternately by the first subject and the second subject, so that even a third person can take a picture without a third party. Either the first subject or the second subject may be used to shoot the background image, but considering the next shooting, the second subject can be processed more smoothly if taken.
  • the positional relationship between the objects is not limited to left and right as shown in FIGS. 7 (a) and 8 (a), but may be any positional relationship.
  • the processing from S4 to S10 is performed, and the display as shown in Fig. 11 (a) and Fig. 13 (a) (and the warning Z notification described later, etc.) I do.
  • the processing from S1 to S10 may be repeated again. That is, a background image, a first subject image, and a second subject image are photographed, and a superimposed image is generated and displayed. It may be repeated as many times as desired until the displayed processing result is satisfactory.
  • the second subject moves, for example, the background image and the first subject image need not be retaken, and only the second subject may need to be retaken. In that case, repeat S10 from S3.
  • the second subject image acquisition is continuously performed so that a moving image is captured without pressing the shutter button, and the processing and display are repeated, the camera and the second subject can be acquired.
  • the processing result can be confirmed in real time following the movement. Therefore, whether the moving position of the second subject is appropriate (it is possible to know in real time whether or not the subject overlaps, the force is obtained, and it is easy to take a picture of the second subject to obtain a composite result without overlapping)
  • the shutter button is pressed.
  • the second subject image is determined (recorded), and the repetitive processing / dedicated mode may be terminated (although the processing may be continued up to S10 when the final composite result is obtained).
  • the background image is good but the first object image is not good, for example, the first object is located in the middle of the background, and the second object overlaps the first object no matter how it is arranged.
  • Moss If you try to be free al from the second subject is superposed image that would be frame-out may be again from the acquisition of the first subject image S 2.
  • the first subject image is synthesized as the reference image
  • the background image is used as the reference image
  • the first subject area and the second subject area are placed there.
  • the background image is shot again without changing the first object image. For example, if the first 'subject' is placed on the reference background image so that the background fits in the middle of the background image, the space for placing the second 'subject' around the background image without overlapping is given. There may not be. In that case, Re-photographing the background image so that the i-th subject is not in the middle but positioned closer to the edge has the effect that the area where the second subject is placed can be made free. Coming.
  • FIG. 14 is a flowchart illustrating a method of the process of S3 in FIG. 5, that is, a process of acquiring the second subject image.
  • the second subject image acquiring means 3 acquires the second subject image, and the process proceeds to S3-2.
  • the acquisition of the background image of S 1 in FIG. 5 and the acquisition method itself are the same.
  • step S3-2 the means 3 determines whether or not there is an instruction to record an image from the automatic shutter means 15; if there is an instruction, the procedure proceeds to step S3-3; The process exits.
  • the means 3 records the second subject image acquired in S3-1 in the main memory 74, the external memory 75, etc., and the process exits to P30.
  • the processing of S3 in FIG. 5 is performed by the above processing of S3-1 to S3-3. Note that even if the shutter is not an automatic shutter, the photographed image may be recorded even when the shutter button is manually pressed by the photographer or when the shutter is released by the self-timer. , S2, and S3-1 are included in the processing.
  • FIG. 15 is a flowchart illustrating one method of the process of S4 in FIG. 5, that is, the process of calculating the background correction amount.
  • FIG. 6B is an explanatory diagram illustrating a state in which the background image of FIG. 6A is divided into block regions. Each block area is a rectangle separated by a dotted line. The upper left block is expressed as "B (1, 1)", the right is expressed as “B (1, 2)", and the lower one is expressed as "B (2, 1)". In FIG. 6 (b), for reasons of space, for example, in the block of B (1, 1), "1 1" is written at the upper left of the block.
  • the means 4 obtains a position where the background image block matches on the first subject image and the second subject image, and the process proceeds to S4-2.
  • the “(block) matching” is a process of searching for a block area in which the image in the block is most similar to each block of the background image on the first subject image and the second subject image.
  • the image that defines the block (here, the background image) is called the “reference image”, and the image of the partner searching for similar blocks (here, the first subject image and the second subject image) is referred to as the “search image”.
  • a block on the reference image is called a “reference block”, and a block on the search image is called a “search block”.
  • the pixel value of an arbitrary point (x, y) on the reference image is P r (x, y), and the pixel value of an arbitrary point (x, y) on the search image is Ps (x, y). .
  • the reference image is not limited to the background image, and may be determined to be the reference image or the first subject image or the second subject image irrespective of the reference image. Since block matching is performed in order to obtain the background image, selecting a background image having the largest number of background portions as a reference image has the advantage of increasing the probability of matching with the background image portion in the search image.
  • the first subject image is used as a reference image
  • the second subject image is used as a search image.
  • the background portion on the second subject image corresponds to the subject portion on the first subject image
  • the corresponding block is obtained correctly. You will not be able to do it.
  • the background image is a reference image
  • the block corresponding to B (4, 2) in FIG. 8 (b) exists in the background image as B (4, 2) in FIG. 6 (b). Now, suppose that the reference block is square and each side is m pixels. Then, the position of the upper left pixel of the reference block B (i, j) is
  • the similarity S (xs, ys) between the reference block B (i, j) and the search block is calculated by the following two equations.
  • D (xs, ys; dx, dy) is the absolute value of the difference between each pixel value (dx, dy) away from the upper left of the reference block and the search block. Then, S (xs, ys) calculates the absolute value of the difference for all pixels in the block.
  • S (Xs, ys) is the similarity when the upper left position of the search block is (Xs, ys), so if (xs, ys) is changed on the search image, Is obtained.
  • the position of the minimum similarity (xs, ys) among all the similarities may be set as the matching position.
  • the search block at the matched position is called a “matching block”.
  • Figure 16 is a diagram illustrating this matching process.
  • the image in Figure 16 (a) is the reference image
  • the image in Figure 16 (b) is the search image
  • the contents of the image are the square brackets. It is assumed that the mold lines are slightly displaced from each other. It is assumed that the reference block 100 in the reference image is located at a corner portion, such as after an angle bracket type line.
  • search blocks 101, 102, and 103 exist as search blocks in the search image.
  • search block 101 can be used as a matching block for reference block 100.
  • the above describes the matching of one reference block B (i, j). However, a matching block can be obtained for each reference block. For each of the 42 reference blocks in Fig. 6 (b), Suppose that a matching block is searched for in each of the first subject image and the second subject image.
  • the method of calculating the similarity of the matching block uses the absolute value of the difference between the pixel values here, there are various other methods, and any method may be used.
  • the size of the reference block if the size is too small, the features cannot be well captured in the block and the accuracy of the matching result deteriorates.On the other hand, if the size is too large, the subject and the image frame are included, and the matching is not performed. It is desirable to make the size appropriate because the accuracy of the scanning result will be poor and it will be weak to changes such as rotation and scaling.
  • the means 4 extracts only the search block corresponding to the background portion from the matching blocks obtained in S4-2, and the process proceeds to S4-4.
  • FIG. 7 (b) shows a result obtained by removing an incorrect matching block from the matching result of S4-2 of the first subject image in FIG. 7 (a).
  • Matching blocks determined to be correct have the same numbers as the corresponding reference blocks.
  • FIG. 8 (b) is a result of removing an incorrect matching block from the matching result of S4-2 of the second subject image in FIG. 8 (a).
  • the same means 4 calculates the background correction amount of the first subject image and the second subject image from the matching part of the background part obtained in S4-3, and processes it to P40. Comes out.
  • the background correction amount for example, the rotation amount ⁇ , the enlargement / reduction amount R, and / or the translation amount (L x, L y) are obtained, but there are various calculation methods.
  • An advantage of using a matching block is that the accuracy in determining the enlargement / reduction ratio, rotation amount, and the like is improved. Since the position of the matching block is in pixel units, the accuracy is also in pixel units. For example, the angle when one pixel is shifted upward by 50 pixels horizontally is the same as the angle when 0.1 pixel is shifted upward by five pixels horizontally. However, a displacement of 0.1 pixel cannot be detected by matching. Therefore, it is better to use matching blocks as far apart as possible.
  • two matching blocks which are farthest from each other are a combination of blocks 15 and 61.
  • the center positions of the two selected matching blocks are represented by coordinates on the search image (X1 ', y1'), (X2 ', y2'), and the center of the corresponding reference block.
  • the position is represented by coordinates on the reference image (xl, y1),
  • the direct slope ⁇ m passing through the center of the matching block is
  • the amount of translation is as follows. Since the center positions of the corresponding blocks need only be equal, for example, if (X 1 ', y 1') and (X 1, y 1) are equalized , The translation amount (L x, L y)
  • the rotation amount and the enlargement / reduction amount can be set at any center, here, the point where the translation is matched, that is, the center of the corresponding block is set as the rotation center / enlargement / reduction center.
  • This conversion formula converts the point (X ', y') on the search image into a point (x ", y") on the corrected image, but the point (X ", y") on the corrected image is Since the background part overlaps with the reference image, it can be considered as a conversion from the search image to the reference image (so that the background part overlaps). Therefore, this conversion formula is used to convert a point (Xs, Ys) on the search image into a point (Xr, Yr) on the reference image, Fsr,
  • the above equation is the conversion equation from the captured point (X ", y") to any point (X,, y ') in the search image.
  • x, (1 / R) X (cos ⁇ X (X "-X 1) + s i ⁇ ⁇ X ⁇ y — y 1
  • the transformation function F r s is also called the inverse transformation function of the transformation function F s r.
  • FIG. 17 is a flowchart illustrating one method of the process of S5 in FIG. 5, that is, a process of generating a corrected image of the background image and the second subject image and generating a difference image from the first subject image.
  • FIG. 17 is a flowchart illustrating one method of the process of S5 in FIG. 5, that is, a process of generating a corrected image of the background image and the second subject image and generating a difference image from the first subject image.
  • the correction amount between the background image and the first subject image and between the background image and the second subject image is calculated.
  • a point on the background image is (Xb, Yb)
  • a point on the first subject image is (XI, Y1)
  • a point on the second subject image is (X2, Y 2)
  • F bl is a conversion function from (X b, Y b) force to (XI, Y 1)
  • F ib is its inverse conversion function
  • F b 2 is (X b, Y
  • the transformation function from b) to (X2, Y2), F2b is its inverse transformation function.
  • the conversion function (correction amount) between two of the three images has been determined, any two of the three images can be converted to each other. Therefore, when performing correction, there is a problem as to which image should be corrected.
  • the first subject image that is, the first Z
  • the previously captured subject image is used as the reference image, and the other background image and the second subject image are corrected so that the background portion overlaps the first subject image.
  • the subject is re-shot because the subject overlaps. If the first Z second subject image is taken in this order and the first subject image is used as the reference image, if the subjects overlap, the second subject image will be taken again. At this time, the first subject image and the background image captured using the first subject image as the reference image do not need to be taken again, and can be used as they are for creating a composite image.
  • the second subject image captured later is used as the reference image
  • the second subject image is naturally taken as the second subject image.
  • the correction processing of the first subject image and the background image corrected based on the reference becomes useless and must be corrected again.
  • the conversion function F 21 from the second subject image to the first subject image is obtained by combining the above conversion formulas,
  • the corrected image generation means 5 uses the correction amount obtained by the background correction amount calculation means 4 (S4) to overlap the background image with the first subject image.
  • the corrected image is generated, and the process proceeds to S5-2.
  • the corrected background image generated here is called the “correction background image” (see Fig. 6 (c)).
  • the conversion function F b 1 or the inverse conversion function F 1 may be used.
  • the pixel position of the original image (here, the background image) corresponding to the pixel position of the converted image (here, the corrected background image) is obtained, and the pixel of the converted image is obtained from the pixel position. Find the value.
  • the conversion function used is F 1 b.
  • the pixel position of the original image obtained in general is not an integer value
  • the pixel value of the pixel position of the obtained original image cannot be obtained as it is. Therefore, some kind of interpolation is usually performed.
  • the most common method there is a method in which the four pixels at integer pixel positions around the obtained pixel position of the original image are obtained in the primary sampling.
  • the primary interpolation method is described in general image processing books, etc. (eg, Morikita Publishing: Takeshi Yasui, Masayuki Nakajima, “Image Information Processing”, p. 54), so detailed description is omitted here. .
  • Fig. 6 (c) is an example of a corrected background image generated from the background image of Fig. 6 (a) and the first subject image of Fig. 7 (a) so that the background image overlaps the background portion of the first subject image. It is.
  • the correction in this example is only translation.
  • the range of the background image in Fig. 6 (a) is indicated by a dotted line so that the capture state can be understood.
  • the entire frame moves slightly to the left of the background image in Fig. 6 (a). o
  • the correction image generation means 5 generates a mask image of the corrected background image, and the process proceeds to S5-3.
  • the pixel position of the mask image corresponding to each pixel on the corrected image on the original image can be obtained by the above-described formula, but is the pixel position within the range of the original image? If it does, the pixel value of the corresponding pixel on the corrected image is set to, for example, 0 (black) as a mask portion, and if not, it is set to, for example, 255 (white).
  • the pixel value of the mask part is not limited to 0, 255 and may be freely determined,
  • FIG. 6D is an example of the mask image of FIG. 6C.
  • Solid frame The black area in the frame is the mask.
  • This mask portion indicates the range in which the original image (the image before correction) has pixels in the corrected image. Therefore, in FIG. 6 (d), the left end portion where the corresponding background image does not exist is not a mask portion and is white.
  • the difference image generating means 6 uses the first subject image, the corrected background image obtained from the corrected image generating means 5 (S5-1) and its mask image to generate the first subject image, A difference image with the corrected background image is generated, and the process proceeds to S514.
  • the difference image generated here is referred to as the “first subject difference Minute image ”.
  • P d (x, y) IP 1 (x, y)-P fb (x, y)
  • P fb (x, y) IP 1 (x, y)-P fb (x, y)
  • FIG. 9 (a) is an example of the first subject difference image generated from the first subject image of FIG. 7 (a), the corrected background image of FIG. 6 (c), and the mask image of FIG. 6 (d).
  • the background other than the area of the person (1) has the same background or the difference is 0 outside the mask range, and the area of the person (1) mainly contains the image of the person (1) and the background. It is an image in which images are mixed.
  • an error in the calculation of the correction amount in S4 an error in the interpolating process for generating the corrected image, a subtle change due to a difference in the shooting time of the background image itself, and the like, the area of the person (1).
  • a small difference part comes out.
  • the size is only a few pixels, and the difference is often not very large.
  • Fig. 9 ( a ) there are some white areas around the area of the person (1). 68
  • the corrected image generation means 5 corrects the second subject image using the correction amount obtained by the background correction amount calculation means 4 (S4) so that the background portion overlaps the first subject image. Then, the process proceeds to S5-4.
  • the conversion function F 21 or the inverse conversion function F 12 may be used.
  • the processing is the same as the processing in S5-1 except that the image and the conversion function are different.
  • the corrected second subject image generated here is referred to as a “corrected second subject image”.
  • FIG. 8 (c) is an example of a corrected second subject image generated from the second subject image of FIG. 8 (a) and the first subject image of FIG. 7 (a).
  • the correction in this example is only translation.
  • the range of the second object image in FIG. 8 (a) is indicated by a dotted line.
  • the entire frame is slightly lower right than the background image in Fig. 6 (a).
  • FIG. 18 (a) is an example of the second subject image when rotation is necessary for correction.
  • the background image and the first subject image are the same as in FIGS. 6 (a) and 7 (a).
  • the entire screen is rotated slightly counterclockwise as compared to Fig. 8 (a).
  • FIG. 18 (b) shows the result of performing block matching between the second subject image in FIG. 18 (a) and the background image in FIG. 6 (a). Even if the block is rotated, if the amount of rotation and the size of the block are not so large, there is little image change in the block, and accurate matching is possible to some extent following the rotation.
  • FIG. 18 (c) is a second subject image obtained by calculating the background correction amount based on the block matching result of FIG. 18 (b) and correcting the background correction amount. It can be seen that the first subject image in Fig. 7 (a) and the background part overlap and the rotation has been corrected. The image frame in Fig. 18 (a) is indicated by a dotted line so that the correction can be understood. I have.
  • the corrected image generating means 5 generates a mask image of the corrected second subject image, and the process proceeds to S5-6.
  • the method of generating the mask image is the same as in S5-2.
  • FIG. 8 (d) is an example of the mask image of FIG. 8 (c).
  • the mask image in the case of Fig. 18 (b) is as shown in Fig. 18 (d).
  • the difference image generation means 6 converts the corrected background image obtained from the corrected image generation means 5 (S5-1) and the corrected background image obtained from the corrected image generation means 5 (S5-2). Using the mask image, the corrected second subject image obtained from the corrected image generating means 5 (S5-4), and the mask image of the corrected second subject image obtained from the corrected image generating means 5 (S5-5), A difference image between the corrected second subject image and the corrected background image is generated, and the process exits to P50.
  • the difference image generated here is called the “second subject difference image” (see Fig. 10 (a)).
  • the method of generating the difference image is basically the same as S5-3, except that the pixel value of a point (x, y) of the mask image of the corrected background image and the mask image of the corrected second subject image
  • the processing of the mask image is slightly different in that the difference between the images is obtained only when both are 0 (black).
  • FIG. 10 (a) is an example of the second subject difference image generated from the corrected background image of FIG. 6 (c) and the corrected second subject image of FIG. 8 (c). 1st subject The state is the same as in FIG. 9 (a) except that has changed to the second subject.
  • FIG. 19 is a flowchart illustrating a method of the process of S6 in FIG. 5, that is, a process of extracting a subject region.
  • the subject area extracting means 7 uses the difference image obtained from the difference image generating means 6 (S 6) to determine the “labeling image” (the meaning of the “labeling image” will be described later). Will be described), and the process proceeds to S6-2. Since there are two difference images, a first object difference image and a second object difference image, a labeling image is also created. Since the processing procedure for generating the labeling image is the same in both cases, the following description will be made assuming that the term “difference image” includes “first subject difference image” and “second subject difference image”.
  • each pixel value in the difference image may be compared with a predetermined threshold value, and if the pixel value is larger than the threshold value, it may be set to black; If the difference image consists of R, G, and B pixel values, the threshold value may be compared with the value obtained by adding the pixel values of R ', G, and B.
  • FIG. 9 (b) is an example of a binary image generated from the first subject difference image of FIG. 9 (a). There are six black areas, areas 110 through 115, and small areas except for the large humanoid area 112.
  • FIG. 10 (b) is an example of a binary image generated from the second subject difference image of FIG. 10 (a). There are six black areas, areas 1 2 0 to 1 2 5, and a large humanoid area 1 2 Areas other than 2 are small areas.
  • labeling image refers to a block in the binary image where white pixels or black pixels are connected to each other, and This is an image generated by the process of assigning numbers (hereinafter referred to as “labeling values”).
  • labeling values an image generated by the process of assigning numbers (hereinafter referred to as “labeling values”).
  • the output labeling image is a multi-valued monochrome image, and the pixel values of each block area are all assigned labeling values.
  • label area The area of pixels having the same labeling value will be referred to as “label area” hereinafter.
  • label area For details of the processing procedure of finding connected blocks and assigning labeling values to the blocks, see a general image processing book (eg, Shokodo: "Image Processing Handbook” published in 1962). Since it is described in P 3 18), it is omitted here and an example of the processing result is shown.
  • Fig. 9 (b) and Fig. 10 (b) are shown as binary images because it is difficult to show a multi-valued image on paper, but in reality, the Since it is a value image, it is not necessary to display it, but if it is actually displayed as an image, it looks different from those in Fig. 9 (b) and Fig. 10 (b).
  • the object area extracting means 7 outputs the labeling information obtained in S6-1.
  • the process proceeds to S6-3, removing the "noise" -like area in the scanning image.
  • Noise generally refers to a portion other than the target data, and here refers to a region other than a human-shaped region.
  • a simple method is to remove, for example, label regions with an area below a certain threshold. To do this, first determine the area of each label area. To find the area, scan all the pixels and count how many pixels have a particular labeling value. After determining the area (number of pixels) for all labeling values, label areas with an area (number of pixels) equal to or less than a predetermined threshold are removed from them. Specifically, the removal processing may be such that a labeling value of the label area is set to 0, a new labeling image is created, and a label area other than noise is copied there.
  • FIG. 9 (c) shows the result of noise removal from the labeling image of FIG. 9 (). Areas other than the human-shaped area 1 1 and 2 have been removed as noise. Similarly, FIG. 10 (c) shows the result of noise removal from the labeled image of FIG. 10 (b). Areas other than the human-shaped area 122 have been removed as noise.
  • the subject region extracting means 7 extracts a subject region from the noise-free labeling image obtained in S6-2, and the process exits to P60.
  • label areas are extracted from the noise-removed labeling image in the descending order of the area in number. Just do it.
  • a method of having the user specify it is also conceivable. There are two methods of specifying the outline of the subject area, and the method of using the outline of each label area of the labeling image and specifying which label area is the subject area. Conceivable.
  • Fig. 9 (c) and Fig. 10 (c) all areas having an area equal to or larger than the predetermined threshold are assumed to be object areas, but in Fig. 9 (c) and Fig. 10 (c), a large area has already become one at the noise removal stage. 9 (d) and FIG. 10 (d) have the same appearance as FIGS. 9 (c) and 10 (c). Also, in Fig. 9 (b) and Fig. 10 (b), the human-shaped area happens to be one label area, but depending on the image, even a single subject is divided into multiple label areas. Sometimes. For example, if the pixel in the middle of the subject area has a color and brightness similar to the background, the pixel value of that part in the difference image is small, so the middle of the subject area is recognized as the background. In some cases, the subject area is divided vertically and horizontally and extracted. In such a case, there may be cases where the subsequent processing such as overlapping detection or compositing processing does not work well.
  • the overlap detecting means 8 detects whether the first subject area and the second subject area obtained from the subject area extracting means 7 (S6) overlap each other, and there is an overlap. In this case, the overlapping area is extracted. However, in fact, to detect whether or not there is an overlap, it is easy to extract the overlapping area and to detect whether or not there is an overlapping area.
  • a position (x, y) of a pixel belongs to both the first subject region and the second subject region, and if it belongs to both, the pixel value is set to, for example, 0 ( Black), 2 5 5 if not both (white)
  • the position (x, y) is scanned for all pixel positions, an overlapping image can be generated as a result.
  • the image containing the first subject area obtained from S6 and the second subject area Looking at the pixel at the (x, y) position in the image that contains, it can be determined whether both are pixels in the subject area (for example, in the above example, if the labeling value is not 0, the pixel in the subject area) .
  • the overlap detection means 8 outputs information not only on whether or not there is an overlap but also on an overlapped area as information on the overlap. That is, the generated overlap image is also output.
  • FIG. 20 (b) is a second subject region image generated from FIG. 20 (a).
  • the second subject area 130 is slightly shifted to the left as compared with the area 122 of FIG. 10 (d).
  • FIG. 12 shows an overlap image formed from the first subject region images in FIGS. 20 (b) and 9 (d).
  • the overlapping area 1 3 1 is blacked out.
  • the first subject area 1 1 2 and the second subject area 1 30 are shown by dotted lines so that the degree of overlap can be easily understood. (This dotted line does not exist in the actual overlapping image).
  • the overlap detecting means 8 determines that there is an overlap.
  • FIG. 21 is a flowchart illustrating one method of the process of S8 in FIG. 5, that is, a process related to overlap. An alternative method of processing the overlap will be described later with reference to FIGS. 22, 23, 24, and 27.
  • the overlap warning means 13 determines whether there is an overlap based on the information obtained from the overlap detection means 8 (S7), and if there is an overlap, S8A — Proceed to 2 and if not, exit to P80.
  • the overlap warning means 13 warns the user (the photographer) and / or the subject or both that the first subject and the second subject are overlapping, and sets the P8 Processing exits to 0.
  • the overlapping region may be displayed so as to be conspicuously superimposed on the composite image.
  • FIGS. 13 (a) and 13 (b) are examples for explaining this.
  • the only difference between the two images is the difference in the method of synthesizing the image of the first subject (person (1)).
  • the overlapping area 13 1 in FIG. 12 is displayed on the composite image. It is better to change the pixel value of the area 13 1 and fill it with a conspicuous color such as red.
  • the area 131, the outline thereof, and the like may be blinked and displayed.
  • Fig. 13 (c) is an example in which the warning is further provided by text.
  • a warning window is displayed over the composite image, and the message "Subject is overlapping! Is displayed in the warning window. this May also be made to stand out or blink.
  • Overwriting of these composite images may be performed on the superimposed image generation means 9 or on the superimposed image display means 10 according to the instruction of the overlap warning means 13.
  • the warning window blinks, it may be necessary to keep the original composite image.
  • the data of the warning window is output from the main memory 74 or the external memory 75 to the superimposed image display means 10. In many cases, it is better to read out and give it intermittently.
  • monitor 14 1 in Fig. 3 (a) faces the photographer, if the device can point the monitor toward the subject, it is possible to check the degree of overlap with the subject. This allows the subject to spontaneously move to eliminate the overlap without being instructed by the photographer. Monitor 14 1 You may prepare a separate monitor so that you can see the subject. PC orchid painting 08510
  • the processing from S3 to S10 in Fig. 5 is repeated as described above in the dedicated mode, the current overlapping state can be determined almost in real time. It is almost real time whether or not the problem has been resolved, making shooting convenient and efficient.
  • the processing from S3 to S10 in Fig. 5 does not require much time if a sufficiently fast CPU or logic circuit is used. In actual use, it can be said that the display is almost real-time if it can achieve repetitive processing at a rate of about once per second or more. In the case of repetitive processing, the second subject image is continuously updated.However, when the difference image is generated in S5, the reference image is set to the first subject image because the amount of processing during the repetitive processing is reduced. This is because there are advantages that can be achieved.
  • the second subject image is used as the reference image
  • processing such as calculation of the amount of background correction, generation of a difference image, and detection of the subject area must be performed, including the first subject image and the background image.
  • the process between the first subject image and the background image only needs to be performed once, and only the process related to the second subject image needs to be repeatedly performed.
  • the relationship between the degree of overlap between the subjects and the frame frame of the composite image indicates that the overlapping may occur regardless of how the subject moves, or the subject may be frame-arted.
  • the warning can be made by turning on or blinking the lamps 142 of FIG. 3 (a). Because it is a warning, it is easier to understand if the color of the lamp is red or orange. In general, it is easy for the photographer to notice the blinking of the lamp even if the photographer is not watching the monitor There is an advantage.
  • the overlap region as shown in FIG. 13 (b) may not be displayed by being superimposed on the composite image. In this case, it is difficult to immediately determine how much overlap there is, but if you only know if there is an overlap, then you can see if the warning notice disappears due to the movement of the subject and so on. Since the purpose of obtaining a perfect composite image can be achieved, only a lamp may be used. This has the advantage that the process of displaying the overlapped portion can be omitted.
  • the degree of overlap will be different. I can know more.
  • a warning notification may be made using the speaker 80 shown in FIG.
  • a warning buzzer sounds or a sound such as "overlap” is output to give a warning notification.
  • the same effect as the lamp can be expected.
  • speed there is the advantage that, unlike light, the directivity is not so high that both the photographer and the subject can be overlapped with a single speaker.
  • FIG. 22 is a flowchart illustrating another method of the process of S8 in FIG. 5, that is, the process related to overlap.
  • the photo opportunity notifying means 14 determines whether or not there is an overlap based on the information obtained from the overlap detection means 8 (S7). The process is skipped to P80, and if not, the process proceeds to S8B-2.
  • the photo opportunity notifying unit 14 notifies the user (photographer) and / or the subject that there is no overlap between the first subject and the second subject, and processes it to P 80. Comes out.
  • This notification is not a notification that there is no overlap, but rather a notification of a secondary operation due to the lack of overlap, specifically, a photo opportunity to record the second subject.
  • the most common use is to use it. In that case, the notification will be primarily to the photographer.
  • the method described in FIG. 21 can be used almost as it is. For example, change the message in Figure 13 (c) to "Shutter chance! Since the overlapping portion in FIG. 13 (c) does not exist at this time, it is not necessary to display it.
  • lamps and speakers also vary slightly in color and output sound content, but can be used in the same way as notification methods.
  • the photographer can shoot / record without overlapping by releasing the shutter, and also prepare the subject to be able to release the shutter (eg, eye direction or face) And the like).
  • the processing related to the overlap of S8 in FIG. 5 can be performed.
  • FIG. 23 is a flowchart illustrating yet another method of the process of S8 in FIG. 5, that is, a process related to overlap.
  • the automatic shutter means 15 determines whether or not there is an overlap based on the information obtained from the overlap detection means 8 (S7). The processing is skipped to 0, and if not, the processing proceeds to S8C-2.
  • the automatic shutter means 15 determines whether or not the shutter button has been pressed. If the shutter button has been pressed, the process proceeds to S8C-3, and if not, the process proceeds to P80. Exit.
  • the automatic shirting means 15 instructs the second subject image acquiring means 3 to record the second subject image, and the process exits to P80.
  • the second subject image acquiring means 3 records the photographed image in the main memory 74, the external memory 75, or the like according to the instruction.
  • the shutter button is pressed when the subjects do not overlap each other, an effect that the captured image can be automatically recorded can be obtained. At the same time, it also has the effect of preventing recorded images from being accidentally overlapped.
  • the recording of the second subject image is prohibited so that the recording operation by 3 is not performed.
  • the image may be better to notify the photographer or the like with a display means or a notification means such as a lamp or a speaker if the shutter is pressed but no image is captured.
  • the shutter button is pressed again when there is no overlap due to movement of the subject, etc., the image is recorded this time. It is advisable to notify the photographer or the like by means of a display, a lamp, a speaker or the like so that the user can know that the recording has been made.
  • FIG. 24 is a flowchart illustrating yet another method of the process of S8 in FIG. 5, that is, a process related to overlap.
  • the overlap avoiding method calculating means 11 determines whether or not there is an overlap based on the information obtained from the overlap detecting means 8 (S7). Proceed to 8D-2. If no, proceed to P80.
  • the overlap avoiding method calculating means 11 is used for the first and second objects.
  • the position of the center of gravity of the region is calculated, and the process proceeds to S8D-3.
  • the position of the center of gravity is simply the center position of the area. More precisely, the distance and direction from the position of the center of gravity to a pixel are vectorized, and the vector of the pixels in all the areas is calculated. The sum is 0.
  • the method of obtaining the position of the center of gravity is also described in general image processing books and the like, and is omitted here.
  • the overlap avoiding method calculating means 11 calculates the position of the center of gravity of the first and second object regions from the positions of the center of gravity of the first and second object regions obtained in S8D_2 in the direction in which the second object moves. Then, the process proceeds to S8D- in order to find the direction in which the distance between is the longest (the direction from the position of the center of gravity of the first subject region to the position of the center of gravity of the second subject region).
  • FIG. 25 is an example in which the direction in which the position of the center of gravity is farthest in the overlapping state of FIG. 12 is obtained.
  • the direction in which the position of the center of gravity between the center of gravity 13 of the first subject area 1 1 2 and the center of gravity 13 of the second subject area 13 3 is the most distant is from the center of gravity 1 3 2 to the center of gravity 1 3 3 This is the direction indicated by the arrow 1 34 toward.
  • the overlap avoiding method notifying means 12 notifies the user or the subject or both of the directions obtained in S 8 D-3 as an avoiding method to reduce the overlap. Processing exits. 84
  • FIG. 26 (a) is an explanatory diagram showing a state in which the avoidance method is notified on the monitor 141.
  • FIG. In S8D-3 it was required that the second subject moved to the right as shown in Fig. 25 to reduce the overlap, so an arrow indicating that the second subject was moved to the right was synthesized. It is displayed over the image. It may be easier to understand that this arrow is also prominently displayed in color, blinking, etc., as in the display of the overlapping portion already described.
  • the angle 0 d in the direction of the arrow is calculated from the direction vector obtained in S 8 D-3,
  • ⁇ d a r c t a n ((Y g 2-Y g 1) / (X g 2-X g 1)) .. (0 ⁇ X g 2-X g l)
  • the direction of the arrow displayed here is important, the size of the direction vector obtained in S8D-3 can be ignored.
  • the length of the displayed arrow may have some meaning. For example, if the area where the objects overlap is known, the length and thickness of the arrow may be proportional to the area. The larger the overlap, the longer (or thicker) the arrows, and the more intuitively the degree of overlap is easier to understand. Also, since the arrow is large, the photographer etc. has the effect that it is easy to be concerned that the overlap will not be lost.
  • the direction obtained by S8D-3 can be any direction, but it is not necessary to have a very accurate direction to instruct the movement of the subject, so the direction closest to the obtained 0d is You may choose from 4 directions or 8 directions including diagonal directions.
  • a lamp may be used to indicate the direction of travel.
  • multiple directional ramps may be needed to indicate four directions, up, down, left, and right, or eight directions.
  • a directional ramp may be placed around the monitor 14 1.
  • these notifications may be given to not only the photographer but also the subject, similarly to the notification of the overlapping state.
  • the effects are the same as those already described.
  • the position of the center of gravity of the subject is used, but various other methods are conceivable.
  • the pixel value of the subject area is projected on the X-axis and the Y-axis, and the approximate position in each axis direction is obtained.
  • the position of the center of gravity and the overlapping range can be obtained from the projection results. From these, it is also possible to determine which direction to move up, down, left, or right. By combining the vertical and horizontal directions, it is also possible to determine the diagonal movement direction.
  • FIG. 27 is a flowchart illustrating still another method of the process of S8 in FIG. 5, that is, a process related to overlap.
  • the overlap avoiding method calculating means 11 determines whether or not there is an overlap based on the information obtained from the overlap detecting means 8 (S 7). Proceed to 8E-2, if not, exit to P80.
  • the overlap avoiding method calculating means 11 predicts the amount of overlap when the second subject is moved in each direction, and the process proceeds to S8E-3.
  • the current state is the first subject area 112 and the second subject area 130 in FIG. 12, and it is assumed that the overlapping area is the area 131. From this state, the second subject area 130 is moved up, down, left, and right by a predetermined amount.
  • FIG. 28 (a) is a diagram illustrating a state in which the second subject area 130 indicated by the dotted line is moved to the left and moved to the black area 150.
  • Fig. 28 (b) is a diagram illustrating the state of moving to the right
  • Fig. 28 (c) is a diagram illustrating the state of moving up
  • Fig. 28 (d) is a diagram illustrating the state of moving down. is there.
  • FIGS. 29 (a) to 29 (d) show overlapping images in which the overlap between the moved second subject area and the first subject area has been obtained. Areas of overlap are shown in black. The moved second subject area and the first subject area are indicated by dotted lines.
  • the overlapping area in FIG. 29 (a) is larger than the overlapping area in FIG.
  • the overlapping area in Fig. 29 (b) is missing.
  • the overlapping area between FIG. 29 (c) and FIG. 29 (d) is not much different from the overlapping area 13 1 in FIG.
  • the overlap amount is estimated in four directions, but the number of directions may of course be other than that in consideration of the required accuracy / processing amount.
  • the moving amount is set to a predetermined value. However, a method of calculating the overlapping amount with a plurality of values per direction may be considered.
  • the overlap avoiding method calculating means 11 extracts the direction in which the amount of overlap becomes the least in the prediction of the amount of overlap when moving in each direction obtained in S8E-2. Then, the process proceeds to S8E-4.
  • Fig. 29 (b) has the least overlap, so moving the second subject to the right (in four directions) The overlap is expected to be the least.
  • the means for notifying the overlap avoidance method 12 is notified to the user or the subject or both of the directions obtained by the force S and S8E-3 as an avoidance method for reducing the overlap. Processing exits to 80.
  • the processing and notification method here are almost the same as in S8D-4.
  • the notification result is as shown in Fig. 26 (a).
  • the difference from S 8 D-4 is that only the direction is obtained in the processing from S 8 D-2 to S 8 D-4, but in the processing from S 8 E-2 to S 8 E-4, the second direction is obtained. Since the direction is determined assuming the destination of the subject, it is possible to indicate not only the direction but also how much to move. How to display it. For example, the start point and the end point of the arrow indicating the moving direction may be set to the position where the overlap with the current position of the second subject is minimized with a minimum amount of movement. This has the effect that the user can clearly see how much the second subject should move.
  • Figure 26 (b) is an example showing the destination where the overlap is eliminated with a minimum amount of movement.
  • the destination second object is indicated by a dotted line.
  • FIGS. 21 to 27 are not necessarily exclusive processes, and can be performed in any combination.
  • the following usage scenarios are possible as examples of combinations.
  • FIG. 30 is a flowchart illustrating a method of the process of S9 in FIG. 5, that is, a process of generating a superimposed image.
  • the superimposed image generating means 9 sets the first pixel position of the superimposed image to be generated to the current pixel, and the process proceeds to S9-2.
  • the first pixel position often starts from the upper left corner, for example.
  • the pixel position corresponds to the address on the memory representing the image, and the pixel value is the value of the memory at that address.
  • the superimposed image generating means 9 determines whether or not the current pixel position exists, and if so, the process proceeds to S9_3; otherwise, the process proceeds to P90. Exit.
  • the superimposed image generating means 9 determines whether the current pixel position is in the first object region, and if it is in the first object region, the process proceeds to S9-4; If so, the process proceeds to S9-5.
  • Whether the pixel value is within the first subject area can be determined based on whether the pixel value at the current pixel position on the first subject area image obtained from the subject area extracting means 7 (S6) is black (0).
  • S9-3 and S9-4 may be omitted, and the process may proceed from S9-2 to S9-5.
  • the superimposed image generating means 9 calculates a pixel value according to the setting and writes it as a pixel value at the current pixel position of the superimposed image.
  • the above setting is what kind of superimposed image is synthesized. For example, whether the first subject is synthesized translucently as shown in FIG. 11 (b) or opaque and synthesized as it is by overwriting the first subject as shown in FIG. 11 (a).
  • the pixel value P 1 at the force lent pixel position of the first subject image and the pixel at the current pixel position of the corrected background image obtained from the corrected image generation means 5 (S 5) Obtain the value Pb and calculate the composite pixel value (PlXA + PbX (1—A)) with the predetermined transmittance A (a value between 0.0 and 1.0).
  • the superimposed image generating means 9 generates a synthesized pixel according to the setting, and writes it as a pixel value at the current pixel position of the superimposed image.
  • the processing here is the same as S9-4, except that the first subject area (image) is changed to the second subject area (image).
  • the superimposed image generation means 9 when the superimposed image generating means 9 determines in S 9-5 that the current pixel position is not within the second object area, the superimposed image generation means 9 superimposes the pixel value at the force lent pixel position of the first object image. Write as the pixel value at the current pixel position of the image. That is, the current pixel position in this case is neither in the first object area nor in the second object area, and thus corresponds to the background part after all.
  • using the first subject image provides a more natural boundary portion between the first subject region and the background portion than using the corrected background image.
  • the extraction of the first and second object regions in S6 is incorrect, the effect that the error is not conspicuous because the boundary is natural is obtained.
  • the superimposed image generating means 9 sets the current pixel position to the next pixel.
  • the first subject image and the corrected background image are processed in S9-4 and S9-7, but the first subject image is first added to the generated overlay image before S9-1.
  • a method of copying all pixels of the corrected background image and then processing only the first subject area and the Z or second subject area by processing each pixel position is also conceivable.
  • the procedure is simpler with full pixel copy, but processing time may increase slightly.
  • generation of a superimposed image is allowed as it is.
  • S7 and S8 are omitted in the flowchart of FIG. 5, the processing is simplified.
  • a process for making the overlap region stand out or a process for warning that there is an overlap may be executed.
  • the first subject region and the second subject region can be extracted independently, so that the first subject region and the second subject region overlap each other.
  • the superimposed image generating means 9 is set to give priority to the first subject, as shown in FIG. 31, in the overlapping area between the first subject and the second subject, the first subject (person (1)) ) Is superimposed on the second subject (person (2)) to obtain a superimposed image.
  • the superimposed image generating means 9 uses the transmittance A, PT / JP2003 / 008510
  • the superimposed image generating means 9 is set so as to give priority to the second subject, as shown in FIG. 32, the first subject (the person ( A superimposed image is obtained in which 1)) is superimposed below the second subject (person (2)).
  • the determination whether the current pixel position is within the second object region is performed by the superimposed image generating means 9 in advance, and as a result, if the current pixel position is within the second object region, The process of writing the pixel value of the second subject image as it is at the current pixel position may be performed with the composition ratio of the second subject image being 1.0.
  • Such processing cannot be performed by a method of combining only the first subject image and the second subject image without using the background image. This is because the first subject image and the second subject image alone cannot extract the first subject area and the second subject area independently, but can only extract them as an integrated area. It is.
  • the size of the composite image is set to the size of the reference image, but it is also possible to make the size smaller or larger than this. For example, when generating the corrected image in Fig. 6 (c) and Fig. 8 (c), a part of the corrected image was truncated. In order to increase the size of the image, the image left without truncation can be used for compositing, thereby expanding the background. So-called panoramic painting The effect that can be performed like the image composition is obtained.
  • the first subject image and the background image, the second subject image and the background image have a common background portion
  • the first subject image and the second subject image have a common background portion.
  • the composite image may appear when there is no background between the first subject and the second subject.However, using a background image can also generate a composite image that fills in the nonexistent part. Also comes out.
  • a long composite image in which the edges overlap in the order of the first subject image, the background image, and the second subject image is generated (the first subject image and the second subject image are processed by the process of the present invention. There is no position overlap on the composite image).
  • FIG. 11 (b) is a superimposed image obtained by translucently combining only the first subject region.
  • Fig. 11 (c) is a superimposed image in which only the second subject area is translucently synthesized.
  • Figure 11 (a) shows a superimposed image generated by overwriting both without making them both translucent.
  • Which synthesis method is used depends on the purpose, and it is sufficient that the user can select a synthesis method according to the purpose at that time.
  • a detailed image of the first subject is not necessary, Since it is only necessary to know whether or not there is any overlap, translucent composition may be used. Also, it is better to combine the second subject by overwriting instead of translucent, because the shutter cannot be released properly without knowing the details of the expression at the moment of shooting. Therefore, the synthesis method shown in Fig. 11 (b) is suitable. Also, for users who are more likely to take a picture if they know the area of the subject to be combined, it is better to combine the two with translucency during shooting, or to make only the second subject translucent. There may be cases.
  • the subject area obtained from the subject area obtaining means 7 (S 6) has already been expanded, not only the subject but also the surrounding background portion are synthesized together.
  • the background part has been corrected so that it matches, so even if the subject area to be extracted is slightly larger than the area of the contour of the actual subject and is larger than the actual subject area, it may even include the background part.
  • the image does not become unnatural at the composite boundary.
  • the transparency should be set near the composite boundary of the subject area including the outside, or near the composite boundary only inside the subject area so that the composite boundary looks more natural.
  • the program code itself read from the storage medium implements the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
  • a storage medium for supplying the program code for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a magnetic tape, a nonvolatile memory card, and the like can be used.
  • program code may be downloaded from another computer system to the main storage 74 or the external storage 75 of the image synthesizing apparatus via a transmission medium such as a communication network. .
  • the computer executes the readout program code, thereby not only realizing the functions of the above-described embodiment, but also executing the OS (Operating System) running on the computer based on the instruction of the program code. It is needless to say that an operating system) performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
  • OS Operating System
  • the program code read from the storage medium is stored in a function expansion board connected to the computer or a function expansion board connected to the computer. After the data is written to the memory provided in the unit, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing based on the instructions of the program code. It goes without saying that a case where the functions of the above-described embodiment are realized is also included.
  • the storage medium stores program codes corresponding to the above-described flowcharts.
  • the present invention is not limited to the above-described embodiment, but is described in the claims. Various changes are possible within the scope.
  • the first image synthesizing apparatus includes: a background image that is a background image; and a first subject image that is an image including at least a part of the background and the first subject. Any one of a relative movement amount, a rotation amount, an enlargement / reduction ratio, and a distortion correction amount of a background between at least a part of the background and a second subject image which is an image including a second subject.
  • a background correction amount calculating means for calculating a correction amount comprising a combination or reading out the calculated and recorded correction amount, and a base image for selecting one of the background image, the first subject image, and the second subject image.
  • the other two images are corrected with the correction amount obtained from the background correction amount calculating means so that at least a part of the background other than the subject overlaps, and the reference image and the other corrected one or two are corrected.
  • Superimposed image generation to generate an image with superimposed images And a stage.
  • the background displacement between the two images and combine them it is possible to correct the background displacement between the two images and combine them, so that the portion other than the region except the clearly different region such as the subject (that is, the background portion) can be overlapped in any way.
  • the effect is that the synthesis results are almost the same and the synthesis result does not become unnatural. For example, only the subject area Even if the extraction or specification of the subject area is slightly inaccurate when trying to combine the images, the background around the subject area does not deviate from the part of the image to be combined. It is synthesized as a continuous landscape, which has the effect of reducing the appearance of unnaturalness.
  • the unnaturalness at a level finer than one pixel appears in the conventional method.
  • the pixels around the contour pixel become the pixels at the same background portion position, and the combination is almost natural. In this way, the effect of preventing or reducing unnaturalness at a level finer than one pixel is obtained.
  • the camera since the background is corrected and combined, the camera does not need to be fixed with a tripod or the like when shooting the background image or the first and second object images. This has the effect of simplifying shooting.
  • the correction amount between the first subject image and the second subject image can be calculated even if the background portion does not overlap between the first subject image and the second subject image.
  • the background between the background portion of the first subject image and the background portion of the second subject image is missing, if the background portion of the background image fills the missing background portion, it becomes the background portion.
  • the first subject image and the second subject image having no overlap can be combined in a state where the background is connected.
  • the first image synthesizing device further includes an image pickup means for picking up an object or a landscape, and the background image, the first object image, or the second object image is based on an output of the image pickup means.
  • a configuration that can be generated can also be used.
  • the image synthesizing device that generates the superimposed image includes the imaging unit, the superimposed image can be generated on the spot where the user has photographed the subject or the landscape. This improves convenience.
  • the image synthesizing device that generates the superimposed image includes the imaging unit, the superimposed image can be generated on the spot where the user has photographed the subject or the landscape. This improves convenience.
  • an effect of being able to take a picture again on the spot is obtained.
  • the image obtained from the imaging means is usually recorded in a main memory or an external memory irrespective of whether the image is incorporated in the image synthesizing device or not, and the user can use a shutter button or the like to record the image. Instruct. Then, the recorded image is used as a background image, a first subject image, or a second subject image in the combining process.
  • the first image synthesizing device may be configured so that, of the first subject image and the second subject image, the one taken first is used as the reference image.
  • the first subject image is used as the reference image.
  • the background images may be in any order.
  • the background image and the second subject image are corrected using the first subject image as a reference image.
  • the first subject image reference image
  • the amount of correction such as the amount of movement of the background portion between the second image and the background image is calculated by the background correction amount calculating means.
  • the superimposed image generation means performs correction using the correction amount, and uses the three images of the first subject image (reference image), the corrected background image, and the corrected second subject image to generate a composite image. Combine.
  • the second subject image is re-shooted, and a composite image is generated again.
  • the first subject image (reference image) and the corrected background image do not need to be re-created, and therefore, those obtained when the composite image is created first can be used as they are.
  • the second subject image is corrected again using the first subject image as a reference image.
  • a new corrected second subject image is generated.
  • a composite image is synthesized using the three images of the first subject image (reference image), the corrected background image, and the newly corrected second subject image.
  • the above process may be repeated.
  • the images required for the composition are the three images of the corrected first subject image, the corrected background image, and the second subject image (reference image). Become. If the second subject image is retaken, the reference image changes, so all correction processing must be performed again. Specifically, the corrected first subject image and the corrected background image must be generated again.
  • the amount of processing and the processing time can be reduced when re-shooting is repeated.
  • the background image is used as the reference image, and the images of the areas of the first and second subjects are combined on the background image. If the image of the area of the second subject is placed and then synthesized (or vice versa), the effect is obtained that the area to be synthesized is small and the processing amount and processing time can be reduced.
  • the effect of reducing the possibility that the synthesis result becomes unnatural can be obtained because the area to be synthesized is reduced.
  • the synthesized result is unnatural, for example, if the area of the subject is made smaller than the outline of the actual object, the synthesized object will be lost, or the outline described above will be unnatural. That is the case.
  • the first image synthesizing apparatus may be configured to shoot a background image immediately before or immediately after a reference image.
  • the first subject image Is a reference image. Therefore, even if the second subject image is retaken due to the overlap between the subjects, the second subject is likely to be still there, and the camera or the second subject may move. It is easy to make fine adjustments and retake images.
  • a process other than correcting the background image before capturing the second subject image for example, a process of extracting an area of the first subject, which will be described later, can be performed.
  • the extracted area is used for compositing and overlap detection.
  • the area of the first subject extracted in the processing such as composition and overlap detection can be used immediately. This has the effect of reducing the processing time required after shooting the third image (second subject image). From the user PC leak 08510
  • the first image synthesizing apparatus may be configured such that the superimposed image generating means superimposes the reference image and another corrected one or two images at a predetermined transmittance, respectively.
  • the “predetermined transmittance” may be a fixed value, a value that changes according to the region, or a value that gradually changes near the boundary of the region.
  • the superimposed image generating means determines a pixel position of the superimposed image, obtains a pixel value of a pixel position on the reference image and a pixel value of a corrected pixel position on another image, and obtains a predetermined value for the two pixel values.
  • the sum of the values obtained by multiplying the transmittances is regarded as the pixel value of the image. This processing is performed at all pixel positions of the superimposed image. Also, by changing the transmittance depending on the pixel position, the ratio of the reference image can be increased or the ratio of the corrected image can be increased depending on the location.
  • the inside of the subject area is opaque (that is, the image of the subject in the corrected image is overlaid), and the area around the subject area is Overlap so that the ratio of the reference image increases as the distance from the subject area increases. Then, even if the contour of the subject area, that is, the contour of the extracted subject is wrong, the surrounding pixels gradually change from the corrected image to the reference image, so that the effect that the error becomes inconspicuous is obtained. You.
  • a composite table such as, for example, overlaying only the subject area with half transmittance
  • the areas of the respective objects can be distinguished by the above-described ability, and they are displayed on the composite image. It can be easily determined whether or not they overlap.
  • the superimposed image generating means may convert an area having a difference in a difference image between the reference image and another corrected one or two images into an original pixel.
  • a configuration in which the image is generated as an image having a pixel value different from the value may be employed.
  • the “difference image” is an image in which pixel values at the same position in two images are compared and the difference value is created as a pixel value.
  • the difference value often takes an absolute value.
  • Pigment value different from the original pixel value means, for example, translucent to make it translucent, inverting the brightness or hue of the pixel value, inverting the pixel value, or displaying a conspicuous color such as red, white, or black It is a pixel value that realizes the following. Also, as described above, try changing the pixel value between the boundary and the inside of the area, encircling the boundary with a dotted line, blinking (changing the pixel value over time), Such cases are also included.
  • a pixel value at the same pixel position is obtained between the reference image and another corrected image, and if there is a difference, the pixel value of the superimposed image at that pixel position is changed to another region. Is different from the pixel value.
  • the region of the difference portion can be generated as an image having a pixel value different from the original pixel value.
  • the regions of the first and second subjects are extracted as the regions with differences in the difference image because one is the subject image and the other is the background image on the reference image and the corrected image.
  • You. Make the extracted area translucent, inverted, or use pixel values with prominent colors. This makes it easier for the user to understand the area of the subject, and if there is an overlap between the subjects, the effect becomes easier to understand.
  • a first image combining device extracts a first subject region and a second subject region from a difference image between a reference image and another corrected one or two images.
  • the subject image extracting means wherein the superimposed image generating means replaces the reference image with one or two other corrected images, instead of superimposing the reference image and the corrected one image or two images.
  • a configuration in which one or two other corrected images are overlapped can also be adopted.
  • the composition is performed by changing the transmittance of the subject area, it is easy for the user to know which area is to be combined, and if the subject overlaps, it is even easier to understand. The effect that comes out. In addition, this gives the user the ability to judge how to avoid overlapping so that the user can assist shooting.
  • this gives the user the ability to judge how to avoid overlapping so that the user can assist shooting.
  • three images of the background image, the first subject image, and the second subject image are used, there is an effect that the region of the first subject or the region of the second subject can be easily extracted.
  • the area of the first object or the area of the second object can be respectively extracted, when each object has an overlap, which one is prioritized to be synthesized, that is, in the overlap portion, the first object is determined. This also has the effect of allowing the user to decide whether to combine the subject so that it is above or below the second subject.
  • the first image synthesizing device further includes an overlap detecting unit configured to detect an overlap between the first subject region and the second subject region obtained from the subject region extracting unit. You can also.
  • the first subject area and the second subject area can be obtained from the subject area extracting means, so that the overlap detecting means sets the first subject area and the second subject area at a certain pixel position.
  • the object region extracting unit or the overlap detecting unit generates each region as an image, and sets the pixel value of the pixel of the object region to a predetermined value. . Then, if the overlap detecting means determines at each pixel position whether the pixel value at the same pixel position in both images is the set value, it is possible to accurately determine whether there is an overlap.
  • the first image synthesizing apparatus further comprises an overlap warning means for warning a user, a subject, or both of the presence of the overlap when the overlap detection means detects the overlap. It can be a configuration that includes it.
  • the “warning” includes a warning by a character or an image on a display means or the like, or a method by which a user or a subject can be sensed, such as light from a lamp or the like, sound from a speaker or the like, or vibration from a piebrator or the like. Then, anything is included.
  • the first image synthesizing apparatus further comprises a shutter chance notifying means for notifying the user or the subject or both that the overlap does not exist when the overlap detecting means does not detect the overlap. Further, it is possible to adopt a configuration that includes it.
  • notification includes any method that can be sensed by the user or the subject, similar to “warning”.
  • the subject can be notified of a photo opportunity, the effect of photographing assistance that the user can immediately prepare for a pose or a line of sight can be obtained.
  • the first image synthesizing device further comprises: an image pickup unit for picking up an object or a scene; and an image obtained from the image pickup unit when the overlap detection unit does not detect an overlap.
  • An automatic shutter unit that generates an instruction to record the subject image or the second subject image may be further included.
  • recording a captured image as a background image, a first subject image, or a second subject image is realized by, for example, recording it in a main memory or an external memory. Therefore, the automatic shutter means overlaps a signal indicating that there is no overlap between the area of the first object and the area of the second object.
  • the L5 detection means When input from the L5 detection means, it outputs an instruction for recording control processing for the main memory or external memory. Then, the background correction amount calculating unit and the superimposed image generating unit read the image recorded in the main memory or the external storage so that the background image, the first subject image, and the second subject image can be obtained. Become. Note that even if the automatic shutter means automatically issues an instruction, an image is not necessarily recorded immediately. For example, the recording may not be performed unless the shutter button is pressed at the same time and the camera is in the automatic recording mode.
  • the first image synthesizing apparatus further comprises: an image pickup unit for picking up an image of a subject or a scene; Automatic shutter means for generating an instruction to prohibit recording as the first subject image or the second subject image may be further included.
  • the automatic shutter unit when the automatic shutter unit receives a signal indicating that there is an overlap from the overlap detection unit, the automatic shutter unit outputs an instruction to prohibit recording an image obtained from the imaging unit in the main storage or the external storage. .
  • This prohibition processing may be performed only when the automatic prohibition mode is set.
  • the shooting is not performed when the objects are overlapped with each other, so that an effect of a shooting assistance that prevents a user from shooting / recording in a state where the objects are overlapped by mistake comes out.
  • the overlap detecting means may be configured to extract an overlap area where the area of the first subject and the area of the second subject overlap.
  • the overlap area when detecting whether or not there is an overlap, the overlap area can be extracted at the same time, for example, by using the image described above.
  • the extracted overlapping area when there is a portion where the subjects overlap each other, it is possible to notify the user of which portion overlaps by displaying or the like.
  • this makes it possible to determine the direction and position of the camera or the subject being photographed and how much to move, so that the effect of photographing assistance can be obtained.
  • calculating the background correction amount using only the first subject image and the second subject image without using the background image, correcting one of them, generating a difference image, and obtaining the difference area is appropriate for the background portion. It is possible if there is an overlap in volume. At that time, if there is no overlap between the first subject area and the second subject area, the difference area is obtained as two independent areas, the first area and the second area. However, if there is an overlap, the first region and the second region are not independent and are extracted as one intersecting region. Therefore, it is difficult to extract an overlapping area only from the first subject image and the second subject image.
  • a background image for example, if the reference image is used as the background image, only the first region or the second region is present in the difference image, and the first region and the second region are not included.
  • the second region is extracted separately. They are not extracted at the same time. Therefore, even if the first area and the second area overlap, the first area and the second area can be obtained without any problem. Therefore, the overlap region can also be obtained. In this way, by using the background image, even if the objects overlap, the effect that the overlapping area can be obtained can be obtained.
  • the first image synthesizing apparatus is configured such that the superimposed image generating means generates the overlapping area extracted by the overlap detecting means as an image having a pixel value different from an original pixel value. You can also.
  • the superimposed image generating means when the superimposed image generating means generates the superimposed image, the pixel value of each pixel position is determined, but when the pixel position is within the overlapping area obtained from the overlapping detecting means (for example, the overlapping area Is generated as a black image, the process of determining that the pixel value at the pixel position of the overlapping image is black is simple).
  • the first image synthesizing device when an overlap is detected by the overlap detection means, calculates a position of the first object or the second object to reduce the overlap or a direction of the position.
  • the information on the first subject and the second subject can be obtained from the subject area extracting means, and the information on the overlap can be obtained from the area information by the overlap detecting means. is there.
  • the position of the subject area is set to a position different from the position obtained from the subject area extracting means, and the overlap detecting means examines the amount of overlap, the amount of overlap when the subject moves to that position is determined. Can be predicted.
  • the position of the subject area is set to various positions, the amount of overlap is predicted, and the position or direction with the least overlap is set as the position or direction to reduce the overlap. And notify the subject.
  • the overlap should generally decrease as the distance between the subjects increases, so the direction in which the distance between the subjects increases can be calculated from the obtained subject area.
  • a superimposed image may be generated by performing various synthesizing processes and then overwriting an arrow or the like.
  • the subject for calculating the position or direction with a small overlap may be either the 17th or the 2nd subject, but the subject taken earlier has already left the front of the camera, and the subject taken later Usually, it is considered to be standing in front of the camera. Therefore, if the position and direction of a subject photographed later are calculated, the subject can be moved immediately in the direction in which the overlap is reduced based on the calculation result, and the usability is improved.
  • the first image synthesizing method includes: a background image that is a background image; a first subject image that is an image including at least a part of the background and a first subject; Correction amount, which is any one or a combination of the relative movement amount, rotation amount, enlargement / reduction ratio, and distortion correction amount of the background between the image and the second object image including the second object. Or a background correction amount calculation step for reading out the correction amount that has been calculated and recorded, and using one of the background image, the first object image, and the second object image as a reference image, 2 Make sure that at least part of the background other than the subject overlaps 1 1 3
  • a first image synthesizing program according to the present invention is configured to cause a computer to function as each unit included in the first image synthesizing device.
  • a first image composition program according to the present invention is configured to cause a computer to execute each step included in the first image composition method.
  • a first recording medium according to the present invention has a configuration in which the above-described first image composition program is recorded.
  • the image synthesizing method is realized using the computer.
  • the computer is It can function as an image synthesizing device.
  • Embodiment 1 in addition to the first subject image and the second subject image, a background image in which at least a part of the background image common to each subject image is shown and the subject is not shown is used.
  • a description will be given of a configuration in which images are combined without using a background image.
  • first subject and the “second subject” are objects to be synthesized, and generally include a person but may be an object.
  • “subject” is defined as the height between the first subject image and the second subject image.
  • the scenery part is at least partially overlapped, the area where the pixel values do not match, that is, the area where there is a change has the possibility of becoming the “subject area”.
  • the subject when the subject is a person, the subject is not necessarily one person, and a plurality of persons may be collectively referred to as a “first subject” or a “second subject”. In other words, even if there are multiple people, what is treated collectively as a unit of synthesis processing is one “subject”.
  • the subject is not always limited to one area, and may include a plurality of areas.
  • the “first” and “second” are simply used to distinguish them as different frame images, and do not indicate the order in which they were shot, and there is no essential difference. Also, for example, if the person has clothes and things and does not appear in the “image of only the background that does not include the first subject or the second subject”, they are also included in the subject.
  • first subject image and “second subject image” are separate images including the above “first subject” and “second subject”.
  • the subject is captured by a camera or the like. These are images taken separately.
  • the alignment cannot be performed based on the common background part, which is not suitable for synthesis. Therefore, at least a part (in order to make the surroundings of the combined subject natural, more preferably around the subject to be combined) must have a common background portion.
  • the first subject image and the second subject image are taken using the same background, that is, without moving the camera much.
  • the “background portion” is a portion obtained by removing the “first subject” and the “second subject” from the first subject image and the second subject image, respectively.
  • the “movement amount”, “distortion correction amount”, and “superimposed image generation means” are the same as those described in the first embodiment, and thus description thereof will be omitted.
  • the “subject area” is an area delimited by a boundary where the subject is separated from the background. For example, if a person has clothes and objects in the first subject image and they do not appear in the second subject image, they are also subjects and are included in the subject area. It should be noted that the subject area is not necessarily a connected one-piece area, but may be divided into a plurality of areas.
  • “Overlapping only the region obtained from the subject region extracting means” does not mean that no image is generated except for the region, but means that the other region is filled with a reference image or the like.
  • the “feature” refers to a property of an image in the region, and is preferably a property that can be expressed as a feature amount by being quantified.
  • the feature values include, for example, the pixel value of each color, its hue, saturation, and brightness, as well as statistics representing the pattern and structure of the image. Power vectors, their second statistics, higher statistics, and so on.
  • the area of the first subject or the second subject refers to the difference image, etc. This is an area of the subject extracted from the area of the first subject or the area of the second subject, which need not be distinguished.
  • the “subject to be synthesized” is not the object obtained in the process of the synthesis process, but is the object that actually exists (in front of the camera), and includes the first object image and the second object image. This is the subject that the user is trying to combine with the reference image defined in one of the two. However, as described above, what is treated collectively as a unit of the synthesis processing is one “subject”, so one subject may be a plurality of persons / objects.
  • FIG. 33 is a configuration diagram showing an image synthesizing apparatus for executing the image synthesizing method according to one embodiment of the present invention.
  • the main parts of the image synthesizing device are composed of an imaging unit 21, a first subject image obtaining unit 22, a second subject image obtaining unit 23, a background correction amount calculating unit 24, a corrected image generating unit 25, and a difference.
  • Image generation means 26, subject area extraction means 27, overlap detection means 28, overlap image generation means 29, overlap image display means 30, overlap warning means 31, shutter change notification means 32, automatic shutter means 3 3 main function blocks can be expanded and shown.
  • FIG. 34 is a configuration example of an apparatus that specifically realizes each of the means 21 to 33 in FIG.
  • CPU (central processing singing unit) 90 is a background correction amount calculating means 24, a captured image generating means 25, a difference image generating means 26, a subject area extracting means 27, an overlap detecting means 28, Overlay image generating means 29, Overlay image display 2003/008510
  • Step 30 overlap warning means 31, shutter change notification means 32, automatic shutter function 33, functioning as a main storage of a program describing the processing procedures of these means 24 to 33 3, external storage 75, obtained from the network 1 via a communication device 77, a network destination, etc.
  • the imaging unit 21, the first subject image obtaining unit 22, and the second subject image obtaining unit 23 are also used for internal control of the image sensor and various processes of image data output by the image sensor. In some cases, a CPU is used.
  • the CPU 90 includes a display 71, an image sensor 72, a tablet 73, a main memory 74, an external memory 75, and a shutter button 76 interconnected through a bus 79 including the CPU 90. Processing is performed while exchanging data with the communication device 77, the lamp 78, and the speaker 80. The data exchange may be performed not only via the bus 79 but also via a communication cable or a wireless communication device such as a wireless communication device capable of transmitting and receiving data.
  • the means for realizing each of the means 21 to 33 is not limited to CPU, but may be a digital signal processor (DSP) or a logic circuit in which a processing procedure is incorporated as a circuit.
  • DSP digital signal processor
  • the display 71 is usually realized in combination with a graphics card or the like, has a VRAM (video random access memory) on the graphics card, converts data in the VRAM into a display signal, and converts the data into a display signal. Display / output medium), and the display displays the display signal as an image.
  • the image sensor 72 is a device that obtains an image signal by photographing a landscape or the like. Usually, an optical system component such as a lens, a light receiving element, and an electronic circuit associated therewith are used. Difficult 08510
  • the image sensor 72 includes an output signal that is converted to digital image data through an AZD converter or the like. It is assumed that the image data of the captured image is sent to the acquisition means 23 or the like.
  • a general device as an image sensor there is, for example, a CCD (charge coupled device). However, any device that can obtain a landscape or the like as image data may be used.
  • Means for inputting user instructions include a tablet 73, a shirt turbotan 76, and the like. The user's instructions are input to each means 21 to 33 via a bus 79.
  • various input means such as various operation buttons and voice input by a microphone can be used.
  • the tablet 73 includes a pen and a detecting device for detecting the pen position.
  • the shutter button 76 is composed of a mechanical or electronic switch, and when the user presses the button, the image captured by the image sensor 72 is usually stored in main memory 74 or external memory 75.
  • a start signal is generated to start a series of processes such as recording on a computer.
  • the main memory 74 is usually composed of a memory device such as a dynamic random access memory (DRAM) or a flash memory. Note that memories and registers included in the CPU may be interpreted as a kind of main memory.o
  • DRAM dynamic random access memory
  • flash memory a type of main memory.
  • the external storage 75 is a removable storage device such as a hard disk drive (HDD) or a personal computer (PC) card.
  • a main memory or an external memory attached to another network device wired or wirelessly connected to the CPU 90 via a network through the network can be used as the external memory 75.
  • P Kasumi 08510 P Kasumi 08510
  • the communication device 77 is realized by a network interface card or the like, and exchanges data with another network device connected by wireless or wired communication.
  • the speaker 80 interprets voice data transmitted via the bus 79 or the like as a voice signal and outputs it as voice.
  • the output voice can be a simple single-wavelength sound, or it can be complex, such as music or human voice. If the audio to be output is predetermined, the transmitted data may not be an audio signal but simply an ON / OFF operation control signal.
  • the data exchange between each means is mainly expressed by the bus when the expressions “* obtained from the means” and “send (pass) to the * means” are used without any special annotation.
  • data may be exchanged directly between each means, or data may be exchanged between the main memory 74, the external memory 75, the network via the communication device 77, etc. In some cases.
  • the imaging means 21 mainly includes an imaging element 72, and sends the captured scenery and the like as image data to the first subject image acquiring means 22 and the second subject image acquiring means 23.
  • the first subject image acquiring means 22 includes, for example, an imaging means 21, a main memory 74, and / or an external memory 75, and the first subject image is captured by the imaging means 21, a main memory 74, and an external memory. It is obtained from the memory 75, and from a network destination via the Z or the communication device 77.
  • the first subject image acquisition Stage 22 may include a CPU or the like for internal control or the like.
  • the current scenery (first subject image) including the first subject is photographed by the image sensor 72, and usually the timing when the shutter button 1 6 or the like is pressed.
  • the captured image is recorded in a main memory 74, an external memory 75, and / or a network via a communication device 77.
  • the first subject image acquiring means 22 obtains the first subject image from the main memory 74, the external memory 75, and the network via the Z or the communication device 77, etc. Thus, an image prepared in advance is read out. Note that there is a camera at a network destination via the communication device 77, and there is a case where an image is taken through the network.
  • the first subject image is sent to background correction amount calculating means 24, corrected image generating means 25, difference image generating means 26, subject area extracting means 27, Z or superimposed image generating means 29, and the like.
  • the second subject image acquiring means 23 is composed of, for example, the imaging means 21, the main memory 74, and Z or the external memory 75, and includes an image including the second subject (hereinafter, “second subject image”). ) From the imaging means 21, the main memory 74, the external memory 5, and / or a network via the communication device 77.
  • the second subject image obtaining means 23 may include a CPU or the like for internal control or the like. Except for the content of the image, the method of acquiring the image is the same as that of the first subject image acquiring means 22.
  • the second subject image is sent to background correction amount calculating means 24, corrected image generating means 25, difference image generating means 26, subject area extracting means 27, and / or superimposed image generating means 29.
  • the CPU 90 as the background correction amount calculating means 24 calculates the relative movement amount, rotation amount, enlargement / reduction ratio, and distortion correction amount of the background other than the subject in the first subject image and the second subject image. Calculate the correction amount consisting of one or any combination. It is sufficient that the correction amount between one (reference image) of the first subject image and the second subject image and the other image is at least obtained.
  • the background correction amount calculation unit 24 sends the calculated correction amount to the correction image generation unit 25.
  • the correction amount calculated in advance is read out by the background correction amount calculating means 24, the correction amount is obtained from the main memory 74, the external memory 75, and / or a network destination via the communication device 77. A positive amount will be read.
  • the CPU 90 as the corrected image generation means 25 calculates the background correction amount so that either the first subject image or the second subject image is used as the reference image, and the other image overlaps the background portion other than the subject.
  • An image corrected by the correction amount obtained from the means 24 (hereinafter, referred to as a corrected image) is generated and sent to the difference image generating means 26 and the superimposed image generating means 29.
  • the corrected image generation means 25 reads a previously generated corrected image, the corrected image is read from the main memory 74, the external memory 75, and / or a network destination via the communication device 77. Will be.
  • the CPU 90 as the difference image generation means 26 generates and generates a difference image between the reference image determined by the correction image generation means 25 and the corrected image obtained from the correction image generation means 25.
  • the obtained difference image is sent to the subject region extracting means 27 and the superimposed image generating means 29.
  • the CPU 90 as the subject area extracting means 27 extracts the first and second subject areas from the difference image obtained from the difference image generating means 26, and overlaps the extracted areas with the overlap detecting means 2. 8 and the superimposed image generating means 29.
  • the CPU 90 as the overlap detecting means 28 detects the overlap between the first and second subjects from the first and second subject areas obtained from the subject area extracting means 27, and determines the overlap.
  • the presence / absence information and the information of the overlapping area are sent to the superimposed image generating means 29, the overlapping warning means 31, the shutter change notification means 32 and the automatic shutter means 33.
  • the CPU 90 serving as the superimposed image generating means 29 includes a first subject image obtained from the first subject image obtaining means 22, a second subject image obtained from the second subject image obtaining means 23, and a corrected image. An image in which the corrected image obtained from the generating means 25 is entirely or partially superimposed is generated, and the generated image is sent to the superimposed image display means 30.
  • the superimposed image generating means 29 may generate an area having a difference in the difference image obtained from the difference image generating means 26 as an image having a pixel value different from the original pixel value.
  • the superimposed image generating means 29 superimposes only the i-th subject and the second subject area obtained from the subject area extracting means 27 on the reference image or the like.
  • the superimposed image generation means 29 generates the overlap area obtained from the overlap detection means 28 as an image having a pixel value different from the original pixel value.
  • the CPU 90 as the superimposed image display means 30 displays the superimposed image obtained from the superimposed image generation means 29 on a display 71 or the like.
  • the superimposed image display means 30 performs a shutter change according to the warning information obtained from the overlap warning means 31, or a shutter change according to the photo opportunity information obtained from the photo opportunity notification means 32.
  • an indication that the automatic shuttering has been performed may be performed, or an indication that the automatic shirting has been performed may be performed in accordance with the shutter information obtained from the automatic shirting means 33.
  • the CPU 90 serving as the overlap warning means 31 notifies the overlap information obtained from the overlap detection means 28 to 5 that, when an overlap exists, the user, the subject, or both have an overlap.
  • the notification content is sent to the superimposed image display means 30 as characters, etc., and displayed on the display 71, or is notified by light using the lamp 78. Sound is notified using the speed 80 If you can send L0 notification, other devices may be used.
  • the CPU 90 as the photo opportunity notification means 32 notifies the user, the subject, or both, that there is no overlap from the overlap information obtained from the overlap detection means 28 when there is no overlap. Notification method
  • the L5 method is the same as that described for the overlap warning means 31.
  • the CPU 90 as the automatic shutter means 33 outputs the image obtained from the imaging means 21 to the second subject image acquisition means 23 when there is no overlap based on the overlap information obtained from the overlap detection means 28. Is automatically instructed to be recorded in the main memory 74 or the external memory 75.
  • the image obtained from the imaging means 21 is finally recorded, saved, and synthesized as the first subject image or the second subject image in the main memory 74, the external memory 75, or the like.
  • the main usage is assumed. For example, when photographing the first subject first and then photographing the second subject, when the first subject image is obtained from the imaging means 21, the image is recorded and saved each time it is obtained. 08510
  • the second subject image may be recorded and stored when there is an instruction from the automatic shutter means 33 and the shirt button 1443 is pressed by the user.
  • the automatic shutter means 33 may notify the user, the subject, or both that the captured image has been recorded as a result of issuing the instruction.
  • the notification method is the same as described in the overlap warning means 31.
  • the CPU 90 as the automatic shirtter means 33 not only instructs the recording, but also based on the overlap information obtained from the overlap detecting means 28, when there is an overlap, the second subject image acquiring means At 23, an instruction is automatically issued to prohibit the recording of the image obtained from the imaging means 21 into the main memory 74 or the external memory 75. This operation is the reverse of the above-described automatic recording. In this case, if there is an instruction to prohibit saving by the automatic shutter means 33, the second subject image will not be recorded and saved even if the shutter button 144 is pressed by the user.
  • FIG. 35 (a) shows an example of the external appearance of the image synthesizing apparatus according to the present invention from the back. are doing. On the main body 140, there are a display / tablet 141, a lamp 144, and a shutter button 144.
  • the display / tablet 14 1 corresponds to the input / output device (the display 71 and the tablet 73, etc.) and the superimposed image display means 30. As shown in Fig. 35 (a), on the display / tablet 141, the composite image overlap warning means 31 generated by the superimposed image generation means 29, the shutter chance notification means 32, and the automatic Notification from shutter means 33, etc. Z Warning information is displayed. It is also used to display various setting menus of the image compositing device and change settings with a finger or pen using a tablet. In addition, as operation means for various settings, not only tablets but also buttons and the like may be used.
  • the display / tablet 1414 can be viewed not only by the photographer but also by the subject using a method such as rotation or separation with respect to the main body 140.
  • the lamps 14 2 are used for notification and warning from the overlap warning means 31, the shutter change notification means 32, or the automatic shirtter means 33.
  • the shutter button 144 is mainly used for instructing a timing at which the first subject image acquiring unit 22 or the second subject image acquiring unit 23 captures / records a captured image from the imaging unit 21.
  • a built-in speaker or the like may be used as a notification / warning means.
  • FIG. 35 (b) shows an example of the appearance of the image synthesizing apparatus according to the present invention from the front.
  • the lens unit 144 is a part of the imaging unit 21. Note that this is shown in the example of Fig. 35 (b). However, there may be a display unit, lamp, speaker, etc. on the front so that information (notifications and warnings described above) can be transmitted to the subject.
  • the image data and the pixel values are the same as those described in Embodiment 1 with reference to FIG.
  • FIG. 36 is a flowchart illustrating an example of the image synthesizing method according to the embodiment of the present invention.
  • step S 1 1 the first subject image acquiring means 22 acquires the first subject image, and connects to the connection point p 20 (hereinafter, “ The connection point p is abbreviated as “p”), and the process proceeds to S12.
  • the first subject image may be photographed using the imaging means 21 or may be an image prepared in advance in a main memory 74, an external memory 75, or a network destination via the communication device 77. It may be read.
  • the second subject image acquiring means 23 acquires a second subject image having a background portion at least partially common to the first subject image, and the process proceeds to S13 via p30. move on.
  • the process here will be described later in detail with reference to FIGS. 44, but the method of acquiring the second subject image itself is the same as that of the first subject image. Note that the order of the processing of S11 and S12 may be reversed. However, if the later image is set as the reference image, an effect of less discomfort in displaying the composite image at the time of shooting is obtained.
  • the background correction amount calculation means 24 calculates a background correction amount from the first subject image and the second subject image, and the process proceeds to S14 via p40.
  • the first subject image and the second subject image are obtained from the first subject image obtaining means 22 (S11) and the second subject image obtaining means 23 (S12), respectively.
  • the means / steps from which these images are obtained are the same as those obtained in S13. Therefore, the method of acquiring these images and the Z step will not be described below.
  • the corrected image generation unit 25 corrects the first subject image or the second subject image other than the reference image using the background correction amount obtained from the background correction amount calculation unit 24, and calculates the difference.
  • the image generation unit 26 generates a difference image between the image captured by the corrected image generation unit 25 and the reference image, and the process proceeds to S15 via p50. Details of the processing in S14 will be described later with reference to FIG.
  • the subject area extracting means 27 converts the difference image obtained from the difference image generating means 26 (S14) into the first and second subject areas (hereinafter, the first subject area and the second subject area).
  • the overlap detection means 28 detects overlap between the objects, and the processing proceeds to S16 via p60. Details of the processing in S15 will be described later with reference to FIG.
  • At least one of the overlap warning means 31, the photo opportunity notification means 32, and the automatic shutter means 33 is used as information about the overlap obtained from the overlap detection means 28 (S 15).
  • Various processes are performed accordingly, and the process proceeds to S17 via P70. Details of the processing in S16 will be described later with reference to FIGS. 50 to 52.
  • the superimposed image generating means 29 corrects the first subject image, the second subject image, and the S image which is not the reference image, and corrects the S image. 25 (S14) The i-th and second subject areas obtained from the image corrected by the above, the subject area extracting means 27 (S15), the overlap detecting means 28 (S16) 03008510
  • the superimposed image display means 30 displays the superimposed image obtained from the superimposed image generation means 29 (S17) on the display 71 or the like, and ends the processing.
  • FIG. 37 (a) is an example of the first subject image obtained in S11.
  • the first subject (1) stands on the left side in front of the background.
  • the face of the person (1) is marked with "1".
  • "right side” and “left side” will mean “right side” and "left side” in the figure, respectively. You can think of this direction as seen from the photographer Z camera.
  • FIG. 38 (a) is an example of the second subject image obtained in S12.
  • a second subject (2) stands on the right side.
  • "2" is written on the face of the person (2).
  • FIG. 38 (c) shows the amount of background correction between the first subject image of FIG. 37 (a) and the second subject image of FIG. 38 (a).
  • the second subject image is corrected using the background correction amount.
  • the captured image is the area surrounded by the solid frame, and it is not clear how the correction is performed.
  • the range of the original second subject image in FIG. 38 (a) and the range of the first subject image in FIG. 37 (a) are shown by dotted lines in FIG. 38 (c).
  • the background in Fig. 38 (a) is obtained by photographing a slightly upper left landscape of the background in Fig. 37 (a). Therefore, in order to capture the second subject image in FIG. 38 (a) so as to overlap the background of the first subject image in FIG.
  • FIG. 38 (c) is corrected so as to have a slightly lower right landscape than that of FIG. 38 (a).
  • the original range in Figure 38 (a) is shown by the dotted line. Since there is no image of the lower right scenery from Fig. 38 (a), in Fig. 38 (c), the part protruding from the rightmost dotted line to the right and the part protruding below the lowermost dotted line are shown. Is blank. Conversely, the upper left part of Fig. 38 (a) is truncated.
  • the background correction amount obtained in S13 is the translation amount indicated by the shift between the solid frame and the dotted frame.
  • FIG. 39 (a) shows the first subject image in Fig. 37 (a) and Fig. 38 in S14.
  • the part with the difference amount 0 (that is, the part where the background matches) is indicated by a black area.
  • the part where there is a difference is in the subject area and the noise part, and the subject area part is a strange image where the background part and the subject part image overlap.
  • a region where only one of the images has pixels due to the correction (for example, the inverted L-shaped region between the solid line and the dotted line located at the lower right of Fig. 38 (c)) is excluded from the difference target.
  • the amount is assumed to be 0).
  • Fig. 40 (a) shows the image of the part corresponding to the second subject area shown in Fig. 49 (d), which will be described later, superimposed on the first subject image (reference image) shown in Fig. 37 (a) (overwriting). )
  • the generated image The subjects shown separately in Fig. 37 (a) and Fig. 38 (a) are lined up on the same image without overlapping. There are various processing methods for the stacking method, which will be described in detail later.
  • the image of FIG. 40 (a) is displayed as a composite image on the superimposed image display means 30. As a result, an effect can be obtained in which images can be synthesized as if the subjects were separately photographed at the same time.
  • FIG. 41 is an example of a second subject image different from FIG. 38 (a). Compared to Fig. 38 (a), the second subject is located slightly to the left of the same background. It is assumed that the first subject image is the same as that shown in FIG. 37 (a).
  • FIG. 42 (c) shows an area where the first subject area and the second subject area are combined.
  • An area 202 in the figure is composed of a first subject area and a second subject area.
  • the area 202 is shown as a combined area. ing.
  • FIG. 43 is a diagram showing an example of the superimposed image generated in S17 when there is an overlap in S16. Since the region 202 is treated as one region in which the first subject region and the second subject region are combined, they are displayed translucently in a lump. Also, the first subject and the second 03 008510
  • a message indicating that the subjects are overlapping is displayed.
  • Displaying this superimposed image has the effect of making it easier for the user and the subject to understand that the first subject and the second subject are overlapping.
  • the first subject as shown in Fig. 37 (a) is photographed with a camera (image synthesizing device) and recorded.
  • a second subject as shown in Fig. 38 (a) is photographed with the same background.
  • the first subject and the second subject are photographed alternately by the first subject and the second subject, so that even two persons can photograph without a third party.
  • the positional relationship of the subject may be not only the left and right as shown in FIG. 37 (a) and FIG. 38 (a) but also an arbitrary positional relationship.
  • the processing from S11 to S17 may be repeated again. That is, the first subject image and the second subject image are photographed, and a superimposed image is generated and displayed. Repeat as many times as you like until you are satisfied with the displayed processing results.
  • the dedicated mode In order to start this repetitive processing, it is necessary to enter the dedicated mode by selecting “Start processing” from a menu or the like.
  • the shutter button When the shutter button is pressed at the appropriate moving position, the second subject image is determined (recorded), and the repetitive processing Z dedicated mode can be ended (even if the end is determined, the last The processing may be continued until S17, which obtains the synthesis result.)
  • the first subject image is not good, for example, the first subject is located in the middle of the background, and how the second subject is arranged. If the first subject image does not overlap with the first subject, or if the second subject does not overlap, the second subject will frame out of the superimposed image, start over from acquiring the first subject image in S11 May be.
  • FIG. 44 is a flowchart illustrating a method of S12 in FIG. 36, that is, a method of acquiring the second subject image.
  • the means 23 determines whether or not there is an instruction to record an image from the automatic shutter means 33, and if so, the process proceeds to S 1 2-3, where the instruction is sent. If not, exit to P30.
  • the means 23 records the second subject image acquired in S12-1 in the main memory 74, the external memory 75, etc., and the process exits to P30.
  • the processing of S12 in FIG. 36 is performed by the processing of S12—1 force and S12—3 described above.
  • FIG. 45 is a flowchart for explaining one method of the process of S13 in FIG. 36, that is, a process of calculating the background correction amount.
  • FIG. 37 (b) is an explanatory diagram illustrating a state where the first subject image in FIG. 37 (a) is divided into block areas. The rectangles separated by dotted lines are each block area. The upper left block is represented as "B (1,1) J", the right is represented as “B (1,2)", and the lower one is represented as ": B (2,1)".
  • B (1,1) J The upper left block
  • B (1,2) the right is represented as "B (1,2)
  • B (2,1) B (2,1)
  • the means 24 finds the position where the block of the first subject image matches on the second subject image, and the process proceeds to S13-3.
  • “(block) matching” is a process of searching the second subject image for a block area in which each block of the first subject image is similar to the image in the block. The details of the matching are the same as those described in the first embodiment, and a description thereof will not be repeated.
  • an image defining a block referred to as a “reference image” is a first subject image
  • an image of a partner searching for a similar block referred to as a “search image” is a second subject image.
  • the reference image and the search image may be used as the second subject image and the first subject image, contrary to the above.
  • the means 24 extracts only the search block corresponding to the background portion from the matching blocks obtained in S13-3, and
  • the matching block obtained in S13-2 only the search block with the smallest difference was selected, so it is not guaranteed that the images are the same, and some patterns, etc. happen to be similar. In some cases it is just that.
  • the reference block itself is not the background part because of the first subject, or the reference block is the background part, but the image part corresponding to the reference block is the second subject.
  • the matching block is not present on the second subject image, and in that case, the matching block is set at a somewhat different location. Therefore, it is necessary to remove, from each matching program, those that are judged not to be the same image part as the reference block. Remaining matching 1 3 5
  • the block Since the block is determined to be the same image portion as the reference block, only the background portion excluding the first and second objects remains as a result.
  • FIG. 38 (b) is a result of removing an incorrect matching block from the matching result of S13-2 of the second subject image of FIG. 38 (a).
  • Matching blocks determined to be correct have the same number as the corresponding reference block. As a result, it can be seen that only the matching block of the background portion that does not include or almost does not include the subject portion remains.
  • the remaining matching blocks can be determined to be the same background portion that is commonly reflected in the first subject image and the second subject image. If the first subject image and the second subject image do not have any common background portion, the remaining matching block becomes 0 as a result of the processing in S13-3.
  • the means 24 obtains the background correction amount of the second subject image from the matching block of the background portion obtained in S13-3, and the process exits to p40.
  • the processing of calculating the background correction amount of S13 in FIG. 36 is performed in the processing of S13-1 to S13-4.
  • FIG. 46 is a flowchart illustrating a method of processing of S14 in FIG. 36, that is, a method of generating a corrected image of the second subject image and generating a difference image from the first subject image.
  • the corrected image generation means 25 uses the correction amount obtained by the background correction amount calculation means 24 (S 13) to convert the second object image into the first object.
  • An image corrected so that the background portion overlaps the image is generated, and the process proceeds to S14-12.
  • the corrected second subject image generated here is referred to as “corrected second subject image” (see FIG. 38 (c)).
  • a conversion function F s r or an inverse conversion function F rs may be used.
  • the pixel position of the original image (here, the second object image) corresponding to the pixel position of the converted image (here, the captured second object image) is obtained, and the pixel position is obtained.
  • the conversion function used is F s r.
  • the pixel position of the original image obtained in general is not an integer value, it is If it is left as it is, the pixel value at the pixel position of the original image obtained cannot be obtained. Therefore, some kind of interpolation is usually performed.
  • some kind of interpolation is usually performed.
  • linear interpolation is performed on four pixels at integer pixel positions around the pixel position of the obtained original image.
  • the primary interpolation method is described in general image processing books, etc. (eg, Morikita Publishing: Takeshi Yasui, Masayuki Nakajima, “Image Information Processing”, p. 54), so detailed description is omitted here. .
  • FIG. 38 (c) shows that the second subject image overlaps the background of the first subject image from the second subject image of FIG. 38 (a) and the first subject image of FIG. 37 (a).
  • 9 is an example of a corrected second subject image generated in FIG. In this example, the only correction is translation.
  • the range of the second subject image in FIG. 38 (a) is indicated by a dotted line so that the state of the correction can be understood.
  • the entire frame is slightly lower right than the second subject image in Fig. 38 (a).
  • FIG. 47 (a) is an example of the second subject image when rotation is necessary for correction.
  • the first subject image is the same as that in FIG. 37 (a).
  • the entire screen is rotated slightly counterclockwise as compared to Fig. 38 (a).
  • FIG. 47 (b) shows the result of performing block matching between the second subject image in FIG. 47 (a) and the first subject image in FIG. 37 (a). Even if the block rotates, the amount of rotation and the size of the block must be so large Then, since there is little image change in the block, accurate matching can be performed to some extent following the rotation.
  • FIG. 47 (c) is a second subject image obtained by calculating the background correction amount based on the block matching result of FIG. 47 (b) and correcting the background correction amount. It can be seen that the first subject image in Fig. 37 (a) and the background portion overlap, and the rotation has been corrected. The image frame in Fig. 47 (a) is indicated by a dotted line so that the state of correction can be understood.
  • the corrected image generation means 25 generates a mask image of the corrected second subject image, and the process proceeds to S14-4.
  • the pixel position of the mask image corresponding to each pixel on the corrected image on the original image can be obtained by the above-described formula, but is the pixel position within the range of the original image? If it does, the pixel value of the corresponding pixel on the corrected image is set to, for example, 0 (black) as a mask portion, and if not, it is set to, for example, 255 (white).
  • the pixel value of the mask portion is not limited to 0 and 255, but may be freely determined. Hereinafter, the description will be made with 0 (black) and 255 (white).
  • FIG. 38 (d) is an example of the mask image of FIG. 38 (c).
  • the black area in the solid frame frame is the mask area.
  • This mask portion indicates the range in which the original image (the image before correction) has pixels in the corrected image. Therefore, in FIG. 38 (d), the lower right end portion where the corresponding second subject image does not exist is not a mask portion and is white.
  • the difference image generation means 26 outputs the first subject image, the corrected second subject image obtained from the corrected image generation means 25 (S14-1), and the like. By using this mask image, a difference image between the first subject image and the corrected second subject image is generated, and the process proceeds to S144.
  • the absolute value of the difference between the pixel value P 1 (x, y) on the first subject image and the pixel value P f 2 (x, y) on the corrected second subject image is used.
  • Fig. 39 (a) shows the difference image generated from the first subject image in Fig. 37 (a), the corrected second subject image in Fig. 38 (c), and the mask image in Fig. 38 (d). It is an example. In areas other than the area of the person (1) and the person (2), the background is the same, or the difference is 0 as outside the mask range. As a result, the image of the person (1) and the image of the background, and the image of the person (2) and the image of the background intersect mainly in the area of the person (1) and the area of the person (2), respectively. It is an image.
  • the processing of S 14 in FIG. 36 to generate the differential image can be performed by the above processing from S 14-1 to S 14-3.
  • FIG. 48 is a flowchart illustrating a method of the process of S15 in FIG. 36, that is, a process of extracting a subject region.
  • the subject region extraction means 27 converts the difference image obtained from the difference image generation means 26 (S15) into a "labeling image” ("labeling image”). Is explained in the first embodiment), and the process proceeds to S15-2.
  • a binary image is generated from the difference image.
  • each pixel value in the difference image may be compared with a predetermined threshold value, and if the pixel value is larger than the threshold value, black may be used, and if it is below, white may be used.
  • the difference image is composed of R, G, and B pixel values
  • the value obtained by adding the R, G, and B pixel values may be compared with a threshold value.
  • FIG. 39 (b) is an example of a binary image generated from the difference image of FIG. 39 (a). There are seven black areas, areas 1 1 0 to 1 1 6 Areas other than areas 1 1 and 2 are small areas.
  • a labeling image is generated from the generated binary image.
  • the difference between a binary image and a labeling image is either binary or multi-valued, so an example of a labeling image is described in Figure 39 (b).
  • the numbers from parentheses such as "110 (1)” are added after the numbers from the areas 110 and 116 in parentheses, and this is the labeling value of each area. It is assumed that a labeling value 0 is distributed in other areas.
  • the labeling image Figure 39 (b) is shown as a binary image because it is difficult to show the multivalued image on the paper, but it is actually a multivalued image based on the labeling value. Therefore, there is no need to display it, but when it is actually displayed as an image, it looks different from that shown in Fig. 39 (b).
  • the subject area extracting means 27 removes the “noise” -like area in the labeling image obtained in S15-1, and the process proceeds to S15-3.
  • “Noise” generally refers to a part other than the target data, and here refers to a region other than a human-shaped region.
  • FIG. 39 (c) shows the result of noise removal from the labeling image of FIG. 39 (b). Areas other than the human-shaped areas 1 1 2 and 1 1 3 have been removed as noise. .
  • the specification method also specifies the method to specify the outline of the subject area, and the outline uses the outline of each label area of the labeling image to specify which label area is the object area. A method can be considered.
  • one region happens to be one label region, but depending on the image, even one subject may be divided into multiple label regions. For example, if the pixel in the middle of the subject area has a color and brightness similar to the background, the pixel value of that part in the difference image is small, so the middle of the subject area is recognized as the background. In some cases, the subject area is divided and extracted vertically and horizontally. In such a case, there may be cases where the subsequent processing such as overlap detection of the subject or the compositing processing cannot be performed well.
  • a method of expanding the label area of the labeling image and integrating a label area that is close in distance as the same label area is included.
  • a method of using “snake”, one of the techniques for extracting regions, for integration is also conceivable.
  • the extracted object area is expanded by a certain amount to reduce the risk of overlooking the overlap between the first and second object areas. There is also a way to make it happen.
  • the description is given of a processing example in which expansion and integration are not particularly performed.
  • the overlap detecting means 28 detects whether or not the objects overlap from the noise-removed labeling image obtained in S15-2, and if no overlap is detected, the overlap detection means 28 detects the overlap. Proceed to 1 5—4. If an overlap is detected, proceed to S 15—5.
  • the method that can be easily determined is to determine the number of subjects to be photographed and synthesized and the number of regions of the subject in the noise-free labeling image. How to use is explained.
  • the number of subjects to be photographed / combined is specified in advance by a program, external storage, user input, or the like.
  • the camera has mode settings such as “two-group shooting mode” (number of subjects 2) and “three-group shooting mode” (number of subjects 3), which are set by the user.
  • the “number of subjects” is the number of persons, etc., which are grouped as a region. For example, if each of the first subject and the second subject is one person, the number of subjects is two. If the first subject is a single person, and if the second subject is two people, and if the two are stuck together, the second subject is considered as a block. Therefore, the number of subjects is 2 in total, but if the two people are far apart from each other, they are not a lump area, so the second subject is 2, and the number of subjects is 2. The total is 3.
  • the number of regions of the subject may be obtained by counting the number of regions having different label values in the noise-removed labeling image (excluding the portion having a labeling value of 0).
  • the overlap detecting means 28 checks whether the obtained number of subjects to be photographed / combined and the number of regions of the subject in the noise-removed labeling image match each other. Judge that they do not overlap 0
  • the overlap detecting means 28 determines whether they match, it is determined that the subjects overlap each other.
  • the principle of the judgment by the overlap detecting means 28 is as follows. For simplicity of explanation, the number of subjects to be photographed / combined is assumed to be 2 here. If the objects do not overlap, the area of the first object and the area of the second object should of course be separated. Therefore, if the subjects do not overlap, the number of subject areas after noise removal should be two.
  • the area of the first object and the area of the second object should not be separated because they overlap at the overlapping part. Therefore, if the subjects overlap, the number of regions of the subject after noise removal should be one.
  • the number of regions is two, human-shaped regions 1 1 2 and 1 1 3, so the number of obtained subjects to be photographed / combined and the number of noise-removed labeling images The number of areas of the subject matches. Therefore, in this case, the overlap detecting means 28 determines that the subjects do not overlap. 08510
  • FIG. 42 (a) As an example of overlap, consider the case of using Fig. 41 of the second subject image.
  • Figure 37 (a) is used as it is for the first subject image.
  • the difference image generated from these is shown in Fig. 42 (a).
  • the subjects overlap each other, and the overlapping arm portion is an image in which the images of the first subject and the second subject are mixed, and the other subject portions are the The image of the first subject and the background portion, and the image of the second subject and the background portion are mixed.
  • the labeling image in FIG. 42 (a) is shown in FIG. 42 (b), and FIG. 42 (c) is obtained by removing noise from FIG. 42 (b).
  • FIG. 42 (b) The labeling image in FIG. 42 (a) is shown in FIG. 42 (b)
  • FIG. 42 (c) is obtained by removing noise from FIG. 42 (b).
  • the area of the first object and the area of the second object have been connected by the arm, so that only one block of the area 202 remains.
  • the number of regions of the subject in the noise-removed labeling image is 1, the number does not match the number of subjects to be photographed / combined, and it is determined that there is an overlap.
  • As a method of detecting the overlap there is a method of accurately obtaining the contours of the first subject and the second subject, and determining whether or not the contours overlap each other. If the contour can be determined accurately, it is possible to detect the overlap, and it is also possible to perform various processes such as display using the overlap area and avoidance of the overlap.
  • the area of the subject can be extracted.
  • the subject region extracting means 27 determines which of the subject regions in the noise-removed labeling image is the first subject region and which is the corrected second subject region. Exit to p60.
  • the subject region can be extracted.
  • the extracted subject areas are a first subject area and a second subject area, respectively. That is, the first subject area and the second subject area can be extracted independently.
  • the first subject region and the second subject region cannot be independently extracted from the difference image between the first subject image and the second subject image, and the first subject region cannot be extracted. Can be extracted only in a form where the and the second subject area are mixed.
  • the noise-removed labeling image as shown in Fig. 39 (c) only two subject areas 1 1 2 and 1 1 3 are obtained, and out of the two areas 1 1 2 and 1 1 3
  • the object region extracting means 27 cannot determine which is the first object region and which is the second object region by this alone.
  • FIG. 49 (a) shows the range of the region 1 12 of the first subject image
  • FIG. 49 (b) shows the range of the region 112 of the second subject image
  • FIG. 49 (c) The range of the region 113 of the first subject image
  • FIG. 49 (d) is the range of the region 113 of the second subject image.
  • the image in the subject range! 0 contains a lot of skin color. Therefore, the image containing the larger amount of skin color may be used as the image of the subject range.
  • hue H, saturation S, and brightness I are obtained from the pixel values of R, G, and B in Fig. 36, and recognition is performed mainly using hue H. There is a way to do that.
  • hue H, saturation S, and brightness I There are various methods for determining hue H, saturation S, and brightness I. Yes, it is described in general image processing books, etc. (eg, The University of Tokyo Press, “Image Analysis Handbook”, p. 485-491, published in 1991), so details are omitted here.
  • the hue H has a range of 0 to 2 ⁇ .
  • the subject area extracting means 27 determines the range of ⁇ of the skin color that is the standard. Next, the means 27 finds the H of each pixel in the regions shown in FIGS. 49 (a) to (d), and if it falls within the range of the standard flesh color H, it counts as flesh color. Next, the same means 27 compares which of the skin color counts in Figs. 49 (a) and (d) and the skin color counts in Figs. 49 (b) and (c) is larger, and What is necessary is just to make the image of the subject range.
  • the subject region extracting means 27 obtains a feature amount (described later) in the subject region from the first subject image and the second subject image.
  • the means 27 obtains a feature amount of a region around the subject region (for example, 20 dots around). Since the periphery of the subject area is the background portion, and the background portion is corrected so as to overlap, there is a case where only one of them is sufficient. Then, the same means 27 may determine that the image having the characteristic amount close to the characteristic amount of the background portion is the image of the background portion, and the one having no characteristic amount is the image of the subject region.
  • the hue H, the saturation S, and the lightness I, textures and the like can be used.
  • ⁇ k ( ⁇ (( ⁇ ) 4) X ⁇ (i)) ( ⁇ ⁇ 4)
  • FIGS. 49 (a) and (d) are determined to be images of the subject range by the subject region extracting means 27. Then, the area 112 is the first object area, and the area 113 is the second object area.
  • the number of subjects to be photographed and Z-combined did not match the number of subject regions in the noise-removed labeling image.
  • 27 determines the region of the subject in the noise-removed labeling image as a region in which the first subject region and the second subject region are integrated (hereinafter, referred to as “subject integrated region”), and goes to p 60.
  • the process is omitted (in this case, the first subject region and the second subject region are not independently extracted by the subject region extracting means 27, and the process is performed as an integrated region.
  • the processing of S15_4 or S15_4 should be performed without performing the processing of S15-5-3 and S15-5-5.
  • FIG. 50 is a flowchart for explaining one method of the process of S16 in FIG. 36, that is, a process related to overlap. Another processing method for overlapping will be described later with reference to FIGS.
  • the overlap warning means 31 warns the user (photographer) and / or the object or both that the first subject and the second subject overlap, and p7 Exit to 0.
  • the overlapping subject region may be displayed so as to be conspicuously superimposed on the composite image.
  • Figure 43 is an example to illustrate this.
  • the region 202 in FIG. 42 (c) that is, the region where the first subject and the second subject overlap each other, is displayed translucently on the composite image. It is better to apply a filter of a conspicuous color such as red to the area 202 (image of applying cellophane to the area 202). Alternatively, the area of the area 202 and its frame may be blinked and displayed.
  • Fig. 43 shows an example in which a warning is further issued in text.
  • a warning window is displayed over the composite image, and the message "Subjects overlap! Is displayed in the warning window. This may also be a prominent color scheme or blinking.
  • Overwriting on the composite image may be performed by the superimposed image generation means 29 or by the superimposed image display means 30 according to the instruction of the overlap warning means 31.
  • the warning window blinks, it may be necessary to keep the original composite image.
  • the main window 74 or the external memory 75 may be used to display the warning window on the superimposed image display means 30. It is often better to read and give data intermittently.
  • the camera is in a dedicated mode for repetitive processing in which the subject image is captured as a moving image and the corrected superimposed image is displayed almost in real time.
  • the monitor 141 in Fig. 35 (a) is facing the photographer, if the device can point the monitor toward the subject, the subject can also check the overlapping state, Even if the photographer does not instruct, the subject can move spontaneously to eliminate the overlap. monitor
  • the range of the background shown on the monitor 14 1 is the range of the background of the first subject image.
  • the range of the background to be captured changes, but the captured image is the second subject image, not the first subject image. Therefore, the range of the background shown on the monitor 141 remains unchanged as the range of the background of the first object image. For this reason, the fact that the shooting range is not reflected on the monitor 141 is not reflected, which is uncomfortable for the user.
  • the range of the background shown on the monitor 14 1 is the range of the background of the second subject image.
  • shaking the camera changes the range of the background to be shot, and the image to be shot is the second subject image (reference image).
  • the range of the background is the range of the background during shooting.
  • the relationship between the degree of the overlap and the frame frame of the composite image is checked, and even if the subject moves, overlapping occurs. Then, if the user can make a decision, it will be possible to decide again that it is better to start over from taking the first subject image.
  • the warning can be made by turning on or flashing the lamps 142 of FIG. 35 (a). Because it is a warning, it is easier to understand if the color of the lamp is red or orange. Flashing lamp In general, there is a ray advantage if it is easy for the photographer to notice the monitor 141 without paying attention to it.
  • a superimposed image of the subject may not be displayed, and only the overlap may be notified by a warning message or a lamp.
  • a warning message or a lamp it is not immediately apparent how much overlap, but if you only know if there is an overlap, then you will see if the subject moves and the warning notification disappears, and if there is no overlap, you will see a composite without overlap.
  • the purpose of obtaining images is achieved. Therefore, the advantage of being able to omit the process of displaying the overlapped portion by merely notifying that there is an overlap with a warning message or a lamp is obtained.
  • the lamps 144 are arranged so that only the photographer can see them.
  • the main body 140 of FIG. 35 (b) can be seen. It may be attached to the front side. The effect is the same as when the subject can be seen on the monitor.
  • Fig. 35 (a) if there is another way to check the image, such as the viewfinder, apart from the monitor 141, the same warning notice as that of the monitor 141 may be displayed there. There is also a method of installing a lamp inside the hinder and notifying it.
  • a warning notification may be performed using the speed 80 of FIG. 34. If there is an overlap, a warning buzzer sounds and a warning such as "overlapping" is output. In this case, the same effect as the lamp can be expected.
  • a speaker unlike light, there is not much directivity, so the advantage of being able to know the state of both the photographer and the subject overlapping with a single effort There is.
  • FIG. 51 is a flowchart illustrating another method of the process of S16 in FIG. 36, that is, the process related to the overlap.
  • the shutter chance notifying means 32 determines whether there is an overlap based on the information obtained from the overlap detecting means 28 (S15), and there is an overlap. If not, the processing is skipped to p70, and if not, the processing proceeds to S16B-2.
  • the photo opportunity notifying means 32 notifies the user (photographer) and / or the subject that there is no overlap between the first subject and the second subject. Exit to p70.
  • This notification is not a notification that there is no overlap, but rather a notification of a secondary operation due to the lack of overlap, specifically, a photo opportunity to record the second subject. Such usage is most common. In that case, the notification will be primarily to the photographer.
  • the method described in FIG. 50 can be used almost as it is.
  • the message in Fig. 43 may be changed to "One chance for a shirt!”
  • the lamp and the speed are slightly different in the color and the content of the output sound, but they can be used in the same way as the notification method.
  • the photographer can shoot / record the subject without overlapping by releasing the shutter, and also prepare the subject to be able to release the shutter (for example, looking at the eyes) Direction, facial expression, etc.).
  • FIG. 52 is a flowchart for explaining still another method of the process of S16 in FIG. 36, that is, the process relating to the overlap.
  • the automatic shirtter means 33 determines whether there is an overlap based on the information obtained from the overlap detection means 28 (S 15), and there is an overlap. If not, the process goes to P70, and if there is no process, the process goes to S16C-2.
  • the automatic shutter means 33 determines whether or not the shutter button is pressed. If the shutter button is pressed, the process proceeds to S16C-3. If not, the process proceeds to p70. Exit.
  • the automatic shirting means 33 instructs the second subject image acquiring means 23 to record the second subject image, and the process exits to p70.
  • the second subject image acquiring means 23 records the captured image in the main memory 74, the external memory 75, or the like according to the instruction.
  • the shutter button is pressed when the objects do not overlap each other, an effect that the captured image can be automatically recorded can be obtained. At the same time, it also has the effect of preventing recorded images from being recorded accidentally when they overlap.
  • a notification means such as a display, a lamp, or a speaker 5 if the shutter is pressed but no image is captured.
  • the image is recorded this time. It is preferable to notify L0 such as the photographer by a notification means such as a display, a lamp, a speaker, or the like so that the recorded information can be recognized.
  • FIGS. 50 to 23 are not necessarily exclusive processes, and may be arbitrarily combined with: 0. As examples of combinations, the following usage scenes are possible.
  • FIG. 53 is a flowchart illustrating one method of the process of S17 in FIG. 36, that is, a process of generating a superimposed image.
  • the superimposed image generating means 29 sets the first pixel position of the generated superimposed image to the current pixel, and the process proceeds to S 17-2.
  • the first pixel position often starts from the upper left corner, for example.
  • the “pixel position” indicates a specific position on an image, and is often expressed in an XY coordinate system with the origin at the upper left corner, the + X axis in the right direction, and the + Y axis in the lower direction.
  • the pixel position corresponds to the address in the memory representing the image, and the pixel value is the value in the memory at that address.
  • the superimposed image generation means 29 determines whether or not the current pixel position exists, and if so, the process proceeds to S 17-3; Exit to 80.
  • the superimposed image generating means 29 determines whether the current pixel position is in the integrated area of the object, and if it is in the integrated area of the object, the processing proceeds to S 17-4, If not, the process proceeds to S17-5. Whether it is within the subject integrated area can be determined by determining whether the subject integrated area is obtained by the overlap detection means 28 (S15-5) and whether the current pixel position in the subject integrated area image is black (0).
  • the superimposed image generating means 29 generates a synthesized pixel according to the setting, and writes it as a pixel value at the current pixel position of the superimposed image.
  • the setting means what kind of synthesized image is to be synthesized. For example, as shown in Fig. 40 (b), whether the first subject is to be synthesized translucently, Whether the opaque first subject is synthesized as it is as shown in Fig. 40 (a) or the first and second objects are translucent as shown in Fig. 43, etc. is there. In this case, since the inside of the subject integrated area is handled, the setting is practically related to the composition ratio (transmittance) of that area.
  • the pixel value P 1 at the current pixel position of the first subject image and the current pixel position of the corrected second subject image obtained from the corrected image generating means 25 (S 14) Obtaining the pixel value P f 2 and calculating the composite pixel value (P 1 X (1-A) + P f 2 XA) with a predetermined transmittance A (a value between 0.0 and 1.0) Good.
  • the transmittance A may be set to 0.5.
  • the superimposed image generating means 29 determines whether the current pixel position is in the first subject area. Judgment is made, and if it is within the first subject area, the process proceeds to S17-16, otherwise, the process proceeds to S17-7.
  • Whether it is within the first subject area or not can be determined by using the first subject area image obtained from the subject area extracting means 27 (S15) and by determining whether or not the current pixel is standing black (0). If the subject integrated region exists, it is known that the first subject region does not exist. Therefore, without determining whether the subject is in the first subject region (S17-5 is omitted), the direct The process may proceed to S17-7.
  • S 17-5 and S 17-6 may be omitted, and S 17-3 force may be advanced to S 17-7.
  • the superimposed image generation means 29 generates a synthesized pixel according to the setting and writes it as a pixel value at the current pixel position of the superimposed image.
  • the processing here is the same as in S17-4, except that the subject integrated area (image) is changed to the first subject area (image).
  • the transmittance of the first subject may be set to 0.5, and as shown in Fig. 40 (a), it is opaque. If the first subject is synthesized by overwriting as it is, the transmittance of the first subject may be set to 0.0.
  • the superimposed image generating means 29 determines that the current pixel position is in the second position. It is determined whether it is within the subject area, and if it is within the second subject area, the process proceeds to S17-7-8, and if not, the process proceeds to S17-9.
  • the processing here is the same as in S17-5, except that the first subject area is changed to the second subject area.
  • the superimposed image generation means 29 generates a synthesized pixel according to the setting, and writes it as a pixel value at the current pixel position of the superimposed image.
  • the processing here is the same as in S17-6, except that the first subject area is changed to the second subject area.
  • the superimposed image generating means 29 when it is determined in S17-7 that the current pixel does not belong to the second object area, the superimposed image generating means 29 outputs the first object image (reference image).
  • the pixel value at the current lent pixel position is written as the pixel value at the current lent pixel position in the superimposed image.
  • the current pixel position in this case is not within the subject integrated area, the first subject area, or the second subject area, and thus corresponds to the background portion after all.
  • the superimposed image generation means 29 sets the current pixel position to the next pixel position, and the process returns to S17-2.
  • the first subject image and the corrected second subject image are processed in S17-4, S17-6, and S17-9.
  • the size of the composite image is set to the size of the reference image, but it is also possible to make the size smaller or larger than this.
  • a part of the corrected image was truncated. If the size of the corrected image is increased so that it is not truncated, it is possible to increase the size of the composite image.
  • FIG. 40 (b) is a superimposed image obtained by translucently combining only the first subject region.
  • FIG. 40 (c) is a superimposed image in which only the second subject region is synthesized to be translucent.
  • Figure 40 (a) is a superimposed image generated by overwriting both, without making them both translucent.
  • Fig. 43 is a superimposed image synthesized by making both semi-transparent.
  • the background area of the composite image is shot.
  • the second subject image is used as the reference image, and it is easy to see that the second subject is being photographed. Combining like 0 (b) is more suitable.
  • the subject area obtained from the subject area extraction means 27 (S15) has already been expanded as described above, not only the subject but also the surrounding background part will be synthesized together, Since the background portion has already been corrected by the corrected image generation means 25 (S14) so that it matches, the actual Even if the subject area to be extracted is slightly larger than the body contour area and includes the background part, the effect is obtained that it does not become unnatural at the composite boundary.
  • the transparency should be set near the composite boundary of the subject area including the outside, or near the composite boundary only inside the subject area so that the composite boundary looks more natural.
  • the effect of making the unnaturalness less noticeable can be obtained. If the subject area is incorrectly extracted instead of the correction error, or if the image of the background part changes due to a difference in the shooting time (for example, a tree is moved by the wind, the sun is shaded, Even if there is a pass, etc.), the effect that the unnaturalness can be made inconspicuous as well can be obtained.
  • an object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and a computer (or CPU or MPU) of the system or the apparatus to supply the storage medium. It is needless to say that the present invention is also achieved by reading and executing the program code stored in the storage medium.
  • the program code itself read from the storage medium implements the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
  • the storage medium for supplying the program code for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a magnetic tape, a nonvolatile memory card, and the like can be used.
  • the program code is downloaded from another computer system to the main memory 74 or the external memory 75 of the image synthesizing apparatus via a transmission medium such as a communication network. There may be.
  • the computer executes the readout program code, not only to realize the functions of the above-described embodiment, but also to execute the OS (operating system) running on the computer based on the instruction of the program code. Needless to say, this includes a case in which the functions of the above-described embodiments are implemented by performing part or all of the actual processing.
  • the program code read from the storage medium is written into the memory of the function expansion board inserted into the computer or the function expansion unit connected to the computer, the program code of the program code is read out.
  • the function expansion board or the CPU provided in the function expansion unit may perform part or all of the actual processing, and the processing may realize the functions of the above-described embodiments. Needless to say.
  • the storage medium stores a program code corresponding to the flowchart described above.
  • the present invention is not limited to the above-described embodiment, and various modifications can be made within the scope shown in the claims.
  • the second image synthesizing apparatus includes the first subject image which is the image including the background and the first subject, and at least a part of the background.
  • a correction consisting of any of the relative movement amount, rotation amount, enlargement / reduction ratio, distortion correction amount, or combination of the background portion between the second subject image that is the image containing the second subject and the second subject image
  • a background correction amount calculating means for calculating the amount or a correction amount calculated in advance, and using one of the first subject image and the second subject image as a reference image, and using the other image as a background other than the subject.
  • a superimposed image generating means for generating an image in which the reference image and the corrected image are superimposed so as to at least partially overlap with the correction amount obtained from the background correction amount calculating means.
  • the unnaturalness at a level finer than one pixel appears in the conventional method.
  • the pixels around the contour pixel are pixels at the same background part position, and even if the composition is performed, the connection is almost natural. Become. Thus, the effect of preventing unnaturalness at a level finer than one pixel and reducing a certain level is obtained.
  • the image is synthesized by correcting background displacement and distortion, the first and second subjects There is no need to fix the camera or the like with a tripod when taking images, and it is only necessary to adjust the direction of the camera with your hand, which has the effect of simplifying shooting.
  • the second image synthesizing apparatus further includes an image pickup means for picking up an object or a landscape, wherein the first object image or the second object image is generated based on an output of the image pickup means. You can also.
  • the image synthesizing apparatus that generates the superimposed image includes the imaging unit, the superimposed image can be generated on the spot where the user has photographed the subject or the scenery.
  • the convenience of is improved.
  • an effect of being able to take a picture again on the spot is obtained.
  • the image obtained from the imaging means is usually recorded in a main memory or an external memory irrespective of whether the image is incorporated in the image synthesizing apparatus or not, and a user designates a timing for recording using a shutter button or the like. I do. Then, the recorded image is used as the first subject image or the second subject image in the combining process.
  • the second image synthesizing device may be configured so that, of the first subject image and the second subject image, the one taken later is used as the reference image.
  • the second subject image is used as the reference image. Then, the first subject image is corrected using the second subject image as a reference image. At this time, the amount of movement of the background portion between the second subject image (reference image) and the first subject image Then, the first subject image is corrected using the correction amount.
  • a composite image is synthesized using the second subject image (reference image) and the corrected first subject image. Then, display of a composite image and the like are performed.
  • the displayed composite image is the range of the background of the second image of the second subject currently being captured in the form in which the composite image has just been captured or in a form in which the composite image is displayed in real time. There is no effect. '
  • the range of the background of the composite image is the range of the background of the first subject image.
  • the range of the background of the first subject image may be different from the background range of the second subject image taken earlier due to a change in the direction of the camera, and the photographer may change.
  • the range of the background photographed later does not match the range of the background of the displayed composite image, which gives the photographer an uncomfortable feeling.
  • the background range of the composite image is the second range despite the fact that the second subject image is continuously updated to the captured image. This uncomfortable feeling is further amplified because the range of the background of one subject remains.
  • the second image synthesizing device may be configured such that the superimposed image generating means superimposes the reference image and the corrected image at a predetermined transmittance.
  • the “predetermined transmittance” may be a fixed value, a value that changes according to the region, or a value that gradually changes near the boundary of the region.
  • the superimposed image generating means determines a pixel position of the superimposed image, The pixel value at the pixel position and the corrected pixel value at the pixel position on the other image are obtained, and the value obtained by multiplying the two pixel values by a predetermined transmittance is defined as the pixel value of the superimposed image. This processing is performed at all pixel positions of the superimposed image.
  • the ratio of the reference image can be increased or the ratio of the corrected image can be increased depending on the location.
  • the inside of the subject area is opaque (that is, the image of the subject in the corrected image is overlaid), and the area around the subject area is shifted from the subject area. Overlap so that the ratio of the reference image increases as the distance increases. Then, even if the outline of the subject area, that is, the outline of the extracted subject, is incorrect, the surrounding pixels gradually change from the corrected image to the reference image, so that the effect that the error becomes inconspicuous is obtained. .
  • the areas of the respective objects can be distinguished by the above-described ability, and they are displayed on the composite image. It can be easily determined whether or not they overlap.
  • the superimposed image generating means may set an area having a difference in the difference image between the reference image and the corrected image as an image having a pixel value different from the original pixel value. It is also possible to adopt a configuration in which the information is generated.
  • the “difference image” is an image created by comparing pixel values at the same position in two images and creating the difference value as a pixel value.
  • the difference value often takes an absolute value.
  • Pixel value different from the original pixel value means, for example, translucent to make it translucent, inverting the brightness or hue of the pixel value, inverting the pixel value, or displaying a conspicuous color such as red, white, or black It is a pixel value that realizes the following. Also, the pixel value was changed between the boundary and the inside of the area as described above. This includes the case where the border is surrounded by a dotted line or blinking (changes the pixel value over time).
  • a pixel value at the same pixel position is obtained between the reference image and another corrected image, and if there is a difference, the pixel value of the superimposed image at that pixel position is changed to another region. Is different from the pixel value.
  • the area of the difference portion can be generated as an image having a pixel value different from the original pixel value.
  • the first and second areas of the subject are extracted as the areas with differences in the difference image because one is the image of the subject and the other is the image of the background part on the reference image and the corrected image. Is done.
  • the extracted area semi-transparent, inverted, or set to a pixel value of a conspicuous color, the effect of making the area of the subject easy for the user to understand is obtained.
  • the second image synthesizing device further includes subject region extracting means for extracting a first subject region and a second subject region from a difference image between the reference image and the corrected image, Instead of superimposing the reference image and the corrected image, the superimposed image generating means may superimpose the reference image or the corrected image and the image in the area obtained from the subject area extracting means.
  • the object region extracting means may include an image in a region of the first object from the first object image or the corrected first object image.
  • the image in the area of the first object and the image in the area of the second object are extracted from the second object image or the corrected second object image. May be extracted, and the image of the first subject and the image of the second subject may be selected based on the skin color.
  • the subject region extracting means can determine that the subject region extracted from the difference image is the first subject region or the second subject region, but the individual subject region is the first subject region.
  • the subject area I do not know if it is the area of the subject 2. In other words, it is not known whether the image of the subject indicated by the region exists in the first subject image or the second subject image. Therefore, if it is known that the subject is a person, the colors of the pixels in each area are changed to the first subject image (reference image) and the corrected second subject image or the second subject image (reference image). ) And the corrected first subject image.
  • the subject area extracting means extracts an image within the area of the first subject and an image within the area of the second subject. A total of four image parts will be extracted.
  • the extracted four image parts include an image part of the first object, a background part shaped like the second object, a background part shaped like the first object, and an image part of the second object. It is included. Therefore, by using the skin color as a reference, it is possible to select each image portion of the first subject and the second subject having the skin color or a color close thereto.
  • the object region extracting means may include an image in a region of the first object and a region of the second object from the first object image or the corrected first object image. And an image in the area of the first object and an image in the area of the second object are extracted from the second object image or the corrected second object image. It is also possible to adopt a configuration in which the image of the first subject and the image of the second subject are selected based on the characteristics of the image outside each region. In the above configuration, the point that the subject region extracting means extracts four image portions is as described above. However, as a criterion for selecting each image portion of the first subject and the second subject, instead of using the skin color as described above, the feature of the image outside each region is used.
  • the “feature” refers to a property, an attribute, or the like of an image of a region of interest, and is preferably a property that can be numerically represented as a feature amount.
  • the feature amount include a pixel value of each color, its hue, saturation, and brightness, as well as statistics representing the pattern and structure of an image, such as a co-occurrence matrix, a difference statistic, a run-renders matrix, and a power ⁇ Vector, their secondary statistics, and higher-order statistics.
  • the feature amount of each region is obtained by using the reference image and the captured image.
  • the feature values of the area around the area are also obtained using the reference image and the captured image.
  • the difference between the feature value in the region and the feature value in the surrounding region is compared between the first subject image and the second subject image, and the one with the larger difference is regarded as the subject region image.
  • the number of regions of the first subject or the second subject obtained from the subject region extracting means is a value set as the number of subjects to be combined.
  • An arrangement may be made to further include overlap detection means for judging that the area of the first subject and the area of the second subject overlap each other when they do not match.
  • the “region of the first subject or the second subject” is a region of the subject extracted from a difference image or the like, and is a region of the first subject.
  • An area or a certain area is an area that does not need to be distinguished from the area of the second subject.
  • the “subject to be combined” is not a subject obtained in the process of the combining process, but is a subject that actually exists, and is a subject that the user intends to combine. However, as described above, what is collectively treated as a unit of the composition processing is one “subject”, and thus one subject may be a plurality of persons.
  • the number of subjects may be fixedly set in the image synthesizing apparatus.
  • the usability is determined based on an instruction of a user such as a photographer before the overlap detecting means performs overlap detection. It is preferable to adopt a mode set in the image synthesizing device.
  • the subject regions extracted by the subject region extracting means from the difference image are separated from each other if the subjects do not overlap, and if the subjects overlap, the first subject region and the second subject region Are integrated as a continuous area. Therefore, the number of number of subjects realm of the extracted subject compared detection means overlap (setting value) and, if they match the overlap of the object each other without, it is determined that there is an overlap must match t the The judgment result can be used to notify or warn the photographer or the subject of the presence / absence of the overlap on a composite screen or a lamp.
  • the effect of assisting shooting so that overlapping does not occur is the same as that described above.
  • a second image synthesizing device is characterized in that the overlap detecting means
  • the configuration may further include an overlap warning means for warning the user, the subject, or both of the presence of the overlap when the warp is detected.
  • the “warning” includes a warning using characters or images on display means or the like, or a method that can detect the user or the subject, such as light from a lamp or the like, sound from a speaker or the like, or vibration from a vibrator or the like. Then, anything is included.
  • the second image synthesizing apparatus further includes a shutter change notifying means for notifying the user, the object, or both that the overlap does not exist when the overlap detecting means does not detect the overlap. It can also be configured.
  • notification includes any method that can be sensed by the user or the subject, similar to “warning”.
  • the subject can be notified that it is a photo opportunity. It also has the effect of assisting shooting, allowing you to immediately prepare for poses and eyes. You.
  • a second image synthesizing device further comprises: an imaging means for imaging a subject or a landscape; and an image obtained from the imaging means when the overlap detection means does not detect an overlap.
  • An automatic shutter means for generating an instruction to record as a subject image may be further included.
  • recording the captured image as the first subject image and the second subject image is realized by, for example, recording the captured image in a main storage or an external storage. Therefore, when the automatic shutter means receives a signal indicating that there is no overlap between the area of the first subject and the area of the second subject from the overlap detecting means, the automatic shutter means issues an instruction of the recording control processing to the main memory or the external memory. Output.
  • the background correction amount calculating means and the superimposed image generating means can obtain the first subject image and the second subject image by reading the image stored in the main memory or the external storage. .
  • the shooting is automatically performed when the subjects do not overlap each other, so that it is possible to determine whether or not the user himself / herself has the overlap and to obtain the effect of the shooting assistance that the user does not have to press the shirt.
  • a second image synthesizing device includes an imaging means for imaging a subject or a landscape, and an image capturing means for detecting the overlap by the overlap detecting means.
  • An automatic shutter unit for generating an instruction to prohibit recording the obtained image as the first subject image or the second subject image may be further included.
  • the automatic shutter unit when the automatic shutter unit receives a signal indicating that there is an overlap from the overlap detection unit, the automatic shutter unit outputs an instruction to prohibit recording an image obtained from the imaging unit in the main storage or the external storage. .
  • this prohibition processing may be performed only when the automatic prohibition mode is set.
  • the second image synthesizing method includes: a first subject image which is an image including a background and a first subject; and a first subject image which is an image including at least a part of the background and a second subject.
  • (2) Calculate or calculate a correction amount consisting of any or a combination of the relative movement amount, rotation amount, enlargement / reduction ratio, and distortion correction amount of the background portion with the subject image.
  • a background correction amount calculation step of reading the correction amount, and either the first subject image or the second subject image is used as a reference image, and the other image at least partially overlaps the background portion other than the subject.
  • a second image composition program according to the present invention is provided in the image composition device.
  • the computer functions as each means.
  • a second image composition program according to the present invention is configured to cause a computer to execute each step of the image composition method.
  • a second recording medium has a configuration in which the image synthesizing program is recorded.
  • the image synthesizing method is realized using the computer.
  • the computer is It can function as an image composition device.
  • the present invention relates to a device that captures an image or processes an image, such as a digital camera, a mobile phone having an imaging function, a surveillance camera, a web camera, a scanner, a copier, a fax, and an image editing software. Etc. can be used.

Abstract

 画像合成装置は、第1被写体画像取得手段(1)、第2被写体画像取得手段(3)、背景画像取得手段(2)によって、第1被写体画像、第2被写体画像、背景画像の3つの画像を取得し、その内の1つを基準画像として、背景補正量算出手段(4)、補正画像生成手段(5)によって背景部分が一致する2枚の補正画像を生成する。重ね画像生成手段(9)は、基準画像と2枚の補正画像の1つまたは2つを重ねた画像を生成する。これにより、重ね合わせる画像同士は、背景が一致しているので、別々に撮影した第1の被写体および第2の被写体を、背景に対して違和感無く合成することができる。

Description

明 細 書 画像合成装置、 画像合成方法、 画像合成プログラム、 および画像合成 プログラムを記録した記録媒体
技術分野
本発明は、 別々に撮影された複数の被写体を、 同時に存在するかのよ うに一枚の画像に合成し、 またその際、 被写体同士が重なりなく撮影 合成ができるように補助を行う装置および方法およびプログラムおよび プログラム媒体に関する。
背景技術
フィルムカメラやデジタル力メラで、 例えば二人で並んで写真を撮る 際、 三脚を使ってセルフタイマーで撮影するか、 通りがかり の人などに 頼んで撮影してもらう しかない。
しかし、 三脚を持ち歩くのは大変であり、 また、 見ず知らずの他人に 頼むのも気が引けるとレヽ ぅ問題がある。
それに対して、 特開 2 0 0 0— 3 1 6 1 2 5号公報 ( 2 0 0 0年 1 1 月 1 4 日公開) では、 同一場所で撮影した複数枚の画像から被写体の镇 域を抽出し、 被写体の画像を背景と合成したり しなかったりすることで 背景のみの画像や別の画像の被写体が同時に存在するかのような画像を 合成することができる画像合成装置が開示されている。
また、 特開 2 0 0 1 — 3 3 3 3 2 7号公報 ( 2 0 0 1年 1 1月 3 0 日 公開) では、 撮影済みの参照画像中の指定された領域 (被写体領域) を 撮影中の画像に重ねてモニター画面またはフアインダー内に表示させる ことができると共に、 被写体領域内の被写体を撮影中の画像に合成した 合成画像の画像データを作成することができるデジタルカメラおよび画 像処理方法が開示されている。
しかしながら、 これら従来技術では、 大きく 2つの問題が出てく る。 1つ目の問題は、 参照画像中の被写体領域を単に切り出して別の画像 と重ね合わせるだけでは、 被写体領域の指定が不正確な場合に ( 1 ) 合 成結果の被写体が欠けたり、 ( 2 ) 余計なものが合成されたり、 ( 3 ) 指定が正確であっても合成境界が微妙に不自然になったりするという点 である。
例えば、 ( 1 ) の、 実際の被写体領域より参照画像中で指定した被写 体領域 (以下、 指定被写体領域と呼ぶ) が欠けている場合は、 合成画像 上でもその被写体は欠けているので、 明らかに不自然となる。
また、 ( 2 ) の、 実際の被写体領域より参照画像中の指定被写体領域 が大きすぎる場合は、 参照画像上での被写体周囲の背景も含んでしまつ ていることになる。 上でいう 「余計なもの」 とは、 この含んでしまって いる背景部分のことである。 特開 2 0 0 1 - 3 3 3 3 2 7号公報で説明 される合成方法では、 参照画像と撮影画像を違う場所で撮影することも ありえるので、 指定被写体領域に含まれてしまっている背景画像 (参照 画像上の背景) と、 合成画像上でのその周囲の背景 (撮影画像上の背 景) とは異なることがある。 この場合、 合成画像上では、 指定被写体領 域で背景が突然変わるため、 不自然な合成画像となる。
仮に、 同じ場所、 同じ背景でどちらも撮影されたと しても、 特開 2 0 0 1 — 3 3 3 3 2 7号公報で説明される合成方法では、 参照画像中の指 定被写体領域を撮影画像上の任意の位置に配置 ' 合成できるので、 指定 被写体領域に含まれてしまっている背景画像 (参照画像上の背景) と、 撮影画像上での合成位置周囲の背景 (撮影画像の背景) とが、 同じ位置 の背景とは限らず、 同様に合成結果は不自然となる。
特開 2 0 0 1 — 3 3 3 3 2 7号公報のように、 参照画像中の指定被写 体領域に対し、 ユーザがタブレツ トなどを使ってその輪郭を指定する場 合、 人間が輪郭を判断しながら指定するので指定被写体領域の指定が大 きく間違うことは少ないが、 1 、 2画素ないし数画素程度の誤りが出て く る可能性はある。 もし、 1画素の単位で人手で正確に指定しよう とす ると、 大変な労力が必要となる。
また、 ( 3 ) の、 指定が正確であっても合成境界が微妙に不自然にな る場合には、 ( 1 ) 、 ( 2 ) のよ うな指定被写体領域が画素単位で正確 であったと しても、 指定被写体領域の合成結果と して、 その輪郭の画素 が撮影画像の背景と馴染まない場合をも含んでいる。
これは、 指定被写体領域の輪郭は、 画素単位の指定では精度が充分で なく、 実際は 1画素より ももつと細かい単位でないと表現できないため である。 すなわち、 輪郭の画素は、 本来は被写体部分が ( 0. X) 画素 分、 背景部分が ( 1. 0— 0. X) 画素分となっており、 画素値として は、 被写体部分の画素値と背景部分の画素値とが割合に応じて足された 値、 すなわち平均化された値となっている。
このため、 被写体部分と背景部分との割合は、 平均化された画素値か らは逆算できないので、 結局、 合成する時は画素単位で扱う しかない。 その結果、 合成画像の輪郭の画素値には、 参照画像の背景の値が含まれ てしまい、 周囲の撮影画像の背景と馴染まなくなってしまう。 以上の ( 1 ) 〜 ( 3 ) の問題は、 特開 2 0 0 0— 3 1 6 1 2 5号公報 に開示された合成方法によっても解決できない。 同公報には、 同一場所 または互いに近くの場所で撮影した複数枚の画像を重ねる前に位置合わ せを行う ことが開示されている。
しかしながら、 例えば同じ背景を使って 2人が交互にお互いを撮影す る場合、 カメラの向きの違いによつて撮影される背景の位置が移動する だけではなく、 カメラの傾きによる画像の回転や、 撮影者と被写体との 距離のずれによる画像の拡大縮小や、 撮影者の背丈の違いによってカメ ラの仰角が変わることによる画像の歪みが発生する。
このため、 重ね合わせよう とする画像の位置合わせを単に行うだけで は、 上記 ( 1 ) 〜 ( 3 ) の問題が解消されず、 合成結果は不自然になつ てしまう。
2つ目の問題は、 参照画像中の被写体領域と、 別の被写体の含まれる 撮影画像とを合成することを目的に撮影を行おう とすると、 撮影時の被 写体の位置に気をつけないと、 それぞれの画像中の被写体の領域が合成 画像上で互いに重なってしまったり、 どちらかの被写体が合成画像から はみ出てしまう場合が出てくるという点である。
この問題に対して、 特開 2 0 0 0— 3 1 6 1 2 5号公報には、 撮影済 みの画像を使った合成方法が主に説明されているだけであり、 被写体同 士の重なりや合成画像からのはみだしを防ぐ撮影方法などには触れられ ていない。
また、 特開 2 0 0 1— 3 3 3 3 2 7号公報の画像処理方法によれば、 参照画像中の被写体領域 (ユーザがタブレツ トなどを使って輪郭を指定 する) と撮影中の画像とを重ねて表示することができるので、 合成する 場合の参照画像中の被写体領域と撮影中の画像中の被写体領域とに関し て、 被写体同士が重なるかどうかや、 被写体領域が合成画像からはみだ すかどうかを、 撮影時に知ることができる。 被写体の重なりやはみだし がある場合は、 被写体やカメラを動かすことで撮影中の画像中の被写体 の位置を変更することができ、 重なりやはみだしが起こらない画像を撮 影 ·記録することができるようになる。
しかし、 被写体領域の認識処理や、 被写体領域同士が重なっているか どうか、 合成画像から被写体領域がはみだしているかどうかの判断処理 など、 高度な処理を人間自身がしなければならないという不便さがある。 また、 参照画像中の被写体の領域は手で指定しなければいけないという 不便さもある。
本発明は、 上記課題に鑑みなされたもので、 第 1の目的は、 合成結果 が不自然とならないような合成を行う画像合成装置 (画像合成方法) を 提供することであり、 第 2の目的は、 別々に撮影された複数の被写体を、 同時に存在するかのように一枚の画像に合成する際、 合成画像上で被写 体同士の重なりが起きないように撮影を補助する画像合成装置 (画像合 成方法) を提供することである。 発明の開示
本発明に係る第 1の画像合成装置は、 上記目的を達成するために、 背 景の画像である背景画像と、 前記背景の少なく とも一部と第 1の被写体 を含む画像である第 1被写体画像と、 前記背景の少なく とも一部と第 2 の被写体を含む画像である第 2被写体画像との間での、 背景の相対的な 移動量、 回転量、 拡大縮小率、 歪補正量のいずれかもしくは組み合わせ からなる補正量を算出する、 あるいは算出して記録しておいた補正量を 読み出す背景補正量算出手段と、 背景画像、 第 1被写体画像、 第 2被写 体画像のいずれかを基準画像と し、 他の 2画像を被写体以外の背景の少 なく とも一部が重なるように、 前記背景補正量算出手段から得られる補 正量で補正し、 基準画像と捕正した他の 1つあるいは 2つの画像を重ね た画像を生成する重ね画像生成手段とを含んでいる。
上記の構成において、 「第 1の被写体」 、 「第 2の被写体」 とは、 合 成を行おう と している対象であり、 一般には人物であることが多いが物 などの場合もある。 厳密には、 「第 1の被写体」 は、 背景画像と第 1被 写体画像との間で、 背景部分が少なく とも一部重なるようにした時に、 画素値が一致しない領域、 すなわち変化がある領域は全て 「第 1の被写 体の領域」 となる可能性を持つ。 したがって、 背景画像は第 1被写体画 像との比較処理によって、 「第 1の被写体の領域」 を抽出する目的で取 得される。 (なお、 背景画像には、 第 1被写体画像および第 2被写体画 像の 2画像間で、 重なる背景部分が存在しない場合に、 その存在しない 背景部分を埋めるという 目的で使われる場合もある。 )
但し、 背景部分で、 風で木の葉が揺れたなどの小さな変化でも変化が ある領域となってしまうので、 小さな変化や小さな領域はある程度無視 する方が、 「第 1の被写体の領域」 を的確に抽出でき、 より 自然な重ね 画像を得ることができる。 「第 2の被写体」 についても同様である。
なお、 例えば被写体が人物の場合、 被写体は必ずしも一人であるとは 限らず、 複数の人物をまとめて 「第 1の被写体」 や 「第 2の被写体」 と する場合もある。 つまり、 複数人であっても、 合成の処理の単位として PC漏 00細 510
7
まとめて扱うものは一つの 「被写体」 となる。 なお、 人物でなく、 物で あっても同様である。
また、 被写体は、 必ずしも一つの領域であるとは限らず、 複数の領域 からなる場合もある。 「第 1」 、 「第 2」 は、 異なるコマ画像と して単 に区別する為につけたものであり、 撮影の順番などを表すものではなく、 本質的な違いはない。 また、 例えば、 人物が服や物などを持っていて、
「第 1、 第 2の被写体を含まない背景だけの画像」 にそれらが現れない のならば、 それらも被写体に含まれる。
「第 1被写体画像」 、 「第 2被写体画像」 は、 上記の 「第 1 の被写 体」 、 「第 2の被写体」 を含む別々の画像であり、 一般には、 カメラな どでその被写体を撮影した画像である。 伹し、 画像上に被写体のみしか 写っておらず、 背景画像と共通する背景部分が全く写っていない場合は、 合成に適さないので、 少なく とも一部は背景画像と共通する背景部分が 写っている必要がある。 また、 通常は、 第 1被写体画像、 第 2被写体画 像は、 同じ背景を使って、 すなわちカメラをあまり動かさないで撮影す る場合が多い。
なお、 被写体を撮影するカメラは、 画像を静止画と して記録するスチ ルカメラである必要はなく、 画像を動画と して記録するビデオ力メラで あってもよい。 ビデオカメラで静止画としての重ね画像を生成する場合、 撮影した動画を構成する 1 フレームの画像を被写体画像として取り出し、 合成に用いることになる。
「背景」 とは、 風景から 「第 1 の被写体」 、 「第2の被写体」 を除い た部分である。
「背景画像」 とは、 第 1被写体画像、 第 2被写体画像のそれぞれの背 景部分の画像が少なく とも一部含まれている画像であり、 第 1の被写体、 第 2の被写体は写っていないものである。 通常は、 第 1被写体画像、 第 2被写体画像と同じ背景を使って、 すなわちカメラをあま り動かさない で、 第 の被写体、 第 2の被写体にカメラの前から外れてもらって撮影 する場合が多い。
「第 1、 第 2の被写体以外の背景」 とは、 第 1被写体画像、 第 2被写 体画像から第 1被写体の領域、 第 2被写体の領域を除いた残りの部分で める。
「移動量」 は、 基準画像と背景の少なく とも一部が重なる位置へ、 他 の画像を平行移動させる量だが、 回転や拡大縮小の中心の対応点の移動 量と言ってもよい。
「歪補正量」 とは、 カメラやレンズの位置や方向が変わったことによ る撮影画像の変化のうち、 平行移動、 回転、 拡大縮小では補正できない 残りの変化を補正する為の補正量である。 例えば、 高い建物を撮影した 時に、 上の方が遠近法の効果により同じ大きさであっても小さく写って しまう 「あおり」 などとよばれる効果などを補正する場合などがこれに 含まれる。
「重ね画像生成手段」 は、 重ね画像を生成するが、 必ずしも一つの画 像データと して生成しなくてもよく、 他の手段の画像データと合わせて 合成したかのように見えるのでも構わない。 例えば、 表示手段上にある 画像を表示する際、 その画像に上書きする形で別の画像を一部表示すれ ば、 見た目には 2つの画像データから 1つの合成画像データを生成し、 その合成画像データを表示しているかのように見えるが、 実際は、 2つ の画像データに基づく画像がそれぞれ存在するだけで、 合成画像データ は存在していない。
背景補正量算出手段による補正量の算出には、 例えば、 ブロックマツ チングなど、 2つの画像間での部分的な位置の対応を算出する手法を採 用することができる。 これらの手法などを利用して、 第 1被写体画像、 第 2被写体画像、 背景画像の中の 2つの画像間での対応を求めれば、 背 景部分に一致するところがあれば、 その部分の位置的な対応を算出する ことができる。 被写体部分は他の画像中には存在しないので、 その部分 は間違った対応が得られる。 背景部分の正しい対応と被写体部分の間違 つた対応の中から、 統計的な手法を使うなどして背景部分の正しい対応 だけを得る。 残った正しい対応から、 背景部分の相対的な移動量、 回転 量、 拡大縮小率、 歪補正量のいずれかもしくは組み合わせからなる補正 量が算出できる。
重ね画像生成手段は、 背景補正量算出手段により算出された補正量に 基づき、 基準画像に合わせて他の 2画像を背景部分が一致するように補 正した画像を作る。 求めた補正量は 2つの画像間の関係を意味し、 例え ば、 Aと Bの関係, Bと Cの関係がそれぞれわかれば、 Aと Cの関係も 分かるように、 3つの画像のうちいずれを基準画像に選んでも、 背景補 正量算出手段により、 その画像と他の 2画像との関係は補正量と して算 出できる。
そして、 重ね画像生成手段によって、 捕正した 1つあるいは 2つの画 像を基準画像に重ねた画像を生成する。 画像の重ね方と しては、 3つの 画像の位置的に対応する画素の画像データを、 0〜 1の範囲で比例配分 した任意の比率で混合すればよい。 例えば、 背景画像の比率を 0、 第 1 被写体画像の比率を 1、 第 2被写体画像の比率を 0 とすれば、 その画素 には、 第 1被写体画像の画像データのみが書き込まれる。 また、 3つの 画像の混合比率を 1 : 1 : 1 とすれば、 その画素には、 3つの画像の画 像データを均等に合成した画像データが書き込まれる。
なお、 混合比率をどう設定するかは、 本発明にとって本質的ではなく、 どのよ うな重ね画像を表示ないし出力したいかというユーザの目的次第 である。
以上の処理によって、 本発明の重要な特徴と して、 第 1の被写体と第 2の被写体とを、 背景部分を一致させた状態で一枚の画像上に合成する ことができる。
なお、 背景画像を基準画像とした場合には、 補正した第 1被写体画像 および補正した第 2被写体画像から抽出された少なく とも 「第 1 の被写 体の領域」 および 「第 2の被写体の領域」 力 S、 背景画像に合成される。
「第 iの被写体の領域」 および 「第 2の被写体の領域」 以外の各背景部 分については、 前述のように、 背景画像の対応する画素に所定の比率で 合成してもよいし、 全く合成しなくてもよい。
また、 第 1被写体画像および第 2被写体画像の一方を基準画像と した 場合には、 補正した背景画像との比較処理によって、 補正した他方の被 写体画像から抽出した被写体の領域を基準画像に合成するだけで、 重ね 画像を生成してもよいし、 基準画像の背景部分に、 背景画像の対応する 画素を 0〜 1の間の適当な比率で合成してもよい。
このように、 基準画像と他の補正した画像を 1つ重ねるか、 あるいは 2つ重ねるかについては、 種々のヴァ リエーションがある。
以上のとおり、 二つの画像間の背景のずれを補正して合成することが できるので、 これによつて、 被写体など明らかに異なる領域を除いた以 1 1
外の部分 (すなわち背景部分) は、 どのように重ねても合成結果がほぼ 一致し、 合成結果が不自然とならないという効果が出てく る。 例えば被 写体領域だけを主に合成しよ う とした時、 被写体領域の抽出や指定が多 少不正確であっても、 被写体領域の周りの背景部分が合成先の画像の部 分とずれや歪みがないので、 不正確な領域の内外が連続した風景と して 合成され、 見た目の不自然さを軽減するという効果が出てく る。
被写体領域の抽出が画素単位で正確であったとしても、 課題の項で説 明した通り、 1画素よ り細かいレベルでの不自然さは従来技術の方法で は出てしまうが、 本発明では、 背景部分を合わせてから合成しているの で、 輪郭の画素の周囲の画素は、 同じ背景部分の位置の画素なので、 合 成してもほぼ自然なつながり となる。 このよ うに、 1画素より細かいレ ベルでの不自然さを防ぐ、 あるいは軽減するという効果が出てく る。
また、 背景のずれを補正して合成するので、 背景画像や第 1 /第 2被 写体画像の撮影時にカメラなどを三脚などで固定する必要がなく、 手な どで大体の方向を合わせておけばよく、 撮影が簡単になるという効果が 出てく る。
また、 背景画像を使わず、 第 1 /第 2被写体画像だけで処理する場合、 第 i被写体画像と第 2被写体画像の背景部分に重なり (一致部分) がな い場合、 背景補正量算出手段で補正量を算出することができなくなって しまう。 背景画像を使う場合、 第 1被写体画像と第 2被写体画像の間で は背景部分に重なりがなくても、 背景画像と第 1被写体画像の背景部分 に重なりがあり、 背景画像と第 2被写体画像の背景部分に重なりがあれ ば、 第 1被写体画像と第 2被写体画像の間の補正量を算出することがで きる。 これにより、 第 1被写体画像の背景部分と第 2被写体画像の背景部分 の間の背景が抜けていても、 その抜けている背景部分を背景画像の背景 が埋めていれば、 背景部分に重なりの無い第 1被写体画像と第 2被写体 画像を、 背景が繋がった状態で合成することができる効果が出てく る。
また、 背景画像を利用して、 第 1被写体画像と第 2被写体画像の間の 補正量を算出した後、 背景画像、 第 1被写体画像および第 2被写体画像 のそれぞれから必要な背景部分を取り出して、 互いの不足部分を補うこ とでつなげた背景の上に、 第 1被写体および第 2被写体を合成した重ね 画像を作成することができる。
また、 本発明に係る第 1の画像合成装置は、 基準画像と補正した他の 1つあるいは 2つの画像の間の差分画像中から、 第 1の被写体の領域と 第 2の被写体の領域を抽出する被写体領域抽出手段をさらに含み、 前記 重ね画像生成手段が、 基準画像と補正した他の 1つあるいは 2つの画像 とを重ねる代わりに、 基準画像と前記被写体領域抽出手段から得られる 領域内の補正した他の 1つあるいは 2つの画像とを重ねる構成とするこ ともできる。
ここで、 「被写体の領域」 とは、 被写体が背景と分離される境界で区 切られる領域である。 例えば、 人物が服や物などを持っていて、 背景画 像にそれらが現れないのならば、 それらも被写体であり、 被写体領域に 含まれる。 なお、 被写体の領域は、 必ずしも繋がった一塊の領域とは限 らず、 複数の領域に分かれていることもある。
「前記被写体領域抽出手段から得られる領域内の ' · ' 画像を重ね る」 とは、 その領域以外は何も画像を生成しないということではなく、 それ以外の領域は基準画像などで埋めることを意味する。 背景部分は一致するように補正しているのだから、 差分と して現れる のは主に被写体部分となる。 従って、 被写体領域抽出手段で、 差分画像 に含まれている被写体領域を抽出することができる。 このとき、 差分画 像からノイズなどを除去する (例えば、 差分の画素値が閾値以下のもの を除く) などの処理を施すと、 被写体領域をより正確に抽出することが できる。
重ね画像を生成する際、 各画素位置の画素値を決めるが、 その画素位 置が被写体領域抽出手段から得られる被写体領域内の場合のみ、 被写体 の画像を重ねるようにする。
これによつて、 基準画像上や補正された背景画像上に、 補正された被 写体画像中の被写体領域のみを合成することできるという効果が出てく る。 あるいは、 補正された被写体画像上や補正された背景画像上に、 基 準画像中の被写体領域のみを合成したり、 補正された背景画像上に基準 画像中の被写体領域と補正された被写体画像中の被写体領域を合成した り、 基準画像としての背景画像上に補正された被写体画像中の被写体領 域を合成したりするという こともできる。
また、 被写体領域の透過率を変えるなどして合成するならば、 どの領 域を合成しよう としているかがユーザに分かり易く、 もし被写体同士に 重なりなどがあれば、 それもさらに分かり易くなるという効果が出てく る。 さらに、 それによつて、 重なりが起きないように撮影を補助するこ とができるという効果が出てく る。
なお、 重なりがある場合は、 被写体やカメラを動かすなどして、 重な りの無い状態で撮影し直すのが良い訳だが、 この場合の補助とは、 例え ば、 重なりが起きるかどうかをユーザに認識し易くすることや、 どのく らい被写体やカメラを動かせば重なりが解消できそうかを、 ユーザが判 断する材料 (ここでは合成画像) を与えること、 などになる。
なお、 背景画像を使わず、 第 1被写体画像と第 2被写体画像だけで、 背景補正量を算出してどちらかを捕正し、 差分画像を生成し、 差分領域 を求めることは、 背景部分に適当量の重なりがあれば、 可能である。 そ の時、 第 1の被写体の領域と第 2の被写体の領域に重なりが無ければ、 差分領域は、 第 1の被写体の輪郭を持つ領域 (ここでは説明の為、 「第 1領域」 と呼ぶことにする) と、 第 2の被写体の輪郭を持つ領域 (同様 に 「第 2領域」 と呼ぶことにする) との 2つの独立した領域として求ま る。
この時、 1つの被写体画像中で考えれば、 第 1領域と第 2領域の、 ど ちらかが被写体部分で、 も う片方は背景部分であることは間違いない (ちなみに、 差分領域の周囲は一致する背景部分) 。 例えば、 第 1被写 体画像であれば、 どちらかが第 1の被写体部分で、 もう片方は背景部分 である。 あるいは第 1領域中で考えれば、 第 1被写体画像中の第 1領域 と、 第 2被写体画像中の第 1領域との、 どちらかが被写体部分で、 もう 片方は背景部分である。
しかし、 どちらが被写体部分で、 どちらが背景部分であるかは、 第 1 被写体画像および第 2被写体画像だけから作成した差分画像を使ってい るだけでは判別できない。
これに対し、 背景画像を使う場合、 どちらが被写体部分でどちらが背 景部分であるかが簡単に判別できる効果が出てく る。 例えば背景画像を 基準画像とすると、 背景画像と補正された第 1被写体画像から求められ る被写体領域は、 第 1領域だけとなる。 この場合、 当然、 補正された第 1被写体画像中の第 1領域は、 被写体部分であり、 背景画像中の第 1領 域は背景部分である。 第 2被写体画像に関しても同様である。 差分画像 から第 1領域と第 2領域が同時に検出されることはないので、 どちらが 被写体部分でどちらが背景部分かはすぐに判別できる。
このよ う に、 背景画像、 第 1被写体画像および第 2被写体画像の 3枚 を用いると、 第 1の被写体の領域または第 2の被写体の領域の抽出が容 易になるという効果が出てくる。 さらに、 第 1 の被写体の領域または第 2の被写体の領域をそれぞれ抽出できるので、 各被写体に重なりがある 場合に、 どちらを優先して合成するか、 すなわち重なり部分において、 第ェの被写体が第 2の被写体の上になるように合成するか、 下になるよ うに合成するかを決めることができるという効果も出てく る。
本発明に係る第 2の画像合成装置は、 上記目的を達成するために、 背 景と第 1の被写体とを含む画像である第 1被写体画像と、 上記背景の少 なく とも一部と第 2の被写体とを含む画像である第 2被写体画像との間 での、 背景部分の相対的な移動量、 回転量、 拡大縮小率、 歪捕正量のい ずれかもしくは組み合わせからなる補正量を算出する、 あるいは予め算 出しておいた補正量を読み出す背景補正量算出手段と、 第 1被写体画像、 第 2被写体画像のどちらかを基準画像と し、 他方の画像を、 被写体以外 の背景の部分が少なく とも一部重なるように前記背景補正量算出手段か ら得られる補正量で補正し、 基準画像と補正した画像を重ねた画像を生 成する重ね画像生成手段とを含んでいる。
上記の構成において、 「第 1の被写体」 、 「第 2の被写体」 とは、 合 成を行おう と している対象であり、 一般には人物であることが多いが物 などの場合もある。 厳密には、 「被写体」 は、 第 1被写体画像と第 2被 写体画像との間で、 背景部分が少なく とも一部重なるようにした時に、 画素値が一致しない領域、 すなわち変化がある領域は全て 「被写体の領 域」 となる可能性を持つ。
但し、 背景部分で、 風で木の葉が揺れたなどの小さな変化でも変化が ある領域となってしま うので、 小さな変化や小さな領域はある程度無視 する方が、 「被写体の領域」 を的確に抽出でき、 より 自然な重ね画像を 得ることができる。
なお、 例えば被写体が人物の場合、 被写体は必ずしも一人であるとは 限らず、 複数の人物をまとめて 「第 1の被写体」 や 「第 2の被写体」 と する場合もある。 つまり、 複数人であっても、 合成の処理の単位として まとめて扱う ものは一つの 「被写体」 となる。 なお、 人物でなく、 物で あっても同様である。
また、 被写体は、 必ずしも一つの領域であるとは限らず、 複数の領域 からなる場合もある。 「第 1」 、 「第 2」 は、 異なるコマ画像と して単 に区別する為につけたものであり、 撮影の順番などを表すものではなく、 本質的な違いはない。 また、 例えば、 人物が服や物などを持っていて、
「第 1、 第 2の被写体を含まない背景だけの画像」 にそれらが現れない のならば、 それらも被写体に含まれる。
「第 1被写体画像」 、 「第 2被写体画像」 は、 上記の 「第 1 の被写 体」 、 「第 2の被写体」 を含む別々の画像であり、 一般には、 カメラな どでその被写体を撮影した画像である。 但し、 画像上に被写体のみしか 写っておらず、 互いに共通する背景部分が全く写っていない場合は、 合 成に適さないので、 少なく とも一部は互いに共通する背景部分が写って いる必要がある。 また、 通常は、 第 1被写体画像、 第 2被写体画像は、 同じ背景を使って、 すなわちカメラをあまり動かさないで撮影する場合 が多い。
なお、 被写体を撮影するカメラは、 画像を静止画と して記録するスチ ルカメラである必要はなく、 画像を動画として記録するビデオカメラで あってもよい。 ビデオカメラで静止画と しての重ね画像を生成する場合、 撮影した動画を構成する 1 フレームの画像を被写体画像と して取り出し- 合成に用いることになる。
「背景の部分」 とは、 第 1被写体画像、 第 2被写体画像から 「第 1の 被写体」 、 「第 2の被写体」 を除いた部分である。
「移動量」 、 「歪補正量」 は、 第 1の画像合成装置において説明した とおりである。
「重ね画像生成手段」 は、 重ね画像を生成するが、 必ずしも一つの画 像データとして生成しなくてもよく、 他の手段の画像データと合わせて 合成したかのよ うに見えるのでも構わない。 例えば、 表示手段上にある 画像を表示する際、 その画像に上書きする形で別の画像を一部表示すれ ば、 見た目には 2つの画像データから 1つの合成画像データを生成し、 その合成画像データを表示しているかのように見えるが、 実際は、 2つ の画像データに基づく画像がそれぞれ存在するだけで、 合成画像データ は存在していない。
背景補正量算出手段による補正量の算出には、 例えば、 ブロックマツ チングなど、 2つの画像間での部分的な位置の対応を算出する手法を採 用することができる。 これらの手法などを利用して、 第 1被写体画像、 第 2被写体画像の 2つの画像間の対応を求めれば、 背景部分に一致する ところがあれば、 その部分の位置的な対応を算出することができる。 被 写体部分は他の画像中には存在しないので、 その部分は間違った対応が 得られる。 背景部分の正しい対応と被写体部分の間違った対応の中から、 統計的な手法を使うなどして背景部分の正しい対応だけを得る。 残った 正しい対応から、 背景部分の相対的な移動量、 回転量、 拡大縮小率、 歪 補正量のいずれかもしくは組み合わせからなる捕正量が算出できる。
重ね画像生成手段は、 背景補正量算出手段によ り算出された補正量に 基づき、 基準画像に合わせて他方の画像を背景部分が一致するように捕 正した画像を作る。 そして、 重ね画像生成手段は、 基準画像に補正した 画像を重ねた画像を生成する。
画像の重ね方と しては、 2つの画像の位置的に対応する画素の画像デ ータを、 0〜 1の範囲で比例配分した任意の比率で混合すればよい。 例 えば、 第 1被写体画像の比率を 1、 第 2被写体画像の比率を 0 とすれば. その画素には、 第 1被写体画像の画像データのみが書き込まれる。 また. 2つの画像の混合比率を 1 : 1 とすれば、 その画素には、 2つの画像の 画像データを均等に合成した画像データが書き込まれる。
なお、 混合比率をどう設定するかは、 本発明にとって本質的ではなく . どのような重ね画像を表示ないし出力したいかというユーザの目的次第 である。
以上の処理によって、 第 1の被写体と第 2の被写体とを背景部分を一 致させた状態で一枚の画像上に合成することができる。
二つの画像間の背景のずれや歪みを補正して合成することができるの で、 これによつて、 被写体など明らかに異なる領域を除いた以外の部分
(すなわち背景部分) は、 どのように重ねても合成結果がほぼ一致し、 合成結果が不自然とならないという効果が出てく る。 例えば被写体領域 だけを主に合成しよ う と した時、 被写体領域の抽出や指定が多少不正確 であっても、 被写体領域の周りの背景部分が合成先の画像の部分とずれ や歪みがないので、 不正確な領域の内外が連続した風景と して合成され. 見た目の不自然さを軽減するという効果が出てく る。
被写体領域の抽出が画素単位で正確であったと しても、 課題の項で説 明した通り、 1画素よ り細かいレベルでの不自然さは従来技術の方法で は出てしまうが、 本発明では、 背景部分のずれや歪みを無く してから合 成しているので、 輪郭の画素の周囲の画素は、 同じ背景部分の位置の画 素なので、 合成してもほぼ自然なつながり となる。 このよ うに、 1画素 より細かいレベルでの不自然さを防ぐ、 あるいは軽減するという効果が 出てく る。
また、 背景のずれや歪みを補正して合成するので、 第 1、 第 2被写体 画像の撮影時にカメラなどを三脚などで固定する必要がなく、 手などで 大体の方向を合わせておけばよく、 撮影が簡単になるという効果が出て く る。
なお、 背景補正量算出手段の動作である、 「背景部分の相対的な移動 量、 回転量、 拡大縮小率、 歪補正量のいずれかもしく は組み合わせから なる補正量を算出する」 を 「背景部分の相対的な移動量に、 相対的な回 転量、 拡大縮小率または歪補正量のいずれかもしくは複数を組み合わせ た補正量を算出する」 としてもよい。 これにより、 補正の精度が一層向 上し、 より 自然な合成結果を得ることができる。
さらに、 背景補正量算出手段の上記 2種類の動作をユーザが入力手段 を介して選択的に切り換えられるよ うにすれば、 補正の精度を重視した い場合と、 処理速度または処理負担軽減を重視したい場合とを使い分け ることができ、 画像合成装置の操作性が向上する。
また、 本発明に係る第 2の画像合成装置では、 基準画像と補正した画 像の間の差分画像中から、 第 1の被写体の領域と第 2の被写体の領域を 抽出する被写体領域抽出手段をさらに含み、 前記重ね画像生成手段が、 基準画像と補正した画像とを重ねる代わりに、 基準画像または捕正した 画像と前記被写体領域抽出手段から得られる領域内の画像とを重ねるよ うにすることもできる。
ここで、 「被写体の領域」 とは、 被写体が背景と分離される境界で区 切られる領域である。 例えば、 第 1被写体画像中で人物が服や物などを 持っていて、 第 2被写体画像中でそれらが現れないのならば、 それらも 被写体であり、 被写体領域に含まれる。 なお、 被写体の領域は、 必ずし も繋がった一塊の領域とは限らず、 複数の領域に分かれていることもあ る。
「前記被写体領域抽出手段から得られる領域内の ' · ' 画像を重ね る」 とは、 その領域以外は何も画像を生成しないということではなく、 それ以外の領域は基準画像などで埋めることを意味する。
背景部分は一致するように捕正しているのだから、 差分と して現れる のは主に被写体部分となる。 従って、 被写体領域抽出手段で、 差分画像 に含まれている被写体領域を抽出することができる。 このとき、 差分画 像からノイズなどを除去する (例えば、 差分の画素値が閾値以下のもの を除く) などの処理を施すと、 被写体領域をより正確に抽出することが できる。
重ね画像を生成する際、 各画素位置の画素値を決めるが、 その画素位 置が被写体領域抽出手段から得られる被写体領域内の場合のみ、 被写体 PC雇睡 08510
2 1
の画像を重ねるようにする。
これによつて、 基準画像上に、 捕正された被写体画像中の被写体領域 のみを合成することできるという効果が出てく る。 あるいは、 補正され た被写体画像上に、 基準画像中の被写体領域のみを合成することができ るという効果.も出てく る。
なお、 重ね画像生成手段における被写体領域の透過率を変える処理と 組み合わせることで、 どの領域を合成しょう と しているかがユーザに分 かり易く なり、 合成の結果と して被写体同士に重なりなどが生じる場合 には、 それもさらに分かり易くなるという効果が出てく る。 さらに、 そ れによって、 重なりが起きないように撮影を捕助することができるとい う効果が出てく る。
なお、 重なりがある場合は、 被写体やカメラを動かすなどして、 重な りの無い状態で撮影し直すのが良い訳だが、 この場合の補助とは、 例え ば、 重なりが起きるかどうかをユーザに認識し易くすることや、 どのく らい被写体や力メラを動かせば重なりが解消できそうかを、 ユーザが判 断する材料 (ここでは合成画像) を与えること、 などになる。
本発明のさらに他の目的、 特徴、 および優れた点は、 以下に示す記載 によって十分わかるであろう。 また、 本発明の利益は、 添付図面を参照 した次の説明で明白になるであろう。
図面の簡単な説明 図 1は、 本発明の第 1の画像合成装置の機能的な構成を示すプロック 図である。
図 2は、 上記画像合成装置の各手段を具体的に実現する装置の構成例 を説明するプロック図である。
図 3 ( a ) は、 上記画像合成装置の背面の外観例を示す模式的な斜視 図であり、 図 3 ( b ) は、 上記画像合成装置の前面の外観例を示す模式 的な斜視図である。
図 4は、 画像データのデータ構造例を説明する説明図である。
図 5は、 画像合成方法全体の流れを示すフローチャート図である。 図 6 ( a ) は、 背景画像の例を示す説明図、 図 6 ( b ) は、 上記背景 画像中の参照ブロ ックの配置を説明する説明図、 図 6 ( c ) は、 上記背 景画像を補正した補正背景画像を説明する説明図、 図 6 ( d ) は、 上記 補正背景画像のマスク画像を説明する説明図である。
図 7 ( a ) は、 第 1被写体画像の例を示す説明図、 図 7 ( b ) は、 上 記第 1被写体画像中の残ったマツチングブ口ックの配置を説明する説明 図である。
図 8 ( a ) は、 第 2被写体画像の例を示す説明図、 図 8 ( b ) は、 上 記第 2被写体画像中の残ったマッチングプロックの配置を説明する説明 図、 図 8 ( c ) は、 上記第 2被写体画像を補正した補正第 2被写体画像 を説明する説明図、 図 8 ( d ) は、 上記捕正第 2被写体画像のマスク画 像を説明する説明図である。
図 9 ( a ) は、 第 1被写体画像と補正背景画像の差分画像例を示す説 明図、 図 9 ( b ) は、 上記差分画像から生成したラベル画像例を示す説 明図、 図 9 ( c ) は、 上記ラベル画像からノイズ部分を除去したラベル 画像例を示す説明図、 図 9 ( d ) は、 上記ラベル画像から第 1被写体領 域を抽出した第 1被写体領域画像例を示す説明図である。
図 1 0 ( a ) は、 第 2被写体画像と補正背景画像の差分画像例を示す o
23
説明図、 図 1 0 ( b ) は、 上記差分画像から生成したラベル画像例を示 す説明図、 図 1 0 ( c ) は、 上記ラベル画像からノイズ部分を除去した ラベル画像例を示す説明図、 図 1 0 ( d ) は、 上記ラベル画像から第 2 被写体領域を抽出した第 2被写体領域画像例を示す説明図である。 図 1 1 ( a ) は、 図 9 ( d ) の第 1被写体領域部分と図 1 0 ( d ) の 第 2被写体領域部分と背景部分を重ねて合成した重ね画像例を示す説明 図、 図 1 1 ( b ) は、 第 1被写体領域部分を半透明にして重ねて合成し た重ね画像例を示す説明図、 図 1 1 ( c ) は、 第 2被写体領域部分を半 透明にして重ねて合成した重ね画像例を示す説明図である。
図 1 2は、 図 9 ( d ) の第 1被写体領域と図 2 0 ( b ) の第 2被写体 領域の重なり画像例を示す説明図である。 図 1 3 ( a ) は、 図 9 ( d ) の第 1被写体領域部分と図 2 0 ( b ) の 第 2被写体領域部分と背景部分を重ねて合成し、 重なり部分を目立つよ うに表示させた重ね画像例を示す説明図、 図 1 3 ( b ) は、 上記第 1被
L5 写体領域部分を半透明にして重ねて合成した重ね画像例を示す説明図、 図 1 3 ( c ) は、 重なりの警告メ ッセージを表示させた例を示す説明図 である。
図 1 4は、 第 2被写体画像を取得する処理の一方法を説明するフ口一 チヤ一ト図である。 図 1 5は、 背景補正量を算出する処理の一方法を説明するフローチヤ 一ト図である。 図 1 6 ( a ) は、 ブロックマッチングを説明する参照画像の例を示す 説明図、 図 1 6 ( b ) は、 プロックマッチングを説明する探索画像の例 を示す説明図である。 図 1 7は、 背景画像、 第 2被写体画像の補正画像を生成し、 第 1被写 体画像との差分画像を生成する処理の一方法を説明するフローチャート 図である。
図 1 8 ( a ) は、 回転している第 2被写体画像の例を示す説明図、 図 1 8 ( b ) は、 上記第 2被写体画像中の残ったマッチングブロックの配 置を説明する説明図、 図 1 8 ( c ) は、 上記第 2被写体画像を補正した 補正第 2被写体画像を説明する説明図、 図 1 8 ( d ) は、 補正第 2被写 体画像画像のマスク画像を説明する説明図である。
図 1 9は、 被写体領域を抽出する処理の一方法を説明するフ口一チヤ ート図である。
図 2 0 ( a ) は、 図 7 ( a ) の第 1被写体と被写体領域同士が重なる 第 2被写体画像の例を示す説明図、 図 2 0 ( b ) は、 上記第 2被写体画 像から抽出した第 2被写体領域画像の例を示す説明図である。
図 2 1は、 被写体領域の重なりを警告する処理の一方法を説明するフ ローチヤ—ト図である。 図 2 2は、 被写体領域に重なりが無い時に、 シャッターチャンスを通 知する処理の一方法を説明するフローチャート図である。
図 2 3は、 被写体領域に重なりが無い時に、 自動シャッターを行う処 理の一方法を説明するフローチャー ト図である。
図 2 4は、 被写体領域に重なりがある時に、 重なりがなくなる方向を 通知する処理の一方法を説明するフローチャート図である。
図 2 5は、 被写体領域に重なりがなくなる方向を説明する説明図であ る。
図 2 6 ( a ) は、 被写体領域に重なりがある時に、 重なりがなくなる 方向を通知する例を説明する説明図、'図 2 6 ( b ) は、 被写体領域に重 なりがある時に、 重なりがなくなる位置と方向を通知する例を説明する 説明図である。
図 2 7は、 被写体領域に重なりがある時に、 重なりがなくなる位置を 通知する処理の一方法を説明するフローチヤ一ト図である。
図 2 8 ( a ) 〜図 2 8 ( d ) は、 第 2被写体領域を上下左右に動かし た例をそれぞれ説明する説明図である。
図 2 9 ( a ) 〜図 2 9 ( d ) は、 図 9 ( d ) の第 1被写体領域と図 2 8 ( a ) 〜図 2 8 ( d ) の各第 2被写体領域との重なり領域を説明する 説明図である。
図 3 0は、 重なり画像を生成する処理の一方法を説明するフローチヤ 一ト図である。
図 3 1は、 第 1の被写体を優先して重ね画像を生成した場合の表示例 を示す説明図である。
図 3 2は、 第 2の被写体を優先して重ね画像を生成した場合の表示例 を示す説明図である。
図 3 3は、 本発明の第 2の画像合成装置の機能的な構成を示すプロッ ク図である。
図 3 4は、 第 2の画像合成装置の各手段を具体的に実現する装置の構 成例を説明するブロック図である。
図 3 5 ( a ) は、 第 2の画像合成装置の背面の外観例を示す模式的な 斜視図、 図 3 5 ( b ) は、 第 2の画像合成装置の前面の外観例を示す模 式的な斜視図である。
図 3 6は、 第 2の画像合成装置における画像合成方法全体の流れを示 すフローチヤ一ト図である。
図 3 7 ( a ) は、 第 1被写体画像の例を示す説明図、 図 3 7 ( b ) は、 図 3 7 ( a ) の第 1被写体画像中の参照マッチングブロックの配置を説 明する説明図である。
図 3 8 ( a ) は、 第 2被写体画像の例を示す説明図、 図 3 8 ( b ) は、 図 3 8 ( a ) の第 2被写体画像中の検出されたマッチングブロックの配 置を説明する説明図、 図 3 8 ( c ) は、 図 3 8 ( a ) の第 2被写体画像 を捕正した補正第 2被写体画像を説明する説明図、 図 3 8 ( d ) は、 図 3 8 ( c ) の補正第 2被写体画像のマスク画像を説明する説明図である。 図 3 9 ( a ) は、 図 3 7 ( a ) の第 1被写体画像と図 3 8 ( c ) の補 正第 2被写体画像の差分画像例を示す説明図、 図 3 9 ( b ) は、 図 3 9 ( a ) の差分画像から生成したラベル画像例を示す説明図、 図 3 9 ( c ) は、 図 3 9 ( b ) のラベル画像からノイズ部分を除去したラベル 画像例を示す説明図である。
図 4 0 ( a ) は、 図 3 7 ( a ) の第 1被写体画像に図 4 9 ( d ) の第 2被写体領域部分を重ねて合成した重ね画像例を示す説明図、 図 4 0 ( b ) は、 図 3 7 ( a ) の第 1被写体画像に、 図 4 9 ( b ) の第 1被写 体領域部分を半透明にして重ね、 図 4 9 ( d ) の第 2被写体領域部分を 重ねて合成した重ね画像例を示す説明図、 図 4 0 ( c ) は、 図 3 7 ( a ) の第 1被写体画像に、 図 4 9 ( d ) の第 2被写体領域部分を半透 明にして重ねて合成した重ね画像例を示す説明図である。
図 4 1は、 図 3 7 ( a ) の第 1被写体と被写体領域同士が重なる第 2 被写体画像の例を示す説明図である。
図 4 2 ( a ) は、 図 3 7 ( a ) の第 1被写体画像と図 4 1の第 2被写 体画像の補正画像との差分画像例を示す説明図、 図 4 2 ( b ) は、 図 4 2 ( a ) の差分画像から生成したラベル画像例を示す説明図、 図 4 2 ( c ) は、 図 4 2 ( b ) のラベル画像からノイズ部分を除去したラベル 画像例を示す説明図である。
図 4 3は、 図 4 2 ( c ) の被写体領域部分を半分の透過率で重ねて合 成し、 重なりの警告メ ッセージを表示させた例を示す説明図である。
図 4 4は、 第 2被写体画像を取得する処理の一方法を説明するフ口一 チヤ一ト図である。
図 4 5は、 背景補正量を算出する処理の一方法を説明するフローチヤ ート図である。
図 4 6は、 第 2被写体画像の補正画像を生成し、 第 1被写体画像との 差分画像を生成する処理の一方法を説明するフローチャート図である。
図 4 7 ( a ) は、 回転している第 2被写体画像の例を示す説明図、 図 4 7 ( b ) は、 図 4 7 ( a ) の第 2被写体画像中の検出されたマツチン グブロックの配置を説明する説明図、 図 4 7 ( c ) は、 図 4 7 ( a ) の 第 2被写体画像を補正した補正第 2被写体画像を説明する説明図、 図 4 7 ( d ) は、 図 4 7 ( c ) の補正第 2被写体画像画像のマスク画像を説 明する説明図である。
図 4 8は、 被写体領域を抽出する処理の一方法を説明するフローチヤ ト図である。
図 4 9 ( a ) は、 図 3 7 ( a ) の第 1被写体画像中の第 1被写体領域 の画像を示す説明図、 図 4 9 ( b ) は、 図 3 8 ( a ) の第 2被写体画像 中の第 1被写体領域の画像を示す説明図、 図 4 9 ( c ) は、 図 3 7 ( a ) の第 1被写体画像中の第 2被写体領域の画像を示す説明図、 図 4 9 ( d ) は、 図 3 8 ( a ) の第 2被写体画像中の第 2被写体領域の画像 を示す説明図である。
図 5 0は、 被写体領域の重なりを警告する処理の一方法を説明するフ ローチャート図である。
図 5 1は、 被写体領域に重なりが無い時に、 シャッターチャンスを通 知する処理の一方法を説明するフローチヤ一ト図である。
図 5 2は、 被写体領域に重なりが無い時に、 自動シャッターを行う処 理の一方法を説明するフローチヤ一ト図である。
図 5 3は、 重なり画像を生成する処理の一方法を説明するフローチヤ 一ト図である。
発明を実施するための最良の形態
以下、 実施例および比較例により、 本発明をさらに詳細に説明するが 、 本発明はこれらにより何ら限定されるものではない。
〔実施の形態 1〕
以下、 本発明の実施の形態を図面を参照して説明する。
まず、 言葉の定義について説明しておく。
「第 1の被写体」 、 「第 2の被写体」 とは、 合成を行おう としている 対象であり、 一般には人物であることが多いが物などの場合もある。 厳 密には、 「第 1の被写体」 は、 背景画像と第 1被写体画像との間で、 背 景部分が少なく とも一部重なるようにした時に、 画素値が一致しない領 域、 すなわち変化がある領域は全て 「第 1の被写体の領域」 となる可能 性を持つ。 但し、 背景部分で風で木の葉が揺れたなどの小さな変化でも 変化がある領域となってしま うので、 小さな変化や小さな領域はある程 度無視する方が好ましい。 「第 2の被写体」 についても同様である。
なお、 例えば被写体が人物の場合、 被写体は必ずしも一人であるとは 限らず、 複数の人物をまとめて 「第 1の被写体」 や 「第 2の被写体」 と する場合もある。 つまり、 複数人であっても、 合成の処理の単位として まとめて扱うものは一つの 「被写体」 となる。
なお、 人物でなく、 物であっても同様である。 また、 被写体は、 必ず しも一つの領域である とは限らず、 複数の領域からなる場合もある。 「第 1」 、 「第 2」 は、 異なるコマ画像と して単に区別する為につけた ものであり、 撮影の順番などを表すものではなく、 本質的な違いはない。 また、 例えば、 人物が服や物などを持っていて、 「第 1、 第 2 の被写体 を含まない背景だけの画像」 にそれらが現れないのならば、 それらも被 写体に含まれる。
「第 1被写体画像」 、 「第 2被写体画像」 は、 上記の 「第 1 の被写 体 J 、 「第 2の被写体」 を含む別々の画像であり、 一般には、 カメラな どでその被写体を別々に撮影した画像である。 但し、 画像上に被写体の みしか写っておらず、 背景画像と共通する背景部分が全く写っていない 場合は、 その共通する背景部分を元にした位置合わせができないので、 合成に適さない。 したがって、 少なく とも一部は (合成した被写体の周 囲を自然にするために、 より好ましくは、 合成しょう とする被写体の周 囲において) 背景画像と共通する背景部分が写っている必要がある。 ま た、 通常は、 第 1被写体画像、 第 2被写体画像は、 同じ背景を使って、 すなわちカメラをあまり動かさないで撮影する場合が多い。
「背景部分」 とは、 風景から 「第 1 の被写体」 、 「第 2の被写体」 を 除いた部分である。 「背景画像」 とは、 第 1被写体画像、 第 2被写体画像のそれぞれの背 景部分の画像が少なく とも一部含まれている画像であり、 第 1の被写体、 第 2の被写体は写っていないものである。 通常は、 第 1被写体画像、 第 2被写体画像と同じ背景を使って、 すなわちカメラをあまり動かさない で、 第丄の被写体、 第 2の被写体にカメラの前から外れてもらって撮影 する場合が多い。
なお、 第 1被写体画像および第 2被写体画像には、 背景画像と位置合 わせできる程度に、 背景画像と共通する背景部分をそれぞれ含んでいれ ばよい。 したがって、 第 1被写体画像および第 2被写体画像の背景部分 同士の関係は、 完全一致の場合、 部分一致の場合、 完全不一致の場合の あらゆる場合を含む。
「第 1、 第 2の被写体以外の背景部分」 とは、 第 1被写体画像、 第 2 被写体画像から第 1被写体領域、 第 2被写体領域を除いた残りの部分で ある。
「移動量」 は、 平行移動させる量だが、 回転や拡大縮小の中心の対応 点の移動量と言ってもよい。
「歪補正量」 とは、 カメラやレンズの位置や方向が変わったことによ る撮影画像の変化のうち、 平行移動、 回転、 拡大縮小では補正できない 残りの変化を補正する為の補正量である。 例えば、 高い建物を撮影した 時に、 上の方が遠近法の効果により同じ大きさであっても小さく写って しまう 「あおり」 などとよばれる効果などを補正する場合などがこれに 含まれる。
「重ね画像生成手段」 は、 重ね画像を生成するが、 必ずしも一つの画 像として生成しなくてもよく、 他の手段と合わせて (他の手段との協働 PC蘭難 08510
3 1
で) 合成したかのよ うに見えるのでも構わない。 例えば、 表示手段上に ある画像を表示する際、 その画像に上書きする形で別の画像を一部表示 すれば、 見た目には 2つの画像から合成画像を生成し、 その合成画像を 表示しているかのように見えるが、 実際は、 2つの画像がそれぞれ存在 するだけで、 合成画像は存在していない。
「画素値」 とは、 画素の値であり、 一般に所定のビッ ト数を使って表 される。 例えば、 白黒二値の場合は 1 ビッ トで表現され、 2 5 6階調の モノクロの場合、 8 ビッ ト、 赤、 緑、 青の各色 2 5 6階調の力ラーの場 合、 2 4 ビッ トで表現される。 カラーの場合、 赤、 緑、 青の光の 3原色 に分解されて表現されることが多い。
なお、 似た言葉として、 「濃度値」 、 「輝度値」 などがある。 これは 目的によって使い分けているだけであり、 「濃度値」 は主に画素を印刷 する場合、 「輝度値」 は主にディスプレイ上に表示する場合に使われる が、 ここでは目的は限定していないので、 「画素値」 と表現することに する。
「透過率」 とは、 複数の画素の画素値に所定の割合の値を掛けて、 そ の和を新たな画素値とする処理において、 掛ける 「所定の割合の値」 の ことである。 通常、 0以上、 1以下の値である。 また、 1つの新たな画 素値で使われる各画素の透過率の和は 1 とする場合が多い。 「透過率」 でなく、 「不透明度」 と言う場合もある。 「透明度」 は 1から 「不透明 度」 を引いた値である。
「所定の透過率」 には、 固定された値、 領域に応じて変わる値、 領域 の境界付近で徐々に変わる値なども含まれる。
「差分画像」 とは、 二つの画像中の同じ位置の画素値を比較して、 そ 難 08510
3 2
の差の値を画素値として作成する画像のことである。 一般には、 差の値 は絶対値をとることが多い。
「元の画素値と異なる画素値」 とは、 例えば、 透過率を変えて半透明 にしたり、 画素値の明暗や色相などを逆にして反転表示させたり、 赤や 白、 黒などの目立つ色にしたり、 などを実現するよ うな画素値である。 また、 領域の境界部分と内部とで、 上記のように画素値を変えてみたり、 境界部分を点線で囲ってみたり、 点滅表示 (時間的に画素値を変化させ る) させてみたり、 という よ うな場合も含む。
「被写体の領域」 とは、 被写体が背景と分離される境界で区切られる 領域である。 例えば、 第 1被写体画像中で人物が服や物などを持ってい て、 背景画像にそれらが現れないのならば、 それらも被写体であり、 被 写体の領域に含まれる。 なお、 被写体の領域は、 必ずしも繋がった一塊 の領域とは限らず、 複数の領域に分かれていることもある。
「前記被写体領域抽出手段から得られる領域のみを重ねる」 とは、 そ の領域以外は何も画像を生成しないということではなく、 それ以外の領 域は基準画像などで埋めることを意味する。
「警告」 には、 表示手段などに文字や画像で警告することも含まれる し、 ランプなどによる光やス ピーカなどによる音声、 バイブレータなど による振動など、 ユーザや被写体が感知できる方法ならば何でも含まれ る。
「通知」 は、 「警告」 同様、 ユーザや被写体が感知できる方法ならば 何でも含まれる。
「フ レーム (枠) 」 とは、 画像全体の矩形をさす。 被写体が画像の端 (外形輪郭) に一部かかっているような場合、 フ レーム (枠) にかかる、 とカ フレーム (枠) から切れる、 などと表現することもある。
図 1は、 本発明の実施の一形態に係る画像合成方法を実施する画像合 成装置を示す構成図である。
すなわち、 画像合成装置の要部を、 第 1被写体画像取得手段 1、 背景 画像取得手段 2、 第 2被写体画像取得手段 3、 背景補正量算出手段 4、 補正画像生成手段 5、 差分画像生成手段 6、 被写体領域抽出手段 7、 重 なり検出手段 8、 重ね画像生成手段 9、 重ね画像表示手段 1 0、 重なり 回避方法算出手段 1 1、 重なり回避方法通知手段 1 2、 重なり警告手段 1 3、 シャツターチヤンス通知手段 1 4、 自動シャツタ一手段 1 5、 撮 像手段 1 6の主要な機能プロックに展開して示すことができる。
図 2は、 図 1の各手段 1〜 1 6を具体的に実現する装置の構成例であ る。
C P U ( central proces s ing uni t ) 7 0は、 背景補正量算出手段 4 捕正画像生成手段 5、 差分画像生成手段 6、 被写体領域抽出手段 7、 重 なり検出手段 8、 重ね画像生成手段 9、 重ね画像表示手段 1 0、 重なり 回避方法算出手段 1 1、 重なり回避方法通知手段 1 2、 重なり警告手段 1 3、 シャッターチャンス通知手段 1 4、 自動シャッター手段 1 5 と し て機能し、 これら各手段 1〜 1 6の処理手順が記述されたプログラムを 主記憶 7 4、 外部記憶 7 5、 通信デバィス 7 7を介したネッ トワーク先 などから得る。
なお、 第 1被写体画像取得手段 1、 背景画像取得手段 2、 第 2被写体 画像取得手段 3、 撮像手段 1 6についても、 撮像素子や、 撮像素子が出 力する画像データの各種処理に対する内部制御などの為に C P Uなどを 使っている場合もある。 また、 C P U 7 0は、 C P U 7 0を含めてパス 7 9を通じ相互に接続 されたディスプレイ 7 1、 撮像素子 7 2、 タブレッ ト 7 3、 主記憶 7 4、 外部記憶 7 5、 シャッターポタン 7 6、 通信デバィス 7 7、 ランプ 7 8、 スピーカ 8 0 とデータのやり と り を行ないながら、 処理を行なう。
なお、 データのやり と りは、 バス 7 9を介して行う以外にも、 通信ケ 一ブルや無線通信装置などデータを送受信できるものを介して行っても よい。 また、 各手段 1〜1 6の実現手段と しては、 C P Uに限らず、 D S P (digital signal processor)や処理手順が回路と して組み込まれて いるロジック回路などを用いることもできる。
ディスプレイ 7 1は、 通常はグラフィ ックカードなどと組み合わされ て実現され、 グラフィックカー ド上に V R AM (video random access memory) を有し、 V R A M上のデータを表示信号に変換して、 モニター などのディスプレイ (表示 Z出力媒体) に送り、 ディスプレイは表示信 号を画像と して表示する。
撮像素子 7 2は、 風景等を撮影して画像信号を得るデバイスであり、 通常、 レンズなどの光学系部品と受光素子およびそれに付随する電子回 路などからなる。 ここでは、 撮像素子 7 2は、 A/D変換器などを通し て、 デジタル画像データに変換する所まで含んでいると し、 パス 7 9を 通じて、 第 1被写体画像取得手段 1、 背景画像取得手段 2、 第 2被写体 画像取得手段 3などに撮影した画像データを送るとする。 撮像素子と し て一般的なデバイ ス と しては、 例えば、 C C D ( charge coupled device) などがあるが、 その他にも風景等を画像データと して得られる デバイスならば何でも良い。
ユーザの指示を入力する手段と して、 タブレツ ト 7 3、 シャツターボ o
35
タン 7 6などがあり、 ユーザの指示はバス 7 9 を介して各手段 1〜 1 6 に入力される。 この他にも各種操作ボタン、 マイクによる音声入力など、 様々な入力手段が使用可能である。 タブレッ ト 7 3は、 ペンとペン位置 を検出する検出機器からなる。 シャッターポタン 7 6は、 メカニカルも しく は電子的なスィ ツチなどからなり、 ユーザがボタンを押すことで、 通常は、 撮像素子 7 2で撮影された画像を主記憶 7 4や外部記憶 7 5な どに記録したりする一連の処理を開始させるスター ト信号を生成する。 王 d†意 7 4【ま、 通常 ίま D RAM dynamic random access memory) や フラッシュメモリ などのメモリデバイスで構成される。 なお、 C P U内 部に含まれるメモリやレジスタなども一種の主記憶と して解釈してもよ い。
外部記憶 7 5 は、 H D D ( hard disk drive) や P C ( personal computer) カー ドなどの装脱着可能な記憶手段である。 あるいは C P U 7 0 とネッ トワークを介して有線または無線で接続された他のネッ ト
L5 ワーク機器に取り付けられた主記憶や外部記憶を外部記憶 7 5 と して用 いるこ ともできる。 通信デバイス 7 7は、 ネッ トワークインターフェースカードなどによ り実現され、 無線や有線などによ り接続された他のネッ トワーク機器と データをやり と りする。 スピーカ 8 0は、 パス 7 9などを介して送られて来る音声データを音 声信号と して解釈し、 音声と して出力する。 出力される音声は、 単波長 の単純な音の場合もあるし、 音楽や人間の音声など複雑な場合もある。 出力する音声が予め決まっている場合、 送られて来るデータは音声信号 ではなく 、 単なるオン、 オフの動作制御信号だけという場合もある。 03 008510
3 6
次に、 図 1の各手段 1〜 1 6を各手段間のデータ授受の観点から説明 する。
なお、 各手段間でのデータのやり と りは、 特に注釈なく 「 * *手段か ら得る」 、 「* *手段へ送る (渡す) 」 という表現をしている時は、 主 にバス 7 9を介してデータをやり と り しているとする。 その際、 直接各 手段間でデータのやり と りをする場合もあれば、 主記憶 7 4や外部記憶 7 5、 通信デパイス 7 7を介したネッ トワークなどを間に挟んでデータ をやり と りする場合もある。
第 1被写体画像取得手段 1は、 例えば撮像素子 7 2を含む撮像手段 1 6、 主記憶 7 4、 外部記憶 7 5などで構成され、 第 1被写体画像を、 撮 像手段 1 6、 主記憶 7 4、 外部記憶 7 5、 通信デバィス 7 7を介したネ ッ トワーク先などから得る。 なお、 第 1被写体画像取得手段 1は、 撮像 素子 7 2や、 撮像素子 7 2が出力する画像データの各種処理に対する内 部制御などの為に C P Uなどを含む場合もある。 撮像手段 1 6を使う場合は、 第 1の被写体が含まれる現在の風景 (第 1被写体画像) を撮像素子 7 2で撮影することになり、 通常はシャツタ 一ボタン 7 6などを押したタイミングなどで撮影し、 撮影された画像は、 主記憶 Ί 4、 外部記憶 7 5、 通信デバィス 7 7を介したネッ トワーク先 などに記録される。 一方、 第 1被写体画像取得手段 1が、 主記憶 7 4、 外部記憶 7 5、 お よび/または通信デバイス 7 7を介したネッ トワーク先などから第 1被 写体画像を得る場合は、 既に撮影されて予め用意してある画像を読み出 すことになる。 なお、 通信デバィス 7 7を介したネッ トワーク先などに カメラがあり、 ネッ トワークを通して撮影する場合もある。 第 1被写体画像は、 背景補正量算出手段 4、 補正画像生成手段 5、 差 分画像生成手段 6、 被写体領域抽出手段 7、 および/ /または重ね画像生 成手段 9などに送られる。
背景画像取得手段 2は、 例えば撮像素子 7 2を含む撮像手段 1 6、 主 記憶 7 4、 および Zまたは外部記憶 7 5などで構成され、 背景画像を、 撮像手段 1 6、 主記憶 7 4、 外部記憶 7 5、 および Zまたは通信デバィ ス 7 7を介したネッ トワーク先などから得る。 なお、 背景画像取得手段 2は、 上記内部制御などの為に C P Uなどを含む場合もある。 画像の中 身が違う以外は、 画像の取得方法に関しては、 第 1被写体画像取得手段 1 と同様である。
なお、 背景画像は、 背景補正量算出手段 4、 補正画像生成手段 5、 お よび/または差分画像生成手段 6に送られる。
第 2被写体画像取得手段 3は、 例えば撮像素子 7 2を含む撮像手段 1 6、 主記憶 7 4、 および Zまたは外部記憶 7 5などで構成され、 第 2の 被写体が含まれる画像 (第 2被写体画像) を、 撮像手段 1 6、 主記憶 7 4、 外部記憶 7 5、 および/または通信デバイス 7 7を介したネッ トヮ ーク先などから得る。 なお、 第 2被写体画像取得手段 3は、 內部制御な どの為に C P Uなどを含む場合もある。 画像の中身が違う以外は、 画像 の取得方法に関しては、 第 1被写体画像取得手段 1 と同様である。
第 2被写体画像は、 背景補正量算出手段 4、 補正画像生成手段 5、 差 分画像生成手段 6、 被写体領域抽出手段 7、 および/または重ね画像生 成手段 9などに送られる。
背景補正量算出手段 4 と しての C P U 7 0は、 第 1被写体画像、 第 2 被写体画像、 および背景画像中の被写体以外の背景の相対的な移動量、 回転量、 拡大縮小率、 歪補正量のいずれかもしくは組み合わせからなる 補正量を算出する。
この場合、 少なく とも一部共通する背景を持つ 2つの画像同士で、 一 方を基準画像と し、 その基準画像と他の画像との間の補正量が最低限求 まればよい。 残りの画像についても、 前記基準画像または他の画像のど ちらか、 または双方と少なく とも一部共通する背景を持っていさえすれ ば、 基準画像に対する補正量を最終的に算出することができる。
なお、 補正量は相対的なものなので、 基準画像と他の画像との間の補 正量を直接的でなく、 間接的に計算で求めてもよい。 例えば、 第 1被写 体画像が基準画像の時、 基準画像と第 2被写体画像の間の補正量、 基準 画像と背景画像の間の補正量が直接得られなくても、 基準画像と背景画 像の間の補正量、 第 2被写体画像と背景画像の間の補正量を直接得られ るならば、 その 2つの補正量から基準画像と第 2被写体画像の間の補正 量を計算で求めることも可能である。
背景補正量算出手段 4は、 算出した補正量を補正画像生成手段 5に送 る。 なお、 予め算出しておいた補正量を背景補正量算出手段 4が読み出 す場合は、 主記憶 7 4、 外部記憶 7 5、 および/または通信デバイス 7 7を介したネッ トワーク先などから捕正量を読み出すことになる。
補正画像生成手段 5 と しての C P U 7 0は、 第 1被写体画像、 第 2被 写体画像、 背景画像のいずれかを基準画像と し、 他の 2画像を被写体以 外の背景の部分が重なるように背景補正量算出手段 4から得られる補正 量で補正した画像を生成し、 差分画像生成手段 6および重ね画像生成手 段 9へ送る。 なお、 予め生成しておいた補正画像を捕正画像生成手段 5 が読み出す場合は、 主記憶 7 4、 外部記憶 7 5、 および Zまたは通信デ パイス 7 7を介したネッ トワーク先などから読み出すことになる。
差分画像生成手段 6 と しての C P U 7 0は、 補正画像生成手段 5で決 めた基準画像と補正画像生成手段 5から得られる補正した他の 1つある いは 2つの画像の間の差分画像を生成して、 生成した差分画像を被写体 領域抽出手段 7および重ね画像生成手段 9 へ送る。 基準画像は、 第 1被 写体画像、 第 2被写体画像、 背景画像のいずれかである。
被写体領域抽出手段 7 と しての C P U 7 0は、 差分画像生成手段 6か ら得られる差分画像から第 1、 第 2の被写体の領域を抽出して、 抽出し た領域を重なり検出手段 8および重ね画像生成手段 9 へ送る。
重なり検出手段 8 と しての C P U 7 0は、 被写体領域抽出手段 7から 得られる第 1、 第 2の被写体の領域から第 1、 第 2の被写体同士の重な りを検出して、 重なりが存在するかどうかの情報と重なり領域の情報と を、 重ね画像生成手段 9、 重なり回避方法算出手段 1 1、 重なり警告手 段 1 3、 シャッターチャンス通知手段 1 4および自動シャツター手段 1 5に送る。
重ね画像生成手段 9 としての C P U 7 0は、 第 1被写体画像取得手段 1から得られる第 1被写体画像、 第 2被写体画像取得手段 3から得られ る第 2被写体画像、 背景画像取得手段 2から得られる背景画像、 補正画 像生成手段 5から得られる捕正画像を、 全部あるいは一部重ねた画像を 生成し、 生成した画像を重ね画像表示手段 1 0に送る。
また、 重ね画像生成手段 9は、 差分画像生成手段 6から得られる差分 画像中の差のある領域を、 元の画素値と異なる画素値の画像と して生成 する場合もある。
また、 重ね画像生成手段 9は、 被写体領域抽出手段 7から得られる第 1の被写体と第 2の被写体の領域のみを基準画像などに重ねる場合もあ る。
また、 重ね画像生成手段 9は、 重なり検出手段 8から得られる重なり の領域を、 元の画素値と異なる画素値の画像と して生成する場合もある c 重ね画像表示手段 1 0 と しての C P U 7 0は、 重ね画像生成手段 9か ら得られる重ね画像をディスプレイ 7 1などに表示する。
また、 重ね画像表示手段 1 0は、 重なり回避方法通知手段 1 2から得 られる重なり回避方法の情報に応じて、 重なり回避方法の表示を行う場 合や、 重なり警告手段 1 3から得られる警告情報に応じて、 警告表示を 行う場合や、 シャッターチヤンス通知手段 1 4から得られるシャッター チャンス情報に応じて、 シャッターチャンスである旨の表示を行う場合 や、 自動シャッター手段 1 5から得られるシャッター情報に応じて、 自 動シャッターが行われた旨の表示を行う場合もある。
重なり回避方法算出手段 1 1 としての C P U 7 0は、 重なり検出手段 8から得られる重なりに関する情報から、 第 1 と第 2の被写体の重なり を減らす、 あるいは無くすように、 第 1あるいは第 2の被写体の位置あ るいはその位置の方向を算出し、 その算出した位置や方向を示す情報を 重なり回避方法と して重なり回避方法通知手段 1 2へ渡す。 位置や方向 を求める被写体は、 第 1あるいは第 2の被写体のどちらでも可能だが、 現在撮影中の (あるいは最後に撮影した) 被写体の方が利便性がよい。 重なり回避方法通知手段 1 2と しての C P U 7 0は、 重なり回避方法 算出手段 1 1から得られた上述の重なり回避方法を、 ユーザあるいは被 写体あるいは両方に通知する。
通知には、 通知内容を文字などにして重ね画像表示手段 1 0に送って ディスプレイ 7 1に表示させたり、 ランプ 7 8を使って光で知らせたり、 スピーカ 8 0を使って音で知らせたりする種々の形態を採用できる。 通 知することができるのならば、 それ以外のデパイスなどを使っても良い。 重なり警告手段 1 3 と しての C P U 7 0は、 重なり検出手段 8から得 られる重なり情報から、 重なりが存在する場合、 ユーザあるいは被写体 あるいは両方に重なりがあることを通知する。 通知方法に関しては、 重 なり回避方法通知手段 1 2の説明と同様である。
シャッターチャンス通知手段 1 4 としての C P U 7 0は、 重なり検出 手段 8から得られる重なり情報から、 重なりが存在しない場合、 ユーザ あるいは被写体あるいは両方に重なりが無いことを通知する。 通知方法 に関しては、 重なり回避方法通知手段 1 2の説明と同様である。
自動シャッター手段 1 5 と しての C P U 7 0は、 重なり検出手段 8力、 ら得られる重なり情報から、 重なりが存在しない場合、 第 2被写体画像 取得手段 3に対し、 撮像手段 1 6から得られる画像を主記憶 7 4や外部 記憶 7 5などに記録するように自動的に指示を出す。
ここでは、 撮像手段 1 6から得られる画像は、 背景画像、 第 1被写体 画像または第 2被写体画像と して主記憶 7 4や外部記憶 7 5などに最終 的に記録、 保存され、 合成されるような使い方を主に想定している。 最 終的に記録、 保存されるまでは、 背景画像および第 1被写体画像を撮像 手段 1 6から得て、 得る毎に記録、 保存するが、 第 2被写体画像は撮像 手段 1 6から得られても、 すぐには保存されない。
すなわち、 撮像手段 1 6から得た画像を第 2被写体画像とする場合、 その得られた第 2被写体画像と保存されている背景画像および第 1被写 体画像とを使って、 重なり検出や重なり回避などの処理を行い、 重ね画 像表示手段 1 0などでの各種表示や警告、 通知などの処理を行う、 とい う一連の処理を繰り返す。 そして、 自動シャッター手段 1 5により記録、 保存を指示された時、 第 2被写体画像が最終的に記録、 保存される。
なお、 自動シャッター手段 1 5による撮影許可の指示が存在し、 かつ、 シャッターボタン 7 6がユーザにより押される場合に、 第 2被写体画像 を記録、 保存するようにしてもよい。
また、 自動シャッター手段 1 5が、 指示を出した結果、 撮像画像が記 録されたことをユーザあるいは被写体あるいは両方に通知してもよい。 通知方法に関しては、 重なり回避方法通知手段 1 2の説明と同様である。
また、 自動シャツター手段 1 5 と しての C P U 7 0は、 記録の指示を 行うだけでなく、 重なり検出手段 8から得られる重なり情報から、 重な りが存在する場合、 第 2被写体画像取得手段 3に撮像手段 1 6から得ら れる画像を主記憶 7 4や外部記憶 7 5などに記録するのを禁止するよう に自動的に指示を出す。 この動作は、 上述した自動記録する場合の逆と なる。
この場合,、 自動シャッター手段 1 5による保存禁止の指示が存在する 場合、 シャッターボタン 7 6がユーザにより押されても、 第 2被写体画 像は記録、 保存されないことになる。
撮像手段 1 6は撮像素子 7 2を主要構成要素と して備え、 撮像した風 景などを画像データと して第 1被写体画像取得手段 1、 第 2被写体画像 取得手段 3および/または背景画像取得手段 2に送る。
図 3 ( a ) は、 本発明に係る画像合成装置の背面からの外観例を示し ている。 本体 1 4 0上に表示部兼タブレッ ト 1 4 1、 ランプ 1 4 2、 お よびシャッターボタン 1 4 3がある。 表示部兼タブレツ ト 1 4 1は入出力装置 (ディスプレイ 7 1およぴタ ブレッ ト 7 3等) および重ね画像表示手段 1 0に相当する。 表示部兼タ ブレッ ト 1 4 1上には、 図 3 ( a ) のように、 重ね画像生成手段 9で生 成された合成画像や重なり回避方法通知手段 1 2、 重なり警告手段 1 3、 シャッターチャンス通知手段 1 4、 自動シャッター手段 1 5などからの 通知/警告情報などが表示される。 また、 画像合成装置の各種設定メ - ユーなどを表示して、 タブレツ トを使って指やペンなどで設定を変更し たりするのにも使われる。
なお、 各種設定などの操作手段と して、 タブレッ トだけでなく、 ボタ ン類などがこの他にあってもよい。 また、 表示部兼タブレッ ト 1 4 1は、 本体 1 4 0に対する回転や分離などの方法を用いて、 撮影者だけでなく、 被写体側でも見られるよ うになつていてもよレ、。
ランプ 1 4 2は、 重なり回避方法通知手段 1 2、 重なり警告手段 1 3、 シャッターチャンス通知手段 1 4または自動シャッター手段 1 5などか らの通知や警告に使われたりする。
シャッターボタン 1 4 3は、 第 1被写体画像取得手段 1、 背景画像取 得手段 2または第 2被写体画像取得手段 3が、 撮像手段 1 6から撮影画 像を取り込む/記録するタイ ミングを指示する為に主に使われる。
また、 この例では示していないが、 内蔵スピーカなどを通知 Z警告手 段と して使ってもよい。
図 3 ( b ) は、 本発明に係る画像合成装置の前面からの外観例を示し ている。 本体 1 4 0前面にレンズ部 1 4 4が存在する。 レンズ部 1 4 4 は、 撮像手段 1 6の一部である。 なお、 図 3 ( b ) の例では示していな いが、 前面に被写体に情報 (前記の通知や警告) を伝えられるように、 表示部やランプ、 スピーカなどがあってもよい。
図 4は、 画像データのデータ構造例を説明する説明図である。 画像デ ータは画素データの 2次元配列であり、 「画素」 は、 属性と して位置と 画素値を持つ。 ここでは画素値と して光の 3原色 (赤、 緑、 青) に対応 した R、 G、 Bの値を持つとする。 図 4の横に並んだ R、 G、 Bの組で 1画素のデータとなる。 但し、 色情報を持たないモノクロの輝度情報だ けを持つ場合は、 R、 G、 Bの代わりに輝度値を 1画素のデータと して 持つとする。
位置は X— Y座標 ( x、 y ) で表す。 図 4では左上原点と し、 右方向 を + X方向、 下方向を + Y方向とする。
以降では説明の為、 位置 (x、 y ) の画素を 「P ( x、 y ) 」 と表す が、 画素 P ( x、 y ) の画素値も 「画素値 P ( x、 y ) 」 あるいは単に 「P ( x、 y ) 」 と表す場合もある。 画素値が R、 G、 Bに分かれてい る場合、 各色毎に計算は行うが、 色に関する特別な処理でなければ、 同 じ計算処理を R、 G、 Bの値毎に行えばよい。 従って、 以降では共通し た計算方法と して 「画素値 P ( x、 y ) 」 を使って説明する。
図 5は、 本発明の実施の一形態に係る適応出力方法の一例を示すフロ 一チヤ一ト図である。
まずステップ S 1 (以下、 「ステップ S」 を 「 S」 と略記する。 ) で は、 背景画像取得手段 2が、 背景画像を取得し、 S 2へ処理が進む。 背 景画像は、 撮像手段 1 6を使って撮影してもよいし、 予め主記憶 7 4、 外部記憶 7 5、 通信デバイス 7 7を介したネッ トワーク先などに用意し てある画像を読み出してもよい。
次に、 S 2では、 第 1被写体画像取得手段 1が、 上記背景画像と少な く とも一部共通する背景部分を持つ第 1被写体画像を取得し、 連結点 P 2 0 (以下、 「連結点 P」 を 「P」 と略記する) を経て S 3 へ処理が進 む。 第 1被写体画像の取得方法は、 背景画像と同様である。 なお、 S 1 と S 2の処理の順番は逆でも良い。
S 3では、 第 2被写体画像取得手段 3が、 上記背景画像または第 1被 写体画像と少なく とも一部共通する背景部分を持つ第 2被写体画像を取 得し、 P 3 0を経て S 4 へ処理が進む。 ここでの処理は後で図 1 4を用 いて詳しく説明するが、 第 2被写体画像の取得方法自体は、 背景画像と 同様である。
S 4では、 背景補正量算出手段 4が、 第 1被写体画像、 第 2被写体画 像および背景画像から背景補正量を算出して、 P 4 0を経て S 5 へ処理 が進む。 第 1被写体画像、 第 2被写体画像、 背景画像はそれぞれ、 第 1 被写体画像取得手段 1 ( S 2 ) 、 第 2被写体画像取得手段 3 ( S 3 ) 、 背景画像取得手段 2 ( S 1 ) から得られる。
なお、 以降、 第 1被写体画像、 第 2被写体画像および背景画像を使う 際、 特にことわりの無い限り、 これらの画像の取得元の手段/ステップ は S 4での取得元の手段/ステツプと同じなので、 以降はこれらの画像 の取得元の手段 Zステップの説明は省く。
S 4の処理の詳細は後で図 1 5を用いて説明する。
S 5では、 補正画像生成手段 5が、 背景補正量算出手段 4から得た背 景捕正量を使って第 1被写体画像、 第 2被写体画像および背景画像の内 の基準画像以外の 2つの画像を補正し、 差分画像生成手段 6が、 補正画 像生成手段 5で捕正された画像らと基準画像との間の相互の差分画像を 生成して、 P 5 0を経て S 6 へ処理が進む。 S 5の処理の詳細は後で図 4 6
1 7を用いて説明する。
S 6では、 被写体領域抽出手段 7が、 差分画像生成手段 6 ( S 5 ) ら得られる差分画像から、 第 1、 第 2の被写体の領域 (以降、 第 1被写 体領域、 第 2被写体領域と呼ぶ) を抽出して、 P 6 0を経て S 7 へ処理 が進む。 S 6の処理の詳細は後で図 1 9を用いて説明する。
S 7では、 重なり検出手段 8が、 被写体領域抽出手段 7 ( S 6 ) から 得られる第 1、 第 2の被写体の領域から、 それらの領域の重なりに関す る情報を得て、 P 7 0を経て S 8 へ処理が進む。 S 7の処理の詳細は後 で図を用いて説明する。
S 8では、 重なり回避方法算出手段 1 1、 重なり回避方法通知手段 1 2、 重なり警告手段 1 3、 シャッターチヤンス通知手段 1 4、 自動シャ ッター手段 1 5のうちの一つ以上の手段が、 重なり検出手段 8 ( S 7 ) から得られる重なりに関する情報に応じて様々な処理を行い、 P 8 0を 経て S 9 へ処理が進む。 S 8の処理の詳細は後で図 2 1から図 2 4、 図 2 7を用いて説明する。
S 9では、 重ね画像生成手段 9が、 第 1被写体画像、 第 2被写体画像、 背景画像、 およびそれらの画像を補正画像生成手段 5 ( S 5 ) で補正し た画像、 被写体領域抽出手段 7 ( S 6 ) から得られる第 1、 第 2の被写 体の領域、 重なり検出手段 8 ( S 8 ) から得られる第 1、 第 2の被写体 の重なりに関する情報などから、 これら複数の画像を重ねる 「重ね画 像 J を生成して、 P 9 0を経て S 1 0 へ処理が進む。 S 9の処理の詳細 は後で図 3 0を用いて説明する。
S 1 0では、 重ね画像表示手段 1 0が、 重ね画像生成手段 9 ( S 9 ) から得られる重ね画像をディスプレイ 7 1などに表示して、 処理を終了 する。
これら S 1から S 1 0の処理で、 第 1被写体画像、 第 2被写体画像お よび背景画像を使って、 第 1 の被写体と第 2の被写体を 1枚の画像上に 合成し、 また被写体同士の重なり具合に応じて様々な処理が行えるよう になる。
詳細な処理やその効果については、 後で詳しく説明すると して、 まず 簡単な例で処理の概要を説明する。
図 6 ( a ) は S 1で得る背景画像の例である。 建物とそれに通じる道 路が背景の風景と して写っており、 被写体としての人物は存在しない。
図 7 ( a ) は S 2で得る第 1被写体画像の例である。 図 6 ( a ) の背 景の手前、 左側に第 1の被写体たる人物 ( 1 ) が立っている。 分かりや すいように人物 ( 1 ) の顔部分には 「 1」 と記しておく。 なお、 今後、 特にことわり なく 「右側」 「左側」 といった場合、 図上での 「右側」
「左側」 という意味だとする。 この方向は、 撮影者 Zカメラから見た方 向だと思えばよい。
図 8 ( a ) は S 3で得る第 2被写体画像の例である。 図 6 ( a ) の背 景の手前、 右側に第 2の被写体たる人物 ( 2 ) が立っている。 分かりや すいように人物 ( 2 ) の顔部分には 「 2」 と記しておく。
図 6 ( c ) は、 図 6 ( a ) の背景画像と図 7 ( a ) の第 1被写体画像 との間で背景補正量を求め、 第 1被写体画像を基準画像として、 背景画 像を補正した画像である。 同様に、 図 8 ( c ) は、 図 7 ( a ) の第 1被 写体画像と図 8 ( a ) の第 2被写体画像との間で背景補正量を求め、 第 1被写体画像を基準画像と して、 第 2被写体画像を補正した画像である。 捕正された画像は実線の枠で囲われた範囲であり、 補正のされ方が分 かるよ うに、 元の図 6 ( a ) の背景画像と図 8 ( a ) の第 2被写体画像 の範囲を、 それぞれ図 6 ( c ) と図 8 ( c ) 上に点線の枠で示してある。 例えば、 図 6 ( a ) の背景画像は、 図 7 ( a ) の背景の少し右側の風 景を撮影して得られている。 このため、 図 6 ( a ) の背景画像を図 7 ( a ) の背景と重なるように捕正するには、 図 6 ( a ) の少し左側の風 景を選択する必要がある。 従って、 図 6 ( c ) は、 図 6 ( a ) より少し 左側の風景となるように補正されている。 元の図 6 ( a ) の範囲は点線 で示されている。 図 6 ( a ) よ り左側の風景の画像は存在しないので、 図 6 ( c ) では左端の点線から左の部分が空白となっている。 逆に図 6 ( a ) の右端の部分は切り捨てられている。
ここでは拡大縮小や回転などの補正はなく、 単なる平行移動だけの補 正結果になっている。 すなわち S 4で得られる背景補正量は、 ここでは 実線の枠と点線の枠のずれが示す平行移動量となる。
図 9 ( a ) は、 S 5で、 図 7 ( a ) の第 1被写体画像と図 6 ( c ) の 補正された背景画像との間で生成した差分画像である。 同様に、 図 1 0
( a ) は、 図 8 ( c ) の補正された第 2被写体画像と図 6 ( c ) の補正' された背景画像との間で生成した差分画像である。
差分画像では差分量 0の部分 (すなわち、 背景の一致部分) は黒い領 域で示されている。 差分がある部分は、 被写体の領域内とノイズ部分で あり、 被写体の領域部分は背景画像と被写体部分の画像が重なり合った 妙な画像になっている。 (なお、 補正によってどちらかの画像しか画素 が存在しない領域 (例えば図 6 ( c ) の左側または右側に位置する実線 と点線の間の領域) は差分の対象からは外し、 差分量は 0 としている) 。 図 9 ( d ) は、 S 6で、 図 9 ( a ) から第 1被写体領域を抽出した結 PC漏 00删 510
49
果である。 抽出処理の詳細については後で説明する。 図中の黒い人物の 形をした領域 1 1 2が第 1被写体領域である。 同様に、 図 1 0 ( d ) は、 図 1 0 ( a ) から第 2被写体領域を抽出した結果である。 図中の黒い人 物の形をした領域 1 2 2が第 2被写体領域である。
S 7で、 図 9 ( d ) と図 1 0 ( d ) の被写体領域同士の重なり を検出 するが、 この例では重なりは無いので、 重なりの図は省略する。
S 8の重なりに関する処理は様々な処理方法があるが、 この例では重 なりは検出されないので、 ここでは説明を簡単にする為に特に処理は行 わないことにしておく。
図 1 1 ( a ) は、 図 1 0 ( d ) の第 2被写体領域に相当する部分の画 像を図 8 ( c ) の補正された第 2被写体画像から抜き出し、 図 7 ( a ) の第 1被写体画像に重ねて (上書きして) 生成した画像である。 これに より、 図 1 1 ( a ) では、 図 7 ( a ) と図 8 ( a ) の別々に写っていた 被写体が同じ画像上に重なりなく並んでいる。 重ね方に関しても、 様々 な処理方法があるので、 後で詳しく説明する。 図 1 1 ( a ) の画像が重 ね画像表示手段 1 0上に合成画像と して表示される。
これによつて、 別々に撮影された被写体を同時に撮影したかのような 画像を合成できるようになる効果が出てく る。
以上の説明により、 処理の概要を一通り説明したが、 S 7で被写体領 域同士で重なりがある場合の S 8の処理例の概要について説明していな いので、 以降、 簡単に触れておく。
図 2 0 ( a ) は、 図 8 ( a ) とは別の第 2被写体画像の例である。 図 8 ( a ) と比べると、 第 2の被写体が同一の背景に対して少し左に位置 している。 なお、 背景画像、 第 1被写体画像は、 図 6 ( a ) 、 図 7 ( a ) と同じものを使う とする。
図 2 0 ( b ) は、 第 2被写体領域を示している。 図中の領域 1 3 0が 第 2被写体領域である。 なお、 第 2被写体領域と しての領域 1 3 0は、 前述と同じく、 図 7 ( a ) の第 1被写体画像と図 2 0 ( a ) の第 2被写 体画像との間で背景補正量を求め、 第 1被写体画像を基準画像と して、 第 2被写体画像を補正し、 その補正した画像と、 図 6 ( c ) の捕正され た背景画像との間で生成した差分画像から抽出されている。
図 1 2は、 S 7で図 9 ( d ) の領域 1 1 2 と図 2 0 ( b ) の領域 1 3 0 とを用いて検出された、 各被写体の重なり領域を示している。 図 1 2 中の黒く塗りつぶされている領域 1 3 1が重なっている領域であり、 分 かりやすいよ うに第 1被写体領域 1 1 2 と第 2被写体領域 1 3 0を点線 で示してある。
図 1 3 ( a ) は、 S 8で重なりがある場合に S 9で生成される重ね画 像の一例を示している。 この場合、 第 1被写体画像に第 2の被写体を重 ねて上書きした結果、 第 1の被写体と第 2の被写体とが重なる重なり領 域 1 3 1に相当する部分を目立つように表示している。 すなわち、 重な り領域 1 3 1 の元の画素値を変更し、 例えば黒く塗りつぶす画素値とし ている。
このよ う に重なり領域 1 3 1 を目立たせた重ね画像を表示することで 第 1 の被写体と第 2の被写体とが重なっていることが、 ユーザや被写体 に分かりやすくなるという撮影補助の効果が出てく る。
以上の説明により、 S 7で被写体領域同士で重なりがある場合の S 8 の処理例の概要について説明した。
なお、 これを典型的な利用シーン例で考えると、 まず図 6 ( a ) のよ P T脑 03/008510
5 1
うな背景画像をカメラ (画像合成装置) で撮影し、 記録する。 次に同じ 背景で図 7 ( a ) のよ うな第 1 の被写体を撮影し、 記録する。 最後に同 じ背景で図 8 ( a ) のような第 2 の被写体を撮影する。 なお、 第 1 の被写体と第 2の被写体の撮影は、 第 1 の被写体と第 2の 被写体が交互に行うことで、 第 3者がいなくても二人だけでも撮影が可 能である。 背景画像の撮影は第 1の被写体でも第 2の被写体でもどちら が行っても良いが、 次の撮影を考えると第 2の被写体が撮影した方がス ムーズに処理できる。 同じ背景で撮影する為にはカメラは動かさない方 が良いが、 背景にあわせて補正するので、 三脚などで固定までしなくて も、 手で大体同じ位置で同じ方向を向いて撮影すれば良い。 なお、 被写 体の位置関係は図 7 ( a ) 、 図 8 ( a ) のよ うな左右でなく、 任意の位 置関係でよい。
そして、 3つの画像を撮影した後、 S 4から S 1 0 の処理を行い、 図 1 1 ( a ) や図 1 3 ( a ) のような表示 (や後で説明する警告 Z通知な ど) を行う。 もし、 被写体が重なっているなどの表示や通知がある場合、 再度、 S 1から S 1 0 の処理を繰り返してもよい。 すなわち背景画像、 第 1被写 体画像、 第 2被写体画像を撮影し、 重ね画像を生成、 表示などする。 表 示される処理結果に満足がいくまで何度でも繰り返せば良い。 しかし、 第 2の被写体が位置を移動する場合などは、 背景画像と第 1 の被写体画像は必ずしも撮りなおさなくてもよく、 第 2の被写体だけ取 り直せば済むこともある。 その場合は、 S 3から S 1 0を繰り返せばよ レ、。
この場合、 S 3の第 2被写体画像取得から S 1 0の表示までを自動的 P T/JP2003/008510
5 2
に繰り返せば、 すなわち第 2被写体画像取得をシャッターポタンを押さ ずに動画を撮影するように連続的に取得し、 処理、 表示も含めて繰り返 すようにすれば、 カメラや第 2の被写体の移動などに追従してリアルタ ィムに処理結果が確認できることになる。 従って、 第 2の被写体の移動 位置が適切かどうか (重なっていないかどう力 をリアルタイムに知る ことができ、 重なりが無い合成結果を得る為の第 2の被写体の撮影が容 易になるという利点が出てく る。 なお、 この繰り返し処理を開始するには、 メニューなどから処理開始 を選択するなどして、 専用モードに入る必要がある。 適切な移動位置に なったらシャッターボタンを押すことで、 第 2被写体画像を決定して (記録し) 、 この繰り返し処理/専用モードを終了させればよい (終了 といっても、 最後の合成結果を得る S 1 0までは処理を続けてもよい) 。 また、 背景画像は良いが第 1被写体画像が良く無い場合、 例えば、 背 景の真中に第 1の被写体が位置し、 第 2の被写体をどう配置しても第 1 の被写体に重なってしまうカ 重ならないようにすると第 2の被写体が 重ね画像からフレームアウ トしてしまう ような場合、 S 2の第 1被写体 画像の取得からやり直しても良い。
なお、 ここでは第 1被写体画像を基準画像と して合成しているので、 第 1被写体画像を撮影し直すが、 背景画像を基準画像にして、 そこに第 1被写体領域と第 2被写体領域の画像を合成する場合は、 第 1被写体画 像はそのままで背景画像を撮影し直すという方法もある。 例えば、 基準とする背景画像上に第 1'被写体を背景が合う ように配置 するとどう しても背景画像の真中に位置してしまう場合、 第 2の被写体 をその周囲に重なりなく配置するスペースが無い場合がある。 その場合、 第 i の被写体が真中でなく、 端に寄った場所に配置されるように背景画 像を撮影し直すことで、 第 2の被写体を配置する領域を空けることがで きるようになる効果が出てく る。
以降では、 上で説明した処理の詳細を説明する。
図 1 4は、 図 5の S 3の処理、 すなわち第 2被写体画像を取得する処 理の一方法を説明するフローチャート図である。
P 2 0を経た S 3 — 1では、 第 2被写体画像取得手段 3が、 第 2被写 体画像を取得し、 S 3— 2へ処理が進む。 ここでの処理は、 図 5の S 1 の背景画像の取得と取得方法自体は同様である。
S 3— 2では、 同手段 3が、 自動シャッター手段 1 5から画像を記録 するように指示があるかどうかを判断し、 指示があれば S 3— 3へ進み、 指示がなければ P 3 0へ処理が抜ける。
S 3— 3では、 同手段 3が、 S 3— 1で取得した第 2被写体画像を主 記憶 7 4、 外部記憶 7 5などに記録して、 P 3 0へ処理が抜ける。
以上の S 3 — 1から S 3— 3の処理で、 図 5の S 3の処理が行われる。 なお、 自動シャッター手段 1 5以外であっても、 撮影者によって手動 でシャッターボタンが押されたり、 セルフタイマーでシャッターが切ら れた場合などにも撮影画像を記録してもよいが、 それは S l、 S 2、 S 3 - 1の処理に含まれるとする。
図 1 5は、 図 5の S 4の処理、 すなわち背景補正量を算出する処理の 一方法を説明するフローチャー ト図である。
背景補正量を算出する方法は色々考えられるが、 ここではブロックマ ツチングを使った簡易的な手法について説明する。
P 3 0を経た S 4— 1では、 背景補正量算出手段 4が、 背景画像をプ ロ ック領域に分割する。 図 6 ( b ) は図 6 ( a ) の背景画像をブロック 領域に分割した状態を説明する説明図である。 点線で区切られた矩形が 各ブロック領域である。 左上'のブロックを 「B ( 1, 1 ) 」 とし、 その 右が 「B ( 1, 2 ) 」 、 下が 「B ( 2, 1 ) 」 という ように表現するこ とにする。 図 6 ( b ) ではスペースの都合上、 例えば B ( 1 , 1 ) のブ ロックではブロックの左上に 「 1 1」 と記している。
S 4— 2では、 同手段 4が、 背景画像のブロックが、 第 1被写体画像、 第 2被写体画像上でマツチングする位置を求めて、 S 4— 3へ処理が進 む。 「 (ブロック) マッチング」 とは、 この場合、 背景画像の各ブロッ クと最もブロック内の画像が似ているプロック領域を第 1被写体画像、 第 2被写体画像上で探す処理である。
説明の為、 ブロックを定義する画像 (ここでは背景画像) を 「参照画 像」 と呼び、 似ているブロックを探す相手の画像 (ここでは第 1被写体 画像と第 2被写体画像) を 「探索画像」 と呼び、 参照画像上のブロック を 「参照ブロック」 、 探索画像上のプロックを 「探索ブロック」 と呼ぶ ことにする。 参照画像上の任意の点 ( x、 y ) の画素値を P r ( x、 y ) 、 探索画像上の任意の点 ( x、 y ) の画素値を P s ( x、 y ) とす る。
なお、 参照画像は、 背景画像に限らず、 基準画像や、 基準画像とは無 関係に第 1被写体画像、 第 2被写体画像のどちらかに決めても良いのだ が、 背景部分の捕正量を求める為にブロックマッチングを行うので、 最 も背景部分が多い背景画像を参照画像に選んだ方が、 探索画像中の背景 画像部分とマッチングする確率が高くなる利点がある。
例えば、 第 1被写体画像を参照画像と し、 第 2被写体画像を探索画像 o
55
とする時、 第 2被写体画像上での背景部分 (例えば図 8 ( b ) の B ( 4 , 2 ) ) が第 1被写体画像上での被写体部分に相当する場合、 対応するブ ロックを正しく求めることはできなくなってしま う。 背景画像を参照画 像とすれば、 図 8 ( b ) の B ( 4, 2 ) に対応するブロックは、 背景画 像では図 6 ( b ) の B (4, 2 ) と して存在する。 今、 参照ブロックが正方形で 1辺の大きさが m画素だとする。 すると 参照ブロック B ( i , j ) の左上の画素の位置は、
(m X ( i 一 1 ) , m X ( j 一 1 ) ) となり、 参照ブロ ック B ( i , j ) の左上から画素数にして ( d x、 d y ) 離れた画素値は、
P r (m X ( i 一 1 ) + d x、 m X ( j 一 1 ) + d y ) となる。
探索ブロックの左上位置を ( X s、 y s ) と した時、 参照ブロック B ( i , j ) と探索ブロックの類似度 S ( x s、 y s ) は次の 2式で求め
L5 られる。
D ( x s 、 y s ; d x、 d y ) = | P s ( x s + d x、 y s + d y ) 一 P r (m X ( i 一 1 ) + d x、 m X ( j - 1 ) + d y |
m— 1 m— 1
S ( x s、 y s ) =∑ ∑ D ( x s、 y s ; d x、 d y )
d x = O d y = 0
D ( x s、 y s ; d x、 d y ) は、 参照ブロックと探索ブロックの左 上から ( d x、 d y ) 離れたそれぞれの画素値の間の差の絶対値である。 そして、 S ( x s、 y s ) は、 その差の絶対値をブロック内の全画素に P 霞睡 08510
56
ついて足したものである。 も し、 参照プロ ック と探索ブロ ックが全く 同じ画像である (対応する 画素値が全て等しい) 場合、 S ( X s、 y s ) は 0 となる。 似ていない 部分が増える と、 すなわち画素値の差が大き く なる と、 S ( X s 、 y s ) は大きな値となっていく。 従って、 S ( X s、 y s ) が小さいほど 似たブロ ック という こ とになる。
S ( X s、 y s ) は、 探索ブロ ックの左上位置を ( X s、 y s ) と し た時の類似度なので、 ( x s、 y s ) を探索画像上で変えれば、 それぞ れの場所での類似度が得られる。 全ての類似度の中で最小となる類似度 の位置 ( x s、 y s ) をマッチングした位置とすればよい。 マッチング した位置の探索ブロ ックを 「マッチングブロ ック」 と呼ぶ。 図 1 6は、 このマッチングの様子を説明した図だが、 図 1 6 ( a ) の 画像を参照画像、 図 1 6 ( b ) の画像を探索画像と し、 画像の中身と し てはカギ括弧型の線がそれぞれ少し位置がずれて存在しているとする。 参照画像中の参照プロ ック 1 0 0は、 力ギ括弧型の線のちよ う ど角の部 分に位置しているとする。 探索画像中の探索ブロック と して、 探索プロ ック 1 0 1、 1 0 2、 1 0 3があったとする。 参照ブロック 1 0 0 と探 索ブロック 1 0 1、 参照プロック 1 0 0 と探索ブロ ック 1 0 2、 参照ブ ロック 1 0 0 と探索ブロック 1 0 3でそれぞれ類似度を計算すると、 探 索プロ ック 1 0 1が最も小さな値となるので、 探索プロック 1 0 1 を参 照ブロ ック 1 0 0に対するマッチングブロ ック とすればよレ、。 以上は一つの参照ブロック B ( i , j ) のマッチングについて説明し たが、 それぞれの参照ブロックについて、 マッチングブロックを求める ことができる。 図 6 ( b ) の 4 2個の参照ブロックそれぞれに対して、 第 1被写体画像、 第 2被写体画像のそれぞれで、 マッチングブロックを 探すとする。
なお、 マッチングブロックの類似度の求め方については、 ここでは各 画素値の差分の絶対値を使ったが、 それ以外にも様々な方法があり、 い ずれの手法を使っても良い。
例えば、 相関係数を使う方法や周波数成分を使う方法などもあるし、 各種高速化手法などもある。 また、 参照ブロックの位置や大きさなどの 設定の仕方も色々考えられるが、 ブロックマッチングの細かな改良方法 は本発明の主旨ではないのでここでは省略する。
なお、 参照ブロックの大きさについては、 あまり小さく しすぎるとブ ロック内にうまく特徴が捉えきれずマッチング結果の精度が悪く なるが 逆に大きく しすぎると被写体や画像のフレーム枠を含んでしまいマッチ ング結果の精度が悪くなつたり、 回転、 拡大縮小などの変化に弱くなつ たり してしまうので、 適当な大きさにすることが望ましい。
次に、 S 4— 3で、 同手段 4が、 S 4— 2で求めたマッチングブロッ クの中から背景部分に相当する探索プロックだけを抜き出して、 S 4— 4へ処理が進む。
S 4一 3で求めたマッチングブロックは、 最も差分が少ない探索ブロ ックを選んだだけなので、 同じ画像であることが保証されてはおらず、 たまたま何かの模様などが似ているだけの場合もある。 また、 そもそも 第 1や第 2の被写体の為、 参照プロックに相当する画像部分が存在しな い場合もあるので、 その場合はいいかげんな場所にマツチングプロック が設定されていることになる。
そこで各マッチングプロックから、 参照プロックと同じ画像部分では ないと判断されるものを取り除く ことが必要となる。 残ったマッチング ブロックは参照プロック と同じ画像部分であると判断されたものなので、 結果的に第 1や第 2の被写体を除いた背景部分だけが残ることになる。 マツチングブ口ックの選別手法は色々考えられるが、 ここでは最も単 純な方法と して、 類似度 S ( X S 、 y s ) を所定の閾値で判断すること にする。 すなわち、 各マッチングブロックの S ( X s 、 y s ) が閾値を 超えていたら、 そのマッチングは不正確であると して取り除く という手 法である。 S ( x s 、 y s ) は、 プロックの大きさに影響されるので、 閾値はブロックの大きさを考慮して決めるのが望ましい。
図 7 ( b ) は、 図 7 ( a ) の第 1被写体画像の S 4— 2のマッチング 結果から、 不正確なマッチングブロックを取り除いた結果である。 正し いと判断されたマッチングブロックには、 対応する参照ブロックと同じ 番号が振ってある。 同様に、 図 8 ( b ) は図 8 ( a ) の第 2被写体画像 の S 4— 2のマッチング結果から、 不正確なマッチングプロックを取り 除いた結果である。 これにより、 被写体部分が含まれない、 あるいはほ とんど含まれない背景部分のマツチングブロックだけが残っているのが 分かる。
S 4— 4では、 同手段 4が、 S 4— 3で得た背景部分のマッチングプ 口ックから、 第 1被写体画像および第 2被写体画像の背景補正量を求め て、 P 4 0 へ処理が抜ける。
背景補正量と して、 例えば回転量 θ、 拡大縮小量 R、 および/または 平行移動量 (L x 、 L y ) を求めるのだが、 計算方法は色々考えられる。 ここでは 2つのプロックを使った最も簡単な方法について説明する。 なお、 回転量、 拡大縮小量、 平行移動量以外の歪補正量は、 よほど撮 影時にカメラを動かすなどしない限り、 使わなくても背景部分がほぼ重 なり、 差分画像でノイズが充分少ない補正ができる場合が多い。 回転量、 拡大縮小量、 平行移動量以外の歪補正量を得るには、 最低でも 3点ある いは 4点以上ブロックを使う ことが必要であり、 透視変換を考慮した計 算が必要となるが、 パノラマ画像の合成などでも使われている公知の手 法 (例えば、 「共立出版 : b i t 1 9 9 4年 1 1月号別冊 『コンビユ ー タ . サイエンス』 」 の P 9 0など) なので、 この処理の詳細については ここでは省略する。
まず、 できるだけ互いの距離が離れているマッチングプロックを 2つ 選ぶ。 なお、 S 4— 3で残ったマッチングブロックが 1つしか無いとき は、 以降の拡大縮小率、 回転量を求める処理は省いて、 対応する参照ブ ロックの位置との差分を平行移動量と して求めればよレ、。 S 4— 3で残 つたマッチングブロックが 1つも無かったら、 背景画像、 第 1 /第 2被 写体画像などを撮影し直した方が良いと思われるので、 その旨の警告を 出すなどするとよい。
選び方は色々考えられるが、 例えば、
1 ) マッチングブロ ック中の任意の 2つを選び、 その二つのブ 口ックの中心位置間の距離を計算する、
2 ) 1 ) の計算を全てのマッチングブロ ックの組み合わせで行 5 、
3 ) 2 ) の中で最も距離が大きい組み合わせを背景補正量の算 出に使う 2つのブロックと して選ぶ、
という方法が考えられる。
ここで、 上記 3 ) と して挙げたように、 互いの距離が最も離れている PC霞睡 08510
6 0
マッチングプロックを使う利点としては、 拡大縮小率や回転量などを求 める際の精度が良くなることがあげられる。 マッチングプロックの位置 は画素単位となるので、 精度も画素単位となってしまう。 例えば、 横に 5 0画素離れた位置で上に 1画素分ずれた時の角度は、 横に 5画素離れ た位置で上に 0 . 1画素分ずれた時の角度と同じになる。 しかし、 0 . 1画素のずれはマッチングでは検出できない。 従って、 'できるだけ離れ たマッチングプロックを使った方が良い。
2つのブロックを使っているのは、 単に計算が簡単だからである。 も つと多くのプロ ックを使って平均的な拡大縮小率や回転量などを求める ようにすると、 誤差が減少する利点が出てく る。
例えば図 8 ( b ) の例では、 互いの距離が最も離れている 2つのマツ チングブロックは、 ブロック 1 5、 6 1の組み合わせとなる。 次に、 選んだ 2つのマッチングブロックの中心位置を、 探索画像上の 座標で表した ( X 1 ' 、 y 1 ' ) 、 ( X 2 ' 、 y 2 ' ) 、 それに対応す る参照ブロックの中心位置を参照画像上の座標で表した (x l 、 y 1 ) 、
( x 2、 y 2 ) とする。 まず、 拡大縮小率について求める。
マッチングブロックの中心間の £巨離 L mは、
L m = ( ( X 2 ' — 1 ' ) X ( 2 ' — 1 ' ) + ( y 2 ' — y 1 ' ) X ( y 2 ' - y 1 ' ) ) 1 / 2
参照プロックの中心間の距離 L r は、
L r = ( ( X 2 — 1 ) X ( 2 — 1 ) + ( y 2 — y 1 ) X ( y 2—
y 1 ) ) 1 / 2 となり、 拡大縮小率 Rは、
R = L r / L m
で求められる。
次に回転量について求める。
マッチングブロックの中心を通る直 の傾き Θ mは、
0 m = a r c t a n ( Ύ 2 ― y 1 ) / ( x 2 ― x 1 ' ) )
(但し、 x 2, = x 1 ' の時は θ ιη= πノ 2 ) 、
参照ブロックの中心を通る直線の傾き 0 rは、
6 r = a r c t a n ( ( y 2— y 1 ) / ( x 2— x 1 ) )
(但し、 x 2 = x 1の時は Θ r = π / 2 ) 、
で求められる。 なお、 a r c t a nは、 t a nの逆関数とする。
これより、 回転量 0は、
θ = Θ r— Θ m
で求められる。
最後に平行移動量であるが、 これは対応するプロック同士の中心位置 が等しく なればよいので、 例えば、 ( X 1 ' 、 y 1 ' ) と ( X 1、 y 1 ) が等しくなるようにすると、 平行移動量 (L x、 L y ) は、
、L x、 L y ) := 、 x l ― x l、 y l — y 1 )
となる。 回転量と拡大縮小量は、 どこを中心にしても良いので、 ここで は平行移動で一致する点、 すなわち対応するプロックの中心を回転中心 拡大縮小中心とすることにする。
従って、 探索画像中の任意の点 (x, , y ' ) を補正された点 (X " y " ) に変換する変換式は、 x " = R X ( c o s θ X ( x ' - x 1 ' ) — s i n θ X ( y ' - y 1 ' ) )
+ x 1
y " = R X ( s i n θ X ( x ' - 1 ' ) + c o s θ X ( y, 一 y 1 ' ) )
+ y 1
となる。 回転量、 拡大縮小量、 平行移動量と述べたが、 正確にはここで は、 Θ 、 R, ( 1 、 y 1 ) 、 ( 1 ' 、 y 1 ' ) のパラメ一タを求 めることになる。 なお、 補正量 Z変換式の表し方は、 これに限定される 訳ではなく、 その他の表し方でもよい。
この変換式は、 探索画像上の点 ( X ' , y ' ) を補正画像上の点 ( x " , y " ) に変換するものだが、 補正画像上の点 (X " , y " ) は、 参照画像に (背景部分が) 重なるよ うになるのだから、 意味的には、 探 索画像から参照画像への (背景部分が重なるような) 変換とみなせる。 従って、 この変換式を探索画像上の点 ( X s , Y s ) を参照画像上の点 ( X r , Y r ) への変換関数 F s r、
( X r, Y r ) = F s r ( X s , Y s )
と表現することにする。
なお、 先の式は逆に捕正された点 (X " , y " ) から探索画像中の任 意の点 ( X, , y ' ) への変換式、
x , = ( 1 / R ) X ( c o s θ X ( X " - X 1 ) + s i η θ X { y — y 1
) ) + x 1 '
y , = ( 1 / R ) X ( s i n θ X ( x " - 1 ) — s i n θ ( y " ~ y 1
) ) + y 1 '
にも変形できる。 これも変換関数 F r sで表せば、
(X s , Y s ) = F r s (X r , Y r )
となる。 変換関数 F r sは変換関数 F s rの逆変換関数とも言う。
図 6 ( a ) 、 図 7 ( a ) 、 図 8 ( a ) の例では回転や拡大縮小はなく . 単なる平行移動だけであるが、 詳細は後で図 6 ( c ) 、 図 8 ( c ) で説 明する。
以上の S 4— 1から S 4— 4の処理で、 図 5の S 4の背景補正量算出 の処理が行われる。
図 1 7は、 図 5の S 5の処理、 すなわち背景画像および第 2被写体画 像の補正画像を生成し、 第 1被写体画像との差分画像を生成する処理の 一方法を説明するフローチャー ト図である。
S 4で算出した補正量の説明では、 背景画像と第 1被写体画像、 背景 画像と第 2被写体画像との間の補正量を算出した。
変換式の形で書けば、 背景画像上の点を (X b , Y b ) 、 第 1被写体 画像上の点を (X I , Y 1 ) 、 第 2被写体画像上の点を (X 2 , Y 2 ) と して、
(X I , Y 1 ) = F 1 (X b , Y b )
(X b , Y b ) = F 1 b (X I , Y 1 )
(X 2 , Y 2 ) = F b 2 (X b , Y b )
(X b , Y b ) = F 2 b (X 2 , Y 2 )
が求まったことになる。 但し、 F b lは、 (X b, Y b ) 力 ら (X I , Y 1 ) への変換関数、 F i bはその逆変換関数、 F b 2は、 (X b, Y b ) から (X 2, Y 2 ) への変換関数、 F 2 bはその逆変換関数である。
3つの画像のうち 2つの画像間の変換関数 (補正量) を求めたので、 3つの画像のうちのいずれの 2画像も相互に変換可能ということになる。 従って、 捕正を行う際、 どの画像に合わせて補正を行うかが問題となる。 ここでは後の処理の効率も考えて、 第 1被写体画像、 すなわち第 1 Z第
2被写体画像の内、 先に撮影した被写体画像を基準画像とし、 それ以外 の背景画像、 第 2被写体画像を第 1被写体画像に背景部分が重なるよう に補正することにする。
例えば、 被写体同士に重なりがあるなどの理由で撮影し直す場合を考 える。 第 1 Z第 2被写体画像をこの順に撮影したとし、 第 1被写体画像 を基準画像にしたとすると、 被写体同士に重なりがある場合には、 第 2 被写体画像を撮影し直すことになる。 このとき、 第 1被写体画像と、 第 1被写体画像を基準画像と して捕正した背景画像とは、 撮影し直す必要 が無く、 そのまま合成画像の作成に使う ことができる。
これに対し、 後から撮影した第 2被写体画像を基準画像とすると、 被 写体同士に重なりがある場合に、 第 2被写体画像を撮影し直すことにな れば、 当然、 第 2被写体画像を基準に補正した第 1被写体画像および背 景画像の補正処理が無駄となり、 それぞれを再補正しなければならなレ、。
このよ う に、 第 1被写体画像と第 2被写体画像のうち、 先に撮影した 方を基準画像とすることで、 撮影し直しを繰り返す場合に、 処理量 ' 処 理時間を減らすことができるという効果が出てく る。
第 2被写体画像から第 1被写体画像への変換関数 F 2 1は、 上の変換 式を組み合わせて、
( X I , Y 1 ) = F 2 1 ( X 2 , Y 2 ) = F b 1 ( F 2 b ( X 2 , Y 2 ) )
となる。 逆変換関数 F 1 2も同様の考え方で求められる。
P 4 0を経た S 5— 1では、 捕正画像生成手段 5が、 背景補正量算出 手段 4 ( S 4 ) で得られる補正量を使って、 背景画像を第 1被写体画像 に背景部分が重なるよ うに補正した画像を生成し、 S 5— 2 へ処理が進 む。 なお、 ここで生成される補正された背景画像を 「捕正背景画像」 (図 6 ( c ) 参照) と呼ぶことにする。
補正には、 変換関数 F b 1 あるいは逆変換関数 F 1 を使えばよい。 一般に、 きれいな変換画像を生成する為には、 変換画像 (ここでは補正 背景画像) の画素位置に対応する元画像 (ここでは背景画像) の画素位 置を求め、 その画素位置から変換画像の画素値を求める。 この時、 使用 する変換関数は F 1 bになる。
また、 一般に求めた元画像の画素位置は整数値とはならないので、 そ のままでは求めた元画像の画素位置の画素値は求められない。 そこで、 通常は何らかの補間を行う。 例えば最も一般的な手法と して、 求めた元 画像の画素位置の周囲の整数値の画素位置の 4画素から一次捕間で求め る手法がある。 一次補間法に関しては、 一般的な画像処理の本など (例 えば、 森北出版 : 安居院猛、 中嶋正之共著 「画像情報処理」 の P 5 4 ) に載っているので、 ここでは詳しい説明を省略する。
図 6 ( c ) は、 図 6 ( a ) の背景画像と図 7 ( a ) の第 1被写体画像 とから、 背景画像が第 1被写体画像の背景部分に重なるように生成した 補正背景画像の例である。 この例での補正は平行移動だけである。 捕正 の様子が分かるよ うに、 図 6 ( a ) の背景画像の範囲を点線で示してあ る。 図 6 ( a ) の背景画像よりフレーム枠全体が少し左に移動している。 o
6 6
補正の結果、 対応する背景画像が存在しない部分が出てく る。 例えば、 図 6 ( c ) の左端の点線と実線の間の部分は、 図 6 ( a ) の背景画像に は存在しない部分なので、 抜けている。 これは、 下の道路を示す水平線 が左端までいかずに途切れているのでも分かる。 その部分は、 S 5— .2 で説明するマスク画像を使って除外するので適当な画素値のままと して おいても問題はない。
S 5— 2では、 捕正画像生成手段 5が、 補正背景画像のマスク画像を 生成して、 S 5— 3へ処理が進む。 マスク画像は、 補正画像を生成する際、 補正画像上の各画素に対応す るオリジナル画像上の画素位置が先に説明した式で求められるが、 その 画素位置がオリジナル画像の範囲に収まっているかどうかで判断して、 収まっていればマスク部分と して補正画像上の対応する画素の画素値を 例えば 0 (黒) にし、 収まっていなければ例えば 2 5 5 (白) にすれば よい。 マスク部分の画素値は 0、 2 5 5に限らず自由に決めてよいが、
L 5 以降では、 0 (黒) 、 2 5 5 (白) で説明する。
図 6 ( d ) は、 図 6 ( c ) のマスク画像の例である。 実線のフレーム 枠中の黒く塗りつぶされた範囲がマスク部分である。 このマスク部分は、 補正された画像中でオリ ジナルの画像 (補正前の画像) が画素を持って いる範囲を示している。 従って、 図 6 ( d ) では、 対応する背景画像が 存在しない左端部分がマスク部分とはなっておらず、 白くなっている。
S 5— 3では、 差分画像生成手段 6が、 第 1被写体画像と、 補正画像 生成手段 5 ( S 5 - 1 ) から得られる補正背景画像とそのマスク画像と を用いて、 第 1被写体画像と補正背景画像との差分画像を生成して S 5 一 4へ処理が進む。 なお、 こ こで生成される差分画像を 「第 1被写体差 分画像」 と呼ぶことにする。
差分画像を生成するには、 ある点 (x、 y ) のマスク画像上の点の画 素値が 0かどうかを見る。 0 (黒) ならば補正背景画像上に補正された 画素が存在するはずなので、 差分画像上の点 ( x、 y ) の画素値 P d ( X、 y ) は、
P d ( x、 y ) = I P 1 ( x、 y ) 一 P f b ( x、 y ) | より、 第 1被写体画像上の画素値 P 1 ( x、 y ) と補正背景画像上の画 素値 P f b ( x、 y ) の差の絶対値とする。
ある点 ( x、 y ) のマスク画像上の点の画素値が 0 (黒) でないなら ば、
P d ( X、 y ) = 0
とする。
これらの処理を、 点 (x、 y ) を差分画像の左上から右下まですべて の画素について繰り返せばよい。
図 9 ( a ) は、 図 7 ( a ) の第 1被写体画像と図 6 ( c ) の補正背景 画像、 図 6 ( d ) のマスク画像から生成された第 1被写体差分画像の例 である。 人物 ( 1 ) の領域以外の所は背景が一致している、 あるいはマ スク範囲外と して差分が 0 となり、 主に人物 ( 1 ) の領域内が、 人物 ( 1 ) の画像と背景の画像が交じり合ったような画像となっている。 通常、 S 4での補正量の算出の誤差や、 補正画像生成の捕間処理など の誤差、 背景部分の画像自体の撮影時間の差による微妙な変化などによ つて、 人物 ( 1 ) の領域以外にも小さな差分部分は出てく る。 通常は数 画素程度の大きさで、 差もあまり大きくないことが多い。 図 9 ( a ) で も人物 ( 1 ) の領域の周辺に白い部分がいくつか出てきている。 68
S 5 — 4では、 補正画像生成手段 5が、 背景補正量算出手段 4 ( S 4 ) で得られる補正量を使って、 第 2被写体画像を第 1被写体画像に背 景部分が重なるように補正した画像を生成し、 S 5— 4へ処理が進む。 補正には、 変換関数 F 2 1あるいは逆変換関数 F 1 2を使えばよい。 极 う画像や変換関数が異なる以外は S 5— 1の処理と同様である。 なお、 ここで生成される補正された第 2被写体画像を 「補正第 2被写体画像」 と呼ぶことにする。
図 8 ( c ) は、 図 8 ( a ) の第 2被写体画像と図 7 ( a ) の第 1被写 体画像から生成した補正第 2被写体画像の例である。 この例での補正も 平行移動だけである。 補正の様子が分かるよ うに、 図 8 ( a ) の第 2被 写体画像の範囲を点線で示してある。 図 6 ( a ) の背景画像よりフレー ム枠全体が少し右下に移動している。
なお、 図 1 8 ( a ) は補正に回転が必要な場合の第 2被写体画像の例 である。 背景画像、 第 1被写体画像は、 図 6 ( a ) 、 図 7 ( a ) と同じ とする。 画面全体が図 8 ( a ) と比べて少し左回りに回転している。 図 1 8 ( b ) は、 図 1 8 ( a ) の第 2被写体画像と図 6 ( a ) の背景 画像でブロックマッチングを行った結果である。 ブロックは回転などが あっても、 回転量やブロックの大きさがそれほど大きくなければ、 プロ ック内での画像変化は少ないので、 回転に追従して正確なマツチングが ある程度可能である。
図 1 8 ( c ) は、 図 1 8 ( b ) のブロックマッチング結果をもとに背 景補正量を算出し、 補正した第 2被写体画像である。 図 7 ( a ) の第 1 被写体画像と背景部分が重なるようになり、 回転が補正されているのが 分かる。 補正の様子がわかるよ うに、 図 1 8 ( a ) の画像枠を点線で示 してある。
S 5 — 5では、 補正画像生成手段 5が、 補正第 2被写体画像のマスク 画像を生成して、 S 5— 6へ処理が進む。 マスク画像の生成の仕方に関 しては、 S 5— 2 と同様であ'る。 図 8 ( d ) は、 図 8 ( c ) のマスク画 像の例である。 図 1 8 ( b ) の場合のマスク画像は図 1 8 ( d ) のよう になる。
なお、 拡大縮小や回転の補正量がある場合でも、 S 5— 4、 S 5 - 5 で補正やマスク画像生成を行ってしまえば、 後の処理は手順と しては変 わりないので、 以降の説明では、 第 2被写体画像は図 1 8 ( a ) は使わ ず、 図 8 ( a ) のものを使う。
S 5 - 6では、 差分画像生成手段 6が、 補正画像生成手段 5 ( S 5— 1 ) から得られる補正背景画像、 捕正画像生成手段 5 ( S 5 - 2 ) から 得られる補正背景画像のマスク画像、 補正画像生成手段 5 ( S 5— 4 ) から得られる補正第 2被写体画像、 補正画像生成手段 5 ( S 5— 5 ) か ら得られる補正第 2被写体画像のマスク画像を用いて、 補正第 2被写体 画像と補正背景画像との差分画像を生成して P 5 0へ処理が抜ける。 な お、 こ こで生成される差分画像を 「第 2被写体差分画像」 (図 1 0 ( a ) 参照) と呼ぶことにする。
差分画像の生成の仕方に関しては、 基本的には S 5— 3 と同様である が、 補正背景画像のマスク画像と補正第 2被写体画像のマスク画像のあ る点 ( x、 y ) の画素値がどちらも 0 (黒) の時だけ画像の差分を取る 点で、 マスク画像の処理が少し異なる。
図 1 0 ( a ) は、 図 6 ( c ) の捕正背景画像と図 8 ( c ) の補正第 2 被写体画像から生成された第 2被写体差分画像の例である。 第 1被写体 が第 2被写体に変わっている以外は、 図 9 ( a ) と同様の状態になって いる。
以上の S 5— 1から S 5— 6の処理で、 図 5の S 5の差分画像生成の 処理が行える。
図 1 9は、 図 5の S 6の処理、 すなわち被写体領域を抽出する処理の 一方法を説明するフローチャー ト図である。
5 0を経た 3 6 — 1では、 被写体領域抽出手段 7が、 差分画像生成 手段 6 ( S 6 ) から得られる差分画像から、 「ラベリ ング画像」 ( 「ラ ベリ ング画像」 の意味については後で説明する) を生成して、 S 6— 2 へ処理が進む。 差分画像は、 第 1被写体差分画像と第 2被写体差分画像 の二つあるので、 ラベリング画像もそれぞれ作成される。 どちらもラベ リング画像を生成する処理手順は一緒なので、 以降では 「差分画像」 と いう言葉に 「第 1被写体差分画像」 、 「第 2被写体差分画像」 が含まれ るとして説明する。
まず準備として、 差分画像から 2値画像を生成する。 2値画像の生成 方法も色々考えられるが、 例えば、 差分画像中の各画素値を所定の閾値 と比較して、 閾値より大きければ黒、 以下ならば白、 などと してやれば よい。 差分画像が R, G, Bの画素値からなる場合は、 R', G, Bの画 素値を足した値と閾値を比較すればよい。
図 9 ( b ) は、 図 9 ( a ) の第 1被写体差分画像から生成した 2値画 像の例である。 黒い領域が領域 1 1 0から 1 1 5の 6つ存在し、 大きな 人型の領域 1 1 2以外は小さな領域である。 同様に、 図 1 0 ( b ) は、 図 1 0 ( a ) の第 2被写体差分画像から生成した 2値画像の例である。 黒い領域が領域 1 2 0から 1 2 5の 6つ存在し、 大きな人型の領域 1 2 2以外は小さな領域である。
次に、 生成した 2値画像からラベリ ング画像を生成するが、 一般に 「ラベリ ング画像」 とは、 2値画像中の白画素同士あるいは黒画素同士 が連結している塊を見つけ、 その塊に番号 ( 「ラベリ ング値」 と以降、 呼ぶ) を振っていく処理により生成される画像である。 多くの場合、 出 力されるラベリング画像は多値のモノクロ画像であり、 各塊の領域の画 素値は全て振られたラベリング値になっている。
なお、 同じラベリ ング値を持つ画素の領域を 「ラベル領域」 と以降呼 ぶことにする。 連結している塊を見つけ、 その塊にラベリング値を振つ ていく処理手順の詳細については、 一般的な画像処理の本など (例えば、 昭晃堂 : 昭和 6 2年発行 「画像処理ハンドブック」 P 3 1 8 ) に載って いるので、 ここでは省略し、 処理結果例を示す。
2値画像とラベリ ング画像とは、 2値か多値の違いなので、 ラベリ ン グ面像例は図 9 ( b ) と図 1 0 ( b ) で説明する。 図 9 ( b ) の領域 1 1 0から 1 1 5の番号の後に 「 1 1 0 ( 1 ) 」 などと括弧書きで番号が ついているが、 これが各領域のラベリ ング値である。 図 1 0 ( b ) につ いても同様である。 これ以外の領域はラベリ ング値 0が捩られていると する。
なお、 ラベリ ング画像図 9 ( b ) 、 図 1 0 ( b ) は、 紙面上で多値画 像を図示するのが難しいので 2値画像のように示してあるが、 実際はラ ベリング値による多値画像になっているので、 表示する必要はないが実 際に画像と して表示した場合は図 9 ( b ) と図 1 0 ( b ) とは異なる見 え方をする。
S 6— 2では、 被写体領域抽出手段 7が、 S 6— 1で得られるラベリ ング画像中の 「ノイズ」 的な領域を除去して、 S 6 — 3 へ処理が進む。
「ノイズ」 とは目的のデータ以外の部分を一般に指し、 ここでは人型の 領域以外の領域を指す。
ノイズ除去にも様々な方法があるが、 簡単な方法と して、 例えばある 閾値以下の面積のラベル領域は除く という方法がある。 これには、 まず 各ラベル領域の面積を求める。 面積を求めるには、 全画素を走査し、 あ る特定のラベリ ング値を持つ画素がいくつ存在するか数えればよい。 全 ラベリ ング値について面積 (画素数) を求めたら、 それらの内、 所定の 閾値以下の面積 (画素数) のラベル領域は除去する。 除去処理は、 具体 的には、 そのラベル領域をラベリ ング値 0にしてしま うカ 新たなラベ リング画像を作成し、 そこにノイズ以外のラベル領域をコピーする、 で もよい。
図 9 ( c ) は、 図 9 ( ) のラベリング画像からノイズ除去した結果 である。 人型の領域 1 1 2以外はノイズと して除去されてしまっている。 同様に、 図 1 0 ( c ) は、 図 1 0 ( b ) のラベリ ング画像からノィズ除 去した結果である。 人型の領域 1 2 2以外はノイズと して除去されてし まっている。
S 6— 3では、 被写体領域抽出手段 7が、 S 6— 2で得られるノイズ 除去されたラベリ ング画像から被写体の領域を抽出して、 P 6 0 へ処理 が抜ける。
被写体の領域を画像処理だけで完全に正確に抽出することは一般に難 しく、 人間の知識や人工知能的な高度な処理が一般に必要とされる。 領 域を抽出する手法の 1つである 「スネーク」 などもあるが、 完璧ではな い。 しかし、 重なり検出処理や合成処理に使える程度の領域を推定する ことはある程度できる。
例えば、 第 1や第 2の被写体の人数がプログラム中などに固定値また は変数と して設定されているならば、 ノイズ除去されたラベリング画像 中からラベル領域を面積が大きい順に人数分、 抽出すれば良い。 あるい は所定の閾値以上の面積をもつ領域を全て被写体領域などとしてもよい c また、 完全自動化が難しいなら、 どの領域が被写体領域であるかを、 タブレツ トゃマウスなどの入力手段を使ってユーザに指定してもらう方 法も考えられる。 指定方法も、 被写体領域の輪郭まで指定してもらう方 法と、 輪郭はラベリ ング画像の各ラベル領域の輪郭を使い、 どのラベル 領域が被写体領域であるかどうかを指定してもら う方法などが考えられ る。
ここでは、 所定の閾値以上の面積をもつ領域を全て被写体領域とする ことにするが、 図 9 ( c ) や図 1 0 ( c ) では、 既にノィズ除去の段階 で大きな領域が一つになってしまっているので、 処理結果図 9 ( d ) 、 図 1 0 ( d ) は、 図 9 ( c ) 、 図 1 0 ( c ) と見た目は同じである。 また、 図 9 ( b ) や図 1 0 ( b ) ではたまたま人型の領域がうまく一 つのラベル領域となっているが、 画像によっては、 一人の被写体であつ ても複数のラベル領域に分かれてしまうことがある。 例えば、 被写体領 域中の真中辺りの画素が、 背景と似たような色や明るさの画素の場合、 差分画像中のその部分の画素値が小さいので、 被写体領域の真中辺りが 背景と認識されてしまい、 被写体領域が上下や左右に分断されて抽出さ れてしまうことがある。 その場合、 後の被写体の重なり検出や合成処理 などでうまく処理できない場合が出てく る可能性がある。
そこで、 ラベリ ング画像のラベル領域を膨張させて、 距離的に近いラ ベル領域を同じラベル镇域と して統合してしまう処理を入れるという方 法もある。 さらに銃合にスネークを利用する方法も考えられる。 膨張や スネークの処理手順の詳細については、 一般的な画像処理の本など (例 えば、 昭晃堂 : 昭和 6 2年発行 「画像処理ハンドブック」 P 3 2 0、 ま たは K a s s A . , e t a 1 . , "S n a k e s : A c t i v e C o n t o u r M o d e l s ", I n t . J . C o m p u t . V i s i o n , p p . 3 2 1 - 3 3 1 ( 1 9 8 8 ) ) に載っているので、 ここでは省略 する。
また、 距離的に近いラベル領域の統合に使わなくても、 重なりがある ことを見逃す危険性を減らすことに使う為に、 抽出した被写体領域を一 定量膨張させるという方法もある。
なお、 ここでは、 膨張や統合は特に行わない処理例で説明している。 以上の S 6— 1から S 6— 3の処理で、 図 5の S 6の被写体領域抽出 処理が行える。
次に、 図 5の S 7の処理の詳細の一例について説明する。
S 7では、 重なり検出手段 8が、 被写体領域抽出手段 7 ( S 6 ) から 得られる第 1被写体領域、 第 2被写体領域について、 両者の領域に重な りがあるかどうか検出し、 重なりがある場合は重なる領域を抽出する。 しかし、 実際のところ、 重なりがあるかどうかを検出するには、 重な る領域を抽出し、 重なる領域が存在するかどうかを検出するのが簡単な ので、 まずは重なる領域を抽出する。
その手法と して、 ある画素の位置 (x、 y ) が、 第 1被写体領域と第 2被写体領域の両方に属しているかどうかを判断し、 両方に属していれ ばその画素値を例えば 0 (黒) 、 両方に属していなければ 2 5 5 (白) などと し、 位置 (x、 y ) を全画素位置について走査すれば、 結果的に 重なり画像が生成できる。
ある画素の位置 (x、 y ) 、 第 1被写体領域と第 2被写体領域の両 方に属しているかどうかを判断するには、 S 6から得られる第 1被写体 領域を含む画像と第 2被写体領域を含む画像中の ( x、 y ) 位置の画素 を見て、 両方とも被写体領域の画素であるかどうか (例えば、 先の例で はラベリ ング値 0でなければ被写体領域の画素) で判断できる。
生成される重なり画像中に 0 (黒) の画素値を持つ画素が存在するか どうかを見て、 存在すれば重なりが存在し、 無ければ重なりが存在しな いことになる。
なお、 重なり検出手段 8は、 重なりに関する情報という ことで、 重な りがあるかないかだけでなく、 重なっている領域についても出力する。 つまり、 生成した重なり画像も出力することになる。
図 9 ( c ) 、 図 1 0 ( c ) の例では、 重なりが無いので特に重なり画 像は示していないが、 この場合、 重なり検出手段 8は、 重なりが無いと 判断する。
重なりがある例を、 図 2 0 ( a ) の第 2被写体画像で説明する。 なお. 背景画像、 第 1被写体画像は、 図 6 ( a ) 、 図 7 ( a ) を使う とする。
図 2 0 ( b ) は、 図 2 0 ( a ) から生成した第 2被写体領域画像であ る。 第 2被写体領域 1 3 0は、 図 1 0 ( d ) の領域 1 2 2 と比べると、 少し左に寄っている。 図 2 0 ( b ) と図 9 ( d ) の第 1被写体領域画像 から作られる重なり画像が、 図 1 2である。 重なっている領域 1 3 1は 黒く塗りつぶされている。 重なり具合が分かりやすいように、 図 1 2で は第 1被写体領域 1 1 2 と第 2被写体領域 1 3 0を点線で示している (実際の重なり画像中にはこの点線は存在しない) 。 図 1 2の場合は、 重なり検出手段 8は、 重なりがあると判断する。
次に、 図 2 1は、 図 5の S 8の処理、 すなわち重なりに関する処理の 一方法を説明するフローチャー ト図である。 重なりに関する別の処理方 法に関しては、 後で図 2 2、 2 3、 2 4、 2 7を使って説明する。
P 7 0を経た S 8— 1では、 重なり警告手段 1 3が、 重なり検出手段 8 ( S 7 ) から得られる情報に基づいて重なりがあるかどうかを判断し、 重なりがある場合は S 8 A— 2へ進み、 無い場合は P 8 0へ処理が抜け る。
S 8 A— 2では、 重なり警告手段 1 3が、 第 1の被写体と第 2の被写 体とに重なりがあることをユーザ (撮影者) あるいは被写体あるいはそ の両方に警告して、 P 8 0へ処理が抜ける。
警告の通知の仕方としては色々考えられる。
例えば、 合成画像を利用して通知する場合、 重なり領域を目立つよう に合成画像に重ねて表示すればよい。 図 1 3 ( a ) 、 図 1 3 ( b ) はこ れを説明する例である。 二つの画像の違いは第 1被写体 (人物 ( 1 ) ) の画像合成方法の違いだけである。
図 1 3 ( a ) 、 図 1 3 ( b ) では、 図 1 2の重なり領域 1 3 1が、 合 成画像上に重ねて表示されている。 領域 1 3 1の部分の画素値を変更し て赤などの目立つ色で塗りつぶすと さらに良い。 あるいは、 領域 1 3 1 の領域やその輪郭等を点滅させて表示させても良い。
図 1 3 ( c ) は、 さらに文字で警告を行っている例である。 図 1 3 ( c ) の上の方に合成画像に重ねて警告ウィンドウを出し、 その中で 「被写体が重なっています ! 」 というメ ッセージを表示している。 これ も目立つよ うな配色にしたり、 点滅させたり してもよい。
これら合成画像に対する上書きは、 重なり警告手段 1 3 の指示により、 重ね画像生成手段 9に対して行っても良いし、 重ね画像表示手段 1 0に 対して行ってもよい。 警告ウインドゥを点滅などさせる場合は元の合成 画像を残しておく必要があるかもしれないので、 重ね画像表示手段 1 0 に対して、 例えば主記憶 7 4または外部記憶 7 5から警告ウインドウの データを間歇的に読み出して与える等して行った方がよい場合が多い。
これらの警告表示を図 3 ( a ) のモニター 1 4 1上に表示すれば、 撮 影しながら重なり状態を確認することができて、 撮影に便利である。 こ の時、 撮影者は被写体 (人物 ( 2 ) ) に対して、 「重なっているからも つと右の方に動いてくれ」 などと、 次に撮影した画像を第 2被写体画像 などと して使う場合に、 重なり状態を解消するよ うな指示を行う ことが できるとレヽぅ利点がある。
なお、 次に撮影した画像を第 2被写体画像などとして使う場合とは、 ユーザがメニューやシャッターボタ ン 1 4 3で第 2被写体画像の記録 (メモ リ書き込み) を指示する場合か、 先に説明したように、 第 2被写 体画像を動画的に撮影し補正重ね画像をほぼリアルタイムに表示する繰 り返し処理の専用モードになっている場合などが考えられる。
また、 図 3 ( a ) のモニター 1 4 1は撮影者の方を向いているが、 被 写体の方にモニターを向けることができる装置ならば、 重なり具合を被 写体も確認することができ、 撮影者に指示されなくても、 被写体が自発 的に重なりを解消するように動く こともできるようになる。 モニター 1 4 1 とは別のモニターを用意して、 それを被写体が見られるようにする のでもよい。 PC蘭画 08510
7 8
また、 先に専用モードと して説明したよ うに図 5の S 3から S 1 0の 処理を線り返すのならば、 現在の重なり状態がほぼリアルタイムで分か るので、 被写体の移動によって重なりが解消できたかどうかがほぼリァ ルタイムで分かり、 撮影が便利で効率よくできる。 図 5の S 3から S 1 0の処理は、 充分速い C P Uやロジック回路などを使えば、 それほど時 間は必要ない。 実使用上は、 1秒に 1回程度以上の速さの繰り返し処理 を実現できれば、 ほぼリアルタイムの表示と言って良い。 なお、 繰り返し処理の場合、 第 2被写体画像を更新しつづけるが、 S 5で差分画像を生成する際、 基準画像を第 1被写体画像にしたのは、 繰 り返し処理時に処理量を減らすことができる利点があるからである。 つ まり、 第 2被写体画像を基準画像にすると、 背景補正量の計算や差分画 像生成、 被写体領域検出などの処理を第 1被写体画像、 背景画像も含め て全て行わなければいけないが、 第 1被写体画像を基準画像にすると、 第 1被写体画像と背景画像間での間の処理は 1回で済み、 第 2被写体画 像に関連する処理だけを繰り返し行えばよいことになる。 また、 重なり領域を合成画像に重ねて表示した結果、 被写体同士の重 なり具合と合成画像のフレーム枠との関係を見て、 被写体がどう動いて も重なりが生じたり、 被写体がフレームァゥ トしてしまう と判断できれ ば、 もう一度、 第 1被写体画像や背景画像の撮影からやり直した方が良 いという判断を行うこともできるようになる。 また、 警告の通知の仕方と して、 図 3 ( a ) のランプ 1 4 2を点燈ぁ るいは点滅させることで知らせることもできる。 警告なので、 ランプの 色は赤やオレンジなどの色にしておく と分かりやすい。 ランプの点滅な どは一般にモニター 1 4 1に撮影者が注目 していなくても気づきやすい という利点がある。
また、 図 1 3 ( b ) のよ うな重なり領域を合成画像に重ねて表示せず. ランプだけで知らせてもよい。 この場合、 どのく らい重なっているかは すぐには分かり にくいが、 重なりがあるかないかだけ分かれば、 後は被 写体が移動するなどして警告通知が無く なるかどうかを見ていれば重な り の無い合成画像を得る という 目的は達せられるので、 ランプだけでも よい。 これによ り、 重なり部分を表示させる処理が省けるという利点が 出てく る。
なお、 重なり の面積を数字や棒グラフなどでモニター 1 4 1に表示し たり、 複数のランプの点燈制御や単独のランプの点滅間隔を重なり の面 積によって変えたりするなどすると、 重なり具合を別途知ることができ てさらによ 、。
また、 図 3 ( a ) にはないが、 モニター 1 4 1 とは別にファインダー のよ うな画像を確認できる別の手段がある場合、 そちらにモニター 1 4 1 と同じ警告通知を表示したり、 ファインダー内部にランプを組み込ん でおき、 通知する方法も考えられる。
また、 図 3 ( a ) 、 図 3 ( b ) では示していないが、 図 2のスピーカ 8 0を使って警告通知を行っても良い。 重なりがある場合に警告ブザー を鳴らしたり、 「重なっています」 などの音声を出力したり などして、 警告通知を行う。 この場合にもランプと同様の効果が期待できる。 スピ 一力を使う場合、 光と違って指向性があま り ないので、 一つのスピーカ で撮影者も被写体も両方重なり状態を知ることができるという利点があ る。
以上の S 8— 1 から S 8 A— 2の処理で、 図 5の S 8の重なり に関す る処理が行える。
図 2 2は、 図 5の S 8の処理、 すなわち重なり に関する処理の別の一 方法を説明するフローチャート図である。
P 7 0 を経た S 8— 1では、 シャッターチャンス通知手段 1 4が、 重 なり検出手段 8 ( S 7 ) から得られる情報に基づいて重なりがあるかど うかを判斬し、 重なりがある場合は P 8 0へ処理が抜け、 無い場合は S 8 B - 2へ処理が進む。
S 8 B— 2では、 シャッターチャンス通知手段 1 4が、 第 1の被写体 と第 2の被写体に重なりがないことをユーザ (撮影者) あるいは被写体 あるいはその両方に通知して、 P 8 0へ処理が抜ける。
この通知は、 実際には、 重なりが無いことを通知する という よ り、 重 なりがないことによる副次的な操作、 具体的には第 2の被写体を記録す るシャッターチャンスであることを通知するよ うな使われたかたが最も 一般的である。 その場合、 その通知は、 主に撮影者に対するものとなる。
シャッターチャンスの通知方法に関しては、 図 2 1で説明したよ うな 方法がほぼそのまま使える。 例えば、 図 1 3 ( c ) のメ ッセージを 「シ ャッターチヤンスです ! 」 などと変えるなどすればよレ、。 なお、 図 1 3 ( c ) の重なり部分は、 この時は存在しないので、 当然、 表示も不要で ある。 その他、 ランプ、 スピーカについても、 色や出力する音の内容な どは多少変わるが、 通知手法と しては同様に利用できる。
シャッターチャンスであることが分かれば、 撮影者はシャッターを切 ることで重なりのない状態で撮影/記録することができ、 また、 被写体 もシャッターを切られるかもしれない準備 (例えば目線の方向や顔の表 情など) を行う ことができるという利点が出てく る。 以上の S 8— 1から S 8 B— 2の処理で、 図 5の S 8の重なりに関す る処理が行える。
図 2 3は、 図 5の S 8の処理、 すなわち重なりに関する処理のさらに 別の一方法を説明するフローチャー ト図である。
P 7 0を経た S 8— 1では、 自動シャッター手段 1 5が、 重なり検出 手段 8 ( S 7 ) から得られる情報に基づいて重なりがあるかどうかを判 断し、 重なりがある場合は P 8 0へ処理が抜け、 無い場合は S 8 C— 2 へ処理が進む。
S 8 C— 2では、 自動シャッター手段 1 5が、 シャッターボタンが押 されているかどうかを判断し、 押されていれば S 8 C— 3へ進み、 押さ れていなければ P 8 0へ処理が抜ける。
S 8 C— 3では、 自動シャツター手段 1 5が、 第 2被写体画像の記録 を第 2被写体画像取得手段 3へ指示して、 P 8 0へ処理が抜ける。 第 2 被写体画像取得手段 3は、 指示に従い、 撮影画像を主記憶 7 4、 外部記 憶 7 5などに記録する。
これによつて、 被写体同士が重なっていない時にシャッターボタンが 押されていれば、 自動的に撮影画像を記録することができるようになる という効果が出てく る。 同時に、 誤って重なっている状態で撮影画像を 記録してしまうことを防ぐ効果も出てく る。
実際の使われ方と しては、 被写体の様子などを見て、 今なら撮影画像 を記録しても良いと思ったら撮影者がシャッターボタンを押すが、 その 時点で必ずしも記録される訳ではなく、 重なりがある場合は記録されな い。 すなわち、 自動シャツター手段 1 5が、 重なりがあると判断した場 合には、 撮影者がシャッターポタンを押しても第 2被写体画像取得手段 8510
8 2
3による記録動作が行われないよ うに、 第 2被写体画像の記録を禁止す る。
なお、 記録されない場合は、 その旨を表示やランプ、 スピーカなどの 通知手段で撮影者などに知らせた方が、 シャッターを押したが撮影され ていないことが分かってよい。
そして、 被写体が動くなどして、 重なりがない状態になった時に、 再 度シャッターポタンが押されれば、 今度は記録される。 記録されたこと が分かるように、 表示やランプ、 スピーカなどの通知手段で撮影者など に知らせるとよい。
シャッターボタンを毎度押すのではなく、 押しつぱなしにするならば、 重なっている状態から重なりがなく なった瞬間に自動的に記録されるこ とになる。 但し、 重なりがなくなった瞬間だとまだ被写体が静止してお らず撮影画像がぶれてしまったり、 被写体が撮影される状態 (被写体が 他所を向いている時など) になっていない場合があるので、 その場合は 自動的に記録するまでに少し時間をあけると良い。
以上の S 8 — 1から S 8 C一 3の処理で、 図 5の S 8の重なりに関す る処理が行える。
図 2 4は、 図 5の S 8の処理、 すなわち重なりに関する処理のさらに 別の一方法を説明するフローチャート図である。
P 7 0を経た S 8— 1では、 重なり回避方法算出手段 1 1が、 重なり 検出手段 8 ( S 7 ) から得られる情報に基づいて重なりがあるかどうか を判断し、 重なりがある場合は S 8 D— 2へ進み、 無い場合は P 8 0へ 処理が抜ける。
S 8 D— 2では、 重なり回避方法算出手段 1 1が、 第 1、 第 2被写体 領域の重心位置をそれぞれ計算して、 S 8 D— 3へ処理が進む。 重心位 置とは、 簡単に言えばその領域の中心位置であり、 正確に言えば、 重心 位置からある画素までの距離と方向をべク トルし、 全ての領域内の画素 のべク トルの和が 0 となる状態である。 重心位置の求め方についても、 一般的な画像処理の本などに载つているので、 ここでは割愛する。
S 8 D— 3では、 重なり回避方法算出手段 1 1が、 S 8 D _ 2で求め た第 1、 第 2被写体領域の重心位置から、 第 2の被写体が移動する方向 について、 両者の重心位置の間の距離が最も離れる方向 (第 1被写体領 域の重心位置から第 2被写体領域の重心位置へ向かう方向) を求めて、 S 8 D - へ処理が進む。
例えば、 S 8 D— 2で得られた第 1被写体領域の重心位置が (X g l 、 Y g 1 ) 、 第 2被写体領域の重心位置が (X g 2、 Y g 2 ) の時、 最も 距離が離れる方向は、 ベタ トル形式で表現すれば
(X g 2— X g l、 Y g 2 - Y g 1 )
となる。
伹し、 X g 2 =X g l、 Y g 2 = Y g 1の時は、 第 1の被写体と第 2 の被写体の重心位置が重なっているので、 どの方向でもよレ、。
図 2 5は、 図 1 2の重なり状態で最も重心位置が離れる方向を求めた 例である。 第 1被写体領域 1 1 2の重心位置 1 3 2 と第 2被写体領域 1 3 0の重心位置 1 3 3 との間で最も重心位置が離れる方向は、 重心位置 1 3 2から重心位置 1 3 3へ向かう矢印 1 3 4が示す方向である。
S 8 D - では、 重なり回避方法通知手段 1 2が、 S 8 D— 3で求め られる方向を、 重なりを少なくする回避方法と してユーザあるいは被写 体あるいは両方に通知して、 P 8 0へ処理が抜ける。 84
図 2 6 ( a ) は、 回避方法をモニター 1 4 1上で通知している状態を 示す説明図である。 S 8 D— 3で図 2 5のように右方向に第 2の被写体 が動いた方が重なりが少なくなることが求められたので、 第 2の被写体 を右方向へ動かすことを示す矢印を合成画像に重ねて表示している。 こ の矢印も、 既に説明した重なり部分の表示のように、 色や点滅などで目 立つように表示した方が分かりやすくてよい。
重なり状態を示すだけだと、 どのように被写体が動いたら重なりが少 なくなるかをすぐに判断しにくいが、 被写体の移動方向を矢印などで示 すことで、 どのように動いたら良いかが非常に分かりやすくなるという 利点が出てく る。
なお、 矢印の方向の角度 0 dは、 S 8 D— 3で求められる方向べタ ト ルより、
Θ d = a r c t a n ( (Y g 2 - Y g 1 ) / (X g 2 - X g 1 ) ).. ( 0≠ X g 2 - X g l )
Θ d = π / 2 N ( 0 =X g 2— X g l、 0≤Y g 2 -Y g 1 ) Θ d = - π / 2 , ( 0 =X g 2— X g l、 0 >Y g 2—Y g l ) で求められる。
ここで表示する矢印は方向が重要なので、 S 8 D— 3で求めた方向べ ク トルの大きさは無視してよい。 但し、 表示する矢印の長さに何か意味 を持たせてもよい。 例えば、 被写体同士が重なっている面積が分かるの ならば、 矢印の長さや太さをその面積に比例させてもよい。 重なりが大 きレ、ほど、 矢印も長く (あるいは太く) なり、 重なり具合が直感的に分 かりやすくなる。 また矢印が大きいので撮影者なども重なりを無く さな レ、といけないという気になりやすいという効果が出てく る。 なお、 S 8 D— 3で求められる方向はあらゆる方向を取れるが、 被写 体の動きを指示するのにそれほど正確な方向は必要無いので、 求めた 0 dに最も近い方向を、 上下左右の 4方向、 あるいは斜め方向も加えた 8 方向の中から選ぶなどしてもよい。
4方向や 8方向に絞った場合、 言葉でも通知しやすくなるので、 図 2
6 ( a ) の上のメ ッセージのように、 「右方向に被写体が動いた方が、 重なりが無く なります」 と通知してもよレ、。 また、 これらのメ ッセージ をスピーカで流してもよい。
また、 矢印やメ ッセージでなく、 ランプを使って移動方向を通知して もよい。 その場合、 上下左右の 4方向や 8方向などの方向を示すことが できるように複数の方向ランプが必要になる場合もある。 例えば、 モニ ター 1 4 1の周囲に方向ランプを配置してもよい。
また、 これらの通知は重なり状態の通知などと同様、 撮影者だけでな く、 被写体に通知してもよい。 その効果については、 既に説明したもの と同様である。
なお、 ここでは被写体の重心位置を利用したが、 これ以外にも様々な 方法が考えられる。 例えば、 被写体領域の画素値を X軸や Y軸に投影し て、 各軸方向のどの辺に位置するかをおおまかに求める。 投影結果から. 重心位置や重なり範囲を求めることができるので、 それらから、 上下左 右のどちらの方向に移動すればよいかを求めることもできる。 上下方向 と左右方向を組み合わせれば、 斜め方向の移動方向を求めることもでき る。
以上の S 8 — 1から S 8 D— 4の処理で、 図 5の S 8の重なりに関す る処理が行える。 8 6
図 2 7は、 図 5の S 8の処理、 すなわち重なりに関する処理のさらに 別の一方法を説明するフローチャート図である。
P 7 0を経た S 8 — 1では、 重なり回避方法算出手段 1 1が、 重なり 検出手段 8 ( S 7 ) から得られる情報に基づいて重なりがあるかどうか を判断し、 重なりがある場合は S 8 E— 2へ進み、 無い場合は P 8 0 へ 処理が抜ける。
S 8 E— 2では、 重なり回避方法算出手段 1 1が、 第 2の被写体を各 方向に動かした時の重なり量を予測して、 S 8 E— 3 へ処理が進む。
まず、 現在、 図 1 2の第 1被写体領域 1 1 2、 第 2被写体領域 1 3 0 の状態であり、 重なりあう領域は領域 1 3 1であるとする。 この状態か ら、 第 2被写体領域 1 3 0を上下左右に所定量、 動かしてみる。
図 2 8 ( a ) は、 点線で表示されている第 2被写体領域 1 3 0を左に 動かして、 黒く塗りつぶされている領域 1 5 0に動かしてみた状態を説 明する図である。 同様に、 図 2 8 ( b ) は右に動かしてみた状態、 図 2 8 ( c ) は上に動かしてみた状態、 図 2 8 ( d ) は下に動かしてみた状 態を説明する図である。
これらの移動した第 2被写体領域と第 1被写体領域の重なりを求めた 重なり画像が、 図 2 9 ( a ) から図 2 9 ( d ) である。 重なりのある領 域は黒く塗りつぶして示してある。 移動した第 2被写体領域と第 1被写 体領域は点線で示してある。
図 2 9 ( a ) の重なり領域は、 図 1 2の重なり領域と比べて増えてし まっている。 図 2 9 ( b ) の重なり領域は、 無く なつている。 図 2 9 ( c ) と図 2 9 ( d ) の重なり領域は、 図 1 2の重なり領域 1 3 1 とあ まり変わらない。 なお、 ここでは 4方向で重なり量を予想したが、 必要とする精度ゃ処 理量などを考えて、 それ以外の方向数にしてももちろん構わない。 また. 移動量も所定の値としていたが、 これを 1方向あたり、 複数の値で重な り量を求めるという方法も考えられる。
S 8 E— 3では、 重なり回避方法算出手段 1 1が、 S 8 E— 2で得ら れた各方向に動かした時の重なり量の予測のうち、 最も重なり量が少な くなる方向を抽出して、 S 8 E— 4 へ処理が進む。
なお、 S 8 E— 2で説明したような手法を用いて、 各方向の移動量を いろいろ変えて重なり量を求める場合、 それぞれ別個に考えて最も少な い重なりの方向や位置を選ぶ方法も考えられるし、 その方向の全ての移 動量の重なり量の和で比較したり、 あるいは平均的な重なり量で比較し たり、 といった方法も考えられる。
図 2 9 ( a ) から図 2 9 ( d ) の中で最も重なりが少ないのは図 2 9 ( b ) なので、 第 2の被写体を右方向に動かした方が ( 4方向のう ち で) 最も重なりが少なくなると予想される。
S 8 E— 4では、 重なり回避方法通知手段 1 2力 S 、 S 8 E— 3で求め られる方向を、 重なりを少なくする回避方法と してユーザあるいは被写 体あるいは両方に通知して、 P 8 0へ処理が抜ける。
ここの処理、 通知方法については、 S 8 D— 4 とほぼ同様である。 例 えば、 図 2 6 ( a ) のような通知結果となる。
S 8 D - 4 との違いを言えば、 S 8 D— 2から S 8 D— 4の処理では 方向しか求めていないが、 S 8 E— 2から S 8 E— 4の処理では、 第 2 の被写体の移動先を仮定して方向を決めているので、 方向だけでなく、 どの程度動けば良いのかを示すことも可能である。 表示の仕方と しては. 例えば、 移動方向を示す矢印の開始点と終了点を、 第 2の被写体の現在 位置と、 最小限の移動量で重なりが最も少なくなる位置とにすればよい。 これにより、 第 2の被写体がどのく らい動けばよいかがはっきり分かる という効果が出てく る。
また、 矢印だけでなく、 被写体の移動先の位置を直接示す方法もある。 図 2 6 ( b ) は最小限の移動量で重なりが無くなる移動先を示した例で ある。 移動先の第 2の被写体を点線で示している。
以上の S 8 — 1から S 8 E— 4の処理で、 図 5の S 8の重なりに関す る処理が行える。
なお、 図 2 1〜 2 7の処理は必ずしも排他的な処理ではなく、 任意に 組み合わせて処理することも可能である。 組み合わせの例と して、 次の ような利用シーンが可能となる。
『被写体同士が重なっている時は 「重なっています」 と警告がなされ、 この時にシャツタ一ボタンを押しても撮影画像は記録されない。 そして 警告と一緒に、 被写体がどちらの方向に動いたら良いかが図 2 6 ( a ) のように示される。 それに従って被写体が動き、 重なりがなくなったら シャッターチャンスランプが点燈する。 シャッターチャンスランプが点 燈している間にシャッターポタンを押したら撮影画像が記録される。 』 次に、 図 3 0は、 図 5の S 9の処理、 すなわち重ね画像を生成する処 理の一方法を説明するフローチヤ一ト図である。
P 8 0を経た S 9— 1では、 重ね画像生成手段 9が、 生成する重ね画 像の最初の画素位置を力レント画素に設定して S 9— 2 へ処理が進む。 最初の画素位置は、 例えば左上などの隅から始まることが多い。
なお、 「画素位置」 は、 画像上の特定の位置を表し、 左上隅を原点、 P 漏謹 08510
89
右方向を + X軸、 下方向を + Y軸と した X— Y座標系で表現されること が多い。 画素位置は、 画像を表すメ モリ上のア ドレスに対応し、 画素値 はそのァ ドレスのメモリ の値である。
S 9— 2では、 重ね画像生成手段 9が、 カ レン ト画素位置は存在する かどうかを判断し、 存在するならば S 9 _ 3へ処理が進み、 存在しない ならば P 9 0へ処理が抜ける。
S 9— 3では、 重ね画像生成手段 9が、 カ レン ト画素位置が第 1被写 体領域内かどうかを判断し、 第 1被写体領域内ならば S 9 - 4へ処理が 進み、 そうでないならば S 9— 5へ処理が進む。
第 1被写体領域内かどうかは、 被写体領域抽出手段 7 ( S 6 ) から得 られる第 1被写体領域画像上でカ レン ト画素位置の画素値が黒 ( 0 ) か どうかで判断できる。
なお、 第 1被写体領域であるかどうかで特に処理を変えない場合は、 S 9— 3, S 9— 4は省いて、 S 9— 2力 ら S 9— 5へ進めばよい。
S 9— 4では、 重ね画像生成手段 9が、 設定に応じた画素値を計算し て、 重ね画像のカ レン ト画素位置の画素値と して書き込む。
上記の設定とは、 つまり どのような重ね画像を合成するかということ である。 例えば、 図 1 1 ( b ) のように第 1被写体を半透明で合成する のか、 図 1 1 ( a ) のように不透明で第 1被写体をそのまま上書きで合 成するのか、 などである。
もし半透明で合成するのならば、 第 1被写体画像の力レン ト画素位置 の画素値 P 1 と捕正画像生成手段 5 ( S 5 ) から得られる補正背景画像 のカ レン ト画素位置の画素値 P bを得て、 所定の透過率 A ( 0. 0から 1. 0の間の値) で合成画素値 (P l XA+ P b X ( 1 — A) ) を求め PC霞睡 08510
9 0
れぱよい。 そのまま上書きするのならば、 透過率 Aを 1 . 0 と して P 1 をそのまま書き込めばよレ、。
S 9一 5では、 重ね画像生成手段 9が、 S 9— 3でカレン ト画素位置 が第 1被写体領域内ではないと判断した場合に、 カレント画素位置が第 2被写体領域内かどうかを続いて判断し、 第 2被写体領域内ならば S 9 一 6へ処理が進み、 そうでないならば S 9— 7へ処理が進む。 ここでの 処理は、 第 1被写体領域が第 2被写体領域に変わるだけで、 S 9— 3 と 同様である。
S 9 - 6では、 重ね画像生成手段 9が、 設定に応じた合成画素を生成 して、 重ね画像のカレン ト画素位置の画素値として書き込む。 ここでの 処理は、 第 1被写体領域 (画像) が第 2被写体領域 (画像) に変わるだ けで、 S 9— 4と同様である。
S 9一 7では、 重ね画像生成手段 9が、 S 9— 5でカレント画素位置 が第 2被写体領域内ではないと判断した場合に、 第 1被写体画像の力レ ント画素位置の画素値を重ね画像の力レント画素位置の画素値と して書 き込む。 すなわち、 この場合のカレント画素位置は、 第 1被写体領域内 でも第 2被写体領域内でもないので、 結局、 背景部分に相当する。 なお、 ここでは背景部分の画像を第 1被写体画像から取得している力 補正背景画像から取得することも可能である。 ただ、 第 1被写体領域と 背景部分の境界部分が、 補正背景画像を使うより第 1被写体画像を使つ た方が自然な境界部分が得られるという利点がある。 また、 S 6での第 1 , 第 2被写体領域の抽出が間違っていたとしても、 境界が自然なので 間違いが目立たないという効果も出てく る。
S 9— 8では、 重ね画像生成手段 9が、 カレン ト画素位置を次の画素 PC漏 003趣 510
9 1
位置に設定して、 S 9— 2へ処理が戻る。
以上の S 9— 1から S 9— 8の処理で、 図 5の S 9の重ね画像生成に 関する処理が行える。
なお、 上記の処理では S 9— 4や S 9— 7で第 1被写体画像や補正背 景画像を処理しているが、 生成する重ね画像に S 9— 1の前に最初に第 1被写体画像または補正背景画像を全画素コピーしてしまい、 その後、 各画素位置の処理で第 1被写体領域および Zまたは第 2被写体領域だけ を処理する方法も考えられる。 全画素コピーの方が処理手順は単純にな るが、 処理時間は若干増えるかもしれない。 また、 第 1被写体領域と第 2被写体領域とが重なったと しても、 重ね 画像の生成をそのまま許可する形態も考えられる。 この場合には、 図 5 のフローチャートにおいて、 S 7, S 8が省略されるよ うにすれば、 処 理が簡単になる。 ただし、 前述どおり、 重なり領域を目立たせる処理や、 重なりがあることを警告する処理を実行しても構わない。
重要なのは、 本発明の画像合成方法では、 第 1被写体領域と第 2被写 体領域とを独立して抽出することができるので、 第 1被写体領域と第 2 被写体領域とが重なりを持った重ね画像を生成する場合に、 第 1被写体 と第 2被写体のどちらを優先して合成すればよいかを決めることができ るということである。 例えば、 第 1被写体を優先するように重ね画像生成手段 9が設定され たとすると、 図 3 1に示すように、 第 1被写体と第 2被写体との重なり 領域において、 第 1被写体 (人物 ( 1 ) ) を第 2被写体 (人物 ( 2 ) ) の上になるように重ねた重ね画像が得られる。 図 3 0のフローチヤ一ト で説明すると、 S 9— 4で、 重ね画像生成手段 9が上記の透過率 A、 す P T/JP2003/008510
9 2
なわち合成割合を 1 . 0 ( 1 0 0 % ) として、 第 1被写体画像の画素値 P 1をそのままカ レン ト画素位置に書き込む処理が行われる。
一方、 第 2被写体を優先するように重ね画像生成手段 9が設定された とすると、 図 3 2に示すように、 第 1被写体と第 2被写体との重なり領 域において、 第 1被写体 (人物 ( 1 ) ) を第 2被写体 (人物 ( 2 ) ) の 下になるように重ねた重ね画像が得られる。 これを実現するには、 図 3 0のフローチャートで S 9— 3の処理と S 9— 5の処理とを入れ替える のが簡単である。 つまり、 カ レント画素位置が第 2被写体領域内かどう かの判断を先に、 重ね画像生成手段 9が行うようにし、 その結果、 カ レン ト画素位置が第 2被写体領域内ならば、 同様に第 2被写体画像の合成割合を 1 . 0 と し て、 第 2被写体画像の画素値をそのまま力レント画素位置に書き込む処 理を行えばよい。
なお、 このような処理は、 背景画像を使わずに、 第 1被写体画像と第 2被写体画像だけで合成処理するやり方では不可能である。 なぜなら、 第 1被写体画像と第 2被写体画像だけでは、 第 1被写体領域と第 2被写 体領域とを独立して抽出することができず、 一塊に統合された領域と し てしか抽出できないからである。 なお、 ここでは合成画像の大きさを基準画像の大きさにしているが、 これより小さく したり、 大きく したりすることも可能である。 例えば図 6 ( c ) や図 8 ( c ) で補正画像を生成する際、 一部を切り捨ててしま つていたが、 捕正画像の大きさを大きく して切り捨てないようにすれば、 合成画像を大きくする時のために、 切り捨てずに残した画像を合成に使 い、 それによつて背景を広 、ることも可能となる。 いわゆるパノラマ画 像合成のよ うなことが可能となる効果が出てく る。
また、 例えば、 第 1被写体画像と背景画像、 第 2被写体画像と背景画 像の間では共通した背景部分を持っていて、 第 1被写体画像と第 2被写 体画像で共通した背景部分を持たない場合、 合成画像では第 1被写体と 第 2被写体の間の背景が存在しない場合も出てきてしまうかもしれない が、 背景画像も使う ことで、 存在しない部分を埋める合成画像を生成で きる効果も出てく る。 この場合、 例えば、 第 1被写体画像、 背景画像、 第 2被写体画像の順で端がそれぞれ重なった長い合成画像が生成される (第 1被写体画像と第 2被写体画像とは、 本発明の処理により、 合成画 像上では位置の重なりは無い) 。
図 1 1 ( b ) は、 第 1被写体領域だけを半透明に合成した重ね画像で ある。 図 1 1 ( c ) は、 第 2被写体領域だけを半透明に合成した重ね画 像である。 図 1 1 ( a ) は、 両方とも半透明にはせず、 どちらも上書き して生成した重ね画像である。 なお、 図では示していないが、 両方とも 半透明にして合成する方法も考えられる。
どの合成方法をとるかは目的によるので、 ユーザがそのときの目的に 応じた合成方法を選択できるようにすれば良い。
例えば、 背景画像、 第 1被写体画像を既に撮影/記録してあり、 第 2 被写体画像を重なり無く撮影しょう とする段階では、 第 1 の被写体の詳 細な画像は必要なく、 大体どの辺に存在し、 重なりがあるかどうかが分 かればよいのだから、 半透明の合成で構わない。 また、 第 2の被写体は、 撮影する瞬間にどういう表情をしているとかの詳細が分からないと うま くシャッターが切れないので、 半透明ではなく上書きで合成する方が良 い。 従って、 図 1 1 ( b ) のような合成方法が向いている。 また、 合成する被写体の領域が分かった方が撮りやすいというユーザ にとつては、 撮影中は両者を半透明で合成した方が良い場合や、 第 2の 被写体だけを半透明にした方が良い場合もあるかもしれない。
また、 第 2の被写体の撮影/記録が済んで、 背景画像、 第 1被写体画 像、 第 2被写体画像を使って、 最終的な合成画像を合成したい場合は、 半透明な被写体では困るので、 どちらも上書きで合成する必要がある。 従って、 図 1 1 ( a ) のような合成方法が向いている。
また、 被写体領域取得手段 7 ( S 6 ) から得られる被写体領域が既に 膨張されていれば、 被写体だけでなく、 その周囲の背景部分も一緒に合 成してしまうが、 既に補正画像生成手段 5 ( S 5 ) で背景部分は一致す るように補正処理されているので、 実際の被写体の輪郭の領域より も多 少、 抽出する被写体領域が大きめになって背景部分まで含んでしまつて いても、 合成境界で不自然になることはないという効果が出てく る。
なお、 被写体領域を膨張させて処理するのであれば、 合成境界をより 自然に見せるように、 外部も含めた被写体領域の合成境界付近、 あるい は被写体領域内部だけの合成境界付近で、 透明度を徐々に変化させて合 成させるという方法もある。 例えば、 被写体領域の外部にいくに従って. 背景部分の画像の割合を強く し、 被写体領域の内部にいく に従って、 被 写体領域部分の画像の割合を強くする、 といった具合である。
これにより、 たとえ合成境界付近で補正誤差による多少の背景のずれ があったとしても、 不自然さを目立たなくすることができるという効果 が出てくる。 補正誤差でなく、 そもそも被写体領域の抽出が間違ってい る場合や、 撮影時間のずれなどに起因する背景部分の画像の変化 (例え ば、 風で木が動いた、 日が陰った、 関係無い人が通った、 など) があつ たと しても、 同様に、 不自然さを目立たなくすることができるという効 果が出てく る。
また、 本発明の目的は、 前述した実施形態の機能を実現するソフ ト ゥ エアのプログラムコー ドを記録した記憶媒体を、 システムあるいは装置 に供給し、 そのシステムあるいは装置のコンピュータ (または C P Uや M P U ) が記憶媒体に格納されたプログラムコー ドを読み出し実行する ことによつても、 達成されるこ とは言うまでもない。
この場合、 記憶媒体から読み出されたプログラムコー ド自体が前述し た実施形態の機能を実現するこ とになり、 そのプログラムコー ドを記憶 した記憶媒体は本発明を構成することになる。
プログラムコー ドを供給するための記憶媒体と しては、 例えば、 フロ ツビディスク, ハードディスク, 光ディスク, 光磁気ディスク, 磁気テ ープ, 不揮発性のメモリカー ド, 等を用いることができる。
また、 上記プログラムコードは、 通信ネッ トワーク のよ うな伝送媒体 を介して、 他のコンピュータシステムから画像合成装置の主記憶 7 4ま たは外部記憶 7 5へダウンロー ドされるものであってもよい。
また、 コ ンピュータが読み出したプログラムコー ドを実行することに よ り、 前述した実施形態の機能が実現されるだけでなく 、 そのプログラ ムコー ドの指示に基づき、 コンピュータ上で稼働している O S (ォペレ 一ティングシステム) などが実際の処理の一部または全部を行い、 その 処理によって前述した実施形態の機能が実現される場合も含まれること は言うまでもない。
さ らに、 記憶媒体から読み出されたプログラムコー ドが、 コンビユー タに揷入された機能拡張ボー ドゃコンピュータに接続された機能拡張ュ ニッ トに備わるメ モリに書込まれた後、 そのプログラムコードの指示に 基づき、 その機能拡張ボードゃ機能拡張ュニッ トに備わる C P Uなどが 実際の処理の一部または全部を行い、 その処理によつて前述した実施形 態の機能が実現される場合も含まれることは言うまでもない。
本発明を上記記憶媒体に適用する場合、 その記憶媒体には、 先に説明 したフローチャートに対応するプログラムコードを格納することになる 本発明は上述した実施形態に限らず、 請求の範囲に示した範囲で種々 の変更が可能である。
以上のように、 本発明に係る第 1の画像合成装置は、 背景の画像であ る背景画像と、 前記背景の少なく とも一部と第 1の被写体を含む画像で ある第 1被写体画像と、 前記背景の少なく とも一部と第 2の被写体を含 む画像である第 2被写体画像との間での、 背景の相対的な移動量、 回転 量、 拡大縮小率、 歪補正量のいずれかもしくは組み合わせからなる補正 量を算出する、 あるいは算出して記録しておいた補正量を読み出す背景 補正量算出手段と、 背景画像、 第 1被写体画像、 第 2被写体画像のいず れかを基準画像と し、 他の 2画像を被写体以外の背景の少なく とも一部 が重なるように、 前記背景補正量算出手段から得られる捕正量で捕正し、 基準画像と補正した他の 1つあるいは 2つの画像を重ねた画像を生成す る重ね画像生成手段とを含んでいる。
これにより、 二つの画像間の背景のずれを補正して合成することがで きるので、 被写体など明らかに異なる領域を除いた以外の部分 (すなわ ち背景部分) は、 どのように重ねても合成結果がほぼ一致し、 合成結果 が不自然とならないという効果が出てく る。 例えば被写体領域だけを主 に合成しよう とした時、 被写体領域の抽出や指定が多少不正確であって も、 被写体領域の周りの背景部分が合成先の画像の部分とずれがないの で、 不正確な領域の内外が連続した風景として合成され、 見た目の不自 然さを軽減するという効果が出てく る。
また、 これにより、 たとえ被写体領域の抽出が画素単位で正確であつ たと しても、 課題の項で説明した通り、 1画素より細かいレベルでの不 自然さは従来技術の方法では出てしまうが、 本発明では、 背景部分を合 わせてから合成しているので、 輪郭の画素の周囲の画素は、 同じ背景部 分の位置の画素となり、 合成してもほぼ自然なつながり となる。 このよ うに、 1画素より細かいレベルでの不自然さを防ぐ、 あるいは軽減する という効果が出てく る。
また、 背景のずれを補正して合成するので、 背景画像や第 1 第 2被 写体画像の撮影時にカメラなどを三脚などで固定する必要がなく、 手な どで大体の方向を合わせておけばよく、 撮影が簡単になるという効果が 出てく る。
さらに、 第 1被写体画像と第 2被写体画像の間では背景部分に重なり がなくても、 第 1被写体画像と第 2被写体画像の間の補正量を算出する ことができる。 これにより、 第 1被写体画像の背景部分と第 2被写体画 像の背景部分の間の背景が抜けていても、 その抜けている背景部分を背 景画像の背景が埋めていれば、 背景部分に重なりの無い第 1被写体画像 と第 2被写体画像を、 背景が繋がった状態で合成することができる効果 が出てく る。
さらに、 背景画像、 第 1被写体画像および第 2被写体画像のそれぞれ から必要な背景部分を取り出して、 互いの不足部分を補う ことでつなげ た背景の上に、 第 1被写体および第 2被写体を合成した重ね画像を作成 することもできる。
また、 本発明に係る第 1の画像合成装置は、 被写体や風景を撮像する 撮像手段をさらに含み、 背景画像、 または第 1被写体画像、 または第 2 被写体画像は、 前記撮像手段の出力に基づいて生成される構成とするこ ともできる。
上記の構成によれば、 重ね画像を生成する画像合成装置が、 撮像手段 を具備することで、 ユーザが被写体や風景を撮影したその場で、 重ね画 像を生成することができるため、 ユーザにとつての利便性が向上する。 また、 重ね画像を生成した結果、 もし被写体同士の重なりがあるなどの 不都合があれば、 その場で撮影し直すことができるという効果が出てく る。
なお、 撮像手段から得られる画像は、 通常、 画像合成装置に内蔵され ているか否かを問わない主記憶や外部記憶などに記録し、 シャッターボ タンなどを利用して記録するタイ ミングをユーザが指示する。 そして、 記録された画像を背景画像、 または第 1被写体画像、 または第 2被写体 画像として、 合成処理に利用することになる。
また、 本発明に係る第 1の画像合成装置は、 第 1被写体画像と第 2被 写体画像のうち、 先に撮影した方を基準画像とする構成とすることもで きる。
上記の構成において、 例えば、 第 1被写体画像、 第 2被写体画像の順 に撮影したとすると、 第 1被写体画像を基準画像する。 背景画像はと り あえずどの順番でもよいとする。 第 1被写体画像を基準画像と して、 背 景画像、 第 2被写体画像を捕正する。 この際、 第 1被写体画像 (基準画 像) と背景画像、 第 2被写体画像と背景画像の間で、 背景部分の移動量 などの補正量を背景補正量算出手段が算出する。 重ね画像生成手段は、 その補正量を使って補正を行い、 第 1被写体画像 (基準画像) 、 補正さ れた背景画像、 補正された第 2被写体画像の 3つの画像を使って、 合成 画像を合成する。
この時点で、 被写体同士に重なりがあるなどの理由で撮影し直す場合 には、 第 2被写体画像のみを撮影し直し、 再度、 合成画像を生成する。 この際、 第 1被写体画像 (基準画像) 、 補正された背景画像は、 再作成 する必要はないので、 先に合成画像を作成した時のものをそのまま使う ことができる。 第 2被写体画像は変わっているので、 第 1被写体画像を 基準画像と して、 第 2被写体画像を改めて補正する。 これによ り、 補正 された新たな第 2被写体画像が生成される。 第 1被写体画像 (基準画 像) 、 補正された背景画像、 新たに補正された第 2被写体画像の 3つの 画像を使って、 合成画像を合成する。
撮影し直しを操り返す場合は、 上記の処理を繰り返せばよい。 もし、 後から撮影する第 2被写体画像を基準画像とすると、 合成に必要な画像 は、 補正された第 1被写体画像、 補正された背景画像、 第 2被写体画像 (基準画像) の 3つの画像となる。 第 2被写体画像を撮影し直すと、 基 準画像が変わるので、 補正処理を全てやり直さなければいけなくなる。 具体的には、 補正された第 1被写体画像、 補正された背景画像を再度生 成しなければいけなくなる。
このよ うに、 第 1被写体画像と第 2被写体画像のうち、 先に撮影した 方を基準画像とすることで、 撮影し直しを繰り返す場合に、 処理量 · 処 理時間を減らすことができるという効果が出てく る。 なお、 第 1の被写体と第 2の被写体を合成する場合、 背景画像を基準 画像とし、 背景画像上に第 1 と第 2の被写体の領域の画像を置いて合成 するより、 第 1被写体画像上に第 2の被写体の領域の画像を置いて合成 する (あるいはその逆) 方が、 合成する領域が少なくて処理量 · 処理時 間を減らすことができるという効果が出てく る。
また、 その場合、 合成する領域が少なく なる分、 合成結果が不自然と なる可能性を減らすことができるという効果が出てく る。 合成結果が不 自然となる場合とは、 例えば、 被写体の領域を実際の被写体の輪郭より 小さく してしまう と、 合成された被写体が欠けてしま う といったことや, 前述した輪郭などが不自然となってしまう場合などのことである。
また、 本発明に係る第 1の画像合成装置では、 基準画像の直前あるい は直後の順で背景画像を撮影する構成とすることもできる。
上記の構成において、 例えば、 背景画像、 第 1被写体画像、 第 2被写 体画像の順、 あるいは、 第 1被写体画像、 背景画像、 第 2被写体画像の 順に撮影した場合には、 第 1被写体画像を基準画像とする。 これにより . もし、 被写体同士の重なりなどで、 第 2被写体画像を撮影し直す場合で も、 第 2の被写体はまだその場にいる可能性が高いので、 カメラや第 2 の被写体が動くなどして微調整して撮影し直すことが容易にできる。 上記と異なり、 例えば、 第 1被写体画像、 第 2被写体画像、 背景画像 の順に撮影される場合 (第 1被写体画像を基準画像とする) を考えてみ ると、 第 2被写体画像を撮影する時点では第 2の被写体が背景の前に存 在している状態だが、 背景画像を撮影する時には第 2の被写体に背景の 前からどいてもらう必要がある。 もし、 被写体同士の重なりなどで、 第 2被写体画像を撮影し直すとすれば、 第 2の被写体はすでにどいてしま つているので、 再度、 背景の前に立ってもらわなければいけない問題が ある。 また、 たとえ第 2の被写体が少し右に動けば重なりが無くなるこ とが分かっていたと しても、 先に第 2被写体画像を撮影したの時の位置 がすぐには分からないので、 少し右に動いた位置がどこなのかもすぐに は分からない問題がある。
このよ うに、 再度撮影し直す際の被写体や撮影者の微調整などの手間 を減らし、 重なりなどの不具合の少ない画像を撮影し易くなるという効 果が出てく る。
また、 撮影し易くなる効果だけでなく、 処理に関しても効果が出てく る。
本発明の画像合成手法では、 背景画像の撮影順に関係無く、 結局 3枚 の画像が揃わなければ合成画像は作成できないのだが、 合成画像を作成 する際、 補正画像の作成以外の処理も考えると、 処理手順に違いが出て く る。
最初の例の順番では、 第 2被写体画像を撮影する前に、 背景画像を補 正すること以外の処理として、 例えば後で説明する第 1の被写体の領域 抽出などの処理も可能となる。 抽出された領域は、 合成や重なり検出な どに使われる。 高速連写をするのでもない限り、 2枚目の画像を撮影し てから 3枚目の画像 (第 2被写体画像) を撮影するまでには、 通常、 多 少の時間間隔があるので、 これらの処理をする時間も充分にある。 2枚 目の画像を撮影した後に 3枚目の画像 (第 2被写体画像) を撮影した時 合成や重なり検出などの処理に抽出された第 1の被写体の領域などを即 座に使うことができ、 3枚目の画像 (第 2被写体画像) を撮影した後に かかる処理時間を少なくすることができる効果が出てく る。 ユーザから PC漏難 08510
1 0 2
すれば、 合成装置の反応が早く なるという効果となる。 後の例の順番 (背景画像が最後) の場合、 背景画像が未取得であるた め、 第 1の被写体の領域抽出などの処理は 2枚目の'画像を撮影した時点 ではできず、 3枚目の背景画像を撮影した後でしかできないので、 3枚 目の画像を撮影した後にかかる処理時間は大きく なつてしまう。 また、 本発明に係る第 1の画像合成装置は、 前記重ね画像生成手段が、 基準画像と補正した他の 1つあるいは 2つの画像とを、 それぞれ所定の 透過率で重ねる構成とすることもできる。 ここで、 「所定の透過率」 は、 固定された値でもよいし、 領域に応じ て変化させる値や、 領域の境界付近で徐々に変化させる値などでもよい。 前記重ね画像生成手段は、 重ね画像の画素位置を決め、 基準画像上の 画素位置の画素値と補正した他の画像上の画素位置の画素値とを得て、 その二つの画素値に所定の透過率をそれぞれ掛け合わせた値の合計を重 ね画像の画素値とする。 この処理を重ね画像の全ての画素位置で行う。 また、 透過率を画素位置によって変えれば、 場所によって基準画像の 割合を強く したり、 補正画像の割合を強く したりできる。
これを使って、 例えば、 補正された被写体画像中の被写体領域だけを 基準画像に重ねる時、 被写体領域内.は不透明 (すなわち補正画像中の被 写体の画像そのまま) で重ね、 被写体領域周辺は被写体領域から離れる に従い基準画像の割合が強くなるように重ねる。 すると、 被写体領域、 すなわち抽出した被写体の輪郭が間違っていたと しても、 その周辺の画 素は、 補正画像から基準画像に徐々に変わっているので、 間違いが目立 たなくなるという効果が出てく る。
また、 例えば被写体領域だけを半分の透過度で重ねる、 などの合成表 示をすることで、 表示されている画像のどの部分が以前に撮影した合成 対象部分で、 どの部分が今撮影している被写体の画像なのかを、 判別し やすくするという効果も出てく る。
また、 人間は、 常識 (画像理解) を使うことで、 画像中の背景部分と 被写体部分 (輪郭) を区別する能力を通常、 持っている。 被写体領域を 半分の透過度で重ねて表示しても、 その能力は一般に有効である。
従って、 被写体領域を半分の透過度で重ねて表示することで、 複数の 被写体の領域が重なっている場合でも、 それぞれの被写体の領域を前記 能力で区別することができ、 それらが合成画像上で位置的に重なってい るかどうかを容易に判断することができる。
第 1被写体画像と第 2被写体画像を左右に並べて見比べることでも重 なりがあるかどうかを判断することは不可能ではないが、 その際は、 そ れぞれの画像中の被写体領域を前記能力で区別し、 それぞれの画像の背 景部分の重なりを考慮して、 区別した被写体領域同士が重なるかどうか を頭の中で計算して判断しなければいけない。 この一連の作業を頭の中 だけで正確に行うことは、 合成画像中の被写体領域を区別する先の方法 と比べると、 難しい。
つまり、 背景部分が重なるような位置合わせを機械に行わせることで、 人間の高度な画像理解能力を使って、 被写体領域同士が重なっているか どうかを判断し易い状況を作り出しているといえる。 このよ うに、 被写 体領域を半分の透過度で重ねて表示することで、 被写体同士の重なりな どがある場合も、 今撮影している被写体の位置を判別しやすく なるとい う効果も出てく る。
なお、 ここで記載した構成を、 前記した各構成と、 必要に応じて任意 に組み合わせてもよい。
また、 本発明に係る第 1の画像合成装置は、 前記重ね画像生成手段が、 基準画像と補正した他の 1つあるいは 2つの画像の間の差分画像中の差 のある領域を、 元の画素値と異なる画素値の画像として生成する構成と することもできる。
ここで、 「差分画像」 とは、 二つの画像中の同じ位置の画素値を比較 して、 その差の値を画素値として作成する画像のことである。 一般には、 差の値は絶対値をとることが多い。
「元の画素値と異なる画素値」 とは、 例えば、 透過率を変えて半透明 にしたり、 画素値の明暗や色相などを逆にして反転表示させたり、 赤や 白、 黒などの目立つ色にしたり、 などを実現するような画素値である。 また、 領域の境界部分と内部とで、 前述したように画素値を変えてみた り、 境界部分を点線で囲ってみたり、 点滅表示 (時間的に画素値を変化 させる) させてみたり、 という ような場合も含む。
上記の構成によれば、 基準画像と補正した他の画像との間で、 同じ画 素位置の画素値を得て、 その差がある場合はその画素位置の重ね画像の 画素値を他の領域とは異なる画素値とする。 この処理を全ての画素位置 で行うことで、 差分部分の領域を元の画素値と異なる画素値の画像と し て生成することができる。
これによつて、 二つの画像間で一致しない部分がユーザに分かりやす くなるという効果が出てく る。 例えば、 第 1や第 2の被写体の領域は、 基準画像上と補正画像上では、 片方は被写体の画像、 他方は背景の画像 となるので、 差分画像中の差のある領域と して抽出される。 抽出された 領域を半透明にしたり、 反転表示したり、 目立つような色の画素値とす ることで、 被写体の領域がユーザに分かりやすく、 もし被写体同士に重 なりなどがあれば、 それも分かり易く なるという効果が出てく る。
なお、 ここで記載した構成を、 前記した各構成と、 必要に応じて任意 に組み合わせてもよい。
本発明に係る第 1の画像合成装置は、 基準画像と補正した他の 1つあ るいは 2つの画像の間の差分画像中から、 第 1の被写体の領域と第 2の 被写体の領域を抽出する被写体領域抽出手段をさらに含み、 前記重ね画 像生成手段において、 基準画像と補正した他の 1つあるいは 2つの画像 とを重ねる代わりに、 基準画像と前記被写体領域抽出手段から得られる 領域内の補正した他の 1つあるいは 2つの画像とを重ねる構成とするこ ともできる。
これによつて、 基準画像上や補正された背景画像上に、 補正された被 写体画像中の被写体領域のみを合成することできるという効果が出てく る。 あるいは、 補正された被写体画像上や補正された背景画像上に、 基 準画像中の被写体領域のみを合成したり、 補正された背景画像上に基準 画像中の被写体領域と補正された被写体画像中の被写体領域を合成した り、 基準画像と しての背景画像上に補正された被写体画像中の被写体領 域を合成したりするということもできる。
また、 被写体領域の透過率を変えるなどして合成するならば、 どの領 域を合成しよ う と しているかがユーザに分かり易く、 もし被写体同士に 重なりなどがあれば、 それもさらに分かり易くなるという効果が出てく る。 さらに、 それによつて、 どうすれば重なりが起きないようになる力 をユーザが判断する材料を与える等、 撮影を補助することができるとい う効果が出てく る。 また、 背景画像、 第 1被写体画像および第 2被写体画像の 3枚を用い ると、 第 1の被写体の領域または第 2の被写体の領域の抽出が容易にな るという効果が出てく る。 さらに、 第 1の被写体の領域または第 2の被 写体の領域をそれぞれ抽出できるので、 各被写体に重なりがある場合に、 どちらを優先して合成するか、 すなわち重なり部分において、 第 1の被 写体が第 2の被写体の上になるように合成するか、 下になるように合成 するかを決めることができるという効果も出てく る。
なお、 ここで記載した構成を、 前記した各構成と、 必要に応じて任意 に組み合わせてもよい。
また、 本発明に係る第 1の画像合成装置は、 前記被写体領域抽出手段 から得られる第 1の被写体の領域と第 2の被写体の領域の重なりを検出 する重なり検出手段をさらに含んでいる構成とすることもできる。
上記の構成によれば、 被写体領域抽出手段から第 1の被写体の領域と 第 2の被写体の領域が得られるので、 重なり検出手段が、 ある画素位置 について、 第 1の被写体の領域と第 2の被写体の領域の両方に含まれる 画素位置かどうかを調べることによって、 両方に含まれる画素位置が存 在する場合に、 重なりがあると判断できる。
その判断処理に好適な手法と しては、 例えば、 それぞれの領域を被写 体領域抽出手段または重なり検出手段が画像と して生成し、 被写体領域 の画素の画素値を所定の値に設定する。 そして、 重なり検出手段が、 各 画素位置において、 両方の画像の同じ画素位置の画素値が、 設定した所 定の値かどうかを判断すれば、 重なりがあるかどうかを的確に判断でき る。
これによつて、 被写体同士が重なり合つている部分があるかどうかを ユーザが判別しやすく なる という効果が出てく る。 それによつて、 重な りが起きないよ うに撮影を捕助する効果については、 前述したものと同 様である。
また、 本発明に係る第 1 の画像合成装置は、 前記重なり検出手段にお いて重なりが検出される時、 重なりが存在することを、 ユーザあるいは 被写体あるいは両方に警告する重なり警告手段をさ らに含んでいる構成 とすることもできる。
ここで、 「警告」 には、 表示手段などに文字や画像で警告することも 含まれる し、 ランプなどによる光やスピーカなどによる音声、 パイブレ ータなどによる振動など、 ユーザや被写体が感知できる方法ならば何で も含まれる。
これによつて、 被写体同士が重なり合つている場合に、 重なり警告手 段の動作によって警告されるので、 ユーザがそれに気づかずに撮影/記 録したり合成処理したり という ことを防ぐことができ、 さ らに被写体に も位置調整等が必要であることを即時に知らせることができるという撮 影補助の効果が出てく る。
また、 本発明に係る第 1 の画像合成装置は、 前記重なり検出手段にお いて重なりが検出されない時、 重なりが存在しないことを、 ユーザある いは被写体あるいは両方に通知するシャツタ一チャンス通知手段をさら に含んでいる構成とすること もできる。
ここで、 「通知」 には、 「警告」 同様、 ユーザや被写体が感知できる 方法ならば何でも含まれる。
これによつて、 被写体同士が重なり合つていない時をユーザが知るこ とができるので、 撮影や撮影画像記録、 合成のタイ ミ ングをそれに合わ o
1 0 8
せて行えば、 被写体同士が重ならずに合成することができるという撮影 補助の効果が出てくる。
また、 被写体にも、 シャッターチャンスであることを通知できるので、 ポーズや視線などの備えを即座に行えるという撮影補助の効果も得られ る。
また、 本発明に係る第 1の画像合成装置は、 被写体や風景を撮像する 撮像手段と、 前記重なり検出手段で重なりが検出されない時に、 前記撮 像手段から得られる画像を背景画像、 または第 1被写体画像、 または第 2被写体画像と して記録する指示を生成する自動シャツター手段とをさ らに含んでいる構成とすることもできる。
上記の構成において、 撮影画像を背景画像や第 1被写体画像、 第 2被 写体画像として記録するというのは、 例えば、 主記憶や外部記憶に記録 するなどで実現される。 したがって、 自動シャッター手段は、 第 1の被 写体の領域と第 2の被写体の領域とに重なりが無いという信号を重なり
L5 検出手段から入力したときに、 主記憶や外部記憶に対する記録制御処理 の指示を出力する。 そして、 背景補正量算出手段や重ね画像生成手段は、 主記憶や外部記 憶に記録されている画像を読み込むことで、 背景画像や第 1被写体画像、 第 2被写体画像を得ることができるようになる。 なお、 自動シャッター手段が自動的に指示を出しても、 即座に画像が 記録されるとは限らない。 例えば、 同時にシャッターボタンも押されて いると力 、 自動記録モードになっているなどの状態でないと記録されな いようにしてもよい。
これによつて、 被写体同士が重なり合っていない時に自動的に撮影が 行われるので、 ユーザ自身が重なりがあるかどうかを判別してシャツタ 一を押さなくても良いという撮影補助の効果が出てく る。
また、 本発明に係る第 1 の画像合成装置は、 被写体や風景を撮像する 撮像手段と、 前記重なり検出手段で重なりが検出される時に、 前記撮像 手段から得られる画像を、 背景画像、 あるいは第 1被写体画像、 あるい は第 2被写体画像として記録することを禁止する指示を生成する自動シ ャッター手段とをさらに含んでいる構成とすることもできる。
上記の構成によれば、 自動シャッター手段は、 重なり検出手段から重 なりがあるという信号を得たら、 撮像手段から得られる画像を主記憶や 外部記憶などに記録することを禁止する指示を出力する。 この結果、 例 えば、 シャッターポタンが押されたと しても、 撮像手段から得られる画 像は記録されない。 なお、 この禁止処理は、 自動禁止モードになってい るなどの状態でないと行われないよ うにしてもよい。
これによつて、 被写体同士が重なり合つている時は撮影が行われない ので、 ユーザが誤って重なりがある状態で撮影/記録してしまう ことを 防ぐ撮影補助の効果が出てく る。
また、 本発明に係る第 1 の画像合成装置は、 前記重なり検出手段が、 第 1の被写体の領域と第 2の被写体の領域とが重なり合う重なり領域を 抽出する構成とすることもできる。
上記の構成によれば、 重なり検出手段で、 重なりがあるかどうか検出 する際に、 例えば先に説明した画像を使うなどして、 重なり領域も同時 に抽出できる。 この抽出した重なり領域を利用して、 被写体同士が重な り合っている部分がある場合に、 どの部分が重なっているかを表示など で通知することができる。 P2003/008510
1 1 0
これにより、 重なり領域をユーザが判別しやすく なるという効果が出 てく る。 また、 それによつて、 カメラや撮影中の被写体がどの方向、 位 置にどのく らい動けばよいかが判別しゃすくなるという撮影補助の効果 が出てく る。
なお、 背景画像を使わず、 第 1被写体画像と第 2被写体画像だけで、 背景補正量を算出してどちらかを補正し、 差分画像を生成し、 差分領域 を求めることは、 背景部分に適当量の重なりがあれば、 可能である。 そ の時、 第 1の被写体の領域と第 2の被写体の領域に重なりが無ければ、 差分領域は、 第 1領域と、 第 2領域との 2つの独立した領域と して求ま る。 しかし、 重なりがある場合、 第 1領域と第 2領域は独立せず、 交じ り合った 1つの領域と して抽出されてしまう。 従って、 第 1被写体画像 および第 2被写体画像だけから重なっている領域を抽出することは難し い
これに対し、 背景画像を使う場合は、 例えば基準画像を背景画像に取 るなどすれば、 差分画像中には、 第 1領域か第 2領域のどちらかしか存 在せず、 第 1領域と第 2領域は別個に抽出される。 同時に抽出されるこ とはない。 従って、 第 1領域と第 2領域が重なり合っていても、 問題な く第 1領域と第 2領域を求めるこができる。 従って、 重なり領域も求め ることができる。 このよ うに、 背景画像も使うことで、 被写体に重なりがあっても、 重 なり領域を求めることができる効果が出てく る。 また、 本発明に係る第 1の画像合成装置は、 前記重ね画像生成手段が、 前記重なり検出手段にて抽出された重なり領域を元の画素値と異なる画 素値の画像として生成する構成とすることもできる。 上記の構成によれば、 重ね画像生成手段が重ね画像を生成する際、 各 画素位置の画素値を決めるが、 その画素位置が重なり検出手段から得ら れる重なり領域内の場合 (例えば、 重なり領域を黒画像と して生成した 場合、 重なり画像の画素位置の画素値が黒であると判定する処理が簡 便) は、 他の領域とは異なる画素値とする。 特に、 その領域の境界線や 内部を赤などの目立つ色で描画したり、 境界線を点滅表示させたり、 半 透明にして背景が透けるような画素値とすることが好ましい。
これによって、 重なり領域がユーザや被写体に判別しゃすくなるとい う撮影補助の効果が出てく る。
また、 本発明に係る第 1の画像合成装置は、 前記重なり検出手段で重 なりが検出される場合、 重なりを減らす第 1 の被写体または第 2の被写 体の位置あるいはその位置の方向を算出する重なり回避方法算出手段と . 前記重なり回避方法算出手段から得られる第 1 の被写体または第 2の被 写体の位置あるいはその位置の方向を、 ユーザあるいは被写体あるいは 両方に知らせる重なり回避方法通知手段とをさらに含んでいる構成とす ることもできる。
ここで、 被写体領域抽出手段から第 1の被写体の領域と第 2の被写体 の領域の情報が得られ、 それらの領域情報から重なり検出手段で重なり に関する情報が得られることは、 既に説明したとおりである。
従って、 被写体の領域の位置を被写体領域抽出手段から得た位置と異 なる位置にして、 重なり検出手段で重なりがどのく らいあるかを調べれ ば、 その位置に被写体が動いたときの重なり量が予測できる。 被写体の 領域の位置を色々な位置にしてみて、 それぞれの重なり量を予測し、 最 も重なりが少ない位置や方向を重なりを減らす位置や方向としてユーザ や被写体に通知する。
あるいは、 もっと簡単に処理するのならば、 一般に被写体間の距離が 離れれば重なりは減るはずなのだから、 得られた被写体領域から、 被写 体間の距離が離れる方向を計算することができる。
得られた重なりが少なくなる位置や方向を、 例えば表示で通知する場 合、 重ね画像を生成する際、 各種合成処理を行った後に、 矢印などを上 書きして生成すればよい。
これによつて、 重なりがある場合に、 カメラや撮影中の被写体がどの 方向、 位置に動けばよいかがユーザが判断しなくても済むという撮影捕 助の効果が出てく る。
なお、 重なりが少ない位置や方向を算出する被写体は、 第 1 7第 2の 被写体のどちらでもよいが、 先に撮影した被写体は、 既にカメラの前か ら立ち退いており、 後で撮影した被写体が、 通常、 カメラの前に立って いると考えられる。 したがって、 後で撮影した被写体について位置や方 向を算出すれば、 その算出結果に基づいて、 重なりが少なくなる方向へ 被写体が即座に移動すればよいので、 使い勝手が良くなる。
本発明に係る第 1の画像合成方法は、 背景の画像である背景画像と、 前記背景の少なく とも一部と第 1の被写体を含む画像である第 1被写体 画像と、 前記背景の少なく とも一部と第 2の被写体を含む画像である第 2被写体画像との間での、 背景の相対的な移動量、 回転量、 拡大縮小率、 歪捕正量のいずれかもしくは組み合わせからなる捕正量を算出する、 あ るいは算出して記録しておいた補正量を読み出す背景補正量算出ステッ プと、 背景画像、 第 1被写体画像、 第 2被写体画像のいずれかを基準画 像とし、 他の 2画像を被写体以外の背景の少なく とも一部が重なるよう 1 1 3
に、 前記背景補正量算出ステップから得られる補正量で補正し、 基準画 像と捕正した他の 1つあるいは 2つの画像を重ねた画像を生成する重ね 画像生成ステップとを含んでいる。
これによる種々の作用効果は、 前述したとおりである。
本発明に係る第 1 の画像合成プログラムは、 上記第 1 の画像合成装置 が備える各手段と して、 コンピュータを機能させる構成である。
本発明に係る第 1の画像合成プログラムは、 上記第 1の画像合成方法 が備える各ステップをコンピュータに実行させる構成である。
本発明に係る第 1の記録媒体は、 上記第 1 の画像合成プログラムを記 録した構成である。
これにより、 上記記録媒体、 またはネッ トワークを介して、 一般的な コンピュータに画像合成プログラムをイ ンス トールすることによって、 該コンピュータを用いて上記の画像合成方法を実現する、 言い換えれば、 該コンピュータを画像合成装置として機能させることができる。
〔実施の形態 2〕
以下、 本発明の実施のその他の形態を図面を参照して説明する。 実施 の形態 1では、 第 1被写体画像および第 2被写体画像に加えて、 各被写 体画像と少なく とも一部共通する背景部分が写っていて被写体は写って いない背景画像を利用していたが、 実施の形態 2では、 背景画像を利用 しないで画像合成する構成について説明する。
ここでも、 まず、 言葉の定義について説明しておく。
「第 1の被写体」 、 「第 2の被写体」 とは、 合成を行おう と している 対象であり、 一般には人物であることが多いが物などの場合もある。 厳 密には、 「被写体」 は、 第 1被写体画像と第 2被写体画像との間で、 背 景部分が少なく とも一部重なるようにした時に、 画素値が一致しない領 域、 すなわち変化がある領域は全て 「被写体の領域」 となる可能性を持 つ。 但し、 背景部分で、 風で木の葉が揺れたなどの小さな変化でも変化 がある領域となってしまうので、 小さな変化や小さな領域はある程度無 視する方が好ましい。
なお、 例えば被写体が人物の場合、 被写体は必ずしも一人であるとは 限らず、 複数の人物をまとめて 「第 1の被写体」 や 「第 2の被写体」 と する場合もある。 つまり、 複数人であっても、 合成の処理の単位と して まとめて扱う ものは一つの 「被写体」 となる。
なお、 人物でなく、 物であっても同様である。 また、 被写体は、 必ず しも一つの領域である とは限らず、 複数の領域からなる場合もある。 「第 1」 、 「第 2」 は、 異なるコマ画像として単に区別する為につけた ものであり、 撮影の順番などを表すものではなく、 本質的な違いはない。 また、 例えば、 人物が服や物などを持っていて、 「第 1の被写体または 第 2の被写体を含まない背景だけの画像」 にそれらが現れないのならば、 それらも被写体に含まれる。
「第 1被写体画像」 、 「第 2被写体画像」 は、 上記の 「第 1の被写 体」 、 「第 2の被写体」 を含む別々の画像であり、 一般には、 カメラな どでその被写体を別々に撮影した画像である。 但し、 画像上に被写体の みしか写っておらず、 互いに共通する背景部分が全く写っていない場合 は、 その共通する背景部分を元にした位置合わせができないので、 合成 に適さない。 したがって、 少なく とも一部は (合成した被写体の周囲を 自然にするために、 より好ましくは、 合成しょう とする被写体の周囲に おいて) 互いに共通する背景部分が写っている必要がある。 また、 通常 は、 第 1被写体画像、 第 2被写体画像は、 同じ背景を使って、 すなわち カメラをあまり動かさないで撮影する場合が多い。
「背景部分」 とは、 第 1被写体画像、 第 2被写体画像から 「第 1の被 写体」 、 「第 2の被写体」 をそれぞれ除いた部分である。
「移動量」 、 「歪補正量」 、 および 「重ね画像生成手段」 は、 実施の 形態 1で説明したものと同じであるので、 説明を省略する。
「画素値」 、 「濃度値」 、 「輝度値」 、 「透過率」 、 「不透明度」 、 「所定の透過率」 、 「差分画像」 、 および 「元の画素値と異なる画素 値」 についても、 実施の形態 1で説明したものと同じであるので、 説明 を省略する。
「被写体の領域」 とは、 被写体が背景と分離される境界で区切られる 領域である。 例えば、 第 1被写体画像中で人物が服や物などを持ってい て、 第 2被写体画像中でそれらが現れないのならば、 それらも被写体で あり、 被写体の領域に含まれる。 なお、 被写体の領域は、 必ずしも繋が つた一塊の領域とは限らず、 複数の領域に分かれていることもある。
「前記被写体領域抽出手段から得られる領域のみを重ねる」 とは、 そ の領域以外は何も画像を生成しないということではなく、 それ以外の領 域は基準画像などで埋めることを意味する。
「特徴」 とは、 その領域の画像の持つ性質などであり、 特徴量と して 数値化して表現できる性質が好ましい。 特徴量と しては、 例えば、 各色 の画素値や、 その色相、 彩度、 明度のほか、 画像の模様や構造を表す統 計量と して、 同時生起行列や差分銃計量、 ランレングス行列、 パワース ぺク トル、 それらの第 2次統計量、 高次統計量などがある。
「第 1の被写体あるいは第 2の被写体の領域」 とは、 差分画像などか ら抽出される被写体の領域で、 第 1の被写体の領域かあるいは第 2の被 写体の領域かの区別がついていなくてもよい領域である。
「合成しょう と している被写体」 とは、 合成処理の過程で求められる 被写体のことではなく、 実際に (カメラの前に) 存在する被写体のこと であり、 第 1被写体画像および第 2被写体画像のどちらか一方に定めた 基準画像に対して、 ユーザが合成しよう と している被写体のことである。 但し、 上述した通り、 合成の処理の単位としてまとめて扱う ものは一つ の 「被写体」 なので、 1つの被写体が複数の人物/物であることもあり X.る。
「警告」 、 「通知」 、 および 「フ レーム (枠) 」 についても、 実施の 形態 1で説明したものと同じであるので、 説明を省略する。
図 3 3は、 本発明の実施の一形態に係る画像合成方法を実施する画像 合成装置を示す構成図である。
すなわち、 画像合成装置の要部を、 撮像手段 2 1、 第 1被写体画像取 得手段 2 2、 第 2被写体画像取得手段 2 3、 背景補正量算出手段 2 4、 補正画像生成手段 2 5、 差分画像生成手段 2 6、 被写体領域抽出手段 2 7、 重なり検出手段 2 8、 重ね画像生成手段 2 9、 重ね画像表示手段 3 0、 重なり警告手段 3 1 、 シャ ッターチヤンス通知手段 3 2、 自動シャ ッター手段 3 3の主要な機能プロックに展開して示すことができる。 図 3 4は、 図 3 3の各手段 2 1〜 3 3を具体的に実現する装置の構成 例である。
C P U ( central proces s ing uni t ) 9 0は、 背景補正量算出手段 2 4、 捕正画像生成手段 2 5、 差分画像生成手段 2 6、 被写体領域抽出手 段 2 7、 重なり検出手段 2 8、 重ね画像生成手段 2 9、 重ね画像表示手 2003/008510
117
段 3 0、 重なり警告手段 3 1、 シャ ッターチヤンス通知手段 3 2、 自動 シャッター手段 3 3 として機能し、 これら各手段 2 4〜 3 3の処理手順 が記述されたプログラムを主記憶 7 4、 外部記憶 7 5、 通信デバイス 7 7を介したネッ 1、 ワーク先などから得る。
なお、 撮像手段 2 1、 第 1被写体画像取得手段 2 2、 第 2被写体画像 取得手段 2 3、 についても、 撮像素子や、 撮像素子が出力する画像デー タの各種処理に対する内部制御などの為に C P Uなどを使っている場合 もある。
また、 C P U 9 0は、 C P U 9 0を含めてバス 7 9を通じ相互に接続 されたディスプレイ 7 1、 撮像素子 7 2、 タブレッ ト 7 3、 主記憶 7 4、 外部記憶 7 5、 シャッターボタン 7 6、 通信デバィス 7 7、 ランプ 7 8、 スピーカ 8 0 とデータのやり と りを行いながら、 処理を行う。 なお、 データのやり と りは、 バス 7 9を介して行う以外にも、 通信ケ 一ブルや無線通信装置などデータを送受信できるものを介して行っても よい。 また、 各手段 2 1〜 3 3の実現手段と しては、 C P Uに限らず、 D S P (digital signal processor)や処理手順が回路と して組み込まれ ているロジック回路などを用いることもできる。
ディスプレイ 7 1は、 通常はグラフィ ックカードなどと組み合わされ て実現され、 グラフィ ックカード上に V RAM (video random access memory) を有し、 V R A M上のデータを表示信号に変換して、 モニター などのディスプレイ (表示/出力媒体) に送り、 ディスプレイは表示信 号を画像と して表示する。 撮像素子 7 2は、 風景等を撮影して画像信号を得るデバイスであり、 通常、 レンズなどの光学系部品と受光素子およびそれに付随する電子回 難 08510
118
路などからなる。 ここでは、 撮像素子 7 2は、 出力信号を AZD変換器 などを通して、 デジタル画像データに変換する所まで含んでいると し、 バス 7 9を通じて、 第 1被写体画像取得手段 2 2、 第 2被写体画像取得 手段 2 3などに撮影した画像の画像データを送るとする。 撮像素子とし て一般的なデバイ ス と しては、 例えば、 C C D ( charge coupled device) などがあるが、 その他にも風景等を画像データと して得られる デパイスならば何でも良い。 ユーザの指示を入力する手段として、 タブレッ ト 7 3、 シャツターボ タン 7 6などがあり、 ユーザの指示はバス 7 9を介して各手段 2 1〜 3 3に入力される。 この他にも各種操作ボタン、 マイクによる音声入力な ど、 様々な入力手段が使用可能である。 タブレッ ト 7 3は、 ペンとペン 位置を検出する検出機器からなる。 シャッターボタン 7 6は、 メカ二力 ルもしくは電子的なスィツチなどからなり、 ユーザがボタンを押すこと で、 通常は、 撮像素子 7 2で撮影された画像を主記憶 7 4や外部記憶 7 5などに記録したりする一連の処理を開始させるスタ一ト信号を生成す る。
主記憶 7 4は、 通常は D RAM (dynamic random access memory) や フラッシュメモリ などのメモリデバイスで構成される。 なお、 C P U内 部に含まれるメモリやレジスタなども一種の主記憶と して解釈してもよ い o
外部記憶 7 5 は、 H D D ( hard disk drive) や P C ( personal computer) カー ドなどの装脱着可能な記憶手段である。 あるいは C P U 9 0とネッ トワークを介して有線または無線で接続された他のネッ ト ワーク機器に取り付けられた主記憶や外部記憶を外部記憶 7 5 として用 P 霞睡 08510
1 1 9
いることもできる。
通信デバイス 7 7は、 ネッ トワークインターフエ一スカードなどによ り実現され、 無線や有線などにより接続された他のネッ トワーク機器と データをやり と りする。
スピーカ 8 0は、 バス 7 9などを介して送られて来る音声データを音 声信号と して解釈し、 音声と して出力する。 出力される音声は、 単波長 の単純な音の場合もあるし、 音楽や人間の音声など複雑な場合もある。 出力する音声が予め決まっている場合、 送られて来るデータは音声信号 ではなく、 単なるオン、 オフの動作制御信号だけという場合もある。 次に、 図 3 3の各手段 2 1〜 3 3を各手段間のデータ授受の観点から 説明する。
なお、 各手段間でのデータのやり と りは、 特に注釈なく 「* *手段か ら得る」 、 「* *手段へ送る (渡す) 」 という表現をしている時は、 主 にバス 7 9を介してデータをやり と り しているとする。 その際、 直接各 手段間でデータのやり と りをする場合もあれば、 主記憶 7 4や外部記憶 7 5、 通信デバィス 7 7を介したネッ トワークなどを間に挟んでデータ をやり と りする場合もある。
撮像手段 2 1は主に撮像素子 7 2からなり、 撮像した風景などを画像 データと して第 1被写体画像取得手段 2 2、 第 2被写体画像取得手段 2 3に送る。
第 1被写体画像取得手段 2 2は、 例えば撮像手段 2 1、 主記憶 7 4、 および/または外部記憶 7 5などで構成され、 第 1被写体画像を、 撮像 手段 2 1、 主記憶 7 4、 外部記憶 7 5、 および Zまたは通信デバイス 7 7を介したネッ トワーク先などから得る。 なお、 第 1被写体画像取得手 段 2 2は、 内部制御などの為に C P Uなどを含む場合もある。
撮像手段 2 1 を使う場合は、 第 1の被写体が含まれる現在の風景 (第 1被写体画像) を撮像素子 7 2で撮影することになり、 通常はシャツタ 一ボタン 7 6などを押したタイ ミングなどで撮影し、 撮影された画像は、 主記憶 7 4、 外部記憶 7 5、 および/または通信デバイス 7 7を介した ネッ トワーク先などに記録される。
—方、 第 1被写体画像取得手段 2 2が、 主記憶 7 4、 外部記憶 7 5、 および Zまたは通信デバィス 7 7を介したネッ トワーク先などから第 1 被写体画像を得る場合は、 既に撮影されて予め用意してある画像を読み 出すことになる。 なお、 通信デバイス 7 7を介したネッ トワーク先など にカメラがあり、 ネッ トワークを通して撮影する場合もある。
第 1被写体画像は、 背景補正量算出手段 2 4、 補正画像生成手段 2 5 . 差分画像生成手段 2 6、 被写体領域抽出手段 2 7、 および Zまたは重ね 画像生成手段 2 9などに送られる。
第 2被写体画像取得手段 2 3は、 例えば撮像手段 2 1、 主記憶 7 4、 および Zまたは外部記憶 7 5などで構成され、 第 2の被写体が含まれる 画像 (以降、 「第 2被写体画像」 と呼ぶ) を、 撮像手段 2 1、 主記憶 7 4、 外部記憶 Ί 5、 および/または通信デバィス 7 7を介したネッ トヮ ーク先などから得る。 なお、 第 2被写体画像取得手段 2 3は、 内部制御 などの為に C P Uなどを含む場合もある。 画像の中身が違う以外は、 画 像の取得方法に関しては、 第 1被写体画像取得手段 2 2 と同様である。
第 2被写体画像は、 背景補正量算出手段 2 4、 補正画像生成手段 2 5 . 差分画像生成手段 2 6、 被写体領域抽出手段 2 7、 および/または重ね 画像生成手段 2 9などに送られる。 P T脑 03/008510
121
背景補正量算出手段 2 4としての C P U 9 0は、 第 1被写体画像およ ぴ第 2被写体画像中の被写体以外の背景の相対的な移動量、 回転量、 拡 大縮小率、 歪補正量のいずれかもしくは任意の組み合わせからなる補正 量を算出する。 第 1被写体画像および第 2被写体画像の一方 (基準画 像) と他方の画像との間の補正量が最低限求まればよい。 背景補正量算出手段 2 4は、 算出した補正量を補正画像生成手段 2 5 に送る。 なお、 予め算出しておいた補正量を背景補正量算出手段 2 4が 読み出す場合は、 主記憶 7 4、 外部記憶 7 5、 および/または通信デバ イス 7 7を介したネッ トワーク先などから捕正量を読み出すことになる。 補正画像生成手段 2 5 としての C P U 9 0は、 第 1被写体画像、 第 2 被写体画像のどちらかを基準画像と し、 他方の画像を被写体以外の背景 の部分が重なるよ うに背景捕正量算出手段 2 4から得られる補正量で補 正した画像 (以下、 補正画像と呼ぶ) を生成し、 差分画像生成手段 2 6 および重ね画像生成手段 2 9へ送る。 なお、 予め生成しておいた捕正画 像を補正画像生成手段 2 5が読み出す場合は、 主記憶 7 4、 外部記憶 7 5、 および/または通信デバィス 7 7を介したネッ トワーク先などから 読み出すことになる。 差分画像生成手段 2 6 と しての C P U 9 0は、 補正画像生成手段 2 5 で決めた基準画像と補正画像生成手段 2 5から得られる補正画像との間 の差分画像を生成して、 生成した差分画像を被写体領域抽出手段 2 7お よび重ね画像生成手段 2 9へ送る。
被写体領域抽出手段 2 7 と しての C P U 9 0は、 差分画像生成手段 2 6から得られる差分画像から第 1、 第 2の被写体の領域を抽出して、 抽 出した領域を重なり検出手段 2 8および重ね画像生成手段 2 9へ送る。 重なり検出手段 2 8 と しての C P U 9 0は、 被写体領域抽出手段 2 7 から得られる第 1、 第 2の被写体の領域から第 1、 第 2の被写体同士の 重なりを検出して、 重なりが存在するかどうかの情報と重なり領域の情 報とを、 重ね画像生成手段 2 9、 重なり警告手段 3 1、 シャッターチヤ ンス通知手段 3 2および自動シャッター手段 3 3に送る。
重ね画像生成手段 2 9 と しての C P U 9 0は、 第 1被写体画像取得手 段 2 2から得られる第 1被写体画像、 第 2被写体画像取得手段 2 3から 得られる第 2被写体画像、 補正画像生成手段 2 5から得られる補正画像 を、 全部あるいは一部重ねた画像を生成し、 生成した画像を重ね画像表 示手段 3 0に送る。
また、 重ね画像生成手段 2 9は、 差分画像生成手段 2 6から得られる 差分画像画像中の差のある領域を、 元の画素値と異なる画素値の画像と して生成する場合もある。
また、 重ね画像生成手段 2 9は、 被写体領域抽出手段 2 7から得られ る第 iの被写体と第 2の被写体の領域のみを基準画像などに重ねる場合 もある。
また、 重ね画像生成手段 2 9は、 重なり検出手段 2 8から得られる重 なりの領域を元の画素値と異なる画素値の画像として生成する場合もあ る。
重ね画像表示手段 3 0 と しての C P U 9 0は、 重ね画像生成手段 2 9 から得られる重ね画像をディスプレイ 7 1などに表示する。
また、 重ね画像表示手段 3 0は、 重なり警告手段 3 1から得られる警 告情報に応じて、 警告表示を行う場合や、 シャッターチャンス通知手段 3 2から得られるシャッターチャンス情報に応じて、 シャッターチャン スである旨の表示を行う場合や、 自動シャツター手段 3 3から得られる シャッター情報に応じて、 自動シャツターが行われた旨の表示を行う場 合もある。
重なり警告手段 3 1 と しての C P U 9 0は、 重なり検出手段 2 8から 5 得られる重なり情報から、 重なりが存在する場合、 ユーザあるいは被写 体あるいは両方に重なりがあることを通知する。
通知には、 通知内容を文字などにして重ね画像表示手段 3 0に送って ディスプレイ 7 1 に表示させたり、 ランプ 7 8を使って光で知らせたり . スピー力 8 0を使って音で知らせたりする等の種々の形態を採用できる, L0 通知することができるのならば、 それ以外のデバイスなどを使っても良 い
シャッターチャンス通知手段 3 2 と しての C P U 9 0は、 重なり検出 手段 2 8から得られる重なり情報から、 重なりが存在しない場合、 ユー ザあるいは被写体あるいは両方に重なりが無いことを通知する。 通知方
L 5 法に関しては、 重なり警告手段 3 1 の説明と同様である。
自動シャッター手段 3 3 としての C P U 9 0は、 重なり検出手段 2 8 から得られる重なり情報から、 重なりが存在しない場合、 第 2被写体画 像取得手段 2 3に対し、 撮像手段 2 1から得られる画像を主記憶 7 4や 外部記憶 7 5などに記録するように自動的に指示を出す。
:0 ここでは、 撮像手段 2 1から得られる画像は、 第 1被写体画像または 第 2被写体画像と して主記憶 7 4や外部記憶 7 5などに最終的に記録、 保存され、 合成されるような使い方を主に想定している。 例えば、 第 1 の被写体を先に撮影した後で、 第 2の被写体を撮影するとするとき、 第 1被写体画像を撮像手段 2 1から得た場合には、 得る毎に記録、 保存す 08510
1 2 4
るが、 第 2被写体画像は撮像手段 2 1から得られても、 すぐには保存さ れない。
すなわち、 撮像手段 2 1から得た画像を第 2被写体画像とする場合、 その得られた第 2被写体画像と保存されている第 1被写体画像とを使つ て、 重なり検出などの処理を行い、 重ね画像表示手段 3 0などでの各種 表示や警告、 通知などの処理を行う、 という一連の処理を繰り返す。 そ して、 自動シャツター手段 3 3によ り記録、 保存を指示された時、 第 2 被写体画像が最終的に記録、 保存される。
なお、 自動シャッター手段 3 3による指示が存在し、 かつ、 シャツタ 一ポタン 1 4 3がユーザにより押される場合に、 第 2被写体画像を記録、 保存するようにしてもよい。
また、 自動シャッタ一手段 3 3が、 指示を出した結果、 撮像画像が記 録されたことをユーザあるいは被写体あるいは両方に通知してもよい。 通知方法に関しては、 重なり警告手段 3 1の説明と同様である。 また、 自動シャツター手段 3 3 と しての C P U 9 0は、 記録の指示を 行うだけでなく、 重なり検出手段 2 8から得られる重なり情報から、 重 なりが存在する場合、 第 2被写体画像取得手段 2 3に撮像手段 2 1から 得られる画像を主記憶 7 4や外部記憶 7 5などに記録するのを禁止する ように自動的に指示を出す。 この動作は、 上述した自動記録する場合の 逆となる。 この場合、 自動シャッター手段 3 3による保存禁止の指示が存在する 場合、 シャッターポタン 1 4 3がユーザにより押されても、 第 2被写体 画像は記録、 保存されないことになる。 図 3 5 ( a ) は、 本発明に係る画像合成装置の背面からの外観例を示 している。 本体 1 4 0上に表示部兼タブレッ ト 1 4 1、 ランプ 1 4 2、 およびシャッターポタン 1 4 3がある。
表示部兼タブレツ ト 1 4 1は入出力装置 (ディスプレイ 7 1およびタ プレツ ト 7 3等) および重ね画像表示手段 3 0に相当する。 表示部兼タ ブレッ ト 1 4 1上には、 図 3 5 ( a ) のように、 重ね画像生成手段 2 9 で生成された合成画像重なり警告手段 3 1、 シャッターチャンス通知手 段 3 2、 自動シャ ツター手段 3 3などからの通知 Z警告情報などが表示 される。 また、 画像合成装置の各種設定メニューなどを表示して、 タブ レッ トを使って指やペンなどで設定を変更したりするのにも使われる。 なお、 各種設定などの操作手段として、 タブレッ トだけでなく、 ボタ ン類などがこの他にあってもよい。 また、 表示部兼タブレッ ト 1 4 1は, 本体 1 4 0に対する回転や分離などの方法を用いて、 撮影者だけでなく . 被写体側でも見られるようになつていてもよレ、。
ランプ 1 4 2は、 重なり警告手段 3 1、 シャッターチヤンス通知手段 3 2または自動シャツター手段 3 3などからの通知や警告に使われたり する。
シャッターボタン 1 4 3は、 第 1被写体画像取得手段 2 2または第 2 被写体画像取得手段 2 3が撮像手段 2 1から撮影画像を取り込む/記録 するタイミングを指示する為に主に使われる。
また、 この例では示していないが、 内蔵スピーカなどを通知/警告手 段と して使ってもよい。
図 3 5 ( b ) は、 本発明に係る画像合成装置の前面からの外観例を示 している。 本体 1 4 0前面にレンズ部 1 4 4が存在する。 レンズ部 1 4 4は、 撮像手段 2 1の一部である。 なお、 図 3 5 ( b ) の例では示して いないが、 前面に被写体に情報 (前記の通知や警告) を伝えられるよう に、 表示部やランプ、 スピーカなどがあってもよい。
画像データや、 画素値については、 実施の形態 1において図 4を用い て説明したものと同じであるので、 説明を省略する。
図 3 6は、 本発明の実施の一形態に係る画像合成方法の一例を示すフ ローチャート図である。
まずステップ S 1 1 (以下、 「ステップ S」 を 「 S」 と略記する。 ) では、 第 1被写体画像取得手段 2 2が、 第 1被写体画像を取得し、 連結 点 p 2 0 (以下、 「連結点 p」 を 「 p」 と略記する) を経て S 1 2へ処 理が進む。 第 1被写体画像は、 撮像手段 2 1を使って撮影してもよいし、 予め主記憶 7 4、 外部記憶 7 5または通信デパイス 7 7を介したネッ ト ワーク先などに用意してある画像を読み出してもよい。
S 1 2では、 第 2被写体画像取得手段 2 3が、 上記第 1被写体画像と 少なく とも一部共通する背景部分を持つ第 2被写体画像を取得し、 p 3 0を経て S 1 3へ処理が進む。 ここでの処理は後で図 4 4を用いて詳し く説明するが、 第 2被写体画像の取得方法自体は、 第 1被写体画像と同 様である。 なお、 S 1 1 と S 1 2の処理の順番は逆でも良いが、 後に撮 影する方を基準画像とすると、 撮影時の合成画像の表示に違和感が少な い効果が出てく る。
S 1 3では、 背景補正量算出手段 2 4が、 第 1被写体画像および第 2 被写体画像から背景捕正量を算出して、 p 4 0を経て S 1 4へ処理が進 む。 第 1被写体画像、 第 2被写体画像はそれぞれ、 第 1被写体画像取得 手段 2 2 ( S 1 1 ) 、 第 2被写体画像取得手段 2 3 ( S 1 2 ) から得ら れる。 なお、 以降、 第 1被写体画像、 第 2被写体画像を使う際、 特にことわ りの無い限り、 これらの画像の取得元の手段 /ステップは S 1 3での取 得元の手段ノステップと同じなので、 以降はこれらの画像の取得元の手 段 Zステップの説明は省く。
S 1 3の処理の詳細は後で図 4 5を用いて説明する。
S 1 4では、 捕正画像生成手段 2 5が、 背景補正量算出手段 2 4から 得た背景補正量を使って基準画像以外の第 1被写体画像または第 2被写 体画像を補正し、 差分画像生成手段 2 6が、 補正画像生成手段 2 5で捕 正された画像と基準画像との間の差分画像を生成して、 p 5 0を経て S 1 5へ処理が進む。 S 1 4の処理の詳細は後で図 4 6を用いて説明する。
S 1 5では、 被写体領域抽出手段 2 7が、 差分画像生成手段 2 6 ( S 1 4 ) から得られる差分画像から、 第 1、 第 2の被写体の領域 (以降、 第 1被写体領域、 第 2被写体領域と呼ぶ) を抽出し、 重なり検出手段 2 8が被写体同士の重なりを検出して、 p 6 0を経て S 1 6へ処理が進む。 S 1 5の処理の詳細は後で図 4 8を用いて説明する。
S 1 6では、 重なり警告手段 3 1、 シャッターチャンス通知手段 3 2、 自動シャッター手段 3 3のうちの一つ以上の手段が、 重なり検出手段 2 8 ( S 1 5 ) から得られる重なりに関する情報に応じて様々な処理を行 レ、、 P 7 0を経て S 1 7へ処理が進む。 S 1 6の処理の詳細は後で図 5 0から図 5 2を用いて説明する。
S 1 7では、 重ね画像生成手段 2 9が、 第 1被写体画像、 第 2被写体 画像、 およびそれらの内の基準画像ではない方の] S像を補正画像生成手 段 2 5 ( S 1 4 ) で補正した画像、 被写体領域抽出手段 2 7 ( S 1 5 ) から得られる第 i、 第 2被写体領域、 重なり検出手段 2 8 ( S 1 6 ) か 03008510
128
ら得られる第 1、 第 2の被写体の重なりに関する情報などから、 これら 2枚の画像を重ねる 「重ね画像」 を生成して、 p 8 0を経て S 1 8へ処 理が進む。 S 1 7の処理の詳細は後で図 5 3を用いて説明する。
S 1 7では、 重ね画像表示手段 3 0が、 重ね画像生成手段 2 9 ( S 1 7 ) から得られる重ね画像をディスプレイ 7 1などに表示して、 処理を 終了する。
これら S 1 1から S 1 7の処理で、 第 1被写体画像、 第 2被写体画像 を使って、 第 1の被写体と第 2の被写体を 1枚の画像上に合成し、 また 被写体同士の重なり具合に応じて様々な処理が行えるようになる。 詳細な処理やその効果については、 後で詳しく説明すると して、 まず 簡単な例で処理の概要を説明する。 図 3 7 ( a ) は S 1 1で得る第 1被写体画像の例である。 背景の手前、 左側に第 1の被写体たる人物 ( 1 ) が立っている。 分かりやすいように 人物 ( 1 ) の顏部分には 「 1」 と記しておく。 なお、 今後、 特にことわ りなく 「右側」 「左側」 といった場合、 図上での 「右側」 「左側」 とい う意味だとする。 この方向は、 撮影者 Zカメラから見た方向だと思えば よい。
図 3 8 ( a ) は S 1 2で得る第 2被写体画像の例である。 背景の手前、 右側に第 2の被写体たる人物 ( 2 ) が立っている。 分かりやすいよ うに 人物 ( 2 ) の顔部分には 「 2」 と記しておく。
図 3 8 ( c ) は、 図 3 7 ( a ) の第 1被写体画像と図 3 8 ( a ) の第 2被写体画像との間で背景捕正量を求め、 第 1被写体画像を基準面像と して、 その背景補正量を用いて第 2被写体画像を補正した画像である。 捕正された画像は実線の枠で囲われた範囲であり、 補正のされ方が分 かるように、 元の図 3 8 ( a ) の第 2被写体画像と図 3 7 ( a ) の第 1 被写体画像の範囲を図 3 8 ( c ) 上に点線の枠で示してある。 図 3 8 ( a ) の背景は、 図 3 7 ( a ) の背景の少し左上側の風景を撮影して得 られている。 このため、 図 3 8 ( a ) の第 2被写体画像を図 3 7 ( a ) 5 の第 1被写体画像の背景と重なるよ 'うに捕正するには、 図 3 8 ( a ) の 少し右下側の風景を選択する必要がある。 従って、 図 3 8 ( c ) は、 図 3 8 ( a ) より少し右下側の風景となるように補正されている。 元の図 3 8 ( a ) の範囲は点線で示されている。 図 3 8 ( a ) より右下側の風 景の画像は存在しないので、 図 3 8 ( c ) では右端の点線から右にはみ 0 出した部分、 および下端の点線から下にはみ出した部分が空白となって いる。 逆に図 3 8 ( a ) の左上側の部分は切り捨てられている。
ここでは拡大縮小や回転などの補正はなく、 単なる平行移動だけの補 正結果になっている。 すなわち S 1 3で得られる背景補正量は、 ここで は実線の枠と点線の枠のずれが示す平行移動量となる。
L5 図 3 9 ( a ) は、 S 1 4で、 図 3 7 ( a ) の第 1被写体画像と図 3 8
( c ) の補正された第 2被写体画像との間で生成した差分画像である。 差分画像では差分量 0の部分 (すなわち、 背景の一致部分) は黒い領域 で示されている。 差分がある部分は、 被写体の領域内とノイズ部分であ り、 被写体の領域部分は背景部分と被写体部分の画像が重なり合った妙 !0 な画像になっている。 (なお、 補正によってどちらかの画像しか画素が 存在しない領域 (例えば図 3 8 ( c ) の右下側に位置する実線と点線の 間の逆 L字領域) は差分の対象からは外し、 差分量は 0 と している) 。
S 1 6の重なりに関する処理は様々な処理方法があるが、 この例では 重なりは検出されないので、 ここでは説明を簡単にする為に特に処理は 行わないことにしておく。
図 4 0 ( a ) は、 後述する図 4 9 ( d ) に示す第 2被写体領域に相当 する部分の画像を、 図 3 7 ( a ) の第 1被写体画像 (基準画像) に重ね て (上書きして) 生成した画像である。 図 3 7 ( a ) と図 3 8 ( a ) の 別々に写っていた被写体が同じ画像上に重なりなく並んでいる。 重ね方 に関しても、 様々な処理方法があるので、 後で詳しく説明する。 図 4 0 ( a ) の画像が重ね画像表示手段 3 0上に合成画像として表示される。 これによつて、 別々に撮影された被写体を同時に撮影したかのような 画像を合成できるよ うになる効果が出てく る。
以上の説明により、 処理の概要を一通り説明したが、 S 1 5で被写体 領域同士で重なりがある場合の S 1 6の処理例の概要について説明して いないので、 以降、 簡単に触れておく。
図 4 1は、 図 3 8 ( a ) とは別の第 2被写体画像の例である。 図 3 8 ( a ) と比べると、 第 2の被写体が同一の背景に対して少し左に位置し ている。 なお、 第 1被写体画像は図 3 7 ( a ) と同じものを使う とする 図 4 2 ( c ) は、 第 1被写体領域と第 2被写体領域との合わさった領 域を示している。 図中の領域 2 0 2が第 1被写体領域と第 2被写体領域 とで構成されている。 ここでは、 同じ背景に対する第 1、 第 2の被写体 の各位置の関係で、 第 1被写体領域と第 2被写体領域とに重なりが生じ たため、 領域 2 0 2が結合された領域と して示されている。
図 4 3は、 S 1 6で重なりがある場合に S 1 7で生成される重ね画像 の一例を示した図である。 領域 2 0 2は、 第 1被写体領域と第 2被写体 領域とが結合された 1つの領域として扱われるので、 一括して半透明に 表示されている。 また、 重ね画像に上書きして、 第 1の被写体と第 2の 03 008510
1 3 1
被写体が重なっていることを示すメ ッセージが表示されている。
この重ね画像 (含むメ ッセージ) を表示することで、 第 1の被写体と 第 2の被写体が重なっていることが、 ユーザや被写体に分かりやすく な るという効果が出てく る。
以上の説明により、 S 1 5で被写体領域同士で重なりがある場合の S 1 6の処理例の概要について説明した。
なお、 これを典型的な利用シーン例で考えると、 まず図 3 7 ( a ) の ような第 1 の被写体をカメラ (画像合成装置) で撮影し、 記録する。 次 に同じ背景で図 3 8 ( a ) のような第 2の被写体を撮影する。 なお、 第 1の被写体と第 2の被写体の撮影は、 第 1の被写体と第 2の 被写体が交互に行う ことで、 第 3者がいなくても二人だけでも撮影が可 能である。 同じ背景で撮影する為にはカメラは動かさない方が良いが、 背景にあわせて補正するので、 三脚などで固定までしなくても、 手で大 体同じ位置で同じ方向を向いて撮影すれば良い。 なお、 被写体の位置関 係は図 3 7 ( a ) 、 図 3 8 ( a ) のような左右だけでなく、 任意の位置 関係でよい。
そして、 2つの画像を撮影した後、 S 1 3から S 1 7の処理を行い、 図 4 0 ( a ) や図 4 3のよ うな表示 (や後で説明する警告/通知など) を行う。
もし、 被写体が重なっているなどの表示や通知がある場合、 再度、 S 1 1から S 1 7の処理を繰り返してもよい。 すなわち第 1被写体画像、 第 2被写体画像を撮影し、 重ね画像を生成、 表示などする。 表示される 処理結果に満足がいくまで何度でも繰り返せば良い。
しかし、 第 2の被写体が位置を移動する場合などは、 第 1の被写体は 必ずしも撮り なおさなくてもよく、 第 2の被写体だけ撮り直せば済むこ と もある。 その場合は、 S 1 2から S 1 7を繰り返せばよい。
この場合、 S 1 2の第 2被写体画像取得から S 1 7の表示までを自動 的に繰り返せば、 すなわち第 2被写体画像取得をシャッターポタンを押 さずに動画を撮影するよ うに連続的に取得し、 処理、 表示も含めて繰り 返すようにすれば、 カメ ラや第 2の被写体の移動などに追従してリ アル タイムに処理結果が確認できることになる。 従って、 第 2の被写体の移 動位置が適切かどうか (重なっていないかどう力 をリ アルタイムに知 ることができ、 重なりが無い合成結果を得る為の第 2の被写体の撮影が 容易になるという利点が出てく る。
なお、 この繰り返し処理を開始するには、 メニューなどから処理開始 を選択するなどして、 専用モードに入る必要がある。 適切な移動位置に なったらシャ ッターボタンを押すこ とで、 第 2被写体画像を決定して (記録し) 、 この繰り返し処理 Z専用モー ドを終了させればよい (終了 といっても、 最後の合成結果を得る S 1 7までは処理を続けてもよい) , また、 第 1被写体画像が良く ない場合、 例えば、 背景の真中に第 1 の 被写体が位置し、 第 2の被写体をどう配置しても第 1の被写体に重なつ てしま うか、 重ならないよ う にすると第 2の被写体が重ね画像からフレ ームアウ ト してしま う よ うな場合、 S 1 1 の第 1被写体画像の取得から やり直しても良い。
以降では、 上で説明した処理の詳細を説明する。
図 4 4は、 図 3 6の S 1 2の処理、 すなわち第 2被写体画像を取得す る処理の一方法を説明するフローチヤ一ト図である。
p 2 0を経た S 1 2— 1では、 第 2被写体画像取得手段 2 3が、 第 2 被写体画像を取得し、 S 1 2— 2へ処理が進む。 ここでの処理は、 図 3 6の S 1 1の第 1被写体画像の取得と取得方法自体は同様である。
S 1 2— 2では、 同手段 2 3が、 自動シャッター手段 3 3から画像を 記録するように指示があるかどうかを判断し、 指示があれば S 1 2 - 3 へ処理が進み、 指示がなければ P 3 0へ抜ける。
S 1 2— 3では、 同手段 2 3が、 S 1 2— 1で取得した第 2被写体画 像を主記憶 7 4、 外部記憶 7 5などに記録して、 P 3 0へ処理が抜ける。 以上の S 1 2— 1力、ら S 1 2— 3の処理で、 図 3 6の S 1 2の処理が 行われる。
なお、 自動シャツター手段 3 3以外であっても、 撮影者によつて手動 でシャッターボタンが押されたり、 セルフタイマーでシャッターが切ら れた場合などにも撮影画像を記録してもよいが、 それは S 1 1、 S 1 2 一 1の処理に含まれるとする。
図 4 5は、 図 3 6の S 1 3の処理、 すなわち背景補正量を算出する処 理の一方法を説明するフローチャート図である。
背景補正量を算出する方法は色々考えられるが、 ここではブロックマ ツチングを使った簡易的な手法について説明する。
p 3 0を経た S 1 3 _ 1では、 背景補正量算出手段 2 4が、 第 1被写 体画像をブロック領域に分割する。 図 3 7 ( b ) は図 3 7 ( a ) の第 1 被写体画像をプロック領域に分割した状態を説明する説明図である。 点 線で区切られた矩形が各ブロ ック領域である。 左上のブロックを 「 B ( 1 , 1 ) J と し、 その右が 「B ( 1 , 2 ) 」 、 下が 「: B ( 2 , 1 ) 」 というように表現することにする。 図 3 7 ( b ) ではスペースの都合上、 例えば B ( 1 , 1 ) のプロ ックではプロックの左上に 「 1 1」 と記して 難 08510
1 3 4
いる。
S I 3— 2では、 第 1被写体画像のブロ ックが、 第 2被写体画像上で マッチングする位置を、 同手段 2 4が求めて、 S 1 3— 3へ処理が進む。 「 (ブロ ック) マッチング」 とは、 この場合、 第 1被写体画像の各プロ ック と最もブロック内の画像が似ているブロック領域を第 2被写体画像 上で探す処理である。 なお、 マッチングの詳細については、 実施の形態 1で説明したものと 同じであるので、 その説明を省略する。 ここでは、 「参照画像」 と称し たブロックを定義する画像が第 1被写体画像となり、 「探索画像」 と称 した、 似ているブロックを探す相手の画像が第 2被写体画像となる。 な お、 背景捕正量は相対的なものなので、 上記とは逆に、 参照画像と探索 画像を、 第 2被写体画像と第 1被写体画像と して良い。 次に、 S 1 3— 3で、 同手段 2 4が、 S 1 3 — 2で求めたマッチング ブロックの中から背景部分に相当する探索ブロ ックだけを抜き出して、
S 1 3— 4へ処理が進む。
S 1 3 - 2で求めたマツチングブ口 ックは、 最も差分が少ない探索ブ ロ ックを選んだだけなので、 同じ画像であることが保証されてはおらず、 たまたま何かの模様などが似ているだけの場合もある。 また、 そもそも 第 1 の被写体の為、 参照ブロ ック自体が背景部分でなかったり、 参照ブ ロ ックは背景部分だが、 第 2の被写体の為、 参照ブロ ックに相当する画 像部分が第 2被写体画像上に存在しない場合もあるので、 その場合はい いかげんな場所にマッチングプロ ックが設定されていることになる。 そこで各マッチングプロ ックから、 参照プロ ック と同じ画像部分では ないと判断されるものを取り除く ことが必要となる。 残ったマッチング 1 3 5
ブロ ックは参照ブロック と同じ画像部分であると判断されたものなので、 結果的に第 1や第 2の被写体を除いた背景部分だけが残ることになる。
マツチングブ口 ックの選別手法は色々考えられるが、 ここでは最も単 純な方法と して、 類似度 S ( x s 、 y s ) を所定の閾値で判断すること にする。 すなわち、 各マッチングブロックの S ( X s 、 y s ) が閾値を 超えていたら、 そのマッチングは不正確であると して取り除く という手 法である。 S ( x s、 y s ) は、 ブロックの大きさに影響されるので、 閾値はブロックの大きさを考慮して決めるのが望ましい。
図 3 8 ( b ) は、 図 3 8 ( a ) の第 2被写体画像の S 1 3— 2のマツ チング結果から、 不正確なマツチングブロックを取り除いた結果である。 正しいと判断されたマッチングプロ ックには、 対応する参照プロ ック と 同じ番号が振ってある。 これにより、 被写体部分が含まれない、 あるい はほとんど含まれない背景部分のマッチングブロックだけが残っている のが分かる。
しかも、 残ったマッチングブロックは、 第 1被写体画像と第 2被写体 画像とに共通して写り込んだ同一の背景部分であると判断できる。 も し、 第 1被写体画像と第 2被写体画像とが共通する背景部分を全く持ってい ないとすると、 S 1 3— 3の処理の結果、 残るマッチングプロ ックは 0 となる。
S 1 3— 4では、 同手段 2 4が、 S 1 3— 3で得た背景部分のマッチ ングブロックから、 第 2被写体画像の背景補正量を求めて、 p 4 0へ処 理が抜ける。
なお、 背景補正量と して、 例えば回転量 0 、 拡大縮小量 R、 および/ または平行移動量を求めることや、 その計算方法の説明等は、 既に実施 の形態 1で説明しているので、 ここでは説明を省略する ( S 1 3— 3で 残ったマッチングブロックが 1つしか無いときや、 残ったマッチングブ ロックが 1つも無かった場合の対応も同じである) 。 また、 探索画像中 の任意の点 (χ ' , y ' ) を補正された点 (X " , y " ) に変換する変 換式等 (変換関数 F s rあるいは逆変換関数 F r s等) のについても同 じであるので、 ここでは説明を省略する。
図 3 7 ( a ) 、 図 3 8 ( a ) の例では回転や拡大縮小はなく、 単なる 平行移動だけであるが、 詳細は後で図 3 8 ( c ) で説明する。
以上の S 1 3— 1から S 1 3— 4の処理で、 図 3 6の S 1 3の背景補 正量算出の処理が行われる。
図 4 6は、 図 3 6の S 1 4の処理、 すなわち第 2被写体画像の補正画 像を生成し、 第 1被写体画像との差分画像を生成する処理の一方法を説 明するフローチヤ一ト図である。
p 4 0を経た S 1 4— 1では、 補正画像生成手段 2 5が、 背景捕正量 算出手段 2 4 ( S 1 3 ) で得られる補正量を使って、 第 2被写体画像を 第 1被写体画像に背景部分が重なるように補正した画像を生成し、 S 1 4一 2へ処理が進む。 なお、 ここで生成される補正された第 2被写体画 像を 「補正第 2被写体画像」 (図 3 8 ( c ) 参照) と呼ぶことにする。 補正には、 変換関数 F s r あるいは逆変換関数 F r s を使えばよい。 一般に、 きれいな変換画像を生成する為には、 変換画像 (ここでは捕正 第 2被写体画像) の画素位置に対応する元画像 (ここでは第 2被写体画 像) の画素位置を求め、 その画素位置から変換画像の画素値を求める。 この時、 使用する変換関数は F s r になる。
また、 一般に求めた元画像の画素位置は整数値とはならないので、 そ のままでは求めた元画像の画素位置の画素値は求められない。 そこで、 通常は何らかの補間を行う。 例えば最も一般的な手法と して、 求めた元 画像の画素位置の周囲の整数値の画素位置の 4画素から一次補間で求め る手法がある。 一次補間法に関しては、 一般的な画像処理の本など (例 えば、 森北出版 : 安居院猛、 中嶋正之共著 「画像情報処理」 の P 5 4 ) に載っているので、 ここでは詳しい説明を省略する。
図 3 8 ( c ) は、 図 3 8 ( a ) の第 2被写体画像と図 3 7 ( a ) の第 1被写体画像とから、 第 2被写体画像が第 1被写体画像の背景部分に重 なるように生成した補正第 2被写体画像の例である。 この例での捕正は 平行移動だけである。 補正の様子が分かるように、 図 3 8 ( a ) の第 2 被写体画像の範囲を点線で示してある。 図 3 8 ( a ) の第 2被写体画像 よりフレーム枠全体が少し右下に移動している。
補正の結果、 対応する第 2被写体画像が存在しない部分が出てく る。 例えば、 図 3 8 ( c ) の右端の点線と実線の間の部分は、 図 3 8 ( a ) の第 2被写体画像には存在しない部分なので、 抜けている。 これは、 下 の道路を示す水平線が右端までいかずに途切れているのでも分かる。 そ の部分は、 S 1 4— 2で説明するマスク画像を使って除外するので適当 な画素値のままと しておいても問題はない。
なお、 図 4 7 ( a ) は補正に回転が必要な場合の第 2被写体画像の例 である。 第 1被写体画像は、 図 3 7 ( a ) と同じとする。 画面全体が図 3 8 ( a ) と比べて少し左回りに回転している。
図 4 7 ( b ) は、 図 4 7 ( a ) の第 2被写体画像と図 3 7 ( a ) の第 1被写体画像とでプロックマツチングを行った結果である。 ブロックは 回転などがあっても、 回転量やブロックの大きさがそれほど大きくなけ れば、 ブロック内での画像変化は少ないので、 回転に追従して正確なマ ツチングがある程度可能である。
図 4 7 ( c ) は、 図 4 7 ( b ) のブロックマツチング結果をもとに背 景補正量を算出し、 補正した第 2被写体画像である。 図 3 7 ( a ) の第 1被写体画像と背景部分が重なるようになり、 回転が補正されているの が分かる。 補正の様子がわかるように、 図 4 7 ( a ) の画像枠を点線で 示してある。
S 1 4 _ 2では、 補正画像生成手段 2 5が、 補正第 2被写体画像のマ スク画像を生成して、 S 1 4— 3へ処理が進む。
マスク画像は、 補正画像を生成する際、 補正画像上の各画素に対応す るオリジナル画像上の画素位置が先に説明した式で求められるが、 その 画素位置がオリジナル画像の範囲に収まっているかどうかで判断して、 収まっていればマスク部分として補正画像上の対応する画素の画素値を 例えば 0 (黒) にし、 収まっていなければ例えば 2 5 5 (白) にすれば よい。 マスク部分の画素値は 0、 2 5 5に限らず自由に決めてよいが、 以降では、 0 (黒) 、 2 5 5 (白) で説明する。
図 3 8 ( d ) は、 図 3 8 ( c ) のマスク画像の例である。 実線のフレ ーム枠中の黒く塗りつぶされた範囲がマスク部分である。 このマスク部 分は、 補正された画像中でオリ ジナルの画像 (補正前の画像) が画素を 持っている範囲を示している。 従って、 図 3 8 ( d ) では、 対応する第 2被写体画像が存在しない右下端部分がマスク部分とはなっておらず、 白くなつている。
S 1 4— 3では、 差分画像生成手段 2 6が、 第 1被写体画像と、 捕正 画像生成手段 2 5 ( S 1 4 - 1 ) から得られる補正第 2被写体画像とそ のマスク画像とを用いて、 第 1被写体画像と補正第 2被写体画像との差' 分画像を生成して S 1 4一 4へ処理が進む。
差分画像を生成するには、 ある点 (x、 y ) のマスク画像上の点の画 素値が 0かどうかを見る。 0 (黒) ならば補正第 2被写体画像上に補正 された画素が存在するはずなので、 差分画像上の点 (x、 y ) の画素値 P d ( X、 y ) は、
P d ( x、 y ) = I P 1 ( x、 y ) — P f 2 ( x、 y ) |
より、 第 1被写体画像上の画素値 P 1 ( x、 y ) と補正第 2被写体画像 上の画素値 P f 2 ( x、 y ) の差の絶対値とする。
ある点 (x、 y ) のマスク画像上の点の画素値が 0 (黒) でないなら ば、
P d ( X、 y ) = 0
とする。
これらの処理を、 点 (x、 y ) を差分画像の左上から右下まですべて の画素について繰り返せばよい。
図 3 9 ( a ) は、 図 3 7 ( a ) の第 1被写体画像と図 3 8 ( c ) の捕 正第 2被写体画像、 図 3 8 ( d ) のマスク画像から生成された差分画像 の例である。 人物 ( 1 ) と人物 ( 2 ) の領域以外の所は背景が一致して いる、 あるいはマスク範囲外と して差分が 0 となる。 この結果、 主に人 物 ( 1 ) の領域と人物 ( 2 ) の領域内がそれぞれ、 人物 ( 1 ) の画像と 背景の画像、 人物 ( 2 ) の画像と背景の画像が交じり合ったような画像 となっている。
通常、 S 1 3での補正量の算出の誤差や、 捕正画像生成の補間処理な どの誤差、 背景部分の画像自体の撮影時間の差による微妙な変化などに よって、 人物 ( 1 ) の領域と人物 ( 2 ) の領域以外にも小さな差分部分 は出てく る。 通常は数画素程度の大きさで、 差もあまり大きくないこと が多い。 図 3 9 ( a ) でも人物 ( 1 ) の領域と人物 ( 2 ) の領域の周辺 に白い部分がいくつか出てきている。
一方、 図 4 7 ( b ) の場合のマスク画像は図 4 7 ( d ) のようになる c なお、 拡大縮小や回転の補正量がある場合でも、 S 1 4— 1、 S 1 4— 2で補正やマスク画像生成を行ってしまえば、 後の処理は手順と しては 変わりないので、 以降の説明では、 第 2被写体画像は図 4 7 ( a ) は使 わず、 図 3 8 ( a ) のものを使う。
以上の S 1 4— 1から S 1 4— 3の処理で、 図 3 6の S 1 4の差分画 像生成の処理が行える。
図 4 8は、 図 3 6の S 1 5の処理、 すなわち被写体領域を抽出する処 理の一方法を説明するフローチャート図である。
p 5 0を経た S 1 5— 1では、 被写体領域抽出手段 2 7が、 差分画像 生成手段 2 6 ( S 1 5 ) から得られる差分画像から、 「ラベリ ング画 像」 ( 「ラベリ ング画像」 の意味は実施の形態 1にて説明ずみである) を生成して、 S 1 5— 2へ処理が進む。
まず準備と して、 差分画像から 2値画像を生成する。 2値画像の生成 方法も色々考えられるが、 例えば、 差分画像中の各画素値を所定の閾値 と比較して、 閾値より大きければ黒、 以下ならば白、 などとしてやれば よい。 差分画像が R, G, Bの画素値からなる場合は、 R, G, Bの画 素値を足した値と閾値を比較すればよい。
図 3 9 ( b ) は、 図 3 9 ( a ) の差分画像から生成した 2値画像の例 である。 黒い領域が領域 1 1 0から 1 1 6の 7つ存在し、 大きな人型の 領域 1 1 2、 1 1 3以外は小さな領域である。
次に、 生成した 2値画像からラベリ ング画像を生成する。 2値画像と ラベリ ング画像とは、 2値か多値かの違いなので、 ラベリ ング画像例は 図 3 9 ( b ) で説明する。 図 3 9 ( b ) の領域 1 1 0力 ら 1 1 6の番号 の後に 「 1 1 0 ( 1 ) 」 などと括弧書きで番号がついているが、 これが 各領域のラベリ ング値である。 これ以外の領域はラベリ ング値 0が振ら れているとする。
なお、 ラベリ ング画像図 3 9 ( b ) は、 紙面上で多値画像を図示する のが難しいので 2値画像のよ うに示してあるが、 実際はラベリ ング値に よる多値画像になっているので、 表示する必要はないが実際に画像と し て表示した場合は図 3 9 ( b ) とは異なる見え方をする。
S 1 5 _ 2では、 被写体領域抽出手段 2 7が、 S 1 5— 1で得られる ラベリ ング画像中の 「ノイズ」 的な領域を除去して、 S 1 5— 3へ処理 が進む。 「ノイズ」 とは目的のデータ以外の部分を一般に指し、 ここで は人型の領域以外の領域を指す。
ノイズ除去にも様々な方法があるが、 簡単な方法と して、 例えばある 閾値以下の面積のラベル領域は除く という方法がある。 これには、 まず 各ラベル領域の面積を求める。 面積を求めるには、 全画素を走査し、 あ る特定のラベリ ング値を持つ画素がいくつ存在するか数えればよい。 全 ラベリ ング値について面積 (画素数) を求めたら、 それらの内、 所定の 閾値以下の面積 (画素数) のラベル領域は除去する。 除去処理は、 具体 的には、 そのラベル領域をラベリ ング値 0にしてしま う力 、 新たなラベ リ ング画像を作成し、 そこにノイズ以外のラベル領域をコピーする、 で もよい。 図 3 9 ( c ) は、 図 3 9 ( b ) のラベリ ング画像からノイズ除去した 結果である。 人型の領域 1 1 2、 1 1 3以外はノイズと して除去されて しまっている。 .
なお、 被写体以外のラベル領域を除去するノィズ除去処理の完全自動 化が難しいなら、 例えば、 どの領域が被写体領域であるかを、 タブレツ トゃマウスなどの入力手段を使ってユーザに指定してもら う方法も考え られる。 指定方法も、 被写体領域の輪郭まで指定してもら う方法と、 輪 郭はラベリ ング画像の各ラベル領域の輪郭を使い、 どのラベル領域が被 写体領域であるかどうかを指定してもら う方法などが考えられる。
また、 図 3 9 ( b ) ではたまたま一人の領域がうまく一つのラベル領 域となっているが、 画像によっては、 一人の被写体であっても複数のラ ベル領域に分かれてしまう ことがある。 例えば、 被写体領域中の真中辺 りの画素が、 背景と似たよ うな色や明るさの画素の場合、 差分画像中の その部分の画素値が小さいので、 被写体領域の真中辺りが背景と認識さ れてしまい、 被写体領域が上下や左右に分断されて抽出されてしま う こ とがある。 その場合、 後の被写体の重なり検出や合成処理などでうまく 処理できない場合が出てく る可能性がある。
そこで、 既に実施の形態 1 にて説明したよ う に、 ラベリ ング画像のラ ベル領域を膨張させて、 距離的に近いラベル領域を同じラベル領域と し て統合してしま う処理を入れるという方法もある。 さ らに、 領域を抽出 する手法の 1つである 「スネーク」 を統合に利用する方法も考えられる。
また、 距離的に近いラベル領域の統合に使わなく ても、 第 1、 第 2の 被写体領域同士に重なりがあることを見逃す危険性を減らすことに使う 為に、 抽出した被写体領域を一定量膨張させるという方法もある。 なお、 ここでは、 膨張や統合は特に行わない処理例で説明している。
S 1 5— 3では、 重なり検出手段 2 8が、 S 1 5— 2で得られるノィ ズ除去されたラベリ ング画像から被写体同士の重なり があるかどうかを 検出し、 重なりが検出されなければ S 1 5— 4へ進み、 重なりが検出さ れれば S 1 5— 5 へ進む。
重なり の検出方法には様々な方法が考えられるが、 ここでは簡単に求 められる方法と して、 撮影 Z合成したい被写体の数と、 ノイズ除去され たラベリ ング画像中の被写体の領域数とを使う方法について説明する。
まず、 撮影/合成したい被写体の数は予めプログラムや外部記憶、 ュ 一ザ入力などによって指定されているとする。 例えば、 カメラに 「 2集 団撮影モー ド」 (被写体数 2 ) 、 「 3集団撮影モー ド」 (被写体数 3 ) などのモード設定があり、 これをユーザが設定する。
なお、 ここでは 「被写体の数」 は領域と して一塊になっている人物な どの数である。 例えば、 第 1 の被写体、 第 2の被写体と してそれぞれ 1 人ずつならば、 被写体の数は 2 となる。 第 1の被写体は 1人と して、 も し、 第 2の被写体が 2人の場合、 その 2人がく っつきあって写る場合は、 一塊の領域となっているので、 第 2の被写体を 1 と し、 被写体の数は合 計 2 となるが、 2人が距離を空けて離れている場合は、 一塊の領域とな つていないので、 第 2の被写体を 2 と し、 被写体の数は合計 3 となる。 被写体の領域数は、 ノィズ除去されたラベリ ング画像中の異なるラベ ル値の領域数を数えればよい (ラベリ ング値 0の部分は除く) 。
そこで、 重なり検出手段 2 8は、 得られた撮影/合成したい被写体の 数と、 ノィズ除去されたラベリ ング画像中の被写体の領域数とがー致す るかどうかを見て、 一致するならば被写体同士が重なっていないと判断 0
1 4 4 ' し、 一致しない場合は被写体同士が重なっていると判断する。 この重なり検出手段 2 8による判断の原理は次の通りである。 説明を 簡単にする為、 ここでは撮影/合成したい被写体の数は 2 とする。 もし被写体同士が重なっていないならば、 当然、 第 1の被写体の領域 と第 2の被写体の領域は分離しているはずである。 従って、 被写体同士 が重なっていない場合、 ノィズ除去した後の被写体の領域の数は 2 とな るはずである。
もし被写体同士が重なっているのならば、 第 1の被写体の領域と第 2 の被写体の領域は重なっている部分で統合されるため、 分離していない はずである。 従って、 被写体同士が重なっている場合、 ノイズ除去した 後の被写体の領域の数は 1 となるはずである。
撮影/合成したい被写体の数が 3でも同様の考え方で、 もし被写体同 士が重なっていないならば、 それぞれの領域は分離されているので、 ノ ィズ除去した後の被写体の領域の数は 3 となるはずである。 もし被写体 同士が重なっているのならば、 3つの被写体の領域の少なく ともいずれ か一組は重なっている部分で統合されるため、 分離していないはずであ る。 従って、 被写体同士が重なっている場合、 ノィズ除去した後の被写 体の領域の数は 1あるいは 2 となるはずである。 図 3 7 ( a ) 、 図 3 8 ( a ) ではそれぞれ被写体となる人物が 1人な ので、 撮影 Z合成したい被写体の数は 2で設定されているとする。 図 3 9 ( c ) では、 領域の数は、 人型の領域 1 1 2、 1 1 3の 2つなので、 得られた撮影/合成したい被写体の数と、 ノイズ除去されたラベリ ング 画像中の被写体の镇域数とがー致する。 従って、 この場合、 重なり検出 手段 2 8は被写体同士が重なっていないと判断する。 08510
1 4 5
重なりがある例と して、 第 2被写体画像の図 4 1 を使う場合を考える。 第 1被写体画像は図 3 7 ( a ) をそのまま使う。 これらから生成された 差分画像が図 4 2 ( a ) である。 図 4 2 ( a ) では、 被写体同士が重な つてしまい、 重なった腕の部分は、 第 1の被写体と第 2の被写体の画像 が交じり合った画像となり、 それ以外の被写体の部分は、 第 1の被写体 と背景部分、 第 2の被写体と背景部分の画像が交じり合った画像となつ ている。 図 4 2 ( a ) のラベリング画像が図 4 2 ( b ) であり、 図 4 2 ( b ) からノイズ除去を施したものが図 4 2 ( c ) である。 図 4 2 ( c ) では、 第 1の被写体と第 2の被写体の領域は腕の部分で 結合されてしまっているので、 1塊の領域 2 0 2 しか残らない。 この場 合、 ノィズ除去されたラベリング画像中の被写体の領域数は 1 となるの で、 撮影/合成したい被写体の数と一致せず、 重なりがあると判断され ることになる。 なお、 重なり検出の方法として、 第 1の被写体と第 2の被写体の輪郭 を正確に求めて、 その輪郭同士が重なっているかどうかで判断する方法 もある。 輪郭が正確に求まるのならば、 重なりの検出を行う ことも可能 であり、 さらに重なり領域を使った表示、 重なり回避などの様々な処理 を行うことも可能である。 しかし、 被写体の領域を画像処理だけで完全に正確に抽出することは 一般に難しく、 人間の知識や人工知能的な高度な処理が一般に必要とさ れる。 領域を抽出する手法の 1つである 「スネーク」 などもあるが、 完 璧ではない。 なお、 第 1被写体画像おょぴ第 2被写体画像に加えて、 各 被写体画像と少なく とも一部共通する背景部分が写っていて被写体は写 つていない背景画像を利用するのであれば、 重なりの有無にかかわらず、 P T脑 03/008510
1 4 6
被写体の領域を抽出することができる。 これに対し、 第 1被写体画像と 第 2被写体画像からだけで、 重なりがあるかもしれない被写体の輪郭を 正確に抽出するのは難しい。 従って、 ここでは上述した簡単な方法で重なりの有無だけを検出する ことにする。
S 1 5— 4では、 被写体領域抽出手段 2 7が、 ノィズ除去されたラベ リング画像中の被写体の領域について、 どちらが第 1被写体領域で、 ど ちらが補正第 2被写体領域なのかを判断して、 p 6 0へ抜ける。 上述の背景画像を用いる方法では、 背景画像と第 1被写体画像との差 分画像、 背景画像と第 2被写体画像との差分画像を使っているので、 被 写体領域はそれぞれ抽出できる。 抽出された被写体領域は、 それぞれ第 1被写体領域と第 2被写体領域となる。 つまり、 第 1被写体領域と第 2 被写体領域とは独立して抽出できる。
しかし、 本発明では背景画像を使わないので、 第 1被写体画像と第 2 被写体画像との差分画像からは、 第 1被写体の領域と第 2被写体領域は 独立して抽出できず、 第 1被写体領域と第 2被写体領域とが混ざった形 でしか抽出できない。 つまり、 図 3 9 ( c ) のようなノイズ除去された ラベリング画像からは、 被写体領域 1 1 2、 1 1 3が 2つ得られるだけ で、 2つの領域 1 1 2、 1 1 3のうち、 どちらが第 1被写体領域でどち らが第 2被写体領域なのかは、 これだけでは被写体領域抽出手段 2 7が 判断できない。
どちらが第 1被写体領域か第 2被写体領域か判断できないというのは、 見方を変えると、 第 1、 第 2の被写体の画像か背景部分の画像かを被写 体領域抽出手段 2 7が判断できない、 という ことでもある。 例えば、 第 1被写体画像 (図 3 7 ( a ) ) と第 2被写体画像 (図 3 8 ( a ) ) から、 図 3 9 ( c ) の領域 1 1 2、 1 1 3に相当する範囲をそ れぞれ抜き出したのが図 4 9 ( a ) 〜 ( d ) である。 すなわち、 図 4 9 ( a ) は、 第 1被写体画像の領域 1 1 2の範囲、 図 4 9 ( b ) は、 第 2 5 被写体画像の領域 1 1 2の範囲、 図 4 9 ( c ) は、 第 1被写体画像の領 域 1 1 3の範囲、 図 4 9 ( d ) は、 第 2被写体画像の領域 1 1 3の範囲 である。
背景部分以外は、 第 1被写体画像中には第 1 の被写体だけ、 第 2被写 体画像中には第 2の被写体だけが写っていることが前提なので、 実際に L0 は、 「図 4 9 ( a ) が第 1の被写体の画像で図 4 9 ( d ) が第 2の被写 体の画像」 、 あるいは 「図 4 9 ( b ) が第 1 の被写体の画像で図 4 9 ( c ) が第 2の被写体の画像」 のどちらかが正しいことなる。 従って、 第 1被写体領域と第 2被写体領域を区別するには、 図 4 9 ( a ) 、 ( d ) と図 4 9 ( b ) 、 ( c ) のどちらが被写体範囲の画像か L5 を識別すればよい。
どちらが被写体範囲の画像かを識別するには様々な方法が考えられる が、 例えば、 被写体や背景の特徴が予めわかっているのならば、 それを 利用して区別する方法がある。
例えば、 被写体が人物であることが分かっているのならば、 被写体範 !0 囲の画像には肌色が多く含まれている可能性が高い。 従って、 肌色が多 く含まれる方を被写体範囲の画像とすればよい。
色の認識の仕方にも様々な方法があるが、 例えば、 図 3 6の R、 G、 Bの画素値から、 色相 H、 彩度 S、 明度 I を求め、 主に色相 Hを使って 認識する方法がある。 色相 H、 彩度 S、 明度 I の求め方には各種方式が あり、 一般的な画像処理の本など (例えば、 東京大学出版会、 1 9 9 1 年発行 「画像解析ハンドブック」 P 4 8 5〜 4 9 1 ) に载つているので、 ここでは詳細は省略するが、 例えば同書籍中の 「H S I 6角錐カラーモ デルによる変換」 方法では、 色相 Hは 0から 2 πの値域を持つ。
具体的には、 被写体領域抽出手段 2 7が標準となる肌色の Ηの範囲を 決める。 次に、 同手段 2 7が図 4 9 ( a ) 〜 ( d ) の領域の各画素の H を求め、 標準となる肌色の Hの範囲に入っていれば、 肌色としてカウン トする。 続いて、 同手段 2 7が図 4 9 ( a ) 、 ( d ) の肌色のカウント 数と、 図 4 9 ( b ) 、 ( c ) の肌色のカウント数のどちらが多いか比較 し、 多い方が被写体範囲の画像とすればよい。
特徴量を使って、 どちらが被写体範囲の画像かを識別する方法として、 肌色を使う以外にも、 例えば、 周囲の背景部分と似ているかどうかで識 別する方法がある。
この場合、 まず、 被写体領域抽出手段 2 7が被写体領域中の特徴量 (後述) を第 1被写体画像、 第 2被写体画像で求める。 次に、 同手段 2 7が被写体領域の周囲の領域 (例えば周囲 2 0 ドッ トなど) の特徴量を 求める。 被写体領域の周囲は背景部分であり、 背景部分は重なるように 補正しているので、 これは片方だけでも良い場合もある。 そして、 同手 段 2 7が、 背景部分の特徴量と近い特徴量をもつ方を背景部分の画像、 近くない方を被写体領域の画像と判断すればよい。
上記の特徴量と しては、 上述したような R、 G、 Bの画素値や、 色相 H、 彩度 S、 明度 I の他にも、 テクスチャなども利用可能である。 テク スチヤを特徴量と して求める方法は様々考案されているが、 例えば、 明 度 I のヒス トグラムなどがある。 これは、 ある領域中の画素に対して、 全体の和が 1 . 0 となるよ うに正規化された明度 I のヒス トグラム P ( i ) 、 ( i = 0、 1 、 · · · -、 n — 1 ) 、 を取り、 平均 、 分散 ( σ 0 2 ) 、 歪度 T s、 尖度 T kを、 被写体領域抽出手段 2 7が以下の式によ つて求める。 なお、 (X 0 Y) は、 Xの Y乗を意味する。
n一 1
∑ X Ρ ( i )
0
n - 1
σ ί 2 = ∑ ( ( ) Φ 2 ) X Ρ ( i )
0
η - 1
Τ s = (∑ ( ( ) ø 3 ) X Ρ ( i ) ) ( σ ø 3 )
= 0
η
Τ k = (∑ ( ( β ) 4 ) X Ρ ( i ) ) ( σ ø 4 )
0
以上の 4つの値を特徴量と して使う。
特徴量と しては、 その他にも、 同時生起行列や差分統計量、 ランレン ダス行列、 パワースぺク トル、 それらの第 2次統計量、 高次統計量を使 う方法などがあるが、 一般的な画像処理の本など (例えば、 東京大学出 版会、 1 9 9 1年発行 「画像解析ハンドブック」 Ρ 5 1 7〜 5 3 8 ) に 載っているので、 ここでは詳細は省略する。
これにより、 図 4 9の場合、 図 4 9 ( a ) 、 ( d ) が、 被写体領域抽 出手段 2 7によって被写体範囲の画像と判断されたとする。 すると、 領 域 1 1 2が第 1被写体領域、 領域 1 1 3が第 2被写体領域となる。
なお、 ここでの処理は、 S 1 5— 3で被写体同士の重なりが無い場合 に実行される処理なので、 図 3 9 ( c ) のように第 1の被写体と第 2の 被写体が完全に分離した状態になっているはずである。 図 4 2 ( c ) の ように、 第 1の被写体と第 2の被写体が統合した状態にはなっていない はずである。
S 1 5— 5では、 S 1 5 _ 3で、 撮影 Z合成したい被写体の数と、 ノ ィズ除去されたラベリ ング画像中の被写体の領域数とが一致しなかった ため、 被写体領域抽出手段 2 7が、 ノィズ除去されたラベリング画像中 の被写体の領域を、 第 1被写体領域と第 2被写体領域が統合された領域 (以降、 「被写体統合領域」 と呼ぶ) と定めて、 p 6 0へ処理が抜ける ( この場合、 被写体領域抽出手段 2 7によって第 1被写体領域と第 2被 写体領域を独立して抽出することはあきらめ、 統合された領域として処 理する。 なお、 上述したように、 第 1の被写体と第 2の被写体の輪郭を 正確に求められる場合は、 S 1 5— 3や S 1 5— 5の処理を行わず、 S 1 5 _ 4の処理を行えばよレヽ。
以上の S 1 5— 1から S 1 5— 5の処理で、 図 3 6の S 1 5の被写体 領域抽出処理が行われる。
図 5 0は、 図 3 6の S 1 6の処理、 すなわち重なりに関する処理の一 方法を説明するフローチャート図である。 重なりに関する別の処理方法 に関しては、 後で図 5 1、 2 3を使って説明する。
p 6 0を経た S 1 6— 1では、 重なり警告手段 3 1において、 重なり 検出手段 2 8 ( S 1 5 ) から得られる重なりがあるかどうかの情報から 重なりがある場合は S 1 6 A— 2へ処理が進み、 無い場合は p 7 ◦へ抜 ける。
S 1 6 A— 2では、 重なり警告手段 3 1が、 第 1の被写体と第 2の被 写体に重なりがあることをユーザ (撮影者) あるいは被写体あるいはそ の両方に警告して、 p 7 0へ抜ける。
警告の通知の仕方と しては色々考えられる。
例えば、 合成画像を利用して通知する場合、 重なりのある被写体領域 を目立つように合成画像に重ねて表示すればよい。 図 4 3はこれを説明 する例である。
図 4 3では、 図 4 2 ( c ) の領域 2 0 2、 すなわち第 1 の被写体と第 2の被写体の重なり合った領域が、 合成画像上に重ねて半透明で表示さ れている。 領域 2 0 2の部分を赤などの目立つ色のフィルタをかける (領域 2 0 2に色セロハンを当てるイメージ) とさらに良い。 あるいは. 領域 2 0 2の領域やその枠を点滅させて表示させても良い。 これらの合 成方法については、 後で図 5 3で説明する。
図 4 3では、 さらに文字で警告を行っている例である。 図 4 3の上の 方に合成画像に重ねて警告ウィンドウを出し、 その中で 「被写体が重な つています ! 」 というメ ッセージを表示している。 これも目立つような 配色にしたり、 点滅させたり してもよい。
合成画像に対する上書きは、 重なり警告手段 3 1の指示により、 重ね 画像生成手段 2 9で行っても良いし、 重ね画像表示手段 3 0で行っても 良い。 警告ウインドゥを点滅などさせる場合は元の合成画像を残してお く必要があるかもしれないので、 重ね画像表示手段 3 0に対して、 例え ば主記憶 7 4または外部記憶 7 5から警告ウィンドゥのデータを間歇的 に読み出して与える等して行った方がよい場合が多い。 T JP2003/008510
1 5 2
これらの警告表示を図 3 5 ( a ) のモニター 1 4 1上に表示すれば、 撮影しながら重なり状態を確認、することができて、 撮影に便利である。 この時、 撮影者は被写体 (人物 ( 2 ) ) に対して、 「重なっているから もっと右の方に動いてくれ」 などと、 次に撮影した画像を第 2被写体画 像などと して使う場合に、 重なり状態を解消するよ うな指示を行うこと ができるという利点がある。 なお、 次に撮影した画像を第 2被写体画像などとして使う場合とは、 ユーザがメニューゃシャッターボタンで第 2被写体画像の記録 (メモリ 書き込み) を指示する場合か、 先に説明したように、 第 2被写体画像を 動画的に撮影し補正重ね画像をほぼリアルタイムに表示する繰り返し処 理の専用モードになっている場合などが考えられる。 また、 図 3 5 ( a ) のモニタ一 1 4 1は撮影者の方を向いているが、 被写体の方にモニターを向けることができる装置ならば、 重なり状態を 被写体も確認することができ、 撮影者に指示されなくても、 被写体が自 発的に重なりを解消するように動く こともできるよ うになる。 モニター
1 4 1 とは別のモニターを用意して、 それを被写体が見られるようにす るのでもよレ、。 また、 先に専用モードと して説明したように図 3 6 の S 1 3から S 1 7の処理を繰り返すのならば、 現在の重なり状態がほぼリアルタイムで 分かるので、 被写体の移動によつて重なりが解消できたかどうかがほぼ リアルタイムで分かり、 撮影が便利で効率よくできる。 図 3 6の S 1 3 から S 1 7の処理は、 充分速い C P Uやロジック回路などを使えば、 そ れほど時間は必要ない。 実使用上は、 1秒に 1回程度以上の速さの繰り 返し処理を実現できれば、 ほぼリアルタイムの表示と言って良い。 なお、 S 1 4で補正画像を生成する際、 第 1被写体画像を基準画像に する と、 合成画像も第 1被写体画像がベースとなる。 モニター 1 4 1 に 写る背景の範囲は第 1被写体画像の背景の範囲となる。 上述したリ アル タイムに繰り返し処理を行う場合、 カメ ラを振ると撮影される背景の範 囲が変わるが、 撮影される画像は第 2被写体画像であって、 第 1被写体 画像ではない。 従って、 モニタ一 1 4 1 に写る背景の範囲は、 第 1被写 体画像の背景の範囲のまま変わらない。 このため、 撮影している範囲が モニター 1 4 1 に写らないノ反映されないというのは、 ユーザにとって 違和感がある。
これに対し、 第 2被写体画像を基準画像にすると、 モニター 1 4 1 に 写る背景の範囲は第 2被写体画像の背景の範囲となる。 上述したリ アル タイムに繰り返し処理を行う場合、 カメ ラを振ると撮影される背景の範 囲が変わり、 撮影される画像は第 2被写体画像 (基準画像) なので、 モ 二ター 1 4 1 に写る背景の範囲は、 撮影中の背景の範囲となる。 これに よ り、 撮影している範囲がモニター 1 4 1 に写る Z反映されるので、 ュ 一ザにとつて違和感が少ないという効果が出てく る。
また、 重なり合った被写体領域を合成画像と重ねて表示した結果、 重 なり具合と合成画像のフレーム枠との関係を見て、 被写体がどう動いて も重なりが生じたり、 -被写体がフレームァゥ ト してしま う とユーザが判 断できれば、 も う一度、 第 1被写体画像の撮影からやり直した方が良い という判断を行う こともできるよ う になる。
また、 警告の通知の仕方と して、 図 3 5 ( a ) のランプ 1 4 2を点燈 あるいは点滅させることで知らせることもできる。 警告なので、 ランプ の色は赤やオレンジなどの色にしておく と分かりやすい。 ランプの点滅 などは一般にモニタ一 1 4 1に撮影者が注目 していなくても気づきやす いとレヽぅ利点がある。
また、 図 4 3のように被写体の重ね画像を表示せず、 重なりがあるこ とだけを、 警告メ ッセージやランプで知らせてもよい。 この場合、 どの く らい重なっているかはすぐには分からないが、 重なりがあるかないか だけ分かれば、 後は被写体が移動するなどして警告通知が無くなるかど うかを見ていれば重なりの無い合成画像を得るという 目的は達せられる。 従って、 警告メ ッセージやランプで重なりがあることを知らせるだけに することにより、 重なり部分を表示させる処理が省けるという利点が出 てく る。
また、 図 3 5 ( a ) ではランプ 1 4 2を撮影者側のみ見られるような 配置にしているが、 もちろん、 被写体側からも分かるよ うに、 図 3 5 ( b ) の本体 1 4 0の前面側につけてもよい。 効果については、 モニタ 一を被写体が見られる場合と同様である。
また、 図 3 5 ( a ) にはないが、 モニター 1 4 1 とは別にファインダ 一のような画像を確認できる別の手段がある場合、 そちらにモニター 1 4 1 と同じ警告通知を表示したり、 フアインダー内部にランプを組み込 んでおき、 通知する方法も考えられる。
また、 図 3 5 ( a ) 、 図 3 5 ( b ) では示していないが、 図 3 4 のス ピ一力 8 0を使って警告通知を行っても良い。 重なりがある場合に警告 ブザーを鳴らしたり、 「重なっています」 などの音声を出力したりなど して、 警告通知を行う。 この場合にもランプと同様の効果が期待できる。 ス ピーカを使う場合、 光と違って指向性があまりないので、 一つのスピ 一力で撮影者も被写体も両方重なり状態を知ることができるという利点 がある。
以上の S 1 6— 1から S 1 6 A— 2の処理で、 図 3 6の S 1 6の重な りに関する処理が行える。
図 5 1 は、 図 3 6の S 1 6の処理、 すなわち重なり に関する処理の別 の一方法を説明するフローチャー ト図である。
p 6 0を経た S 1 6— 1では、 シャッターチャンス通知手段 3 2が、 重なり検出手段 2 8 ( S 1 5 ) から得られる情報に基づいて重なりがあ るかどうかを判断し、 重なりがある場合は p 7 0へ処理が抜け、 無い場 合は S 1 6 B— 2へ処理が進む。
S 1 6 B— 2では、 シャッターチャンス通知手段 3 2が、 第 1 の被写 体と第 2の被写体に重なりがないことをユーザ (撮影者) あるいは被写 体あるいはその両方に通知して、 p 7 0へ抜ける。
この通知は、 実際には、 重なりが無いことを通知するという よ り 、 重 なりがないことによる副次的な操作、 具体的には第 2被写体を記録する シャッターチャンスであることを通知するよ うな使われ方が最も一般的 である。 その場合、 その通知は、 主に撮影者に対するものとなる。
シャッターチャンスの通知方法に関しては、 図 5 0で説明したよ うな 方法がほぼそのまま使える。 例えば、 図 4 3のメ ッセージを 「シャツタ 一チャンスです ! 」 などと変えるなどすればよい。 その他、 ランプ、 ス ピー力についても、 色や出力する音の内容などは多少変わるが、 通知手 法と しては同様に利用できる。
シャッターチヤンスであることが分かれば、 撮影者はシャッターを切 ることで被写体同士に重なりのない状態で撮影/記録することができ、 また、 被写体もシャッターを切られるかも しれない準備 (例えば目線の 方向や顔の表情など) を行う ことができるという利点が出てくる。
以上の S 1 6— 1 力 ら S 1 6 B— 2の処理で、 図 3 6の S 1 6の重な りに関する処理が行える。
図 5 2は、 図 3 6の S 1 6の処理、 すなわち重なりに関する処理のさ らに別の一方法を説明するフローチャート図である。
p 6 0を経た S 1 6 _ 1では、 自動シャツター手段 3 3が、 重なり検 出手段 2 8 ( S 1 5 ) から得られる情報に基づいて重なりがあるかどう かを判断し、 重なりがある場合は P 7 0へ処理が抜け、 無い場合は S 1 6 C - 2へ処理が進む。
S 1 6 C— 2では、 自動シャッター手段 3 3が、 シャッターボタンが 押されているかどうかを判断し、 押されていれば S 1 6 C— 3へ進み、 押されていなければ p 7 0へ抜ける。
S 1 6 C— 3では、 自動シャツター手段 3 3が、 第 2被写体画像の記 録を第 2被写体画像取得手段 2 3へ指示して、 p 7 0へ処理が抜ける。 第 2被写体画像取得手段 2 3は、 指示に従い、 撮影画像を主記憶 7 4、 外部記憶 7 5などに記録する。
これによつて、 被写体同士が重なっていない時にシャッターポタンが 押されていれば、 自動的に撮影画像を記録することができるようになる という効果が出てく る。 同時に、 誤って重なっている状態で撮影画像を 記録してしま う ことを防ぐ効果も出てく る。
実際の使われ方と しては、 被写体の様子などを見て、 今なら撮影画像 を記録しても良いと思ったら撮影者がシャッターポタンを押すが、 その 時点で必ずしも記録される訳ではなく、 重なりがある場合は記録されな い。 すなわち、 自動シャッター手段 3 3が、 重なりがあると判断した場 合には、 撮影者がシャッターボタンを押しても第 2被写体画像取得手段 2 3による記録動作が行われないよ うに、 第 2被写体画像の記録を禁止 する。
なお、 記録されない場合は、 その旨を表示やランプ、 スピーカなどの 5 通知手段で撮影者などに知らせた方が、 シャッターを押したが撮影され てないことが分かってよい。
そして、 被写体が動く などして、 重なりがない状態になった時に、 再 度シャッターボタンが押されれば、 今度は記録される。 記録されたこと が分かるよ うに、 表示やランプ、 スピーカなどの通知手段で撮影者など L 0 に知らせるとよい。
シャッターボタンを毎度押すのではなく、 押しっぱなしにするならば 重なっている状態から重なりがなく なった瞬間に自動的に記録されるこ とになる。 但し、 重なりがなく なった瞬間だとまだ被写体が静止してお らず撮影画像がぶれてしまったり、 被写体が撮影される状態 (被写体が .5 他所を向いている時など) になっていない場合があるので、 その場合は 自動的に記録するまでに少し時間をあけると良い。
以上の S 1 6— 1力、ら S 1 6 C— 3の処理で、 図 3 6の S 1 6の重な り に関する処理が行える。
なお、 図 5 0〜 2 3の処理は必ずしも排他的な処理ではなく、 任意に :0 組み合わせて処理すること も可能である。 組み合わせの例と して、 次の よ うな利用シーンが可能となる。
『被写体同士が重なっている時は 「重なっています」 と警告がなされ. この時にシャッターポタンを押しても撮影画像は記録されない。 警告に 応じて被写体が動き、 重なりがなく なったらシャッターチヤンスランプ o
1 5 8
が点燈する。 シャッターチヤンスランプが点燈している間にシャッター ボタンを押したら撮影画像が記録される。 』
次に、 図 5 3は、 図 3 6の S 1 7の処理、 すなわち重ね画像を生成す る処理の一方法を説明するフローチヤ一ト図である。
p 7 0を経た S 1 7— 1では、 重ね画像生成手段 2 9が、 生成する重 ね画像の最初の画素位置を力レント画素に設定して S 1 7— 2 へ処理が 進む。 最初の画素位置は、 例えば左上などの隅から始まることが多い。 なお、 「画素位置」 は、 画像上の特定の位置を表し、 左上隅を原点、 右方向を + X軸、 下方向を + Y軸とした X— Y座標系で表現されること が多い。 画素位置は、 画像を表すメモリ上のア ドレスに対応し、 画素値 はそのァ ドレスのメモリ の値である。
S 1 7— 2では、 重ね画像生成手段 2 9が、 カレン ト画素位置は存在 するかどうかを判断し、 存在するならば S 1 7— 3 へ処理が進み、 存在 しないならば!) 8 0 へ抜ける。
L 5 S 1 7 - 3では、 重ね画像生成手段 2 9が、 カレン ト画素位置が被写 体統合領域内かどうかを判断し、 被写体統合領域内ならば S 1 7— 4 へ 処理が進み、 そうでないならば S 1 7 - 5へ処理が進む。 被写体統合領域内かどうかは、 重なり検出手段 2 8 ( S 1 5 - 5 ) で 被写体統合領域が得られ、 かつ、 被写体統合領域画像中のカレント画素 位置が黒 ( 0 ) かどうかで判断できる。
S 1 7 - 4では、 重ね画像生成手段 2 9が、 設定に応じた合成画素を 生成して、 重ね画像のカレン ト画素位置の画素値と して書き込む。
設定とは、 つまり どのような合成画像を合成するかということである 例えば、 図 4 0 ( b ) のよ うに第 1の被写体を半透明で合成するのか、 図 4 0 ( a ) のように不透明で第 1の被写体をそのまま上書きで合成す るのか、 図 4 3のように第 1の被写体も第 2の被写体も半透明で合成す るのか、 などである。 ここでは、 被写体統合領域内を扱っているので、 実質的には、 その領域の合成割合 (透過率) に関する設定となる。
合成割合 (透過率) が決まれば、 第 1被写体画像のカレン ト画素位置 の画素値 P 1 と補正画像生成手段 2 5 ( S 1 4 ) から得られる補正第 2 被写体画像の力レント画素位置の画素値 P f 2を得て、 所定の透過率 A ( 0. 0力 ら 1 . 0の間の値) で合成画素値 (P 1 X ( 1 - A) + P f 2 X A) を求めればよい。
例えば図 4 3のような被写体統合領域内を半透明とするには、 透過率 Aを 0. 5 とすればよい。
S 1 7— 5では、 S 1 7— 3でカレント画素が被写体統合領域に属さ ないと判断された場合に、 重ね画像生成手段 2 9が、 カレン ト画素位置 が第 1被写体領域内かどうかを判断し、 第 1被写体領域内ならば S 1 7 一 6へ処理が進み、 そうでないならば S 1 7— 7へ処理が進む。
第 1被写体領域内かどうかは、 被写体領域抽出手段 2 7 ( S 1 5 ) か ら得られる第 1被写体領域画像を使い、 カ レン ト画素 ί立置が黒 ( 0 ) か どうかで判断できる。 なお、 被写体統合領域が存在する場合は、 第 1被 写体領域は存在しないことが分かっているので、 第 1被写体領域内かど うか判断せずに ( S 1 7— 5を省略) 、 直接、 S 1 7— 7へ処理を進め てもよい。
なお、 第 1被写体領域であるかどうかで特に処理を変えない場合は、 S 1 7 - 5 , S 1 7— 6は省いて、 S 1 7— 3力 ら S 1 7— 7へ進めば よい。 S 1 7 _ 6では、 重ね画像生成手段 2 9が、 設定に応じた合成画素を 生成して、 重ね画像のカレント画素位置の画素値として書き込む。 ここ での処理は、 被写体統合領域 (画像) が第 1被写体領域 (画像) に変わ るだけで、 S 1 7— 4と同様である。
図 4 0 ( b ) のように第 1の被写体を半透明で合成するのなら、 第 1 の被写体の透過率を 0. 5 とすればよく、 図 4 0 ( a ) のように不透明 で第 1の被写体をそのまま上書きで合成するのならば、 第 1の被写体の 透過率を 0. 0 とすればよい。
S 1 7— 7では、 S 1 7— 5でカ レン ト画素が第 1被写体領域にも属 さないと判断された場合に、 重ね画像生成手段 2 9が、 カ レント画素位 置が第 2被写体領域内かどうかを判断し、 第 2被写体領域内ならば S 1 7— 8へ進み、 そうでないならば S 1 7— 9へ処理が進む。 ここでの処 理は、 第 1被写体領域が第 2被写体領域に変わるだけで、 S 1 7— 5 と 同様である。
S 1 7— 8では、 重ね画像生成手段 2 9が、 設定に応じた合成画素を 生成して、 重ね画像のカ レン ト画素位置の画素値として書き込む。 ここ での処理は、 第 1被写体領域が第 2被写体領域に変わるだけで、 S 1 7 — 6 と同様である。
S 1 7— 9では、 S 1 7— 7でカ レン ト画素が第 2被写体領域にも属 さないと判断された場合に、 重ね画像生成手段 2 9が、 第 1被写体画像 (基準画像) の力レン ト画素位置の画素値を重ね画像の力レン ト画素位 置の画素値と して書き込む。 すなわち、 この場合のカ レン ト画素位置は 被写体統合領域内でも第 1被写体領域内でも第 2被写体領域内でもない ので、 結局、 背景部分に相当する。 S 1 7— 1 0では、 重ね画像生成手段 2 9が、 カ レント画素位置を次 の画素位置に設定して、 S 1 7— 2へ処理が戻る。
以上の S 1 7— 1力 ら S 1 7 - 1 0の処理で、 図 3 6の S 1 7の重ね 画像生成に関する処理が行われる。
なお、 上記の処理では S 1 7— 4や S 1 7— 6、 S 1 7— 9で第 1被 写体画像や補正第 2被写体画像を処理しているが、 生成する重ね画像に、 S 1 7 - 1の前に最初に、 第 1被写体画像または補正第 2被写体画像を 全画素コピーしてしまい、 その後、 各画素位置の処理で第 1被写体領域 および/または第 2被写体領域だけを処理する方法も考えられる。 全画 素コピーの方が処理手順は単純になるが、 処理時間は若干増えるかもし れない。
なお、 ここでは合成画像の大きさを基準画像の大きさにしているが、 これより小さく したり、 大きく したりすることも可能である。 例えば図3 8 ( c ) で補正画像を生成する際、 一部を切り捨ててしまっていたが、 補正画像の大きさを大きく して切り捨てないようにすれば、 合成画像を 大きくする時のために、 切り捨てずに残した画像を合成に使い、 それに よって背景を広げることも可能となる。 いわゆるパノラマ画像合成のよ うなことが可能となる効果が出てく る。
図 4 0 ( b ) は、 第 1被写体領域だけを半透明に合成した重ね画像で ある。 図 4 0 ( c ) は、 第 2被写体領域だけを半透明に合成した重ね画 像である。 図 4 0 ( a ) は、 両方とも半透明にはせず、 どちらも上書き して生成した重ね画像である。 また、 図 4 3は、 両方とも半透明にして 合成した重ね画像である。
どの合成方法をとるかは目的によるので、 ユーザがそのときの目的に 応じた合成方法を選択できるようにすれば良い。
例えば、 第 1被写体画像を既に撮影/記録してあり、 第 2被写体画像 を重なり無く撮影する場合などのためには、 第 1の被写体の詳細な画像 は必要なく、 第 1 の被写体が大体どの辺に存在し、 第 2の被写体と重な りがあるかどうかが分かればよいので、 半透明の合成で構わない。 また, • 第 2の被写体は、 撮影する瞬間にどういう表情をしているとかの詳細が 分からないと うまくシャッターを切れないので、 半透明ではなく上書き で合成する方が良い。 従って、 図 4 0 ( b ) のような合成方法が向いて レヽる。
また、 既に説明したよ うに、 合成画像の背景の範囲が撮影.中の画像
(第 2被写体) の背景の範囲となる方が違和感が少ないなら、 第 2被写 体画像を基準画像にして、 かつ、 第 2の被写体を撮影中であることが分 かり易いように図 4 0 ( b ) のように合成する方が向いている。
また、 合成する被写体の領域が分かった方が撮りやすいというユーザ にとつては、 撮影中は両者を半透明で合成した方が良い場合や、 第 2の 被写体だけを半透明にした方が良い場合もあるかもしれない。
また、 第 2の被写体の撮影 記録が済んで、 第 1被写体画像、 第 2被 写体画像を使って、 最終的な合成画像を作成したい場合は、 半透明な被 写体では困るので、 どちらも上書きで合成する必要がある。 従って、 図 4 0 ( a ) のよ うな合成方法が向いている。
また、 被写体領域抽出手段 2 7 ( S 1 5 ) から得られる被写体領域が. 前述したように既に膨張されていれば、 被写体だけでなく、 その周囲の 背景部分も一緒に合成してしまうが、 既に補正画像生成手段 2 5 ( S 1 4 ) で背景部分は一致するように捕正処理されているので、 実際の被写 体の輪郭の領域よ り も多少、 抽出する被写体領域が大きめになって背景 部分まで含んでしまっていても、 合成境界で不自然になることはないと いう効果が出てく る。
なお、 被写体領域を膨張させて処理するのであれば、 合成境界をより 自然に見せるように、 外部も含めた被写体領域の合成境界付近、 あるい は被写体領域内部だけの合成境界付近で、 透明度を徐々に変化させて合 成させるという方法もある。 例えば、 被写体領域の外部にいくに従って. 背景部分の画像の割合を強く し、 被写体領域の内部にいく に従って、 被 写体領域部分の画像の割合を強くする、 といった具合である。
これにより、 もし合成境界付近で補正誤差による多少の背景のずれが あつたとしても、 不自然さを目立たなくすることができるという効果が 出てく る。 補正誤差でなく、 そもそも被写体領域の抽出が間違っている 場合や、 撮影時間のずれなどに起因する背景部分の画像の変化 (例えば. 風で木が動いた、 日が陰った、 関係無い人が通った、 など) があったと しても、 同様に、 不自然さを目立たなくすることができるという効果が 出てく る。
また、 本発明の目的は、 前述した実施形態の機能を実現するソフ トゥ エアのプログラムコードを記録した記憶媒体を、 システムあるいは装置 に供給し、 そのシステムあるいは装置のコンピュータ (または C P Uや M P U ) が記憶媒体に格納されたプログラムコードを読み出し実行する ことによつても、 達成されることは言うまでもない。
この場合、 記憶媒体から読み出されたプログラムコード自体が前述し た実施形態の機能を実現することになり、 そのプログラムコードを記憶 した記憶媒体は本発明を構成することになる。 プログラムコー ドを供給するための記憶媒体と しては、 例えば、 フロ ツビディスク, ハー ドディスク, 光ディスク, 光磁気ディスク, 磁気テ ープ, 不揮発性のメモリカー ド, 等を用いることができる。
また、 上記プログラムコー ドは、 通信ネッ トワークのよ う な伝送媒体 を介して、 他のコンピュータシステムから画像合成装置の主記憶 7 4ま たは外部 f己憶 7 5へダウンロー ドされるものであってもよい。
また、 コンピュータが読み出したプログラムコー ドを実行することに よ り、 前述した実施形態の機能が実現されるだけでなく、 そのプロダラ ムコー ドの指示に基づき、 コンピュータ上で稼働している O S (ォペレ 一ティ ングシステム) などが実際の処理の一部または全部を行い、 その 処理によって前述した実施形態の機能が実現される場合も含まれること は言うまでもない。
さらに、 記憶媒体から読み出されたプログラムコー ドが、 コンビユー タに挿入された機能拡張ボー ドゃコンピュータに接続された機能拡張ュ ニッ トに備わるメモリ に書込まれた後、 そのプログラムコー ドの指示に 基づき、 その機能拡張ボー ドゃ機能拡張ュニッ トに備わる C P Uなどが 実際の処理の一部または全部を行い、 その処理によつて前述した実施形 態の機能が実現される場合も含まれることは言うまでもない。
本発明を上記記憶媒体に適用する場合、 その記憶媒体には、 先に説明 したフローチヤ一 トに対応するプログラムコー ドを格納することになる。 本発明は上述した実施形態に限らず、 請求の範囲に示した範囲で種々 の変更が可能である。
以上のよ うに、 本発明に係る第 2の画像合成装置は、 背景と第 1 の被 写体とを含む画像である第 1被写体画像と、 上記背景の少なく とも一部 と第 2の被写体とを含む画像である第 2被写体画像との間での、 背景部 分の相対的な移動量、 回転量、 拡大縮小率、 歪補正量のいずれかもしく は組み合わせからなる補正量を算出する、 あるいは予め算出しておいた 補正量を読み出す背景補正量算出手段と、 第 1被写体画像、 第 2被写体 画像のどちらかを基準画像とし、 他方の画像を、 被写体以外の背景の部 分が少なく とも一部重なるように前記背景補正量算出手段から得られる 補正量で捕正し、 基準画像と捕正した画像を重ねた画像を生成する重ね 画像生成手段とを含んでいる。
これにより、 二つの画像間の背景のずれや歪みを補正して合成するこ とができるので、 これによつて、 被写体など明らかに異なる領域を除い た以外の部分 (すなわち背景部分) は、 どのように重ねても合成結果が ほぼ一致し、 合成結果が不自然とならないという効果が出てく る。 例え ば被写体領域だけを主に合成しよう とした時、 被写体領域の抽出や指定 が多少不正確であっても、 被写体領域の周りの背景部分が合成先の画像 の部分とずれがないので、 不正確な領域の内外が連続した風景として合 成され、 見た目の不自然さを軽減するという効果が出てく る。
また、 これにより、 たとえ被写体領域の抽出が画素単位で正確であつ たと しても、 課題の項で説明した通り、 1画素より細かいレベルでの不 自然さは従来技術の方法では出てしまうが、 本発明では、 背景部分のず れゃ歪みを無く してから合成しているので、 輪郭の画素の周囲の画素は. 同じ背景部分の位置の画素となり、 合成してもほぼ自然なつながり とな る。 このように、 1画素より細かいレベルでの不自然さを防ぐ、 あるレヽ は軽減するという効果が出てく る。
また、 背景のずれや歪みを補正して合成するので、 第 1、 第 2被写体 画像の撮影時にカメラなどを三脚などで固定する必要がなく、 手などで 大体の方向を合わせておけばよく、 撮影が簡単になるという効果が出て く る。
また、 本発明に係る第 2の画像合成装置は、 被写体や風景を撮像する 撮像手段をさらに含み、 第 1被写体画像または第 2被写体画像は、 前記 撮像手段の出力に基づいて生成される構成とすることもできる。
上記の構成によれば、 重ね画像を生成する画像合成装置が、 撮像手段 を具備することで、 ユーザが被写体や風景を撮影したその場で、 重ね画 像を生成することができるため、 ユーザにとっての利便性が向上する。 また、 重ね画像を生成した結果、 もし被写体同士の重なりがあるなどの 不都合があれば、 その場で撮影し直すことができるという効果が出てく る。
なお、 撮像手段から得られる画像は、 通常、 画像合成装置に内蔵され ているか否かを問わない主記憶や外部記憶などに記録し、 シャッターボ タンなどを利用して記録するタイミングをユーザが指示する。 そして、 記録された画像を第 1被写体画像、 または第 2被写体画像と して、 合成 処理に利用することになる。
また、 本発明に係る第 2の画像合成装置は、 第 1被写体画像と第 2被 写体画像のうち、 後に撮影した方を基準画像とする構成とすることもで きる。
上記の構成によれば、 例えば、 第 1被写体画像、 第 2被写体画像の順 に撮影したとすると、 第 2被写体画像を基準画像にする。 そして、 第 2 被写体画像を基準画像として、 第 1被写体画像を捕正する。 この際、 第 2被写体画像 (基準画像) と第 1被写体画像の間で、 背景部分の移動量 などの補正量を算出し、 その補正量を使って第 1被写体画像の補正を行 う。 第 2被写体画像 (基準画像) 、 補正された第 1被写体画像を使って、 合成画像を合成する。 そして合成画像の表示などを行う。
この結果、 表示される合成画像は、 直前に撮影したばかりの、 あるい は合成画像をリアルタイム表示する形態では現在撮影中の第 2被写体画 像の背景の範囲となるので、 撮影者にとっては違和感が無いという効果 が出てく る。 '
もし第 1被写体画像を基準画像とすると、 合成画像の背景の範囲は、 第 1被写体画像の背景の範囲となる。 第 1被写体画像の背景の範囲は、 カメラの方向などが変わっていて、 先ほど撮影した第 2被写体画像の背 景の範囲と変わっているかもしれず、 撮影者が変わることもある。 その 場合、 後で撮影した背景の範囲と、 表示される合成画像の背景の範囲と がー致しないので、 撮影者などにとって違和感が出てく る。
さらに、 上記の第 2被写体画像の撮影から合成画像の表示をリアルタ ィムに繰り返すとすると、 第 2被写体画像を撮影画像に更新し続けてい るにも関わらず、 合成画像の背景の範囲は第 1被写体の背景の範囲のま まなので、 この違和感は一層増幅される。
本発明に係る第 2の画像合成装置は、 前記重ね画像生成手段が、 基準 画像と補正した画像とを、 それぞれ所定の透過率で重ねる構成とするこ ともできる。
上記の構成において、 「所定の透過率」 は、 固定された値でもよいし、 領域に応じて変化させる値や、 領域の境界付近で徐々に変化させる値な どでもよレ、
前記重ね画像生成手段は、 重ね画像の画素位置を決め、 基準画像上の 画素位置の画素値と補正した他の画像上の画素位置の画素値とを得て、 その二つの画素値を所定の透過率によつて掛け合わせた値を重ね画像の 画素値とする。 この処理を重ね画像の全ての画素位置で行う。
また、 透過率を画素位置によって変えれば、 場所によって基準画像の 割合を強く したり、 補正画像の割合を強く したりできる。
これを使って、 例えば、 補正画像中の被写体領域だけを基準画像に重 ねる時、 被写体領域内は不透明 (すなわち補正画像中の被写体の画像そ のまま) で重ね、 被写体領域周辺は被写体領域から離れるに従い基準画 像の割合が強くなるように重ねる。 すると、 被写体領域、 すなわち抽出 した被写体の輪郭が間違っていたと しても、 その周辺の画素は、 補正画 像から基準画像に徐々に変わっているので、 間違いが目立たなくなると いう効果が出てく る。
また、 例えば被写体領域だけを半分の透過度で重ねる、 などの合成表 示をすることで、 表示されている画像のどの部分が以前に撮影した合成 対象部分で、 どの部分が今撮影している画像なのかをユーザや被写体が 判別しゃすくなるという効果も出てく る。
また、 人間は、 常識 (画像理解) を使う ことで、 画像中の背景部分と 被写体部分 (輪郭) を区別する能力を通常、 持っている。 被写体領域を 半分の透過度で重ねて表示しても、 その能力は一般に有効である。
従って、 被写体領域を半分の透過度で重ねて表示することで、 複数の 被写体の領域が重なっている場合でも、 それぞれの被写体の領域を前記 能力で区別することができ、 それらが合成画像上で位置的に重なってい るかどうかを容易に判断することができる。
第 1被写体画像と第 2被写体画像を左右に並べて見比べることでも重 なりがあるかどうかを判断することは不可能ではないが、 その際は、 そ れぞれの画像中の被写体領域を前記能力で区別し、 それぞれの画像の背 景部分の重なりを考慮して、 区別した被写体領域同士が重なるかどうか を頭の中で計算して判断しなければいけない。 この一連の作業を頭の中 だけで正確に行う ことは、 合成画像中の被写体領域を区別する先の方法 と比べると、 難しい。
つまり、 背景部分が重なるような位置合わせを機械に行わせることで. 人間の高度な画像理解能力を使って、 被写体領域同士が重なっているか どうかを判断し易い状況を作り出しているといえる。 このように、 被写 体領域を半分の透過度で重ねて表示することで、 被写体同士の重なりな どがある場合も、 今撮影している被写体の位置を判別しやすくなるとい う効果も'出てく る。
なお、 ここで記載した構成を、 前記した各構成と、 必要に応じて任意 に組み合わせてもよい。
本発明に係る第 2の画像合成装置は、 前記重ね画像生成手段が、 .基準 画像と補正した画像の間の差分画像中の差のある領域を、 元の画素値と 異なる画素値の画像と して生成する構成とすることもできる。
ここで、 「差分画像」 とは、 二つの画像中の同じ位置の画素値を比較 して、 その差の値を画素値と して作成する画像のことである。 一般には 差の値は絶対値をとることが多い。
「元の画素値と異なる画素値」 とは、 例えば、 透過率を変えて半透明 にしたり、 画素値の明暗や色相などを逆にして反転表示させたり、 赤や 白、 黒などの目立つ色にしたり、 などを実現するような画素値である。 また、 領域の境界部分と内部とで、 前述したように画素値を変えてみた り、 境界部分を点線で囲ってみたり、 点滅表示 (時間的に画素値を変化 させる) させてみたり、 という ような場合も含む。
上記の構成によれば、 基準画像と補正した他の画像との間で、 同じ画 素位置の画素値を得て、 その差がある場合はその画素位置の重ね画像の 画素値を他の領域とは異なる画素値とする。 この処理を全ての画素位置 で行う ことで、 差分部分の領域を元の画素値と異なる画素値の画像とし て生成することができる。
これによつて、 二つの画像間で一致しない部分がユーザに分かりやす くなるという効果が出てく る。 例えば、 第 1や第 2の被写体の領域は、 基準画像上と補正画像上では、 片方は被写体の画像、 他方は背景部分の 画像となるので、 差分画像中の差のある領域と して抽出される。 抽出さ れた領域を半透明にしたり、 反転表示したり、 目立つような色の画素値 とすることで、 被写体の領域がユーザに分かりやすく なるという効果が 出てく る。
なお、 ここで記載した構成を、 前記した各構成と、 必要に応じて任意 に組み合わせてもよレ、。
本発明に係る第 2の画像合成装置は、 基準画像と補正した画像の間の 差分画像中から、 第 1の被写体の領域と第 2の被写体の領域を抽出する 被写体領域抽出手段をさらに含み、 前記重ね画像生成手段が、 基準画像 と補正した画像とを重ねる代わりに、 基準画像または補正した画像と前 記被写体領域抽出手段から得られる領域内の画像とを重ねる構成とする こともできる。
これによつて、 基準画像上に、 捕正された被写体画像中の被写体領域 のみを合成することできるという効果が出てく る。 あるいは、 捕正され o
た被写体画像上に、 基準画像中の被写体領域のみを合成することができ るという こともできる。
また、 重ね画像生成手段における被写体領域の透過率を変える処理と 組み合わせることで、 どの領域を合成しょう と しているかがユーザに分 かり易く、 もし被写体同士に重なりなどがあれば、 それもさらに分かり 易くなるという効果が出てく る。 さらに、 それによつて、 重なりが起き ないように撮影を補助することができるという効果が出てく る。 重なり がある場合は、 被写体やカメラを動かすなどして、 重なりの無い状態で 撮影し直すのが良い訳だが、 この場合の補助とは、 例えば、 重なりが起 きるかどうかをユーザに認識し易くすることや、 どのく らい被写体や力 メラを動かせば重なりが解消できそうかを、 ユーザが判断する材料 (こ こでは合成画像) を与えること、 などになる。
なお、 ここで記載した構成を、 前記した各構成と、 必要に応じて任意 に組み合わせてもよい。
ί 5 本発明に係る第 2の画像合成装置は、 前記被写体領域抽出手段が、 第 1被写体画像中あるいは補正された第 1被写体画像中から第 1の被写体 の領域内の画像おょぴ第 2の被写体の領域内の画像を抽出すると共に、 第 2被写体画像中あるいは補正された第 2被写体画像中から第 1の被写 体の領域内の画像おょぴ第 2の被写体の領域内の画像を抽出し、 さらに 皮膚色を基準として第 1の被写体の画像および第 2の被写体の画像を選 別する構成とすることもできる。
上記の構成において、 被写体領域抽出手段は、 差分画像から抽出した 被写体領域が、 第 1の被写体の領域あるいは第 2の被写体の領域である ことは分かるが、 個々の被写体の領域が、 第 1の被写体の領域なのか第 2の被写体の領域なのかは分からない。 言い方を変えれば、 その領域が 示している被写体の画像は、 第 1被写体画像中に存在するのか、 あるい は第 2被写体画像中に存在するのか分からない、 ということになる。 そこで、 被写体が人物であることが分かっているならば、 個々の領域 中の画素の色を、 第 1被写体画像 (基準画像) と補正された第 2被写体 画像、 または第 2被写体画像 (基準画像) と補正された第 1被写体画像 とでそれぞれ調べる。 この場合、 いずれにしても、 基準画像と補正され た画像とのそれぞれについて、 被写体領域抽出手段が第 1の被写体の領 域内の画像おょぴ第 2の被写体の領域内の画像を抽出するから、 合計 4 つの画像部分が抽出されることになる。
この抽出した 4つの画像部分の中には、 第 1の被写体の画像部分、 第 2の被写体の形をした背景部分、 第 1の被写体の形をした背景部分、 第 2の被写体の画像部分とが含まれている。 そこで、 皮膚色を基準にする ことで、 皮膚色またはそれに近い色を持つ第 1の被写体および第 2の被 写体の各画像部分を選り分けることができる。
これによって、 抽出した画像部分がどちらの被写体であるかを自動的 に簡単に判別できる効果が出てく る。
本発明に係る第 2の画像合成装置は、 前記被写体領域抽出手段が、 第 1被写体画像中あるいは補正された第 1被写体画像中から第 1の被写体 の領域内の画像および第 2の被写体の領域内の画像を抽出すると共に、 第 2被写体画像中あるいは補正された第 2被写体画像中から第 1の被写 体の領域内の画像および第 2の被写体の領域内の画像を抽出し、 さらに その各領域外の画像の特徴を基準と して第 1の被写体の画像および第 2 の被写体の画像を選別する構成とすることもできる。 上記の構成において、 被写体領域抽出手段が 4つの画像部分を抽出す る点は、 前述のとおりである。 但し、 第 1の被写体および第 2の被写体 の各画像部分を選り分ける基準と して、 前記のように皮膚色を使うので はなく、 各領域外の画像の特徴を使う。
ここで、 「特徴」 とは、 着目 した領域の画像の持つ性質、 属性などで あり、 特徴量として数値化して表現できる性質が好ましい。 特徴量と し ては、 例えば、 各色の画素値や、 その色相、 彩度、 明度のほか、 画像の 模様や構造を表す統計量として、 同時生起行列や差分統計量、 ランレン ダス行列、 パワースぺク トル、 それらの第 2次統計量、 高次統計量など がある。
個々の領域中、 すなわち抽出した画像部分の特徴量を、 基準画像と捕 正された画像とでそれぞれ求める。 またその領域の周囲の領域の特徴量 も、 基準画像と捕正された画像とでそれぞれ求める。 領域中の特徴量と その周囲の領域の特徴量の差を、 第 1被写体画像と第 2被写体画像で比 較し、 差が大きい方を被写体領域の画像とする。
これによって、 抽出した画像部分がどちらの被写体であるかを自動的 に簡単に判別できる効果が出てく る。
本発明に係る第 2の画像合成装置は、 前記被写体領域抽出手段から得 られる第 1の被写体あるいは第 2の被写体の領域の数が、 合成する被写 体の数と して設定された値と一致しない時に、 第 1の被写体の領域と第 2の被写体の領域が重なっていると判断する重なり検出手段をさらに含 んでいる構成とすることもできる。
上記の構成において、 「第 1の被写体あるいは第 2の被写体の領域」 とは、 差分画像などから抽出される被写体の領域で、 第 1の被写体の領 域かあるレヽは第 2の被写体の領域かの区別がついていなくてもよい領域 である。
「合成する被写体」 とは、 合成処理の過程で求められる被写体のこと ではなく、 実際に存在する被写体のことであり、 ユーザが合成しよう と している被写体のことである。 但し、 上述した通り、 合成の処理の単位 と してまとめて扱う ものは一つの 「被写体」 なので、 1つの被写体が複 数の人物であることもありえる。
また、 被写体の数は画像合成装置に固定的に設定しておく形態でもよ いが、 使い勝手と しては、 重なり検出手段が重なり検出を行う以前に、 撮影者等のユーザの指示に基づいて画像合成装置に設定される形態とす ることが好ましい。
差分画像から被写体領域抽出手段によって抽出された被写体領域は、 被写体同士が重なっていなければ、 互いに分離しており、 被写体同士が 重なっていれば、 第 1の被写体の領域と第 2の被写体の領域とは、 連続 した領域として一塊に統合されている。 従って、 抽出された被写体の領 域の数と被写体の数 (設定値) とを重なり検出手段が比較し、 一致すれ ば被写体同士の重なりは無く、 一致しなければ重なりがあると判断する t その判断結果は、 重なりの有無を合成画面やランプなどで撮影者や被 写体に通知、 警告するのに利用することができる。
これによつて、 被写体同士が重なり合つている部分があるかどうかを ユーザに判別させやすくすることができるという効果が出てく る。 それ によって、 重なりが起きないように撮影を補助する効果については、 前 述したものと同様である。
本発明に係る第 2の画像合成装置は、 前記重なり検出手段において重 なりが検出される時、 重なりが存在することを、 ユーザあるいは被写体 あるいは両方に警告する重なり警告手段をさ らに含んでいる構成とする こともできる。
ここで、 「警告」 には、 表示手段などに文字や画像で警告することも 含まれるし、 ランプなどによる光やスピーカなどによる音声、 バイブレ ータなどによる振動など、 ユーザや被写体が感知できる方法ならば何で も含まれる。
これによつて、 被写体同士が重なり合つている場合に、 重なり警告手 段の動作によって警告されるので、 ユーザがそれに気づかずに撮影/記 録したり合成処理したり という ことを防ぐことができ、 さ らに被写体に も位置調整等が必要であることを即時に知らせることができるという撮 影補助の効果が出てく る。
本発明に係る第 2の画像合成装置は、 前記重なり検出手段において重 なりが検出されない時、 重なりが存在しないことを、 ユーザあるいは被 写体あるいは両方に通知するシャッターチヤンス通知手段をさらに含ん でいる構成とすることもできる。
ここで、 「通知」 には、 「警告」 同様、 ユーザや被写体が感知できる 方法ならば何でも含まれる。
これによつて、 被写体同士が重なり合つていない時をユーザが知るこ とができるので、 撮影や撮影画像記録、 合成のタイ ミ ングをそれに合わ せて行えば、 被写体同士が重ならずに合成することができるという撮影 補助の効果が出てく る。
また、 被写体にも、 シャッターチャンスであることを通知できるので. ポーズや視線などの備えを即座に行えるという撮影補助の効果も得られ る。
本発明に係る第 2の画像合成装置は、 被写体や風景を撮像する撮像手 段と、 前記重なり検出手段で重なりが検出されない時に、 前記撮像手段 から得られる画像を第 1被写体画像、 または第 2被写体画像と して記録 する指示を生成する自動シャッター手段とをさ らに含んでいる構成とす ることもできる。
上記の構成において、 撮影画像を第 1被写体画像、 第 2被写体画像と して記録するというのは、 例えば、 主記憶や外部記憶に記録するなどで 実現される。 したがって、 自動シャッター手段は、 第 1の被写体の領域 と第 2の被写体の領域とに重なりが無いという信号を重なり検出手段か ら入力したときに、 主記憶や外部記憶に対する記録制御処理の指示を出 力する。
そして、 背景補正量算出手段や重ね画像生成手段は、 主記憶や外部記 憶に記録されている画像を読み込むことで、 第 1被写体画像、 第 2被写 体画像を得ることができるよ うになる。
なお、 自動シャッター手段が自動的に指示を出しても、 即座に画像が 記録されるとは限らない。 例えば、 同時にシャッターボタンも押されて いると力 自動記録モー ドになっているなどの状態でないと記録されな いよ うにしてもよレヽ。
これによって、 被写体同士が重なり合っていない時に自動的に撮影が 行われるので、 ユーザ自身が重なりがあるかどうかを判別してシャツタ 一を押さなく ても良いという撮影補助の効果が出てく る。
本発明に係る第 2の画像合成装置は、 被写体や風景を撮像する撮像手 段と、 前記重なり検出手段で重なりが検出される時に、 前記撮像手段か ら得られる画像を、 第 1被写体画像、 あるいは第 2被写体画像と して記 録することを禁止する指示を生成する自動シャツター手段とをさらに含 んでいる構成とすることもできる。
上記の構成によれば、 自動シャッター手段は、 重なり検出手段から重 なりがあるという信号を得たら、 撮像手段から得られる画像を主記憶や 外部記憶などに記録することを禁止する指示を出力する。 この結果、 例 えば、 シャッターボタンが押されたと しても、 撮像手段から得られる画 像は記録されない。 なお、 この禁止処理は、 自動禁止モードになってい るなどの状態でないと行われないようにしてもよい。
これによって、 被写体同士が重なり合っている時は撮影が行われない ので、 ユーザが誤って重なりがある状態で撮影 Z記録してしまうことを 防ぐ撮影補助の効果が出てく る。
本発明に係る第 2の画像合成方法は、 背景と第 1の被写体とを含む画 像である第 1被写体画像と、 上記背景の少なく とも一部と第 2の被写体 とを含む画像である第 2被写体画像との間での、 背景部分の相対的な移 動量、 回転量、 拡大縮小率、 歪捕正量のいずれかもしくは組み合わせか らなる補正量を算出する、 あるいは予め算出しておいた捕正量を読み出 す背景補正量算出ステップと、 第 1被写体画像、 第 2被写体画像のどち らかを基準画像と し、 他方の画像を被写体以外の背景の部分が少なく と も一部重なるように前記背景補正量算出ステップから得られる補正量で 補正し、 基準画像と補正した画像を重ねた画像を生成する重ね画像生成 ステップとを含んでいる。
これによる種々の作用効果は、 前述したとおりである。
本発明に係る第 2の画像合成プログラムは、 上記画像合成装置が備え る各手段と して、 コンピュータを機能させる構成である。
本発明に係る第 2の画像合成プログラムは、 上記画像合成方法が備え る各ステップをコンピュータに実行させる構成である。
本発明に係る第 2の記録媒体は、 上記画像合成プログラムを記録した 構成である。
これにより、 上記記録媒体、 またはネッ トワークを介して、 一般的な コンピュータに画像合成プログラムをイ ンス トールすることによって、 該コンピュータを用いて上記の画像合成方法を実現する、 言い換えれば 、 該コンピュータを画像合成装置と して機能させることができる。
なお、 本発明は、 上述した各実施形態に限定されるものではなく、 請 求の範囲に示した範囲で種々の変更が可能であり、 異なる実施形態にそ れぞれ開示された技術的手段を適宜組み合わせて得られる実施形態につ いても本発明の技術的手段に含まれる。
また、 発明を実施するための最良の形態の項においてなした具体的な 実施態様または実施例は、 あくまでも、 本発明の技術内容を明らかにす るものであって、 そのような具体例にのみ限定して狭義に解釈されるべ きものではなく、 本発明の精神と次に記載する請求の範囲内で、 いろい ろと変更して実施することができるものである。 産業上の利用の可能性
本発明は、 デジタルカメラや撮像機能を有する携帯電話、 監視カメラ 、 W e bカメラ、 スキャナ、 コピー機、 F A X、 画像編集ソフ ト等、 画 像を取り込んだり、 画像を加工したりする機器ゃソフ ト等に用いること ができる。

Claims

請求の範囲
1 . 背景の画像である背景画像と、 前記背景の少なく とも一部と第 1の 被写体を含む画像である第 1被写体画像と、 前記背景の少なく とも一部 と第 2の被写体を含む画像である第 2被写体画像との間での、 背景の相 対的な移動量、 回転量、. 拡大縮小率、 歪補正量のいずれかもしくは組み 合わせからなる補正量を算出する、 あるいは算出して記録しておいた補 正量を読み出す背景補正量算出手段と、
背景画像、 第 1被写体画像、 第 2被写体画像のいずれかを基準画像と し、 他の 2画像を被写体以外の背景の少なく とも一部が重なるように、 前記背景補正量算出手段から得られる補正量で補正し、 基準画像と補正 した他の 1つあるいは 2つの画像を重ねた画像を生成する重ね画像生成 手段とを含む画像合成装置。
2 . 被写体や風景を撮像する撮像手段をさらに含み、 背景画像、 または 第 1被写体画像、 または第 2被写体画像は、 前記撮像手段の出力に基づ いて生成される請求の範囲第 1項記載の画像合成装置。
3 . 第 1被写体画像と第 2被写体画像のうち、 先に撮影した方を基準画 像とする請求の範囲第 2項記載の画像合成装置。
4 . 基準画像の直前あるいは直後の順で背景画像を撮影する請求の範囲 第 3項記載の画像合成装置。
5 . 前記重ね画像生成手段が、 基準画像と補正した他の 1つあるいは 2 つの画像とを、 それぞれ所定の透過率で重ねる請求の範囲第 1項記載の 画像合成装置。
6 . 前記重ね画像生成手段が、 基準画像と補正した他の 1つあるいは 2 つの画像の間の差分画像中の差のある領域を、 元の画素値と異なる画素 値の画像として生成する請求の範囲第 1項記載の画像合成装置。
7 . 基準画像と補正した他の 1つあるいは 2つの画像の間の差分画像中 から、 第 1の被写体の領域と第 2の被写体の領域を抽出する被写体領域 抽出手段をさらに含み、
前記重ね画像生成手段が、 基準画像と補正した他の 1つあるいは 2つ の画像とを重ねる代わりに、 基準画像と前記被写体領域抽出手段から得 られる領域内の補正した他の 1つあるいは 2つの画像とを重ねる請求の 範囲第 1項記載の画像合成装置。
8 . 前記被写体領域抽出手段から得られる第 1の被写体の領域と第 2の 被写体の領域の重なりを検出する重なり検出手段をさらに含む請求の範 囲第 7項記載の画像合成装置。
9 . .前記重なり検出手段において重なりが検出される時、 重なりが存在 することを、 ユーザあるいは被写体あるいは両方に警告する重なり警告 手段をさらに含む請求の範囲第 8項記載の画像合成装置。
1 0 . 前記重なり検出手段において重なりが検出されない時、 重なりが 存在しないことを、 ユーザあるいは被写体あるいは両方に通知するシャ ッターチヤンス通知手段をさらに含む請求の範囲第 8項記載の画像合成
1 1 . 被写体や風景を撮像する撮像手段と、
前記重なり検出手段で重なりが検出されない時に、 前記撮像手段から 得られる画像を背景画像、 または第 1被写体画像、 または第 2被写体画 像と して記録する指示を生成する自動シャツター手段とをさらに含む請 求の範囲第 8項記載の画像合成装置。
1 2 . 被写体や風景を撮像する撮像手段と、
前記重なり検出手段で重なりが検出される時に、 前記撮像手段から得 られる画像を、 背景画像、 あるいは第 1被写体画像、 あるいは第 2被写 体画像として記録することを禁止する指示を生成する自動シャッター手 5 段とをさらに含む請求の範囲第 8項記載の画像合成装置。
1 3 . 前記重なり検出手段が、 第 1の被写体の領域と第 2の被写体の領 域とが重なり合う重なり領域を抽出する請求の範囲第 8項記載の画像合 成装置。
1 4 . 前記重ね画像生成手段が、 前記重なり検出手段にて抽出された重 L0 なり領域を元の画素値と異なる画素値の画像と して生成する請求の範囲 第 1 3項記載の画像合成装置。
1 5 . 前記重なり検出手段で重なりが検出される場合、 重なりを減らす 第 1の被写体または第 2の被写体の位置あるいはその位置の方向を算出 する重なり回避方法算出手段と、
5 前記重なり回避方法算出手段から得られる第 1 の被写体または第 2の 被写体の位置あるいはその位置の方向を、 ユーザあるいは被写体あるい は両方に知らせる重なり回避方法通知手段とをさらに含む請求の範囲第 8〜第 1 4のいずれか 1項記載の画像合成装置。
1 6 . 背景の画像である背景画像と、 前記背景の少なく とも一部と第 1 0 の被写体を含む画像である第 1被写体画像と、 前記背景の少なく とも一 部と第 2の被写体を含む画像である第 2被写体画像との間での、 背景の 相対的な移動量、 回転量、 拡大縮小率、 歪補正量のいずれかもしく は組 み合わせからなる補正量を算出する、 あるいは算出して記録しておいた 補正量を読み出す背景補正量算出ステツプと、 背景画像、 第 1被写体画像、 第 2被写体画像のいずれかを基準画像と し、 他の 2画像を被写体以外の背景の少なく とも一部が重なるよ うに、 前記背景捕正量算出ステップから得られる補正量で補正し、 基準画像と 補正した他の 1つあるいは 2つの画像を重ねた画像を生成する重ね画像 5 生成ステップとを含む画像合成方法。
1 7 . 背景と第 1の被写体とを含む画像である第 1被写体画像と、 上記 背景の少なく とも一部と第 2の被写体とを含む画像である第 2被写体画 像との間での、 背景部分の相対的な移動量、 回転量、 拡大縮小率、 歪補 正量のいずれかもしく は組み合わせからなる補正量を算出する、 あるい
10 は予め算出しておいた補正量を読み出す背景捕正量算出手段と、
第 1被写体画像、 第 2被写体画像のどちらかを基準画像とし、 他方の 画像を、 被写体以外の背景の部分が少なく とも一部重なるように前記背 景補正量算出手段から得られる捕正量で補正し、 基準画像と補正した画 像を重ねた画像を生成する重ね画像生成手段とを含む画像合成装置。
L5 1 8 . 被写体や風景を撮像する撮像手段をさらに含み、 第 1被写体画像 または第 2被写体画像は、 前記撮像手段の出力に基づいて生成される 請求の範囲第 1 7項記載の画像合成装置。
1 9 . 第 1被写体画像と第 2被写体画像のうち、 後に撮影した方を基準 画像とする請求の範囲第 1 8項記載の画像合成装置。
^0 2 0 . 前記重ね画像生成手段が、 基準画像と補正した画像とを、 それぞ れ所定の透過率で重ねる請求の範囲第 1 7項記載の画像合成装置。
2 1 . 前記重ね画像生成手段が、 基準画像と補正した画像の間の差分画 像中の差のある領域を、 元の画素値と異なる画素値の画像と して生成す る請求の範囲第 1 7項記載の画像合成装置。
2 2 . 基準画像と補正した画像の間の差分画像中から、 第 1の被写体の 領域と第 2の被写体の領域を抽出する被写体領域抽出手段をさらに含み. 前記重ね画像生成手段が、 基準画像と補正した画像とを重ねる代わり に、 基準画像または補正した画像と前記被写体領域抽出手段から得られ る領域内の画像とを重ねる請求の範囲第 1 7項記載の画像合成装置。
2 3 . 前記被写体領域抽出手段が、 第 1被写体画像中あるいは補正され た第 1被写体画像中から第 1の被写体の領域内の画像および第 2の被写 体の領域内の画像を抽出すると共に、 第 2被写体画像中あるいは補正さ れた第 2被写体画像中から第 1の被写体の領域内の画像および第 2の被 写体の領域内の画像を抽出し、 さらに皮膚色を基準と して第 1の被写体 の画像および第 2の被写体の画像を選別する請求の範囲第 2 2項記載の 画像合成装置。
2 4 . 前記被写体領域抽出手段が、 第 1被写体画像中あるいは補正され た第 1被写体画像中から第 1の被写体の領域内の画像および第 2の被写 体の領域内の画像を抽出すると共に、 第 2被写体画像中あるいは補正さ れた第 2被写体画像中から第 1の被写体の領域内の画像および第 2の被 写体の領域内の画像を抽出し、 さらにその各領域外の画像の特徴を基準 と 'して第 1の被写体の画像および第 2の被写体の画像を選別する請求の 範囲第 2 2項記載の画像合成装置。
2 5 . 前記被写体領域抽出手段から得られる第 1の被写体あるいは第 2 の被写体の領域の数が、 合成する被写体の数と して設定された値と一致 しない時に、 第 1の被写体の領域と第 2の被写体の領域が重なっている と判断する重なり検出手段をさらに含む請求の範囲第 2 2項記載の画像 合成装置。
2 6 . 前記重なり検出手段において重なりが検出される時、 重なりが存 在することを、 ユーザあるいは被写体あるいは両方に警告する重なり警 告手段をさらに含む請求の範囲第 2 5項記載の画像合成装置。
2 7 . 前記重なり検出手段において重なりが検出されない時、 重なりが 存在しないことを、 ユーザあるいは被写体あるいは両方に通知するシャ ッターチヤンス通知手段をさらに含む請求の範囲第 2 5項記載の画像合 成装置。
2 8 . 被写体や風景を撮像する撮像手段と、
前記重なり検出手段で重なりが検出されない時に、 前記撮像手段から 得られる画像を第 1被写体画像、 または第 2被写体画像として記録する 指示を生成する自動シャツター手段とを含む請求の範囲第 2 5項記載の 画像合成装置。
2 9 . 被写体や風景を撮像する撮像手段と、
前記重なり検出手段で重なりが検出される時に、 前記撮像手段から得 られる画像を、 第 1被写体画像、 あるいは第 2被写体画像とすることを 禁止する自動シャッター手段とをさらに含む請求の範囲第 2 5項記載の 画像合成装置。
3 0 . 背景と第 1の被写体とを含む画像である第 1被写体画像と、 上記 背景の少なく とも一部と第 2の被写体とを含む画像である第 2被写体画 像との間での、 背景部分の相対的な移動量、 回転量、 拡大縮小率、 歪補 正量のいずれかもしくは組み合わせからなる補正量を算出する、 あるい は予め算出しておいた補正量を読み出す背景補正量算出ステップと、 第 1被写体画像、 第 2被写体画像のどちらかを基準画像とし、 他方の 画像を被写体以外の背景の部分が少なく とも一部重なるよ うに前記背景 補正量算出ステップから得られる補正量で補正し、 基準画像と補正した 面像を重ねた画像を生成する重ね画像生成ステップとを含む画像合成方 法。
3 1. 請求の範囲第 1〜第 1 4、 第 1 7〜第 2 9のいずれか 1項記載の 画像合成装置が備える各手段と して、 コンピュータを機能させるための 画像合成プログラム。
3 2. 請求の範囲第 1 5項記載の画像合成装置が備える各手段と して、 コンピュータを機能させるための画像合成プログラム。
3 3. 請求の範囲第 1 6または第 3 0記載の画像合成方法が備える各ス テツプを、 コンピュータに実行させるための画像合成プログラム。
3 4. 請求の範囲第 3 1項記載の画像合成プログラムを記録した記録媒 体。
3 5 き害青求の範囲第 3 2項記載の画像合成プログラムを記録した記録媒 体。
3 6 請求の範囲第 3 3項記載の画像合成プログラムを記録した記録媒 体。
PCT/JP2003/008510 2002-08-09 2003-07-03 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体 WO2004015987A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US10/523,770 US7623733B2 (en) 2002-08-09 2003-07-03 Image combination device, image combination method, image combination program, and recording medium for combining images having at least partially same background
AU2003246268A AU2003246268A1 (en) 2002-08-09 2003-07-03 Image combination device, image combination method, image combination program, and recording medium containing the image combination program

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2002-233012 2002-08-09
JP2002233130A JP3983624B2 (ja) 2002-08-09 2002-08-09 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体
JP2002-233130 2002-08-09
JP2002233012A JP3983623B2 (ja) 2002-08-09 2002-08-09 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体

Publications (1)

Publication Number Publication Date
WO2004015987A1 true WO2004015987A1 (ja) 2004-02-19

Family

ID=31719866

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2003/008510 WO2004015987A1 (ja) 2002-08-09 2003-07-03 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体

Country Status (4)

Country Link
US (1) US7623733B2 (ja)
CN (1) CN100477745C (ja)
AU (1) AU2003246268A1 (ja)
WO (1) WO2004015987A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090063633A1 (en) * 2004-08-13 2009-03-05 William Buchanan Remote program production
CN103079004A (zh) * 2012-12-28 2013-05-01 广东欧珀移动通信有限公司 一种定时拍照的示意方法、装置以及移动终端
CN105493139A (zh) * 2013-09-06 2016-04-13 高通股份有限公司 交互式图像组成

Families Citing this family (119)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3898075B2 (ja) * 2002-03-18 2007-03-28 株式会社リコー 画像処理装置、画像処理方法及び記録媒体
US8498452B2 (en) 2003-06-26 2013-07-30 DigitalOptics Corporation Europe Limited Digital image processing using face detection information
US7792970B2 (en) 2005-06-17 2010-09-07 Fotonation Vision Limited Method for establishing a paired connection between media devices
US7565030B2 (en) * 2003-06-26 2009-07-21 Fotonation Vision Limited Detecting orientation of digital images using face detection information
US7574016B2 (en) 2003-06-26 2009-08-11 Fotonation Vision Limited Digital image processing using face detection information
US8948468B2 (en) 2003-06-26 2015-02-03 Fotonation Limited Modification of viewing parameters for digital images using face detection information
US7269292B2 (en) 2003-06-26 2007-09-11 Fotonation Vision Limited Digital image adjustable compression and resolution using face detection information
US7844076B2 (en) 2003-06-26 2010-11-30 Fotonation Vision Limited Digital image processing using face detection and skin tone information
US8494286B2 (en) 2008-02-05 2013-07-23 DigitalOptics Corporation Europe Limited Face detection in mid-shot digital images
US7440593B1 (en) 2003-06-26 2008-10-21 Fotonation Vision Limited Method of improving orientation and color balance of digital images using face detection information
US7471846B2 (en) 2003-06-26 2008-12-30 Fotonation Vision Limited Perfecting the effect of flash within an image acquisition devices using face detection
EP1531322A3 (en) * 2003-11-13 2007-09-05 Matsushita Electric Industrial Co., Ltd. Map display apparatus
JP2005151282A (ja) * 2003-11-18 2005-06-09 Fuji Xerox Co Ltd 画像処理装置、画像処理方法、およびプログラム
JP4574235B2 (ja) * 2004-06-04 2010-11-04 キヤノン株式会社 画像処理装置、及びその制御方法、プログラム
JP4368767B2 (ja) * 2004-09-08 2009-11-18 独立行政法人産業技術総合研究所 異常動作検出装置および異常動作検出方法
JP2006121275A (ja) * 2004-10-20 2006-05-11 Fuji Photo Film Co Ltd 撮影方法および撮影装置
JP2006140695A (ja) * 2004-11-11 2006-06-01 Konica Minolta Photo Imaging Inc 撮像装置
JP3970877B2 (ja) * 2004-12-02 2007-09-05 独立行政法人産業技術総合研究所 追跡装置および追跡方法
US20110214085A1 (en) * 2004-12-23 2011-09-01 Vanbree Ken Method of user display associated with displaying registered images
JP2006244329A (ja) * 2005-03-07 2006-09-14 Hitachi Ltd 携帯端末および情報処理装置、システム
JP2007025862A (ja) * 2005-07-13 2007-02-01 Sony Computer Entertainment Inc 画像処理装置
JP2007079809A (ja) * 2005-09-13 2007-03-29 Fuji Xerox Co Ltd 電子ペーパシステム
JP4345737B2 (ja) * 2005-11-14 2009-10-14 セイコーエプソン株式会社 デジタルコンテンツ作成システム、デジタルコンテンツ作成方法およびプログラム
EP2033142B1 (en) 2006-06-12 2011-01-26 Tessera Technologies Ireland Limited Advances in extending the aam techniques from grayscale to color images
US7647361B2 (en) * 2006-06-27 2010-01-12 Microsoft Corporation Automatically maintaining metadata in a file backup system
SE532236C2 (sv) * 2006-07-19 2009-11-17 Scalado Ab Metod i samband med tagning av digitala bilder
JP4732299B2 (ja) * 2006-10-25 2011-07-27 富士フイルム株式会社 特定被写体像の検出方法およびデジタルカメラ
KR101351091B1 (ko) * 2006-12-22 2014-01-14 삼성전자주식회사 화상형성장치 및 그 연사촬영 이미지의 제어방법
US8055067B2 (en) 2007-01-18 2011-11-08 DigitalOptics Corporation Europe Limited Color segmentation
US8718336B2 (en) * 2007-03-30 2014-05-06 Fujifilm Corporation Image correction apparatus, image correction method, skin diagnosis method, and computer program product
KR100866230B1 (ko) * 2007-04-12 2008-10-30 삼성전자주식회사 파노라마 사진 촬영 방법
WO2008131823A1 (en) * 2007-04-30 2008-11-06 Fotonation Vision Limited Method and apparatus for automatically controlling the decisive moment for an image acquisition device
US8275215B2 (en) * 2007-05-08 2012-09-25 Arcsoft (Shanghai) Technology Company, Ltd Merging images
US8953684B2 (en) * 2007-05-16 2015-02-10 Microsoft Corporation Multiview coding with geometry-based disparity prediction
JP4772009B2 (ja) * 2007-08-07 2011-09-14 三洋電機株式会社 ディジタルカメラ
KR101204888B1 (ko) * 2007-08-31 2012-11-26 삼성테크윈 주식회사 디지털 촬영장치, 그 제어방법 및 이를 실행시키기 위한프로그램을 저장한 기록매체
JP4930297B2 (ja) * 2007-09-10 2012-05-16 株式会社ニコン 撮像装置
WO2009040872A1 (ja) * 2007-09-25 2009-04-02 Fujitsu Limited 画像合成装置及び方法
JP5020135B2 (ja) * 2008-03-19 2012-09-05 ソニーモバイルコミュニケーションズ, エービー 携帯端末装置およびコンピュータプログラム
JP4492724B2 (ja) * 2008-03-25 2010-06-30 ソニー株式会社 画像処理装置、画像処理方法、プログラム
US7855737B2 (en) * 2008-03-26 2010-12-21 Fotonation Ireland Limited Method of making a digital camera image of a scene including the camera user
CN101656833B (zh) * 2008-08-05 2011-09-28 卡西欧计算机株式会社 图像处理装置
CN101370049B (zh) * 2008-09-25 2013-10-16 青岛海信移动通信技术股份有限公司 一种移动终端窗体背景调节方法及移动终端
JP4760973B2 (ja) * 2008-12-16 2011-08-31 カシオ計算機株式会社 撮像装置及び画像処理方法
KR20100075167A (ko) * 2008-12-24 2010-07-02 삼성전자주식회사 얼굴인식 기능을 이용한 디지털 영상 촬영 장치 및 방법
JP5105550B2 (ja) * 2009-03-19 2012-12-26 カシオ計算機株式会社 画像合成装置及びプログラム
US8907941B2 (en) * 2009-06-23 2014-12-09 Disney Enterprises, Inc. System and method for integrating multiple virtual rendering systems to provide an augmented reality
US8656314B2 (en) * 2009-07-30 2014-02-18 Lenovo (Singapore) Pte. Ltd. Finger touch gesture for joining and unjoining discrete touch objects
US8762886B2 (en) * 2009-07-30 2014-06-24 Lenovo (Singapore) Pte. Ltd. Emulating fundamental forces of physics on a virtual, touchable object
US20110029904A1 (en) * 2009-07-30 2011-02-03 Adam Miles Smith Behavior and Appearance of Touch-Optimized User Interface Elements for Controlling Computer Function
JP5235823B2 (ja) * 2009-08-28 2013-07-10 キヤノン株式会社 情報処理装置、情報処理システム、情報処理方法及び当該情報処理方法をコンピュータに実行させるプログラム
JP5436367B2 (ja) * 2009-09-29 2014-03-05 富士フイルム株式会社 グラフィック配置決定方法ならびにそのプログラムおよび情報処理装置
US9792012B2 (en) 2009-10-01 2017-10-17 Mobile Imaging In Sweden Ab Method relating to digital images
US8379917B2 (en) 2009-10-02 2013-02-19 DigitalOptics Corporation Europe Limited Face recognition performance using additional image features
EP2494498B1 (en) * 2009-10-30 2018-05-23 QUALCOMM Incorporated Method and apparatus for image detection with undesired object removal
KR20110050834A (ko) * 2009-11-09 2011-05-17 삼성전자주식회사 휴대용 단말기에서 영상 정합 방법 및 장치
JP2011109398A (ja) * 2009-11-17 2011-06-02 Sony Corp 画像送信方法、画像受信方法、画像送信装置、画像受信装置及び画像伝送システム
US8447136B2 (en) * 2010-01-12 2013-05-21 Microsoft Corporation Viewing media in the context of street-level images
JP5558852B2 (ja) * 2010-01-28 2014-07-23 キヤノン株式会社 情報処理装置およびその制御方法およびプログラム
US9122707B2 (en) * 2010-05-28 2015-09-01 Nokia Technologies Oy Method and apparatus for providing a localized virtual reality environment
US8487932B1 (en) * 2010-08-30 2013-07-16 Disney Enterprises, Inc. Drawing figures in computer-based drawing applications
JP4763847B1 (ja) 2010-08-30 2011-08-31 楽天株式会社 画像変換装置、画像処理装置、ならびに、画像処理システム
US9153004B2 (en) 2010-08-30 2015-10-06 Rakuten, Inc. Product image interpolating device, method and non-transitory information recording medium
US8427483B1 (en) 2010-08-30 2013-04-23 Disney Enterprises. Inc. Drawing figures in computer-based drawing applications
US20130128072A1 (en) * 2010-09-08 2013-05-23 Nec Corporation Photographing device and photographing method
EP2603834B1 (en) 2010-09-20 2020-12-09 Nokia Technologies Oy Method for forming images
JP5743499B2 (ja) * 2010-11-10 2015-07-01 キヤノン株式会社 画像生成装置、画像生成方法、およびプログラム
JP5182352B2 (ja) * 2010-11-16 2013-04-17 カシオ計算機株式会社 撮像装置、画像合成方法、及びプログラム
TW201228376A (en) * 2010-12-28 2012-07-01 Altek Corp Electronic apparatus, image capturing apparatus and method thereof
US9721872B1 (en) 2011-02-18 2017-08-01 Amkor Technology, Inc. Methods and structures for increasing the allowable die size in TMV packages
US8970704B2 (en) * 2011-06-07 2015-03-03 Verizon Patent And Licensing Inc. Network synchronized camera settings
BR112014001565A2 (pt) 2011-07-22 2017-06-13 Fujifilm Corp método de geração de imagem panorâmica e dispositivo de captura de imagem
JP5812739B2 (ja) * 2011-07-23 2015-11-17 キヤノン株式会社 画像処理装置、画像処理方法、およびプログラム
JP2013074569A (ja) * 2011-09-29 2013-04-22 Sanyo Electric Co Ltd 画像処理装置
JP2013153429A (ja) * 2011-12-27 2013-08-08 Canon Inc 画像処理装置、画像表示システム、画像処理方法および画像処理プログラム
CN103247037A (zh) * 2012-02-10 2013-08-14 联想(北京)有限公司 图像处理方法、装置和电子设备
JP5678911B2 (ja) * 2012-03-12 2015-03-04 カシオ計算機株式会社 画像合成装置、その画像合成方法、及びプログラム
US9019316B2 (en) * 2012-04-15 2015-04-28 Trimble Navigation Limited Identifying a point of interest from different stations
JP2014027442A (ja) * 2012-07-26 2014-02-06 Sony Corp 画像処理装置、画像処理方法、およびプログラム
US10368010B2 (en) * 2012-07-31 2019-07-30 Nec Corporation Image processing system, image processing method, and program
KR101429344B1 (ko) 2012-08-08 2014-08-12 앰코 테크놀로지 코리아 주식회사 반도체 패키지 및 그 제조 방법
JP5999336B2 (ja) * 2012-09-13 2016-09-28 カシオ計算機株式会社 撮像装置及び撮像処理方法並びにプログラム
KR20140038116A (ko) 2012-09-20 2014-03-28 제이앤제이 패밀리 주식회사 Le d 램프
TWI505203B (zh) * 2012-11-02 2015-10-21 Avisonic Technology Corp 產生車用影像的影像處理方法及影像處理裝置
US9799592B2 (en) 2013-11-19 2017-10-24 Amkor Technology, Inc. Semicondutor device with through-silicon via-less deep wells
KR101366461B1 (ko) 2012-11-20 2014-02-26 앰코 테크놀로지 코리아 주식회사 반도체 디바이스 및 그 제조 방법
KR102026717B1 (ko) * 2013-02-08 2019-10-04 삼성전자 주식회사 사진 촬영 가이드 방법 및 이를 구현하는 휴대 단말
KR101488590B1 (ko) 2013-03-29 2015-01-30 앰코 테크놀로지 코리아 주식회사 반도체 디바이스 및 그 제조 방법
CN104349116A (zh) * 2013-08-06 2015-02-11 北大方正集团有限公司 用于网络视频会议系统的屏幕功能区域划分方法和装置
CN104349115B (zh) * 2013-08-06 2017-09-22 北大方正集团有限公司 网络视频会议系统及在其中设置虚拟环境的方法和装置
JP6098436B2 (ja) * 2013-08-23 2017-03-22 ブラザー工業株式会社 画像処理装置およびコンピュータプログラム
TWI622011B (zh) * 2013-10-23 2018-04-21 Maxell Holdings Ltd 表面狀態攝影顯示系統及表面狀態攝影顯示方法
KR101607981B1 (ko) 2013-11-04 2016-03-31 앰코 테크놀로지 코리아 주식회사 반도체 패키지용 인터포저 및 이의 제조 방법, 제조된 인터포저를 이용한 반도체 패키지
TWI533675B (zh) * 2013-12-16 2016-05-11 國立交通大學 影像接合之最佳動態接縫找尋調整系統與方法
US20150271381A1 (en) * 2014-03-20 2015-09-24 Htc Corporation Methods and systems for determining frames and photo composition within multiple frames
JP6402469B2 (ja) 2014-04-04 2018-10-10 富士電機株式会社 安全制御装置および安全制御システム
TWI518603B (zh) * 2014-05-22 2016-01-21 宏達國際電子股份有限公司 影像編輯方法與電子裝置
CN104038700B (zh) * 2014-06-26 2017-11-14 Tcl集团股份有限公司 一种拍照方法及装置
US10536633B2 (en) 2015-02-06 2020-01-14 Panasonic Intellectual Property Management Co., Ltd. Image processing device, imaging system and imaging apparatus including the same, and image processing method
CN106156247B (zh) * 2015-04-28 2020-09-15 中兴通讯股份有限公司 图像管理方法及装置
JP6587435B2 (ja) * 2015-06-29 2019-10-09 キヤノン株式会社 画像処理装置、情報処理方法及びプログラム
US10602988B2 (en) * 2016-03-21 2020-03-31 International Business Machines Corporation Obtainment of cleaned sequences relating to a center of gravity
US9960328B2 (en) 2016-09-06 2018-05-01 Amkor Technology, Inc. Semiconductor device and manufacturing method thereof
TWI655620B (zh) * 2016-12-06 2019-04-01 矽創電子股份有限公司 顯示系統及其視訊資料顯示方法
CN107071275B (zh) * 2017-03-22 2020-07-14 珠海大横琴科技发展有限公司 一种图像合成方法及终端
DE112018002314T5 (de) * 2017-05-01 2020-01-23 Symbol Technologies, Llc Verfahren und vorrichtung zur erkennung eines objektstatus
JP6261063B1 (ja) * 2017-08-01 2018-01-17 グラパックジャパン株式会社 可変画像表示体、レンチキュラー画像形成方法
JP6887910B2 (ja) * 2017-08-01 2021-06-16 株式会社東芝 画像処理装置
JP6686988B2 (ja) * 2017-08-28 2020-04-22 株式会社Soken 映像出力装置及び映像生成プログラム
CN108632543B (zh) * 2018-03-26 2020-07-07 Oppo广东移动通信有限公司 图像显示方法、装置、存储介质及电子设备
CN112334951A (zh) * 2018-07-02 2021-02-05 三菱电机株式会社 编辑装置、编辑方法、编辑程序以及编辑系统
JP7278724B2 (ja) * 2018-07-23 2023-05-22 株式会社東芝 情報処理装置、情報処理方法、および情報処理プログラム
JP7233873B2 (ja) * 2018-09-19 2023-03-07 キヤノン株式会社 画像処理装置、画像処理方法、およびプログラム
TWI721324B (zh) * 2018-10-10 2021-03-11 鴻海精密工業股份有限公司 電子裝置及立體物體的判斷方法
CN112535408B (zh) * 2019-09-23 2022-04-01 佛山市顺德区美的电热电器制造有限公司 辅助烹饪方法、装置和计算机存储介质
CN113469200A (zh) 2020-03-30 2021-10-01 阿里巴巴集团控股有限公司 数据处理方法和系统、存储介质、计算设备
CN113496459A (zh) * 2020-04-01 2021-10-12 华为技术有限公司 辅助化妆方法、终端设备、存储介质及程序产品
JP2022185536A (ja) * 2021-06-02 2022-12-14 株式会社スクウェア・エニックス プログラム、コンピュータ装置、及び制御方法。
US11954882B2 (en) 2021-06-17 2024-04-09 Zebra Technologies Corporation Feature-based georegistration for mobile computing devices

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60190078A (ja) * 1984-03-12 1985-09-27 Fuji Photo Film Co Ltd 画像合成装置
JPH0514810A (ja) * 1991-06-28 1993-01-22 Nippon Hoso Kyokai <Nhk> 画像合成用キー信号の発生装置および発生方法
JP2000036032A (ja) * 1998-07-17 2000-02-02 Fujitsu Ltd 前景画像抽出方法、画像処理装置、自動トリミング装置、記録媒体及び肖像写真装置
JP2002171398A (ja) * 2000-12-04 2002-06-14 Konica Corp 画像処理方法及び電子カメラ
JP2003044852A (ja) * 2001-07-27 2003-02-14 Sony Corp 画像生成装置、画像生成方法及び画像生成プログラム

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5465163A (en) * 1991-03-18 1995-11-07 Canon Kabushiki Kaisha Image processing method and apparatus for processing oversized original images and for synthesizing multiple images
JPH05161050A (ja) 1991-12-03 1993-06-25 Fuji Photo Film Co Ltd ディジタル電子スチル・カメラおよびその動作方法ならびにディジタル電子スチル・カメラにおける被写体の表示方法
US6205259B1 (en) * 1992-04-09 2001-03-20 Olympus Optical Co., Ltd. Image processing apparatus
US5649032A (en) * 1994-11-14 1997-07-15 David Sarnoff Research Center, Inc. System for automatically aligning images to form a mosaic image
JPH08287218A (ja) * 1995-04-10 1996-11-01 Sharp Corp 画像合成装置
JPH08336165A (ja) * 1995-06-09 1996-12-17 Canon Inc 複眼撮像装置
US6549681B1 (en) * 1995-09-26 2003-04-15 Canon Kabushiki Kaisha Image synthesization method
US6389179B1 (en) * 1996-05-28 2002-05-14 Canon Kabushiki Kaisha Image combining apparatus using a combining algorithm selected based on an image sensing condition corresponding to each stored image
JP3851384B2 (ja) * 1996-09-18 2006-11-29 シャープ株式会社 画像合成装置および方法
JPH10178564A (ja) * 1996-10-17 1998-06-30 Sharp Corp パノラマ画像作成装置及び記録媒体
US6429895B1 (en) * 1996-12-27 2002-08-06 Canon Kabushiki Kaisha Image sensing apparatus and method capable of merging function for obtaining high-precision image by synthesizing images and image stabilization function
JPH114398A (ja) * 1997-06-11 1999-01-06 Hitachi Ltd デジタルワイドカメラ
US6215914B1 (en) * 1997-06-24 2001-04-10 Sharp Kabushiki Kaisha Picture processing apparatus
US6611629B2 (en) * 1997-11-03 2003-08-26 Intel Corporation Correcting correlation errors in a composite image
JP2000295564A (ja) 1999-04-02 2000-10-20 Fuji Photo Film Co Ltd ディジタル・スチル・カメラおよびその動作制御方法
JP2000316125A (ja) 1999-04-28 2000-11-14 Sharp Corp 画像合成装置
US6798923B1 (en) * 2000-02-04 2004-09-28 Industrial Technology Research Institute Apparatus and method for providing panoramic images
US7221395B2 (en) 2000-03-14 2007-05-22 Fuji Photo Film Co., Ltd. Digital camera and method for compositing images
JP4620271B2 (ja) 2000-03-14 2011-01-26 富士フイルム株式会社 画像処理方法
JP2002208005A (ja) * 2001-01-12 2002-07-26 Minolta Co Ltd 画像処理装置、画像処理方法、画像処理プログラムおよび画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体
US6516154B1 (en) * 2001-07-17 2003-02-04 Eastman Kodak Company Image revising camera and method
US6954544B2 (en) * 2002-05-23 2005-10-11 Xerox Corporation Visual motion analysis method for detecting arbitrary numbers of moving objects in image sequences

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60190078A (ja) * 1984-03-12 1985-09-27 Fuji Photo Film Co Ltd 画像合成装置
JPH0514810A (ja) * 1991-06-28 1993-01-22 Nippon Hoso Kyokai <Nhk> 画像合成用キー信号の発生装置および発生方法
JP2000036032A (ja) * 1998-07-17 2000-02-02 Fujitsu Ltd 前景画像抽出方法、画像処理装置、自動トリミング装置、記録媒体及び肖像写真装置
JP2002171398A (ja) * 2000-12-04 2002-06-14 Konica Corp 画像処理方法及び電子カメラ
JP2003044852A (ja) * 2001-07-27 2003-02-14 Sony Corp 画像生成装置、画像生成方法及び画像生成プログラム

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090063633A1 (en) * 2004-08-13 2009-03-05 William Buchanan Remote program production
CN103079004A (zh) * 2012-12-28 2013-05-01 广东欧珀移动通信有限公司 一种定时拍照的示意方法、装置以及移动终端
CN103079004B (zh) * 2012-12-28 2015-10-07 广东欧珀移动通信有限公司 一种定时拍照的示意方法、装置以及移动终端
CN105493139A (zh) * 2013-09-06 2016-04-13 高通股份有限公司 交互式图像组成
CN105493139B (zh) * 2013-09-06 2018-11-23 高通股份有限公司 用于交互式图像组成的装置和方法

Also Published As

Publication number Publication date
AU2003246268A1 (en) 2004-02-25
CN1682528A (zh) 2005-10-12
US7623733B2 (en) 2009-11-24
CN100477745C (zh) 2009-04-08
US20060078224A1 (en) 2006-04-13

Similar Documents

Publication Publication Date Title
WO2004015987A1 (ja) 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体
US7024053B2 (en) Method of image processing and electronic camera
US7349020B2 (en) System and method for displaying an image composition template
JP5413002B2 (ja) 撮像装置および方法、並びにプログラム
CN105744180B (zh) 图像生成装置、电子设备及图像生成方法
US8717412B2 (en) Panoramic image production
EP2018049B1 (en) Method of assembling a panoramic image and camera therefor
JP4663699B2 (ja) 画像表示装置、及び画像表示方法
JP5360450B2 (ja) 画像処理装置、画像処理方法及びコンピュータプログラム
US20100225785A1 (en) Image processor and recording medium
JP3777922B2 (ja) デジタル撮像装置、それを備えた画像処理システム、画像処理装置、デジタル撮像方法および記録媒体
JP3983624B2 (ja) 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体
JP3649468B2 (ja) 撮影機能付き電子アルバムシステム
JP5504990B2 (ja) 撮像装置、画像処理装置及びプログラム
JP3983623B2 (ja) 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体
US8971636B2 (en) Image creating device, image creating method and recording medium
JP5733588B2 (ja) 画像処理装置および方法、並びにプログラム
JP6450604B2 (ja) 画像取得装置及び画像取得方法
KR20070116410A (ko) 마커를 이용한 파노라마 촬영 방법 및 장치
CN111083345B (zh) 独照生成装置和方法及其非易失性计算机可读媒体
JP4363153B2 (ja) 撮影装置、その画像処理方法及びプログラム
JP5493839B2 (ja) 撮像装置、画像合成方法及びプログラム
JP2004128588A (ja) 撮像装置
KR101348585B1 (ko) 파노라마 사진 촬영 방법
JP6668646B2 (ja) 画像処理装置、画像処理方法及びプログラム

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
ENP Entry into the national phase

Ref document number: 2006078224

Country of ref document: US

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 10523770

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 20038216264

Country of ref document: CN

122 Ep: pct application non-entry in european phase
WWP Wipo information: published in national office

Ref document number: 10523770

Country of ref document: US