WO2014109125A1 - 画像処理装置、画像処理方法、プログラム - Google Patents

画像処理装置、画像処理方法、プログラム Download PDF

Info

Publication number
WO2014109125A1
WO2014109125A1 PCT/JP2013/080606 JP2013080606W WO2014109125A1 WO 2014109125 A1 WO2014109125 A1 WO 2014109125A1 JP 2013080606 W JP2013080606 W JP 2013080606W WO 2014109125 A1 WO2014109125 A1 WO 2014109125A1
Authority
WO
WIPO (PCT)
Prior art keywords
subject
image
distance
determination
main subject
Prior art date
Application number
PCT/JP2013/080606
Other languages
English (en)
French (fr)
Inventor
雅也 木下
Original Assignee
ソニー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニー株式会社 filed Critical ソニー株式会社
Priority to EP13870934.0A priority Critical patent/EP2945366B1/en
Priority to US14/655,621 priority patent/US10547774B2/en
Priority to CN201380069149.9A priority patent/CN104919791A/zh
Priority to EP19178866.0A priority patent/EP3562143B1/en
Priority to JP2014556331A priority patent/JP6319101B2/ja
Publication of WO2014109125A1 publication Critical patent/WO2014109125A1/ja
Priority to US16/713,766 priority patent/US11012614B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/69Control of means for changing angle of the field of view, e.g. optical zoom objectives or electronic zooming
    • 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
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/36Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals
    • G02B7/365Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals by analysis of the spatial frequency components of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Definitions

  • the present disclosure relates to an image processing apparatus, an image processing method, and a program for performing processing for determining a main subject in an image.
  • Recent digital still cameras and digital video cameras have a face detection function as standard, and are equipped with functions that optimally adjust various camera parameters (focus, brightness, etc.) according to the face position and area. Yes.
  • Patent Document 1 describes a method in which a user designates a “main subject” as a subject tracking target in a captured image by designating the user.
  • a user designates a “main subject” as a subject tracking target in a captured image by designating the user.
  • subject tracking surrounding a whole body frame of an arbitrary subject can be realized.
  • autofocus / automatic exposure has a function of detecting and tracking a desired area in a captured image and controlling an optical system or the like so that the area is most suitable.
  • there are known techniques such as tracking an image designated as a main subject by the user, for example, an image area such as a face in the captured image, and focusing on the face area.
  • the desired region for tracking and focusing in the captured image is currently selected by the photographer himself from “a plurality of candidate regions” obtained from various detectors. This is determined by selecting one candidate. For example, an arbitrary face is selected by a touch panel from a plurality of faces that are displayed on a through image displayed on the screen (a monitoring image of a subject that is displayed at a time other than the shutter operation time) while holding the camera.
  • the main subject is selected by the action.
  • a subject existing in a predetermined area at a user-specified timing half-press of the shutter or the like is set as a main subject.
  • the act of “selection of a main subject by a photographer” is often difficult. For example, it is difficult for the user to select a finger while holding the camera and aiming at the subject while he wants to use this function to keep focusing on the moving subject.
  • the designation may be difficult due to the response speed of the user to the change (movement) of the subject. For example, it is a case where a moving subject cannot be specified well on a live view screen. In the first place, it is difficult for the user to select the main subject with his / her finger on the screen in the situation where the user holds the camera and selects the subject toward the subject.
  • a time lag on the camera system for example, a time lag between an actual scene and a through image of a captured image, may make it difficult for the user to appropriately specify a subject.
  • the user may perform an act of recording the image shake caused by the selection of the main subject as it is, or re-selecting when the tracking disappears (failure) due to frame-out or temporary occlusion.
  • an act of recording the image shake caused by the selection of the main subject as it is or re-selecting when the tracking disappears (failure) due to frame-out or temporary occlusion.
  • an object of the present disclosure is to realize a technique for determining a target subject desired by a user as a main subject without a user such as a photographer intentionally selecting a subject.
  • the image processing apparatus detects a temporal change in the distance from the imaging position of a subject existing in the image, and determines a subject distance change determination that determines a tendency to contact and separate the subject from the imaging position based on the detection. And a main subject determination unit that determines a main subject based on the contact / separation tendency of each subject determined by the subject distance change determination unit.
  • the image processing method detects a temporal change in the distance from the imaging position of a subject existing in the image, and determines a contact / separation tendency of the subject with respect to the imaging position based on the detection. A main subject is determined on the basis of the contact / separation tendency of each subject.
  • the program of the present disclosure is a program that causes an arithmetic processing device to execute processing for realizing the image processing device or the image processing method.
  • main subject determination processing for automatically determining a main subject for image data is performed. For example, when a user holds an image pickup apparatus and takes an image, there is a case where the user aims at an approaching subject or an approaching subject. For example, when a child, a friend, a pet, or the like approaches a photographer holding a camera, or when a train, an aircraft, a wild bird, or the like moves away from the camera. In this way, depending on the use case (imaging target), an approaching subject may be an imaging target, or a moving away subject may be an imaging target.
  • the main subject is automatically determined in the captured image, it is not necessary for the user such as the photographer to select the main subject. Therefore, user operability and convenience can be improved. For example, product additions such as improved operability when holding an imaging device equipped with the image processing device of the present disclosure in hand, reduction of user stress, and realization of various functions according to automatic main subject determination Increase value.
  • FIG. 6 is a flowchart of main subject determination processing of the image processing apparatus according to the embodiment. It is a block diagram of the imaging device of a 1st embodiment. It is explanatory drawing of the outline
  • summary of the main subject determination of 1st Embodiment. It is explanatory drawing of the approach determination of 1st Embodiment. 4 is a flowchart of approach determination and main subject determination processing according to the first embodiment. It is a block diagram of the imaging device of a 2nd embodiment. 10 is a flowchart of approach determination and main subject determination processing according to the second embodiment. It is explanatory drawing of the separation determination of 3rd Embodiment.
  • FIG. 1 shows a configuration example of an image processing apparatus according to an embodiment.
  • the image processing apparatus 1 includes a main subject determination unit 2 and a subject distance change determination unit 3.
  • the subject distance change determination unit 3 detects a temporal change in the distance from the imaging position for a subject existing in the image, and determines a contact / separation tendency of the subject with respect to the imaging position based on the detection.
  • the approaching / separating tendency is either an approaching tendency in which the subject approaches the imaging position or a separation tendency in which the subject moves away from the imaging position.
  • the subject distance change determination unit 3 detects the change in the distance of the subject in the image from the sequentially input frame images as the image data Dg, determines the contact / separation tendency of the subject, and sequentially supplies it to the main subject determination unit 2. To do. Specifically, a change in distance is obtained from the size of the subject image, and the contact / separation tendency is determined.
  • the subject distance change determination unit 3 inputs the distance information Id about the subject included in the image data, obtains the subject distance change from the change of the distance information Id, and determines the contact / separation tendency.
  • the main subject determination unit 2 determines the main subject based on the contact / separation tendency of each subject determined by the subject distance change determination unit 3. For example, the main subject determination unit 2 determines the main subject based on the determination result of the approach tendency. Alternatively, the main subject is determined based on the determination result of the away tendency. For example, all or a part of subjects that tend to approach or move away are determined as main subjects.
  • the main subject determination unit 2 outputs main subject information Dm as a determination result.
  • the image processing apparatus 1 having the above main subject determination unit 2 and subject distance change determination unit 3 can be realized by a CPU (Central Processing Unit) or a DSP (Digital Signal Processor) as an arithmetic processing unit. It is also conceivable to realize the function of the main subject determination unit 2 with a CPU or the like, and to realize the function of the subject distance change determination unit 3 as an image processing DSP or the like connected to the CPU, or as a cooperation process thereof.
  • a CPU Central Processing Unit
  • DSP Digital Signal Processor
  • step F1 the subject distance change determination unit 3 detects a change in the distance of the subject included in the image data, and determines a subject that shows a tendency to contact and separate.
  • step F2 the main subject determination unit 2 determines that the subject in which the tendency to contact / separate is observed is the main subject.
  • step F3 the main subject determination unit 2 outputs main subject information Dm, which is a main subject determination result, and passes it to an application program or the like. In the application program or the like, processing is performed in response to the identification of the main subject image. For example, focus control, tracking processing, image effect processing, and the like.
  • FIGS. 2B and 2C Two methods are shown in FIGS. 2B and 2C.
  • the processing example in FIG. 2B is processing for determining the contact / separation tendency of each subject by detecting the image size in each frame for the subject in the image data and obtaining the size change amount. That is, the temporal change in the distance of the subject is detected by the change in size on the image.
  • this type of processing is called a “size determination method”.
  • the first to third embodiments described later are examples in which the concept of the size determination method is used.
  • the processing example of FIG. 2C is processing for dividing the image data into a plurality of regions and detecting temporal changes in the distance of the subject for each divided region (block) in the image. For the sake of explanation, this type of processing is called a “block determination method”.
  • the fourth embodiment to be described later is an example using the concept of this block determination method.
  • step F10 the subject distance change determination unit 3 detects a candidate image that can be a main subject in the image data.
  • Candidate images are, for example, human face images, body images, dog images, cat images, and the like.
  • the subject distance change determination unit 3 sets one or a plurality of candidate images such as a face image as a subject existing in the image by image analysis processing of the image data.
  • step F11 the subject distance change determination unit 3 calculates the size (area) of each candidate image.
  • the size is calculated as the width ⁇ height of the candidate image region, the number of pixels, and the like.
  • the subject distance change determination unit 3 calculates a size change for each candidate image. For example, in continuous frame image data, the difference between the size of the candidate image of the current processing target frame and the size of the candidate image in the frame image data before a unit time (for example, one frame before) is calculated.
  • the size of the candidate image on the image corresponds to the distance between the imaging position (the position of the imaging device where the cameraman is imaging) and the subject that is the candidate image. Accordingly, when the subject as the candidate image is approaching, the size increases as the frame progresses, and when the subject as the candidate image is far away, the size decreases as the frame progresses. That is, the size change can be regarded as a distance change.
  • the subject distance change determination unit 3 determines the contact / separation tendency of each candidate image. For example, when the above size change is observed over a certain span of time, the subject size gradually increases when the subject as a candidate image is approaching. That is, the amount of size change in the direction of size enlargement is observed to some extent average, cumulatively or continuously. In such a case, it can be determined that the candidate image tends to approach the imaging position. Conversely, when the subject as a candidate image is separated, the subject size gradually decreases. That is, the size change amount in the size reduction direction is observed to some extent average, cumulatively or continuously. In such a case, it can be determined that the candidate image has a tendency to move away from the imaging position.
  • step F14 the main subject determination unit 2 selects a candidate image that tends to approach or separate, and sets the subject of the candidate image as the main subject.
  • steps F20, F21, and F22 are performed as step F1 in FIG. 2A
  • steps F23 and F24 are performed as step F2 in FIG. 2A
  • the subject distance change determination unit 3 detects the subject distance for each of the divided regions (blocks) obtained by dividing the image data into a plurality of regions.
  • the divided area (block) refers to each of the areas obtained by dividing one image into a plurality of areas as indicated by broken lines in FIG. 12B.
  • step F20 for each divided area, distance information of the subject that has been moved into the area is detected.
  • the subject distance change determination unit 3 calculates a distance change for each divided region. For example, in continuous frame image data, a difference in subject distance is calculated for each divided region of the currently processed target frame and each divided region in the frame image data before a unit time (for example, one frame before). As a result, the distance change of the subject in each divided region is calculated.
  • the subject distance change determination unit 3 determines the approaching / separating tendency of each divided region. For example, when the above distance change is observed over a certain span of time, when the subject in the divided area is approaching, the distance value gradually decreases, and the distance is shortened to some extent average, cumulatively or continuously. The distance change in the direction is observed. In such a case, it can be determined that the subject in the divided area tends to approach the imaging position. On the other hand, when the subject in the divided area is separated, the distance value gradually increases, and a distance change amount in the direction in which the distance becomes longer is observed to some extent average, cumulatively or continuously. In such a case, it can be determined that the subject in the divided area has a tendency to move away from the imaging position.
  • the main subject determination unit 2 determines a subject image region including a divided region that tends to approach or move away.
  • the divided area is obtained by dividing the image area and does not correspond to the area of the subject image 1: 1.
  • the main subject determination unit 2 has, for example, a subject distance value that is substantially the same as that of a divided region that is likely to be approaching or moving away, and a region that is continuous with the divided region (an adjacent region or an adjacent region).
  • the area range of one subject image is determined.
  • the subject image in the determined area range is determined as the main subject.
  • the main subject determination is performed as in each of the above examples, so that the subject intended by the user as the target can be estimated based on the movement of the subject (proximity / distance). Therefore, the main subject can be automatically determined without relying on the user's manual operation. Accordingly, the operability of the user is significantly improved by mounting the image processing apparatus 1 of FIG. 1 on various electronic devices that perform operations according to the main subject setting.
  • the imaging device 10 is a so-called digital still camera or digital video camera, and is a device that captures / records still images and moving images, and incorporates an image processing device as defined in the claims.
  • the imaging apparatus 10 includes an optical system 11, an imager 12, an optical system driving unit 13, a sensor unit 14, a recording unit 15, a communication unit 16, a digital signal processing unit 20, a control unit 30, a user interface controller ( Hereinafter, “UI controller”) 32 and user interface 33 are included.
  • UI controller user interface controller
  • the optical system 11 includes a lens such as a cover lens, a zoom lens, and a focus lens, and a diaphragm mechanism.
  • the optical system 11 collects light from the subject on the imager 12.
  • the imager 12 includes, for example, an image sensor such as a charge coupled device (CCD) type or a complementary metal oxide semiconductor (CMOS) type.
  • the imager 12 performs, for example, CDS (Correlated Double Sampling) processing, AGC (Automatic Gain Control) processing, etc., on the electrical signal obtained by photoelectric conversion in the image sensor, and further performs A / D (Analog / Digital) conversion processing. I do.
  • the imaging signal as digital data is output to the digital signal processing unit 20 at the subsequent stage.
  • the optical system drive unit 13 drives the focus lens in the optical system 11 based on the control of the control unit 30, and executes a focus operation. Further, the optical system driving unit 13 drives an aperture mechanism in the optical system 11 based on the control of the control unit 30, and performs exposure adjustment. Furthermore, the optical system drive unit 13 drives the zoom lens in the optical system 11 based on the control of the control unit 30 and executes a zoom operation.
  • the digital signal processor 20 is configured as an image processor by a DSP or the like, for example.
  • the digital signal processing unit 20 performs various signal processes on the digital signal (captured image signal) from the imager 12.
  • the digital signal processing unit 20 includes a preprocessing unit 21, a synchronization unit 22, a YC generation unit 23, a resolution conversion unit 24, a codec unit 25, and a candidate detection unit 27.
  • the pre-processing unit 21 performs clamp processing for clamping the R, G, and B black levels to a predetermined level on the captured image signal from the imager 12, correction processing between the R, G, and B color channels, and the like. Apply.
  • the synchronization unit 22 performs demosaic processing so that the image data for each pixel has all the R, G, and B color components.
  • the YC generation unit 23 generates (separates) a luminance (Y) signal and a color (C) signal from R, G, and B image data.
  • the resolution conversion unit 24 performs resolution conversion processing on image data that has been subjected to various types of signal processing.
  • the codec unit 25 performs, for example, a recording or communication encoding process on the resolution-converted image data.
  • the candidate detection unit 27 performs image analysis processing in units of each frame (or every intermittent frame), for example, on the captured image signal (luminance signal / color signal) obtained by the YC generation unit 23, and selects candidate images. Extract. That is, face image detection, human body image detection, and the like are performed on image data continuously input on the time axis, and images that are candidates for the main subject are extracted. In addition, face detection, human body detection, etc. can be performed by pattern matching method in image analysis for captured image data, but other detectors can be realized in principle by replacing the dictionary used for pattern matching. Is possible. For example, a candidate image of a main subject may be extracted as a (specific type) dog detection / cat detection.
  • a moving object detection method based on a frame difference may be used to detect a moving object, and the moving object may be used as a candidate image.
  • a gaze area extraction method called “Saliency” may be used. There are various methods for extracting and selecting candidate images.
  • the candidate detection unit 27 detects a face image, and extracts a region where the face image exists as a candidate image frame.
  • the position information of the candidate image frame (information on x, y coordinate values, subject distance, etc. on the screen) and size information (for example, the width, height, number of pixels, etc. of the candidate image frame) Is transferred to the control unit 30 as candidate image information.
  • the candidate image information is also referred to as “candidate image frame information”.
  • the candidate detection unit 27 may generate candidate image frame information by performing a process such as a smoothing process and an outlier removal process on the image.
  • the candidate detection unit 27 is shown as a functional configuration executed by the digital signal processing unit 20 in the example of FIG. 3, but this is an example, and the processing of the candidate detection unit 27 is executed by the control unit 30. Also good.
  • the control unit 30 is configured by a microcomputer (arithmetic processing unit) including a CPU, a ROM (Read Only Memory), a RAM (Random Access Memory), a flash memory, and the like.
  • a microcomputer arithmetic processing unit
  • the CPU executes a program stored in a ROM, a flash memory, or the like, the entire imaging apparatus 10 is comprehensively controlled.
  • the RAM is used as a work area for various data processing of the CPU for temporary storage of data and programs.
  • ROM and flash memory non-volatile memory
  • OS Operating System
  • a program for executing processing for main subject determination described later in this example, and an application program for using the main subject determination result are stored.
  • Such a control unit 30 includes various signal processing instructions in the digital signal processing unit 20, an imaging operation and a recording operation according to a user operation, a reproduction operation of a recorded image file, a camera operation such as zoom, focus, and exposure adjustment. Controls the operation of each necessary unit for user interface operations and the like.
  • control unit 30 has functions as a main subject determination unit 30a and a distance change calculation unit 30b, and approaches determination (or as described in the first to fourth embodiments described later) (or Remote distance determination) and main subject determination processing.
  • the distance change calculation unit 30b calculates an image size for the candidate image set by the candidate detection unit 27, calculates a change in the image size per unit time, and approaches from the result Judgment of tendency or distance tendency is performed.
  • the main subject determination unit 30a performs a process of setting the main subject in the candidate image based on the determination result of the distance change calculation unit 30b.
  • the user interface 33 executes display output and audio output for the user, and accepts user operation input. For this reason, a display device, an operation device, a speaker device, a microphone device, and the like are included. Here, a display unit 34 and an operation unit 35 are shown.
  • the display unit 34 is a display unit that performs various displays for a user (imager or the like). For example, an LCD (Liquid Crystal Display) or an organic EL (Electro-Luminescence) display formed on the housing of the imaging device 10.
  • the display device is formed. It may be formed using an LCD, an organic EL display, or the like in the form of a so-called viewfinder.
  • the display unit 34 includes the display device described above and a display driver that causes the display device to perform display. The display driver executes various displays on the display device based on instructions from the control unit 30.
  • the display driver reproduces and displays still images and moving images that have been captured and recorded on a recording medium, or a through image (subject monitoring image) as a moving image based on captured image data of each frame that is captured during a release (shutter operation) standby.
  • a through image subject monitoring image
  • various operation menus, icons, messages, etc. that is, display as a GUI (Graphical User Interface) is executed on the screen.
  • a display that allows the user to know the determination result of the main subject determination is also executed on a through image or a reproduction image.
  • the operation unit 35 has an input function for inputting a user operation, and sends a signal corresponding to the input operation to the control unit 30.
  • the operation unit 35 is realized as, for example, various operators provided on the housing of the imaging apparatus 10 or a touch panel formed on the display unit 34.
  • a playback menu start button, a determination button, a cross key, a cancel button, a zoom key, a slide key, a shutter button (release button), and the like are provided.
  • Various operations may be performed by a touch panel operation using icons, menus, and the like displayed on the touch panel and the display unit 34.
  • the operation of the display unit 34 and the like of the user interface 33 is controlled by the UI controller 32 in accordance with an instruction from the control unit 30. Further, operation information from the operation unit 35 is transmitted to the control unit 30 by the UI controller 32.
  • the recording unit 15 includes, for example, a non-volatile memory, and functions as a storage area for storing image files (content files) such as still image data and moving image data, image file attribute information, thumbnail images, and the like.
  • image files content files
  • JPEG Joint Photographic Experts Group
  • TIFF Tagged Image File Format
  • GIF Graphics Interchange
  • the recording unit 15 may be a flash memory built in the imaging apparatus 10, or a memory card (for example, a portable flash memory) that can be attached to and detached from the imaging apparatus 10 and a card recording / reproducing that performs recording / reproducing access to the memory card.
  • the form by a part may be sufficient.
  • the imaging device 10 may be realized as an HDD (Hard Disk Drive) or the like.
  • a program for executing approach determination (or separation determination) and main subject determination processing described later in this example may be stored in the recording unit 15.
  • the communication unit 16 performs data communication and network communication with an external device in a wired or wireless manner. For example, captured image data (still image file or moving image file) is communicated between an external display device, a recording device, a playback device, and the like.
  • a network communication unit for example, communication via various networks such as the Internet, home network, and LAN (Local Area Network) may be performed, and various types of data may be transmitted and received between servers and terminals on the network. .
  • the sensor unit 14 comprehensively shows various sensors.
  • a gyro sensor angular velocity sensor
  • an acceleration sensor and the like are provided for detecting the overall movement of the imaging apparatus 10 such as camera shake or the posture or movement (pan movement, tilt movement, etc.) of the imaging apparatus 10.
  • An illuminance sensor that detects external illuminance for exposure adjustment or the like, and a distance measuring sensor that measures the subject distance may be provided.
  • a zoom lens position sensor for detecting the position of the zoom lens in the optical system 11 and a focus lens position sensor for detecting the position of the focus lens.
  • a sensor that detects the opening amount of a mechanical iris may be provided.
  • Various sensors of the sensor unit 14 transmit detected information to the control unit 30.
  • the control unit 30 can perform various controls using information detected by the sensor unit 14.
  • the components of the image processing apparatus 1 as described in FIG. 1 are as follows.
  • the configuration corresponding to the main subject determination unit 2 in the image processing apparatus 1 of FIG. 1 is implemented by software in the control unit 30 of the imaging device 10 as the main subject determination unit 30a.
  • the configuration corresponding to the subject distance change determination unit 3 is implemented by software as the candidate detection unit 27 of the imaging device 10 and the distance change calculation unit 30b of the control unit 30.
  • the control unit 30 executes and controls the operation as the image processing method in the claims by executing the processing based on the program in the claims.
  • the main subject determination is executed, for example, when the user (photographer) is aiming for the shutter timing (release timing).
  • the control unit 30 automatically determines the main subject and then performs the following processing. be able to.
  • the main subject set in each captured frame is tracked.
  • the main subject is clearly shown to the user on the through image display, and is used for the user's angle of view adjustment (for example, subject determination in a state where the camera is held in the hand).
  • the frame of the main subject is highlighted on the through image display on the display unit 34. The highlighting or the like may be performed for a certain period immediately after the determination, or may be executed as long as the main subject exists in the through image.
  • Focus adjustment Auto focus control is performed on the main subject. In addition to the tracking process, even when the main subject moves around, the focus is adjusted by tracking the main subject.
  • -Exposure adjustment Automatic exposure adjustment is performed based on the brightness (luminance) of the main subject.
  • Directivity adjustment When sound is collected by a microphone together with imaging (for example, moving image imaging), directivity adjustment is performed according to the direction of the main subject in the angle of view space.
  • ⁇ Zoom control Performs automatic zoom control corresponding to the main subject. For example, automatic zoom lens driving is performed so that the main subject is always reflected in the captured image with a size larger than a predetermined size.
  • the angle of view may be adjusted by zooming according to the change in the distance from the main subject.
  • Recording start control Triggers the start of video capture. For example, in response to the determination of the main subject, moving image recording is started.
  • Image effect processing image processing such as image quality adjustment, noise reduction, and skin color adjustment is applied only to the area of the main subject in each captured frame.
  • image effects such as mosaic processing, blurring processing, and painting processing in addition to the main subject area.
  • Edit processing such as framing and cropping is applied to the captured image or recorded image. For example, it is possible to perform processing such as cutting out or enlarging a partial area in a frame including the main subject. Further, in the captured image data, composition adjustment can be performed by cutting the periphery of the image so that the main subject is arranged at the center of the image.
  • the main subject determination process may be performed at all times.
  • the main subject may be performed again at the time when the tracking is lost.
  • the main subject determination process may be started by a user operation. Further, it may be always executed when the user selects the determination execution mode, or may be executed when tracking is lost. It is also conceivable that the main subject determination process is automatically activated regardless of the user operation.
  • the effects of performing the main subject determination process are as follows. As described above, when the photographer is holding the imaging device 10 and is aiming at a subject, an operation for designating a main subject is difficult in the first place. It is difficult for the user to specify the main subject, especially when the imaging direction is continuously changed in a certain direction, such as panning or tilting, or when the imaging direction is changed even if it is not constant. It is. Also, it is troublesome to designate the main subject many times. By automatically executing the main subject determination, such a situation is eliminated and an effect of reducing user stress can be obtained.
  • the display unit 34 is also small, and the user performs an operation of designating a main subject on the screen. Even so, it is difficult to do accurately. Automatic determination as in this embodiment eliminates erroneous designation.
  • the imaging device 10 automatically determines the main subject, the main subject is in a situation where the user holds the imaging device 10 aiming at the subject or changes the imaging direction following the subject. The determination is executed, and the effect of improving the intelligent feeling that the user feels in the apparatus and the added value can be obtained.
  • the imaging device 10 can be used as if it is naturally held, it can be used as if it is a main role, so that it is possible to increase imaging opportunities and use cases, and to provide a user with an easy-to-use camera.
  • the imaging apparatus 10 of the present embodiment that automatically performs main subject determination is particularly suitable as a handheld camera.
  • First Embodiment as Imaging Device> As the first embodiment, the main subject determination operation in the image pickup apparatus having the configuration shown in FIG. 3 will be described. This is an example in which main subject determination is performed based on the concept of the size determination method described in FIG. 2B. The first embodiment is an example in which an approaching subject is determined as a main subject.
  • FIG. 4A schematically shows a candidate image frame extraction operation performed by the candidate detection unit 27.
  • the candidate detection unit 27 detects a candidate image for each successive frame (or each intermittent frame) that is sequentially input. For example, as shown in the figure, when there are three people in the frame FR1, each face image portion is extracted as a candidate image, and candidate image frame information for the candidate image frames E1, E2, and E3 is output.
  • the candidate image frame information of the candidate image frame E1 is, for example, position information (x, y position information) in the image of the candidate image frame E1, width w, height h, etc. of the candidate image frame.
  • the x, y position information is, for example, coordinate values with the upper left corner of the image as the origin (0, 0).
  • the width w and the height h may be the number of pixels, for example.
  • the candidate detection unit 27 also generates such candidate image frame information for the candidate image frames E ⁇ b> 2 and E ⁇ b> 3 and passes them to the control unit 30.
  • the candidate detection unit 27 extracts candidate images, generates candidate image frame information for each candidate image frame, and passes the candidate image frame information to the control unit 30.
  • the control unit 30 calculates a frame area (h ⁇ w) as a size for each candidate image frame, and further, the candidate image of the previous frame is calculated as the amount of change in the frame area. The difference with the size of is detected. Then, by observing the change in the difference on the time axis, it is determined whether or not each candidate image has an approaching tendency.
  • FIG. 4B shows an example of a captured image when the subject person set as the candidate image frame E1 is approaching the direction of the imaging apparatus 1.
  • the frame area of the candidate image frame E1 is relatively small in a certain frame FRx
  • the frame area of the candidate image frame E1 is large in the frame FRy when a certain time has passed. The size change of the candidate image frame is observed to determine whether or not the subject is approaching.
  • FIG. 5A shows a change in the calculated frame area assuming that the candidate image frames E1, E2, E3 continue to exist in the frames (FR1, FR2,%) For a certain period. It is. For example, it is assumed that the photographer has captured three subjects with the imaging device 10 for a certain period of time. The frame area distance of each of the candidate image frames E1, E2, and E3 calculated on the time axis when each of the three people moves or when the photographer moves while holding the imaging device 10. Is changing on the time axis. In this example, the candidate image frame E1 has a gradually increased frame area, but the candidate image frames E2 and E3 do not have a large change in the average frame area even if there are some changes.
  • FIG. 5B shows the transition of the change amount of the frame area of the candidate image frames E1, E2, and E3.
  • the value at each time point is shown as a difference obtained by subtracting the frame area of the previous frame from the frame area of the current frame. Accordingly, when the relative distance to the imaging device 10 approaches from the previous time point, the value of the area change amount increases. Therefore, first, a determination result for each area change amount is obtained by using a distance determination threshold Thd for determining whether or not it is approaching based on the area change amount. When the area change amount exceeds the distance determination threshold Thd, it is determined that there is an approaching distance of a predetermined distance or more at that time.
  • FIG. 5C shows the determination results for the candidate image frames E1, E2, and E3.
  • the candidate image frame E1 always has a high area change amount, and the E1 determination result continues to be “1”. Since the candidate image frame E2 may have a high area change amount, the E2 determination result is “1” only for a certain period.
  • the candidate image frame E3 always has a low area change amount, and the E3 determination result is continuously “0”.
  • a subject that is approaching a certain amount of time, average, cumulative, or continuously is determined to be a subject that tends to approach.
  • a subject having a long period in which the determination result of FIG. 5C is “1” is determined as a subject having an approaching tendency.
  • the approach tendency can be determined by counting period lengths such as a continuation period and a cumulative period in which the determination result is “1”.
  • the candidate image frame E1 since the determination result is “1” and the period is long, it can be determined that the candidate image frame E1 has an approaching tendency during this determination period.
  • the candidate image frame E2 is, for example, a subject that has temporarily approached or moved away.
  • the candidate image frame E3 is a subject that maintains a relatively far position.
  • the period from the start of determination to the end of determination varies depending on the specific processing example.
  • the period length in which the determination result is “1” is counted, and when the period length reaches a predetermined time, the candidate image frame is determined as an approaching tendency.
  • the determination end timing is advanced. That is, the determination period length varies depending on the status of the determination process.
  • a period from the determination start to the determination end is a fixed period length.
  • a specific example of the approach determination and main subject determination processing of the control unit 30 will be described with reference to FIG.
  • the process described below is a process executed by the control unit 30 when the distance change calculation unit 30b and the main subject determination unit 30a function.
  • the count value Cnt (n) is a counter value for determining the time length of the determination result obtained by comparing the above-described area change amount with the distance determination threshold value Thd.
  • n represents a natural number 1, 2, 3,...
  • the count value Cnt (n) is applied to each detected candidate image frame E (n) like the candidate image frames E1, E2, E3.
  • the corresponding count value is used.
  • Cnt1, Cnt2, and Cnt3 are used as count values.
  • the process for the count value Cnt (n) indicates a process for each of Cnt1, Cnt2, and Cnt3, for example.
  • the processing for the frame area Area (n) is, for example, candidate image frames E1, E2, E3 Are used to mean processing for each of the frame areas Area1, Area2, Area3,.
  • the area change amount Diff (n) indicates the area change amount of each candidate image frame, and the processing for the area change amount Diff (n) is, for example, the candidate image frames E1, E2, E3,. It is used to mean processing for each of the area change amounts Diff1, Diff2, Diff3.
  • the candidate image frame E (n) represents the candidate image frames E1, E2, E3,...
  • the candidate detection unit 27 extracts a face
  • the face image portion of the person A is the candidate image frame E1
  • the person in common in each frame The face image portion of B
  • the face image portion of the person C is set as a candidate image frame E3.
  • the candidate detection unit 27 may not only detect the “face” but also perform individual (individual) discrimination.
  • the control unit 30 performs the processes of steps F101 to F116, for example, every frame timing.
  • step F ⁇ b> 101 the control unit 30 takes in candidate image frame information for a certain frame from the candidate detection unit 27. For example, for each candidate image frame E (n), as position information, information about the x value and y value as the two-dimensional (xy) coordinate values of the image data and the width w and height h of the candidate image frame are acquired. To do.
  • step F102 the control unit 30 calculates a frame area Area (n) for each candidate image frame E (n).
  • the frame area Area (n) width w ⁇ height h is obtained.
  • the candidate image frame E (n) is not necessarily a square, but may be a circle, an ellipse, an indefinite shape, or the like. In that case, the frame area Area (n) may be the number of pixels included in the candidate image frame E (n).
  • step F103 the control unit 30 obtains an area change amount Diff (n) for each candidate image frame E (n).
  • the area change amount Diff (n) is obtained as a difference from the previous frame.
  • the area change amount Diff (n) Area (n) ⁇ Area (n) pre Asking.
  • Area (n) pre is the frame area Area (n) of the previous frame of the candidate image frame E (n).
  • the frame area Area (n) obtained in step F102 when the image one frame before is targeted is “Area (n) pre” at the time of processing the current frame.
  • the determination flag Flg (n) 0 (not approaching) is set in step F107.
  • the determination flag Flg (n) corresponds to the determination result of “1” and “0” described in FIG. 5C.
  • step F111 the control unit 30 performs processing of the count value CNT (n) of the counter that counts the time length when the approach is observed.
  • CNT (n) CNT (n) + OFS (n)
  • the count value CNT (n) is a value corresponding to the length of the detected period when the subject of the candidate image frame E (n) is approaching. . If the approach is not detected (for example, the situation where the subject person has stopped), if the count value CNT (n) is kept, the count value CNT (n) becomes the cumulative value of the approach detection, so the stop is stopped. Even if there is etc., it rises according to proximity. Further, even when the count value CNT (n) is decremented when no approach is detected, the count value CNT (n) increases according to the average proximity. However, when proximity is not detected, the value is subtracted, and if it stops temporarily or moves backward, it is disadvantageous for the determination of the next approach tendency.
  • step F112 the control unit 30 determines whether each candidate image frame E (n) has an approaching tendency. Specifically, it is determined whether or not the count value CNT (n) indicating the approach detection time length is equal to or greater than a predetermined time threshold value Tht. If none of the count values Cnt (n) of each candidate image frame E (n) has reached the time threshold value Tht, the variable TSF remains 0 in step F113, and it is not determined that the determination is completed in step F116. Return to Step F101. In this case, based on the candidate image frame information input for the next frame, the processing after step F101 is executed in the same manner as described above.
  • the user touches the main subject on the screen of the display unit 34 or the subject is placed on the screen at a predetermined position and the shutter is moved.
  • the main subject may be selected as an operation such as half-pressing the button.
  • the main subject may be selected as an operation such as half-pressing the button.
  • the main subject may be terminated (end of interruption) based on the determination in steps F104 and F116.
  • the main subject determination based on the approach determination is determined with a certain length of time, and therefore, if the process for the candidate image frame information for a certain amount of time (number of frames) is not performed, the determination ends in step F116 as described above. Instead, the process returns to step F101 and the process is repeated.
  • a certain candidate image frame E1 may be discontinuous, but it is assumed that there is a situation where approach is detected in a plurality of frames. Then, as time progresses, the opportunity of incrementing the count value Cnt1 of the candidate image frame E1 in step F111 occurs, and the count value Cnt1 advances earlier than the count values Cnt2 and Cnt3. Then, at a certain point, the count value Cnt1 reaches the time threshold value Tht first. In such a case, the control unit 30 advances the process from step F112 to F114.
  • step F114 the control unit 30 determines that the candidate image frame E (n) whose count value Cnt (n) has reached the time threshold value Tht is a main subject, and performs main subject setting.
  • the variable TSF 1 is set.
  • the subject of the candidate image that is approaching on average in a certain period is determined to be the subject in the “approaching tendency” and set as the main subject.
  • step F115 main subject information is output and transferred to, for example, an application program or control program that uses the main subject information.
  • the approach determination and main subject determination processing are performed.
  • an approach tendency in a plurality of frames is determined in the extracted candidate images. For example, a subject with high probability that an imager holding a camera seems to aim as a target often shows an approaching tendency. For example, it is often observed that when a camera is pointed at a child, the child approaches. Therefore, by automatically setting the approaching subject as the main subject, the processing is appropriate for the photographer, and the operability during imaging is greatly improved. Even if the user is unfamiliar with the imaging operation, if the main subject is automatically subjected to focus control or exposure control by such main subject determination, a high-quality still image / It is possible to capture moving images.
  • a case where an approach is detected in the sense of being continuous, cumulative, or average under a predetermined time condition is determined as an approach tendency, but the determination weight may be changed with time.
  • the values ⁇ and ⁇ to be substituted for the offset value OFS (n) set in steps F109 and F110 in FIG. 6 are changed as the process proceeds.
  • the subject to be a leading role is not particularly determined at first. This is a case where an object to be imaged is searched for within a visible range. In this case, when a person who approaches gradually is found and an attempt is made to photograph the person, the photographer performs an operation of gradually adjusting the subject direction around the person.
  • the approach detection weight is increased as the time advances. Specifically, the value ⁇ to be substituted for the offset value OFS (n) is increased stepwise in step F109. By doing in this way, the possibility that main subject determination that matches the photographer's idea can be increased.
  • the main subject determination is performed when the count value CNT (n) of a certain candidate image frame E (n) is equal to or greater than the time threshold Tht, and the determination is terminated. Therefore, the determination period is indefinite. .
  • a fixed determination period is set, and the candidate image frame E (n) having the largest count value CNT (n) or the count value CNT (n) is equal to or greater than a predetermined value within the period.
  • a processing example in which one or a plurality of candidate image frames E (n) is determined as a main subject as a target of Step F114 is also conceivable.
  • the subject distance is within a predetermined distance
  • the subject image is a predetermined size or larger
  • the image type is a specific type
  • the center of gravity of the approaching subject image is a predetermined distance from the center point of the frame image ( It may be added to the condition that the distance is within a distance on the x and y coordinates.
  • the configuration of the imaging device 10 is as shown in FIG. In FIG. 7, the same parts as those in FIG.
  • the imaging apparatus shown in FIG. 7 differs from FIG. 3 in that an attribute identification unit 28 is provided in the digital signal processing unit 20.
  • the attribute identification unit 28 identifies, for example, the attribute of the subject that the candidate detection unit 27 has selected as a candidate image through image analysis, and passes the attribute information to the control unit 30.
  • the attribute information is, for example, information on whether the subject as a candidate image is an adult or a child, or information on whether a subject is a woman or a man.
  • the attribute identifying unit 28 determines the feature point of the face image and determines the gender and the age group.
  • the attribute identification unit 28 has a functional configuration executed by the digital signal processing unit 20, and an example in which the attribute identification unit 28 is realized as a processing function in the control unit 30 is also conceivable.
  • FIG. 8 shows a processing example of the control unit 30 (the main subject determination unit 30a and the distance change calculation unit 30b).
  • the same processing as in FIG. 6 described above is assigned the same step number to avoid redundant description. What differs from FIG. 6 is the processing of steps F101A and F112A.
  • the control unit 30 performs the processes of steps F101 to F116, for example, every frame timing.
  • step F ⁇ b> 101 ⁇ / b> A the control unit 30 takes in candidate image frame information for a certain frame from the candidate detection unit 27. For example, for each candidate image frame E (n), as position information, information about the x value and y value as the two-dimensional (xy) coordinate values of the image data and the width w and height h of the candidate image frame are acquired.
  • control unit 30 acquires attribute information AT (n) from the attribute identification unit 28 for each candidate image frame E (n). For example, identification information such as an adult / child, a male / female, or the like. Specifically, when candidate image frames E1, E2, and E3 exist, the respective attribute information AT1, AT2, and AT3 are acquired. For example, the attribute information AT1 is “child / female”, the attribute information AT2 is “adult / male”, the attribute information AT3 is “adult / female”, and the like.
  • steps F102 to F111 a process for determining an approach tendency for each candidate image frame E (n) is performed as in FIG.
  • the time threshold value for determining the approach tendency is set to a time threshold value Tht (ATn) corresponding to the attribute information.
  • the time threshold Tht (ATn) means that the value as the time threshold is switched according to the attribute information. For example, in the case of “child / female” and “child / male”, a relatively small value, a relatively large value for adult / female, a larger value for adult / male, etc.
  • the control unit 30 may store a threshold value corresponding to the attribute information as table data in the internal storage unit, or the threshold value corresponding to the attribute information may be determined by numerical setting on the program. Furthermore, the coefficient value for each attribute may be set as the coefficient value for the fixed threshold Tht, and the control unit 30 may obtain the threshold Tht (ATn) according to the attribute information at Step F112A. In step F112A, the count value CNT (n) for each candidate image frame E (n) is compared with the time threshold value Tht (ATn), and it is determined whether or not there is an approaching tendency based on the result. Then, the candidate image that tends to approach is determined as the main subject in step F114.
  • the ease of determination as a main subject differs depending on the attribute information. For example, if the time threshold Tht (ATn) for a child is small as described above, the child is likely to be determined as the main subject. Further, if the time threshold Tht (ATn) is smaller for the female than the male, the female is more likely to be determined as the main subject. As described above, the ease of determination as the main subject and the difficulty of determination can be adjusted according to the attribute of the subject. Therefore, the main subject desired by the user can be easily determined. For example, for a user who mainly images children, the accuracy of main subject determination is improved and the determination time is shortened by the time threshold as described above.
  • attribute information can be considered more variously.
  • the age may be estimated from the image more finely than the attribute determination of adult / child, and the age (child / youth / middle age / old age) may be identified and used as attribute information.
  • a face of a child or family member is registered in advance and the feature data is obtained.
  • the attribute identifying unit 28 detects a face that matches the feature data, it generates attribute information as a close relative, and the control unit 30 sets the time threshold Tht (ATn) in that case to a small value.
  • Tht an attribute information
  • the processing according to the second embodiment can be modified in the same manner as the processing according to the first embodiment.
  • FIGS. 9A, 9B, and 9C are similar to FIGS. 5A, 5B, and 5C described above, if the candidate image frames E1, E2, and E3 continue to be frames (FR1, FR2,... ) Shows the determination result using the calculated frame area change, the area change amount, and the distance determination threshold Thd.
  • the area change amount in FIG. 9B is the same as the area change amount in FIG. 5B.
  • the value of the area change amount takes a large value when the frame area decreases, and becomes, for example, as shown in FIG. 9B according to the change in the frame area of FIG. 9A.
  • the candidate image frames E1, E2, and E3 are as shown in FIG. 9C.
  • the candidate image frame E1 continues to have a determination result of “1”.
  • the determination result is “1” during the period when the area change amount is high.
  • the candidate image frame E3 always has a low area change amount, and the E3 determination result is continuously “0”. Similar to the first embodiment, if a period length such as a continuation period or a cumulative period in which the determination result is “1” is counted, an object that is moving away from the average, cumulative, or continuously, that is, a subject that is far away. The subject can be determined. In the case of FIG. 9, the candidate image frame E ⁇ b> 1 has been moving away for a certain period of time, on average, cumulatively, or continuously, and thus is determined to be a subject with a tendency to move away.
  • FIG. 10 shows an example of the separation determination and main subject determination processing of the control unit 30 (the main subject determination unit 30a and the distance change calculation unit 30b).
  • the same processing as in FIG. 6 described above is assigned the same step number to avoid redundant description.
  • the control unit 30 performs the processes of steps F101 to F116, for example, every frame timing.
  • the frame area Area (n) obtained in step F102 when the image one frame before is targeted is “Area (n) pre” at the time of processing the current frame.
  • the subsequent steps F104 to F116 are performed in the same manner as in FIG.
  • the separation tendency in a plurality of frames is determined in the extracted candidate images. Then, the main subject is determined based on the determination result of the away tendency. For example, there are many cases where a photographer holding a camera aims at a subject that moves away. If you want to take a picture of a fast-moving subject such as a train, aircraft, or motor sports, or if you want to take something that moves away from a normal person, such as a wild bird or an animal, the main subject is automatically moved away. By setting, the processing is appropriate for the photographer, and the operability at the time of imaging is remarkably improved. Even if the user is unfamiliar with the imaging operation, if the main subject is automatically subjected to focus control or exposure control by such main subject determination, a high-quality still image / It is possible to capture moving images.
  • the determination weight may be changed temporally.
  • the value ⁇ to be substituted for the offset value OFS (n) is increased stepwise or conversely.
  • a fixed determination period is set, and one or a plurality of candidate image frames E (n) having the largest count value CNT (n) or the count value CNT (n) are equal to or larger than a predetermined value within the period.
  • a processing example in which the candidate image frame E (n) is determined as the main subject as the target of Step F114 is also conceivable.
  • the subject distance is a predetermined distance or more
  • the subject image is a predetermined size or less
  • a specific image type
  • the center of gravity of the subject image that tends to move away is a predetermined distance from the center point of the frame image It may be added to the condition that it is within (distance on the x, y coordinates). By adding such a condition, it is possible to increase the probability that the subject that the photographer wants to capture is determined as the main subject, as well as that the subject is more distant. Therefore, the user may be able to select these additional conditions.
  • the determination of the away tendency may be applied by applying the concept of the second embodiment and using a different time threshold Tht (ATn) according to the attribute information.
  • the imaging apparatus 10 in FIG. 11 includes the distance sensor 17, and the digital signal processing unit 20 has a function as the distance calculation unit 29.
  • the distance sensor 17 detects the subject distance in the imaging direction.
  • the distance calculation unit 29 uses the detection value of the distance sensor 17 to calculate the subject distance for each divided area (block) obtained by dividing the captured image.
  • a subject distance detection technique by the distance sensor 17 and the distance calculation unit 29 a known technique such as a phase difference sensor method, a Time of Flight method, a Kinect method, or the like can be used.
  • the phase difference sensor method is a method for obtaining the distance of the target subject from the distance (number of pixels) between pixels in which the same target subject is detected in the captured images of the imagers arranged on the left and right.
  • the time of flight method is a method in which the distance sensor 17 emits and receives infrared rays, and obtains the distance by dividing the time until the emitted infrared rays are reflected and received by the target subject by the infrared velocity.
  • FIG. 12 shows the distance detection operation for each block.
  • FIG. 12A shows each frame FR1, FR2, FR3...
  • the distance sensor 17 performs an operation for measuring the distance of the subject, and the detection information is input to the distance calculation unit 29.
  • the distance calculation unit 29 calculates the subject distance for each block for each frame image data FR1, FR2, FR3.
  • the control unit 30 is provided with functions as a main subject determination unit 30a and a distance change calculation unit 30b.
  • the components of the image processing apparatus 1 described in FIG. 1 are as follows.
  • the configuration corresponding to the main subject determination unit 2 in the image processing apparatus 1 of FIG. 1 is implemented by software in the control unit 30 of the imaging device 10 as the main subject determination unit 30a.
  • the configuration corresponding to the subject distance change determination unit 3 is implemented by hardware or software as the distance calculation unit 29 and the distance change calculation unit 30b.
  • the distance calculation unit 29 has a function configuration executed by the digital signal processing unit 20, but this is an example, and the function as the distance calculation unit 29 is implemented in the control unit 30 by software. It is also possible to do.
  • FIG. 12B shows an example of a block as a divided region.
  • One image data is divided into a large number of blocks as indicated by broken lines.
  • each block is referred to as a block BK (BK1, BK2,... BK (M)) for explanation.
  • the distance calculation unit 29 obtains a subject distance for each of the blocks BK1, BK2,... BK (M).
  • the lower part of FIG. 12B illustrates the subject distance of each block BK (metric value or infinity ⁇ ).
  • the block BK4 is illustrated as 20 m
  • the block BK3 is illustrated as infinity ⁇ .
  • the distance calculation unit 29 obtains the subject distance for each block BK in this way for each frame, for example, and delivers the distance information of each block BK to the control unit 30.
  • FIG. 13A shows a change in the subject distance calculated for each frame for each block BK.
  • blocks BK1, BK2, and BK (x) are illustrated.
  • the distance of the subject in the block BK (x) is gradually shortened.
  • the same subject is not necessarily located in the same block on the captured image data.
  • it is assumed that the same subject for example, person A, person B, person C is shown in each of the blocks BK1, BK2, BK (x) during the period from the start of determination to the end of determination.
  • a block in which a certain subject is captured changes for each frame. Because of the need to consider such circumstances, in the processing example of FIG. 14 described later, a time association process for each block is added in step F202.
  • FIG. 13B shows the transition of the change amount of the distance of each block BK1, BK2, BK (x).
  • the value at each time point is shown as a difference obtained by subtracting the distance in the previous frame from the distance in the current frame for each block BK. Therefore, when the subject existing in the block BK approaches the relative distance from the imaging device 10 from the previous time point, the distance change amount is small (minus value), and if the relative distance does not change, the distance increment is 0. The distance change amount is a large value.
  • a determination result for each block BK is obtained using a distance determination threshold Thd for determining whether or not the vehicle is approaching based on the distance change amount. If the distance change amount is less than the distance determination threshold Thd, it is determined at that time that the subject of the block BK has approached a predetermined distance or more.
  • FIG. 13C shows the determination results for the blocks BK1, BK2, and BK (x). This is a flag that becomes “H” level when the distance change amount is less than the distance determination threshold Thd. As can be seen from the figure, the determination result of the block BK (x) continues to be “1”. The block BK2 is “1” only for a certain period so as to indicate a temporary approach. The determination result of the block BK1 is continuously “0”.
  • a subject that is approaching a certain amount of time, average, cumulative, or continuously is determined to be a subject that tends to approach.
  • a subject having a long period in which the determination result of FIG. 13C is “1” is determined as a subject having an approaching tendency.
  • the approach tendency can be determined by counting period lengths such as a continuation period and a cumulative period in which the determination result is “1”.
  • the block BK (x) since the determination result is “1” and the period is long, it can be determined that the subject included in the block BK (x) has an approaching tendency during this determination period.
  • the block BK2 can be said to be a block including a subject that has temporarily approached or moved away, for example.
  • the block BK1 is a block that includes a subject that maintains a relatively distant position.
  • the period from the start of determination to the end of determination varies depending on the specific processing example.
  • the period length in which the determination result is “1” is counted, and when the period length reaches a predetermined time, the subject of the block BK is determined to have an approaching tendency.
  • the determination end timing is advanced. That is, the determination period length varies depending on the status of the determination process.
  • a period from the determination start to the determination end is a fixed period length.
  • a specific example of the approach determination and main subject determination processing of the control unit 30 will be described with reference to FIG.
  • the process described below is a process executed by the control unit 30 when the distance change calculation unit 30b and the main subject determination unit 30a function.
  • the count value bCnt (m) 0.
  • the count value bCnt (m) is a counter value for determining the time length of the determination result obtained by comparing the distance change amount and the distance determination threshold value Thd.
  • the count value bCnt (m) is a count value corresponding to each block BK of the blocks BK1, BK2, BK3... BK (M). .
  • bCnt1, bCnt2,..., BCnt (M) are used as count values for the respective blocks BK1 to BK (M).
  • the processing for the count value bCnt (m) indicates processing for each of the count values bCnt1, bCnt2,... BCnt (M).
  • Db (m) described in the processing of FIG. 14 indicates the distance detected for each block
  • bDiff (m) indicates the distance change amount of each block BK.
  • the processing for the distance Db (m) and the distance change amount bDiff (m) is used to mean the processing of the distance and the distance change amount for each of the blocks BK1 to BK (M). The same applies to the determination flag Flg (m) and the offset value OFS (m).
  • the control unit 30 performs the processes of steps F201 to F217, for example, every frame timing.
  • step F201 the control unit 30 takes in the distance information Db1 to Db (M) for each of the blocks BK1 to BK (M) for a certain frame from the distance calculation unit 29.
  • the distance value information shown in the lower part of FIG. 12B.
  • the control unit 30 performs a time association process for each block BK in step F202, and obtains a distance change amount bDiff (m) for each block BK in step F203. That is, the difference between the distance value of the current frame and the distance value of the previous frame.
  • Distance change amount bDiff (m) Db (m) ⁇ Db (m) pre Asking.
  • Db (m) pre is a distance value of the corresponding block BK (m) in the previous frame of the block BK (m) that is currently processed.
  • step F202 the time association processing in step F202 will be described with reference to FIGS.
  • the same subject is not necessarily located in the same block on the captured image data of each frame.
  • the relative position in the left / right / up / down direction between the subject and the imaging device 10 changes, for example, a subject one frame before is located in the block BK4 but in the current frame is located in the block BK5. is there. Considering such a case, simply calculating the distance difference from the previous frame of the block BK5 does not constitute the distance change amount of the subject.
  • the subject and the block are associated (tracked).
  • FIG. 16 shows a state in which the position of a subject P in the image is shifted between the current frame FRc and the previous frame FRpre.
  • the face portion of the subject P exists in the block BK (y).
  • the previous frame FRpre no face portion is present in the same block BK (y) pre, and the position of the block BK (z) pre is present.
  • the distance change amount bDiff (y) to be obtained for the block BK (y) of the current frame FRc is, in this case, the block BK (z) pre of the previous frame FRpre. It is the difference from the distance value. Therefore, time association processing is performed so that the block BK (z) pre here is a block of the previous frame for the block BK (y).
  • step F230 of FIG. 15 the control unit 30 confirms distance information of nine blocks centering on the block BK (m) pre of the previous frame FRpre corresponding to the target block BK (m) of the current frame FRc.
  • the block BK (y) in FIG. 16 nine blocks surrounded by a thick frame are confirmed around the same block BK (y) pre in the previous frame FRpre. As shown in the figure, these nine blocks are designated as BKx1 to BKx9.
  • each block BKx1 to BKx9 is assumed to be “10” “10” “9” “10” “7” “6” “9” “7” “5” (unit is, for example, meter) as shown in the figure. . Note that the distance value of the block BK (y) of the current frame is “5”.
  • step F231 the control unit 30 calculates the absolute value of each block BKx1 to BKx9 of the previous frame FRpre corresponding to the target block BK (m) of the current frame FRc.
  • bDiffX2
  • the distance Db (m) is a distance value of the target block BK (m), which is the distance value “5” of the block BK (y) in the example of FIG.
  • the distances Db (BKx1) to Db (BKx9) are the distance values of the nine blocks BKx1 to BKx9.
  • the above “10” “10” “9” “10” “7” “ The values are “6”, “9”, “7”, and “5”.
  • step F232 the control unit 30 determines which of the absolute distance differences bDiffX1 to bDiffX9 has the minimum value.
  • the block of the current frame is searched for a block with a small absolute distance difference in the vicinity of the same block in the previous frame, and Corresponding blocks (of the same subject) are used.
  • the association is performed for each block BK in this way.
  • the distance change amount bDiff (m) for each block BK (m) calculated in step F203 represents the distance change for the same subject.
  • the meaning of step F204 is the same as step F104 in FIG.
  • the determination flag Flg (m) 0 (not approaching) is set in step F207.
  • the determination flag Flg (n) corresponds to the determination result of “1” and “0” described in FIG. 13C.
  • step F211 the control unit 30 processes the count value bCNT (m) of the counter that counts the time length when the approach is observed.
  • bCNT (m) bCNT (m) + OFS (m)
  • the count value bCNT (m) is a value corresponding to the length of the period detected when the subject of the block BK (m) is approaching. If the approach is not detected (for example, the situation where the subject person has stopped), the count value bCNT (m) becomes the cumulative value of the approach detection if the count value bCNT (m) is kept. If there are many, it will rise. Further, even if the count value bCNT (m) is decremented when no approach is detected, the count value bCNT (m) increases according to the average proximity. However, when proximity is not detected, the value is subtracted, and if it stops temporarily or moves backward, it is disadvantageous for the determination of the next approach tendency.
  • step F212 the control unit 30 determines whether each block BK (m) has an approaching tendency. Specifically, it is determined whether or not the count value bCNT (m) indicating the approach detection time length is equal to or greater than a predetermined time threshold value Tht. If none of the count values bCnt (m) of each block BK (m) has reached the time threshold value Tht, the variable TSF remains 0 in step F213, and it is not determined that the determination is completed in step F217. Return to. In this case, based on the distance information Db (m) of each block BK (m) input for the next frame, the processing after step F201 is executed in the same manner as described above.
  • the processing may be ended (interruption ended) from Step F217.
  • the main subject determination based on the approach determination is performed with a certain length of time, and therefore the determination does not end in step F217 unless the process for each block BK (m) is performed for a certain amount of time (number of frames).
  • step F201 the process is repeated.
  • a certain block BK (x) may be discontinuous, but it is assumed that there is a situation where the approach of the subject is detected in a plurality of frames. Then, as time progresses, the opportunity of incrementing the count value bCnt (x) of the block BK (x) in step F211 occurs, and the count value bCnt (x) is obtained from the count values bCnt1, bCnt2, etc. of other blocks. Proceed quickly. Then, at a certain point, the count value bCnt (x) reaches the time threshold value Tht first. In such a case, the control unit 30 advances the process from step F212 to F214.
  • step F214 the control unit 30 determines that the block BK (m) whose count value bCnt (m) has reached the time threshold Tht is a block including the main subject, and performs main subject setting. That is, a block in which a subject is approaching on average in a certain period is determined as a block including a subject that is “approaching”, and main subject setting is performed.
  • step F216 main subject information is output and passed to, for example, an application program or control program that uses the main subject information. In this case, the determination is ended in step F217.
  • step F214 the main subject setting in step F214 will be described.
  • the approach tendency is determined in step F212 in units of blocks BK, not necessarily in units of subjects. Therefore, in step F214, a subject range is searched based on the block, and the range is determined as the main subject. This will be described in detail with reference to FIGS.
  • FIG. 18A shows a part of one frame of image data.
  • a broken line indicates the block BK. It is assumed that the subject P is now close and that a certain block BK (p) at a certain point in time is determined as an approaching tendency in step F212. However, the block BK (p) is a part of the subject P, and it is not appropriate to use only the block BK (p) as the main subject. Therefore, in order to set the range of the subject P as the main subject, the control unit 30 performs the process shown in FIG. 17 in step F214.
  • step F240 a distance difference between each block BK and the other blocks BK is calculated for the block BK (m) determined to be an approaching tendency in step F212. That is, as the block BK (m), for example, the difference in distance value between the block BK (p) in FIG. 18A and all the other blocks BK1 to BK (M) (excluding the block BK (p)) in the frame. Ask for.
  • step F241 a block BK having a distance difference within a predetermined value is extracted. It is assumed that the block BK with a hatched line in FIG. 18B has a distance difference within a predetermined value from the block BK (p).
  • step F242 the control unit 30 groups the blocks BK (m) determined as the approaching tendency among the blocks BK extracted as described above (block BK (p) in FIG. 18).
  • a continuous block refers to a block that is physically continuous on the image plane, such as a block adjacent to the block BK (p) and a block further adjacent to the adjacent block.
  • the block group MA shown in FIG. 18C is grouped.
  • the control unit 30 sets the grouped block group MA as a region constituting the main subject image, sets the image range as the main subject, and generates main subject information.
  • step F242 it is possible that there is no other block and only one block is grouped. In that case, only the range of the block BK (m) determined to be the approaching trend may be determined as the main subject.
  • an image area of a certain subject can be appropriately set as a main subject image based on the block. Since there should be almost no difference in distance values for the same subject, it is possible to appropriately determine the subject range by extracting blocks with a small distance difference and grouping consecutive blocks as described above. It is.
  • the area of the subject image set as the main subject may be the grouped block group area itself, or the area of the plurality of blocks may be set as the main subject image area by approximating a circle, an ellipse, or a square. May be. Further, image analysis may be performed within the grouped block group range, and the contour may be determined by face detection, body detection, or the like, and may be determined as the main subject.
  • the process for determining the main subject in step F214 may be other than the above process.
  • a candidate detection unit 27 is provided in the digital signal processing unit 20 or the control unit 30, and candidate image extraction is performed in parallel with the processing of FIG. Also good.
  • a candidate image frame including the block BK (m) determined to be approaching in step F212 may be searched, and the subject of the candidate image frame may be set as the main subject.
  • the approach determination and main subject determination processing are performed.
  • an approach tendency in a plurality of frames is determined for each block obtained by dividing an image.
  • the main subject is set based on the determination of the block having the proximity tendency.
  • the advantages described in the first embodiment can be obtained.
  • step F209 the value ⁇ to be assigned to the offset value OFS (m) is increased stepwise or conversely.
  • a certain determination period is set, and the block BK (m) having the largest count value bCNT (m) or one or a plurality of blocks BK having the count value bCNT (m) equal to or greater than a predetermined value within the period.
  • (m) is determined as the main subject as the target of Step F214 is also conceivable.
  • the subject distance of the block BK (m) is within a predetermined distance
  • the subject included in the block BK (m) is of a specific image type
  • the predetermined distance x, y coordinates from the center point of the frame image
  • the processing is performed on all the blocks BK1 to BK (M), but the processing of FIG. 14 is performed on a part of the blocks BK, for example, only the block BK near the center of the image data. Also good. For example, for the subject that the photographer wants to be the main subject, only the block BK near the center is considered as a target in consideration of adjusting the imaging direction so that the photographer captures as close to the center of the image as possible. By performing this process, the accuracy of the main subject setting can be improved. Furthermore, the processing load on the control unit 30 can be reduced.
  • step F202 the time association processing described in FIG. 15 and FIG. 16 is performed in step F202, but a processing example in which this is not performed is also conceivable.
  • the time association processing for each block is not performed, the block BK and the subject continuously match during the determination period only when a certain subject moves straight from the front toward the imaging device 10 and approaches. It becomes. For example, in the case of a subject approaching in an oblique direction, the subject is in a different block BK as the frame advances. Considering this in reverse, if the time association processing for each block is not performed, only a subject naturally approaching from the front can be selected as the main subject. That is, when the approaching tendency in the front direction is used as the determination condition for the main subject, a processing example in which step F202 in FIG.
  • the blocks BK1 to BK (M) have been described.
  • the number of divisions may be variously divided into four divisions, six divisions, eight divisions, nine divisions,.
  • the processing load for proximity determination increases, but main subject determination with high accuracy can be performed even when the zoom state or the subject is small. Conversely, the smaller the number of blocks, the lighter the processing load.
  • the blocks BK to be divided need not all have the same area or the same region shape. For example, it is conceivable that one block BK has a wide range at the end of the image and the center of the screen is divided into fine blocks BK. Considering the high probability of the vicinity of the center of the screen as the position where the main subject exists, it is appropriate to divide the area finely at the center of the screen.
  • the program according to the embodiment is a program that causes an arithmetic processing device such as a CPU (Central Processing Unit) or a DSP (Digital Signal Processor) to execute the processing described in the above-described embodiment.
  • this program detects a temporal change in the distance from the imaging position for a subject present in the image, and determines the contact / separation tendency of the subject with respect to the imaging position based on the detection.
  • This is a program for causing an arithmetic processing unit to execute a process of determining a main subject based on a tendency of a subject to touch and separate.
  • the program according to the embodiment may be a program that causes the arithmetic processing device to execute the processing illustrated in FIG. 2, FIG. 6, FIG. 8, FIG.
  • a program that causes the arithmetic processing device to execute the processing illustrated in FIG. 2, FIG. 6, FIG. 8, FIG.
  • an apparatus for executing the main subject determination described above can be realized using an arithmetic processing unit.
  • Such a program can be recorded in advance in an HDD as a recording medium built in a device such as a computer device, a ROM in a microcomputer having a CPU, or the like.
  • a flexible disk CD-ROM (Compact Disc Read Only Memory), MO (Magnet optical) disk, DVD (Digital Versatile Disc), Blu-ray Disc (Blu-ray Disc (registered trademark)), magnetic disk, semiconductor memory, It can be stored (recorded) temporarily or permanently in a removable recording medium such as a memory card.
  • a removable recording medium can be provided as so-called package software.
  • such a program can be downloaded from a removable recording medium to a personal computer or the like, or downloaded from a download site via a network such as a LAN (Local Area Network) or the Internet.
  • LAN Local Area Network
  • Such a program is suitable for providing a wide range of image processing apparatuses according to the embodiments.
  • a program for example, by downloading a program to a personal computer, a portable information processing device, a mobile phone, a game device, a video device, a PDA (Personal Digital Assistant) or the like, the portable information processing device or the like is changed to the image processing device of the present disclosure. can do.
  • the computer device as shown in FIG. 19 the same processing as the main subject determination processing in the image processing device 1 or the imaging device 10 in FIG. 1 may be executed.
  • the CPU 71 of the computer device 70 executes various processes according to a program stored in the ROM 72 or a program loaded from the storage unit 78 to the RAM 73.
  • the RAM 73 also appropriately stores data necessary for the CPU 71 to execute various processes.
  • the CPU 71, ROM 72, and RAM 73 are connected to each other via a bus 74.
  • An input / output interface 75 is also connected to the bus 74.
  • the input / output interface 75 includes an input unit 76 such as a keyboard and a mouse, a display such as a CRT (Cathode Ray Tube) or LCD or an organic EL panel, an output unit 77 such as a speaker, and a hard disk.
  • a communication unit 79 including a storage unit 78 and a modem is connected. The communication unit 79 performs communication processing via a network including the Internet.
  • a drive 80 is connected to the input / output interface 75 as necessary, and a removable medium 81 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is appropriately mounted, and a computer program read from them is Installed in the storage unit 78 as necessary.
  • a removable medium 81 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is appropriately mounted, and a computer program read from them is Installed in the storage unit 78 as necessary.
  • a program constituting the software is installed from a network or a recording medium.
  • this recording medium is distributed to distribute the program to the user separately from the apparatus main body, and includes a magnetic disk (including a flexible disk) on which the program is recorded, an optical disk (Blu-ray). Disk, CD-ROM, DVD), magneto-optical disk (MD (Mini A removable medium 81 including a semiconductor memory or the like.
  • a ROM 72 in which a program is recorded and a hard disk included in the storage unit 78 that is distributed to the user in a state of being pre-installed in the apparatus main body.
  • the CPU 71 when the moving image data is input by the reception operation by the communication unit 79 or the reproduction operation by the drive 80 (removable medium 81) or the recording unit 78, the CPU 71 is based on the program.
  • the CPU 71 By executing the functions of the subject distance change determination unit 3 and the main subject determination unit 2 described above, that is, the processing shown in FIG. 2, FIG. 6, FIG. 8, FIG. 10, or FIG.
  • the main subject can be determined.
  • the approach determination mode and the separation determination mode may be switched according to the target subject for the user. For example, when a person such as a child is photographed, the proximity determination mode is selected. Then, the process of the first embodiment is executed. On the other hand, when it is desired to take an image of a train, an aircraft, a wild bird, etc., the remote determination mode is set. Then, the process of the third embodiment is executed. Further, the approach determination mode and the distance determination mode may be automatically switched according to the camera mode (landscape mode, portrait mode, etc.). It is also conceivable to perform the proximity determination and the distance determination in parallel at the same time. In that case, it can be considered that the subject is determined as the main subject when a subject corresponding to either the approaching tendency or the away tendency is found.
  • the settings of the time threshold value Tht and the distance determination threshold value Thd described in each embodiment are preferably changed as appropriate according to the product as the imaging device 10 or the image processing device 1, the usage mode, and the like.
  • the user may arbitrarily set a desired value.
  • By setting the time threshold Tht and the distance determination threshold Thd it is possible to change the reference of an image (candidate image frame E (n) or block BK (m)) that can be a main subject. Also, by setting the time threshold Tht, it is possible to select whether priority is given to quick determination or priority is given to a determination with high accuracy.
  • the main subject information can also be used for image effect processing and image editing processing.
  • Such a main subject determination process for a reproduced image is naturally assumed in the image processing apparatus of FIG. 1, the information processing apparatus of FIG.
  • the result of the main subject determination process may be added as metadata to still image data or moving image data that has been captured and recorded thereafter. That is, information indicating the main subject is added to a still image file or the like.
  • the main subject designation operation by the operation of the photographer may be enabled while the through image is displayed and the main subject determination process is simultaneously performed.
  • the process of determining the main subject mainly assuming still image capturing has been described.
  • the image is captured even during standby for moving image capturing or during execution of moving image capturing and recording.
  • the processing of the above-described embodiment can be applied as processing for performing main subject determination from a plurality of frames.
  • this technique can also take the following structures.
  • a subject distance change determination unit that detects a temporal change in the distance from the imaging position of a subject existing in the image and determines a tendency to approach and separate the subject from the imaging position based on the detection;
  • a main subject determination unit that determines a main subject based on the contact / separation tendency of each subject determined by the subject distance change determination unit;
  • An image processing apparatus (2)
  • the subject distance change determination unit determines an approach tendency of each subject to the imaging position based on information on temporal change in the distance of each subject.
  • the image processing apparatus according to (1), wherein the main subject determination unit determines a main subject based on the determination result of the approach tendency.
  • the image processing apparatus according to (1) or (2), wherein the subject distance change determination unit detects a temporal change in the size of the subject image in the image as the temporal change in the distance.
  • the subject distance change determination unit detects a temporal change in the size of the subject image in the image as a temporal change in the distance for the subject image as one or a plurality of candidate images extracted in the image.
  • the image processing device according to any one of (1) to (3).
  • the subject distance change determination unit determines a subject that is approaching average, cumulative, or continuously as a detection result of the temporal change in the distance as a subject having an approach tendency, The image processing apparatus according to any one of (1) to (4), wherein the main subject determination unit determines all or a part of the subjects determined to be close to the main subject as main subjects.
  • An attribute identifying unit that identifies the attribute of the subject and outputs attribute information, The image processing apparatus according to any one of (1) to (5), wherein the subject distance change determination unit changes a determination condition of an approach tendency for a subject according to the attribute information.
  • the image processing apparatus according to (1) or (2), wherein the subject distance change determination unit detects a temporal change in the subject distance for each divided region in the image.
  • the subject distance change determination unit determines a divided region where the subject in the divided region of the current processing target image is located in the image before the unit time, and determines the subject distance in the determined divided region and the current distance
  • the image processing apparatus according to (7), wherein a temporal change in the distance of the subject is detected as a difference in subject distance between the divided regions of the processing target image.
  • the subject distance change determination unit determines, as a detection result of the temporal change in the distance, a subject in a divided region that is approaching average, cumulative, or continuously as a subject that tends to approach.
  • the image processing apparatus determines a main subject based on information on a divided region in which it is determined that the subject tends to approach.
  • the main subject determination unit groups a subject included in one divided region where the subject is determined to have an approaching tendency and another divided region including the same subject, and the grouped one or more grouped regions
  • the image processing apparatus according to (9), wherein an image range as a main subject is set based on the range of the divided area.
  • the main subject determination unit groups the one divided region and the other divided region in which a distance difference between the subject distances is within a predetermined value and is a continuous region from the one divided region.
  • the image processing apparatus according to (10) above.
  • the subject distance change determination unit determines a tendency to move away from the imaging position of each subject based on information on temporal change in the distance of each subject.
  • the image processing apparatus according to (1), wherein the main subject determination unit determines a main subject based on the determination result of the separation tendency.
  • SYMBOLS 1 ... Image processing apparatus, 2 ... Main subject determination part, 3 ... Local motion detection part, 4 ... Global motion detection part, 10 ... Imaging device, 11 ... Optical system, 12 ... Imager, 13 ... Optical system drive part, 14 ... Sensor unit 15 ... Recording unit 16 ... Communication unit 17 ... Distance sensor 20 ... Digital signal processing unit 21 ... Pre-processing unit 22 ... Synchronizing unit 23 ... YC generating unit 24 ... Resolution converting unit 25 ... codec section, 27 ... candidate detection section, 28 ... attribute identification section, 29 ... distance calculation section, 30 ... control section, 30a ... main subject determination section, 30b ... distance change calculation section, 32 ... UI controller, 33 ... user interface , 34 ... display unit, 35 ... operation unit, 70 ... computer device, 71 ... CPU

Abstract

【課題】撮像画像の中で主要被写体を自動的に判定する。 【解決手段】画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、この検出に基づいて被写体の撮像位置に対する接離傾向を判定する。そして判定された各被写体の接離傾向(接近傾向又は離遠傾向)に基づいて主要被写体を判定する。

Description

画像処理装置、画像処理方法、プログラム
 本開示は、画像内の主要被写体を判定する処理を行う画像処理装置、画像処理方法、及びプログラムに関する。
 近年のデジタルスチルカメラ、デジタルビデオカメラには顔検出機能が標準的に備わっており、顔位置・領域に合わせてカメラの各種パラメータ(フォーカス・明るさ等)を最適に合わせるといった機能が搭載されている。
 一方、撮像画像内で、被写体追尾のターゲットとする「主要被写体」を、ユーザが指定することによって選択する手法が、特許文献1に記載されている。
 また例えば上記特許文献2,3,4に開示された技術を用いれば、任意の被写体の全身枠を取り囲んだ被写体追尾が実現できる。
 また、オートフォーカス・自動露光などは、撮像画像内の所望の領域を検出・追跡し、その領域がもっとも好適になるように光学系等を制御するような機能も存在する。
 これらのように、撮像画像内で、ユーザが主要被写体として指定した画像、例えば顔等の画像領域を追尾したり、顔領域にフォーカスを合わせたりする等の技術が知られている。
特開2011-166305号公報 特開2011-146826号公報 特開2011-146827号公報 特開2011-160379号公報
 ところで、撮像画像内での、追尾やフォーカス合わせの目的となる所望の領域、つまり「主要被写体」は、現状は各種検出器から得られる「複数の候補領域」の中から撮像者自身が何らかの方法で一つの候補を選択することで決定される。
 例えばカメラを所持した状態で、画面表示されたスルー画(シャッタ操作時点以外に表示される被写体のモニタリング画像)に写されている複数の顔の中からタッチパネルによって任意の顔を選択するというような行為で主要被写体が選定される。あるいはユーザ指定のタイミング(シャッタ半押し等)で所定の領域内に存在する被写体を主要被写体とするなどである。
 しかしながら実際のユースケースにおいてはこのユーザインターフェースを考えてみると、「撮像者による主要被写体の選択」という行為自体が難しいことが多々ある。
 たとえば動き回る被写体に焦点を合わせ続けたいためにこの機能を使いたいのに、ユーザがカメラを構えて被写体を狙いながら指で選択すること自体が難しい。
 例を挙げれば、被写体の変化(移動)に対するユーザの反応速度により、指定が困難なこともある。例えば動き回る被写体を、スルー画の画面上でうまく指定できないような場合である。
 また、そもそもカメラを手に持って、被写体に向けて被写体を選定しているような状況で、ユーザが画面上で主要被写体を指で選択する行為自体が難しい。特に被写体を追っているような状況、例えばカメラがパンニングやチルティングとしての動きをするようにユーザが撮像方向を変化させている状況では、主要被写体を選択することはほぼ無理に近い。
 またタッチパネルを配した表示画面の解像度によって、ユーザにとって被写体が選択しにくいことがある。
 また、タッチパネルを配した表示画面上の被写体サイズとユーザの指の大きさ(太さ)によっては、所望の被写体を適切に指定できないこともある。
 また、カメラシステム上のタイムラグ、例えば実際の光景と撮像画像のスルー画のタイムラグによって、ユーザが適切に被写体を指定しにくいこともある。
 さらには動画撮像・記録中にこの操作を行う場合には、主要被写体の選択行為による画揺れがそのまま記録されたり、フレームアウトあるいは一時遮蔽等による追跡消失(失敗)時に再選択するという行為をユーザに強いたりといった状況がある。
 これらのように、ハンドヘルドタイプのカメラにおいて、主要被写体を選択する行為自体が、それを必要とする多くのユースケースで難しく、撮像者にストレスを与えてしまう。
 そこで本開示では、撮像者等のユーザが意図的に被写体を選択する行為を行わなくとも、ユーザの求める対象被写体を主要被写体と判定する技術を実現することを目的とする。
 本開示の画像処理装置は、画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定する被写体距離変化判定部と、上記被写体距離変化判定部で判定された各被写体の接離傾向に基づいて主要被写体を判定する主要被写体判定部とを備える。
 本開示の画像処理方法は、画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定し、判定された各被写体の接離傾向に基づいて主要被写体を判定する。
 本開示のプログラムは、上記画像処理装置又は画像処理方法を実現する処理を演算処理装置に実行させるプログラムである。
 これらの本開示の技術によれば、画像データについて自動的に主要被写体を判定する主要被写体判定処理を行う。
 例えばユーザが、撮像装置を構えて撮像を行う場合において、近づいてくる被写体、或いは遠ざかっていく被写体を狙うというケースがある。例えば子供、友人、ペットなどがカメラを構えた撮像者に近寄ってくるような場合、或いは列車、航空機、野鳥等がカメラから遠ざかっていくような場合である。このようにユースケース(撮像対象)に応じて、近寄ってくる被写体を撮像対象とする場合や、遠ざかる被写体を撮像対象とすることがある。そこで被写体の撮像位置に対する接離傾向を判定し、判定された各被写体の接離傾向に基づいて主要被写体を判定することで、ユーザが主要或いは主役と考えている被写体を推定することができ、これにより自動的な主要被写体判定が可能となる。
 本開示によれば、撮像画像内で自動的に主要被写体が判定されるため、撮像者等のユーザが、主要被写体を選択する行為を行う必要は無い。従ってユーザの操作性、利便性を向上できる。例えば本開示の画像処理装置を搭載した撮像装置を手に持って撮像を行う場合の操作性の向上、ユーザストレスの低減、さらには自動的な主要被写体判定に応じた各種機能の実現という製品付加価値向上を実現できる。
本開示の実施の形態の画像処理装置の構成例のブロック図である。 実施の形態の画像処理装置の主要被写体判定処理のフローチャートである。 第1の実施の形態の撮像装置のブロック図である。 第1の実施の形態の主要被写体判定の概要の説明図である。 第1の実施の形態の接近判定の説明図である。 第1の実施の形態の接近判定及び主要被写体判定処理のフローチャートである。 第2の実施の形態の撮像装置のブロック図である。 第2の実施の形態の接近判定及び主要被写体判定処理のフローチャートである。 第3の実施の形態の離遠判定の説明図である。 第3の実施の形態の離遠判定及び主要被写体判定処理のフローチャートである。 第4の実施の形態の撮像装置のブロック図である。 第4の実施の形態の領域分割ブロックの説明図である。 第4の実施の形態の接近判定の説明図である。 第4の実施の形態の接近判定及び主要被写体判定処理のフローチャートである。 第4の実施の形態のブロック毎の時間対応付け処理のフローチャートである。 第4の実施の形態のブロック毎の時間対応付け処理の説明図である。 第4の実施の形態の主要被写体設定処理のフローチャートである。 第4の実施の形態の主要被写体設定処理の説明図である。 実施の形態のコンピュータ装置での適用の場合のブロック図である。
 以下、実施の形態を次の順序で説明する。
<1.実施の形態の画像処理装置の構成>
<2.撮像装置の構成>
<3.主要被写体判定機会/目的等>
<4.撮像装置としての第1の実施の形態>
<5.撮像装置としての第2の実施の形態>
<6.撮像装置としての第3の実施の形態>
<7.撮像装置としての第4の実施の形態>
<8.プログラム及びコンピュータ装置への適用>
<9.変形例>
<1.実施の形態の画像処理装置の構成>
 図1に、実施の形態の画像処理装置の構成例を示す。
 画像処理装置1は、主要被写体判定部2と、被写体距離変化判定部3を有する。
 被写体距離変化判定部3は、画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定する。接離傾向とは、被写体が撮像位置に近づいてくる接近傾向、或いは被写体が撮像位置から遠ざかっていく離遠傾向のいずれかである。例えば被写体距離変化判定部3は、画像データDgとしての順次入力されるフレーム画像から、画像中の被写体の距離変化を検出し、被写体の接離傾向を判定して逐次主要被写体判定部2に供給する。具体的には被写体画像のサイズから距離変化を求め、接離傾向を判定する。或いは被写体距離変化判定部3は、画像データに含まれる被写体についての距離情報Idを入力し、その距離情報Idの変化から被写体の距離変化を求め、接離傾向を判定する。
 主要被写体判定部2は、被写体距離変化判定部3で判定された各被写体の接離傾向に基づいて主要被写体を判定する。例えば主要被写体判定部2は、接近傾向の判定結果に基づいて主要被写体を判定する。或いは離遠傾向の判定結果に基づいて主要被写体を判定する。例えば接近傾向又は離遠傾向にある被写体の全部又は一部を主要被写体と判定する。
 そして主要被写体判定部2は判定結果として、主要被写体情報Dmを出力する。
 なお、以上の主要被写体判定部2、被写体距離変化判定部3を有する画像処理装置1は、演算処理装置としてのCPU(Central Processing Unit)やDSP(Digital SignalProcessor)で実現できる。
 またCPU等で主要被写体判定部2としての機能を実現し、CPUと接続された画像処理用DSP等、もしくはその連携処理として被写体距離変化判定部3の機能を実現することも考えられる。
 この画像処理装置1による主要被写体判定のための処理の流れは図2Aのようになる。
 ステップF1として被写体距離変化判定部3が、画像データに含まれる被写体の距離変化を検出し、接離傾向が見られる被写体を判定する。
 ステップF2として主要被写体判定部2が、接離傾向が観測された被写体を主要被写体と判定する。
 ステップF3で主要被写体判定部2が、主要被写体判定結果である主要被写体情報Dmを出力しアプリケーションプログラム等に受け渡す。
 アプリケーションプログラム等では、主要被写体画像が特定されたことに応じた処理を行う。例えば、フォーカス制御、追尾処理、画像効果処理などである。
 この図2AのステップF1,F2の処理の具体例として、2つの方式を図2B、図2Cに示す。
 図2Bの処理例は、画像データ内の被写体について、各フレームでの画像サイズを検出し、そのサイズ変化量を求めることで、各被写体の接離傾向を判定する処理である。つまり被写体の距離の時間的変化を、画像上でのサイズ変化で検出する。説明上、このような考え方の処理を「サイズ判定方式」と呼ぶこととする。後述の第1~第3の実施の形態は、このサイズ判定方式の考え方を用いる例とする。
 また図2Cの処理例は、画像データを複数の領域に分割し、画像内の分割領域(ブロック)毎の被写体の距離の時間的変化を検出する処理である。説明上、このような考え方の処理を「ブロック判定方式」と呼ぶこととする。後述の第4の実施の形態は、このブロック判定方式の考え方を用いる例とする。
 図2Bのサイズ判定方式について説明する。この場合、図2AのステップF1としてステップF10、F11、F12、F13の処理が行われ、図2AのステップF2としてステップF14が行われる。
 ステップF10で被写体距離変化判定部3は、画像データ内で、主要被写体となり得る候補画像を検出する。候補画像とは、例えば人の顔画像、身体画像、犬画像、猫画像などである。被写体距離変化判定部3は、画像データの画像解析処理により、画像内に存在する被写体として顔画像などの1又は複数の候補画像を設定する。
 ステップF11で被写体距離変化判定部3は、各候補画像のサイズ(面積)を算出する。例えば候補画像の領域の幅×高さやピクセル数などとしてサイズを算出する。
 ステップF12で被写体距離変化判定部3は、各候補画像についてのサイズ変化を算出する。例えば連続するフレーム画像データにおいて、現在処理対象のフレームの候補画像のサイズと、単位時間前(例えば1フレーム前)のフレーム画像データにおける、当該候補画像のサイズの差分を算出する。候補画像の画像上でのサイズは、撮像位置(カメラマ
ンが撮像を行っている撮像装置の位置)と、その候補画像とされた被写体の間の距離に対応する。従って、候補画像としての被写体が接近しているときは、サイズはフレームの進行に従って大きくなり、また候補画像としての被写体が離遠しているときは、サイズはフレームの進行に従って小さくなる。つまりサイズ変化は、距離変化として捉えることができる。
 ステップF13で被写体距離変化判定部3は、各候補画像の接離傾向を判定する。例えばある程度の時間のスパンで上記のサイズ変化を観測すると、候補画像としての被写体が接近しているときは、被写体サイズが徐々に大きくなる。つまりある程度平均的、累積的又は継続的に、サイズ拡大方向へのサイズ変化量が観測される。そのような場合、候補画像は撮像位置に接近傾向にあると判定できる。
 逆に、候補画像としての被写体が離れていっているときは、被写体サイズが徐々に小さくなる。つまりある程度平均的、累積的又は継続的に、サイズ縮小方向へのサイズ変化量が観測される。そのような場合、候補画像は撮像位置から離遠傾向にあると判定できる。
 ステップF14では、主要被写体判定部2が、接近傾向又は離遠傾向にある候補画像を、選択し、その候補画像の被写体を主要被写体と設定する。
 以上の処理により、撮像位置に対して近寄ってくる被写体を主要被写体と判定したり、或いは逆に撮像位置から遠ざかる被写体を主要被写体と判定することを自動的に行うことができる。
 次に図2Cのブロック判定方式について説明する。この場合、図2AのステップF1としてステップF20、F21、F22の処理が行われ、図2AのステップF2としてステップF23、F24の処理が行われる。
 ステップF20で被写体距離変化判定部3は、画像データを複数の領域に分割した各分割領域(ブロック)のそれぞれについて、被写体距離を検出する。詳しくは後述するが分割領域(ブロック)とは、図12Bの破線で示すように1つの画像を複数の領域に分けた領域の1つ1つをいう。ステップF20では、各分割領域について、その領域内にうつされた被写体の距離情報を検出する。
 ステップF21で被写体距離変化判定部3は、各分割領域についての距離変化を算出する。例えば連続するフレーム画像データにおいて、現在処理対象のフレームの各分割領域と、単位時間前(例えば1フレーム前)のフレーム画像データにおける、各分割領域について、被写体距離の差分を算出する。これにより各分割領域における被写体の距離変化が算出される。
 ステップF22で被写体距離変化判定部3は、各分割領域の接離傾向を判定する。例えばある程度の時間のスパンで上記の距離変化を観測すると、分割領域の被写体が接近しているときは、距離の値が徐々に小さくなり、ある程度平均的、累積的又は継続的に、距離が短くなる方向への距離変化量が観測される。そのような場合、その分割領域の被写体は撮像位置に接近傾向にあると判定できる。
 逆に、分割領域の被写体が離れていっているときは、距離の値が徐々に大きくなり、ある程度平均的、累積的又は継続的に、距離が長くなる方向への距離変化量が観測される。そのような場合、その分割領域の被写体は撮像位置から離遠傾向にあると判定できる。
 ステップF23では、主要被写体判定部2は、接近傾向又は離遠傾向にある分割領域を含む被写体画像領域を判定する。分割領域は画像領域を分割したものであって、被写体画像の領域と1:1に対応するものではない。例えば1つの被写体画像が複数の分割領域にまたがって存在することも多い。そこで主要被写体判定部2は、例えば接近傾向又は離遠傾向にあるとされた分割領域と略同様の被写体距離の値をもち、当該分割領域に連続する
領域(隣接領域や、隣接領域にさらに隣接する領域)などの条件で、1つの被写体画像の領域範囲を判定する。
 そしてステップF24で、判定した領域範囲の被写体画像を主要被写体と判定する。
 以上の処理により、撮像位置に対して近寄ってくる被写体を主要被写体と判定したり、或いは逆に撮像位置から遠ざかる被写体を主要被写体と判定することを自動的に行うことができる。
 図1の画像処理装置1では、以上の各例のように主要被写体判定が行われることで、被写体の動き(近接/離遠)により、ユーザがターゲットと意図している被写体を推定できる。よってユーザの手動操作に頼らずに、自動的に主要被写体判定を行うことができる。従って主要被写体設定に応じた動作を行う各種電子機器に図1の画像処理装置1が搭載されることで、ユーザの操作性は格段に向上する。
<2.撮像装置の構成>
 以下では、上記のような画像処理装置を内蔵した撮像装置10を例に挙げ、主要被写体判定動作について詳しく説明する。
 実施の形態の撮像装置10の構成例を図3に示す。なお、この構成例は撮像装置10としての第1の実施の形態に適したものである。第2~第4の実施の形態としての撮像装置10の構成例についてはその都度説明する。
 この撮像装置10はいわゆるデジタルスチルカメラ或いはデジタルビデオカメラとされ、静止画や動画の撮像/記録を行う機器であり、請求項でいう画像処理装置を内蔵するものである。
 図3に示すように撮像装置10は、光学系11、イメージャ12、光学系駆動部13、センサ部14、記録部15、通信部16、デジタル信号処理部20、制御部30、ユーザインターフェースコントローラ(以下、「UIコントローラ」)32、ユーザインターフェース33を有する。
 光学系11は、カバーレンズ、ズームレンズ、フォーカスレンズ等のレンズや絞り機構を備える。この光学系11により、被写体からの光がイメージャ12に集光される。
 イメージャ12は、例えば、CCD(Charge Coupled Device)型、CMOS(Complementary Metal OxideSemiconductor)型などの撮像素子を有する。
 このイメージャ12では、撮像素子での光電変換で得た電気信号について、例えばCDS(Correlated Double Sampling)処理、AGC(Automatic Gain Control)処理などを実行し、さらにA/D(Analog/Digital)変換処理を行う。そしてデジタルデータとしての撮像信号を、後段のデジタル信号処理部20に出力する。
 光学系駆動部13は、制御部30の制御に基づいて、光学系11におけるフォーカスレンズを駆動し、フォーカス動作を実行する。また光学系駆動部13は、制御部30の制御に基づいて、光学系11における絞り機構を駆動し、露光調整を実行する。さらに光学系駆動部13は、制御部30の制御に基づいて、光学系11におけるズームレンズを駆動し、ズーム動作を実行する。
 デジタル信号処理部20は、例えばDSP等により画像処理プロセッサとして構成される。このデジタル信号処理部20は、イメージャ12からのデジタル信号(撮像画像信号)に対して、各種の信号処理を施す。
 例えばデジタル信号処理部20は、前処理部21、同時化部22、YC生成部23、解像度変換部24、コーデック部25、候補検出部27を備えている。
 前処理部21は、イメージャ12からの撮像画像信号に対して、R,G,Bの黒レベルを所定のレベルにクランプするクランプ処理や、R,G,Bの色チャンネル間の補正処理等を施す。
 同時化部22は、各画素についての画像データが、R,G,B全ての色成分を有するようにするデモザイク処理を施す。
 YC生成部23は、R,G,Bの画像データから、輝度(Y)信号および色(C)信号を生成(分離)する。
 解像度変換部24は、各種の信号処理が施された画像データに対して、解像度変換処理を実行する。
 コーデック部25は、解像度変換された画像データについて、例えば記録用や通信用の符号化処理を行う。
 候補検出部27は、例えばYC生成部23で得られる撮像画像信号(輝度信号/色信号)を対象として、各フレーム単位(又は間欠的なフレーム毎)での画像解析処理を行い、候補画像を抽出する。即ち、時間軸上で連続的に入力される画像データについて顔画像検出、人体画像検出などを行って、主要被写体の候補となる画像を抽出する。
 なお、顔検出、人体検出等は、撮像画像データに対しての画像解析におけるパターンマッチングの手法などで可能であるが、パターンマッチングに用いる辞書さえ差し替えれば他の検出器も原理的には実現可能である。例えば(特定種の)犬検出・猫検出などとして主要被写体の候補画像を抽出してもよい。
 また例えばフレーム差分による動体検出の手法で、動体を検出し、当該動体を候補画像とすることも考えられるし、セイレンシ(Saliency)と呼ばれる注視領域抽出の手法を用いてもよい。候補画像の抽出、選定の手法は多様に考えられる。
 候補検出部27は例えば一例としては、顔画像の検出を行い、その顔画像が存在する領域を候補画像枠として抽出する。
 抽出した候補画像については、その候補画像枠の位置情報(画面上でのx,y座標値、被写体距離の情報等)や、サイズ情報(例えば候補画像枠の幅、高さ、ピクセル数等)を、候補画像情報として制御部30に受け渡す。なお、ここでは、候補画像となる画像領域の枠を示す情報であることから、候補画像情報のことを「候補画像枠情報」ともいうこととする。
 また、候補検出部27は、画像に平滑化処理、アウトライヤ(outlier)除去等の処理を行って、候補画像枠情報を生成してもよい。
 なお候補検出部27は、この図3の例ではデジタル信号処理部20で実行される機能構成として示しているが、これは一例であり、制御部30によって候補検出部27の処理が実行されてもよい。
 制御部30は、CPU、ROM(Read Only Memory)、RAM(Random Access Memory)、フラッシュメモリなどを備えたマイクロコンピュータ(演算処理装置)により構成される。
 CPUがROMやフラッシュメモリ等に記憶されたプログラムを実行することで、この撮像装置10全体を統括的に制御する。
 RAMは、CPUの各種データ処理の際の作業領域として、データやプログラム等の一時的な格納に用いられる。
 ROMやフラッシュメモリ(不揮発性メモリ)は、CPUが各部を制御するためのOS(Operating System)や、画像ファイル等のコンテンツファイルの他、各種動作のためのアプリケーションプログラムや、ファームウエア等の記憶に用いられる。例えば本例において後述する主要被写体判定のための処理を実行するためのプログラムや、さらに主要被写体判定結果を利用するアプリケーションプログラム等が記憶される。
 このような制御部30は、デジタル信号処理部20における各種信号処理の指示、ユーザの操作に応じた撮像動作や記録動作、記録した画像ファイルの再生動作、ズーム、フォーカス、露光調整等のカメラ動作、ユーザインターフェース動作等について、必要各部の動作を制御する。
 また本実施の形態の場合、制御部30は、主要被写体判定部30a、距離変化演算部30bとしての機能を備え、後述する第1~第4の実施の形態で説明するような接近判定(又は離遠判定)及び主要被写体判定処理を実行する。
 この図3の構成の場合、距離変化演算部30bは、候補検出部27で設定された候補画像について、画像サイズを計算し、その画像サイズの単位時間毎の変化を計算し、その結果から接近傾向又は離遠傾向の判定を行う。
 主要被写体判定部30aは、距離変化演算部30bの判定結果に基づいて、候補画像の中で主要被写体を設定する処理を行う。
 ユーザインターフェース33は、ユーザに対する表示出力や音声出力を実行し、またユーザの操作入力を受け付ける。このため、表示デバイス、操作デバイス、スピーカデバイス、マイクロホンデバイスなどを有する。ここでは、表示部34,操作部35を示している。
 表示部34はユーザ(撮像者等)に対して各種表示を行う表示部であり、例えば撮像装置10の筐体上に形成されるLCD(Liquid Crystal Display)や有機EL(Electro-Luminescence)ディスプレイ等のディスプレイデバイスを有して形成される。なお、いわゆるビューファインダーの形態で、LCDや有機ELディスプレイ等を用いて形成されてもよい。
 この表示部34は、上記のディスプレイデバイスと、該ディスプレイデバイスに表示を実行させる表示ドライバとから成る。表示ドライバは、制御部30の指示に基づいて、ディスプレイデバイス上に各種表示を実行させる。例えば表示ドライバは、撮像して記録媒体に記録した静止画や動画を再生表示させたり、レリーズ(シャッタ操作)待機中に撮像される各フレームの撮像画像データによる動画としてのスルー画(被写体モニタリング画像)をディスプレイデバイスの画面上に表示させる。また各種操作メニュー、アイコン、メッセージ等、即ちGUI(Graphical User Interface)としての表示を画面上に実行させる。本実施の形態の場合、例えばスルー画や再生画上で、主要被写体判定による判定結果がユーザにわかるような表示も実行される。
 操作部35は、ユーザの操作を入力する入力機能を有し、入力された操作に応じた信号を制御部30へ送る。
 この操作部35としては、例えば撮像装置10の筐体上に設けられた各種操作子や、表示部34に形成されたタッチパネルなどとして実現される。
 筐体上の操作子としては、再生メニュー起動ボタン、決定ボタン、十字キー、キャンセルボタン、ズームキー、スライドキー、シャッターボタン(レリーズボタン)等が設けられる。
 またタッチパネルと表示部34に表示させるアイコンやメニュー等を用いたタッチパネル操作により、各種の操作が可能とされてもよい。
 ユーザインターフェース33の表示部34等の動作は、制御部30の指示に従ってUIコントローラ32により制御される。また操作部35による操作情報は、UIコントローラ32によって制御部30に伝達される。
 記録部15は、例えば不揮発性メモリからなり、静止画データや動画データ等の画像フ
ァイル(コンテンツファイル)や、画像ファイルの属性情報、サムネイル画像等を記憶する記憶領域として機能する。
 画像ファイルは、例えばJPEG(Joint Photographic Experts Group)、TIFF(Tagged Image File Format)、GIF(Graphics Interchange
Format)等の形式で記憶される。
 記録部15の実際の形態は多様に考えられる。例えば記録部15は、撮像装置10に内蔵されるフラッシュメモリでもよいし、撮像装置10に着脱できるメモリカード(例えば可搬型のフラッシュメモリ)と該メモリカードに対して記録再生アクセスを行うカード記録再生部による形態でもよい。また撮像装置10に内蔵されている形態としてHDD(Hard Disk Drive)などとして実現されることもある。
 また、本例において後述する接近判定(又は離遠判定)及び主要被写体判定処理を実行するためのプログラムは、記録部15に記憶されてもよい。
 通信部16は、外部機器との間のデータ通信やネットワーク通信を有線又は無線で行う。
 例えば外部の表示装置、記録装置、再生装置等の間で撮像画像データ(静止画ファイルや動画ファイル)の通信を行う。
 また、ネットワーク通信部として、例えばインターネット、ホームネットワーク、LAN(Local Area Network)等の各種のネットワークによる通信を行い、ネットワーク上のサーバ、端末等との間で各種データ送受信を行うようにしてもよい。
 センサ部14は各種センサを包括的に示している。例えば手ぶれ、或いは撮像装置10の姿勢や移動(パン移動、チルト移動等)等、撮像装置10の全体の動きを検出するためのジャイロセンサ(角速度センサ)、加速度センサ等が設けられる。
 また露光調整等のための外部照度を検出する照度センサ、さらには被写体距離を測定する測距センサが設けられてもよい。
 またセンサ部14として、光学系11におけるズームレンズの位置を検出するズームレンズ位置センサ、フォーカスレンズの位置を検出するフォーカスレンズ位置センサが設けられる場合もある。
 またセンサ部14として、メカアイリス(絞り機構)の開口量を検出するセンサが設けられる場合もある。
 センサ部14の各種センサは、それぞれ検出した情報を制御部30に伝達する。制御部30は、センサ部14で検出された情報を用いて各種制御を行うことができる。
 このような撮像装置10において、図1で説明したような画像処理装置1の構成部分は次のようになる。
 図1の画像処理装置1における主要被写体判定部2に相当する構成は、撮像装置10の制御部30において主要被写体判定部30aとしてソフトウエアにより実装される。また被写体距離変化判定部3に相当する構成は、撮像装置10の候補検出部27と制御部30における距離変化演算部30bとしてソフトウエアにより実装される。
 制御部30は、請求項でいうプログラムに基づく処理を実行することで、請求項でいう画像処理方法としての動作を実行制御することになる。
<3.主要被写体判定機会/目的等>
 本実施の形態では、後述の第1~第4の実施の形態として説明するように主要被写体判定が行われるが、撮像装置10において主要被写体判定を行う機会や目的等について説明しておく。
 まず主要被写体判定結果の利用例を述べる。
 主要被写体判定は、例えばユーザ(撮像者)がシャッタタイミング(レリーズタイミング)を狙っている際に実行されるが、制御部30は主要被写体を自動的に判定した後、次のような処理を行うことができる。
・追尾処理
 撮像される各フレームにおいて設定された主要被写体を追尾する。例えばスルー画表示上でユーザに主要被写体を明示して、ユーザの画角調整(例えばカメラを手に持っている状態における被写体決め)の用に供する。
 なお、主要被写体の提示としては、表示部34でのスルー画表示上で主要被写体の枠を強調表示することが考えられる。また、強調表示等は、判定直後の一定期間でもよいし、スルー画内に主要被写体が存在する限り実行させてもよい。
・フォーカス合わせ
 主要被写体にオートフォーカス制御する。また、追尾処理と合わせて、主要被写体が動き回っていても、フォーカスが、その主要被写体に追尾して調整されるようにする。
・露光調整
 主要被写体の明るさ(輝度)に基づいて自動露光調整を行う。
・指向性調整
 撮像(例えば動画撮像)とともにマイクロホンにより音声収音を行う場合、画角空間内での主要被写体の方向に応じて、指向性調整を行う。
・ズーム制御
 主要被写体に対応したオートズーム制御する。例えば主要被写体が常に所定以上のサイズで撮像画像で映り込むように自動的なズームレンズ駆動を行う。追尾処理と合わせて、主要被写体との距離が変化に応じたズームによる画角調整を行うようにしてもよい。
・録画スタート制御
 動画撮像の開始のトリガーとする。例えば主要被写体が決定されたことに応じて、動画撮像記録を開始する。
 また、撮像画像信号に対する各種信号処理にも用いることができる。
・画像効果処理
 撮像される各フレームにおいて主要被写体の領域にのみ、画質調整、ノイズリダクション、肌色調整などの画像処理を加える。
 或いは、主要被写体の領域以外に、画像効果、例えばモザイク処理、ぼかし処理、塗りつぶし処理等を加えることも考えられる。
・画像編集処理
 撮像画像、もしくは記録された画像について、フレーミング、クロッピング等の編集処理を加える。
 例えば主要被写体を含むフレーム内の一部領域の切り出しや、拡大等の処理を行うことができる。
 また、撮像画像データのうちで、主要被写体が画像の中心に配置されるように画像周辺部のカット等を行い、構図調整を行うことができる。
 これらは一例に過ぎないが、これら以外にも、アプリケーションプログラムや撮像装置内の自動調整機能が、設定した主要被写体を利用する処理は各種考えられる。
 次に主要被写体判定処理をどのような時点で実行するかも各種考えられる。
 例えば撮像装置10が電源オンとされて、撮像を行っているとき(表示部34にスルー画を表示している期間)は、常時主要被写体判定処理を行っていてもよい。

 また、主要被写体を判定したら、追尾処理を行う場合、追尾が外れた時点で、再度主要被写体判定処理を行うようにしてもよい。
 また、ユーザ操作により主要被写体判定処理が開始されるようにしてもよい。
 またユーザが、判定実行モードを選択しているときに常時実行されたり、追尾が外れたときに実行されるなどとしてもよい。
 またユーザ操作にかかわらず、自動的に主要被写体判定処理が起動されることも考えられる。
 主要被写体判定処理を行うことによる効果としては次のとおりである。
 先に述べたように、撮像者が撮像装置10を構えて被写体を狙っているときには、そもそも主要被写体を指定するような操作は難しい。
 特にパンニングやチルティングのように撮像方向を継続的に一定方向に変化させている場合、或いは一定方向ではなくとも、撮像方向を変化させている場合は、主要被写体を指定する操作はユーザにとって困難である。
 また何度も主要被写体を指定する行為は面倒である。
 主要被写体判定を自動的に実行することによれば、このようなことが解消され、ユーザストレスの低減効果が得られる。
 またユーザが通常使用するデジタルスチルカメラ、携帯電話機内蔵カメラなど、ユーザが携帯して使用する撮像装置10としては、表示部34も小型であり、ユーザが主要被写体を画面上で指定する操作を行ったとしても、正確に行いにくい。本実施の形態のように自動判定することで、誤指定ということもなくなる。
 また撮像装置10が自動的に主要被写体判定を行うことによれば、ユーザにとっては、被写体を狙って撮像装置10を構えていたり、被写体を追って撮像方向を変化させていたりする状況で、主要被写体判定が実行されることとなり、ユーザが装置に感じるインテリジェント感の向上や、付加価値の向上という効果が得られる。
 また撮像装置10を自然に構えていれば主役を撮れる、という感覚で使用できるため、撮像機会の増加、対応ユースケースの増加ということができ、使いやすいカメラをユーザに提供できることにもなる。
 以上のことから、ハンドヘルドタイプのカメラとして、主要被写体判定を自動的に行う本実施の形態の撮像装置10は特に好適となる。
<4.撮像装置としての第1の実施の形態>
 第1の実施の形態として上記図3の構成の撮像装置における主要被写体判定の動作を説明する。これは図2Bで述べたサイズ判定方式の考え方で主要被写体判定を行う例である。また第1の実施の形態は、近寄ってくる被写体を主要被写体と判定する例とする。
 図4Aは候補検出部27で行われる候補画像枠の抽出動作を模式的に示したものである。
 図には、撮像装置10の光学系11,イメージャ12の動作によりデジタル信号処理部20に入力される撮像画像信号の各フレームFR1,FR2,FR3・・・を示している。候補検出部27は、このような順次入力される連続した各フレームのそれぞれ(或いは間欠的な各フレームについて)に候補画像の検出を行う。
 例えば図示のように、フレームFR1について、3人の人が存在していた場合、それぞれの顔画像部分を候補画像として抽出し、その候補画像枠E1,E2,E3についての候補画像枠情報を出力する。例えば候補画像枠E1の候補画像枠情報は、例えばこの候補画像枠E1の画像内での位置情報(x,y位置情報)、候補画像枠の幅w、高さh等である
。x,y位置情報は、例えば画像の左上角を原点(0,0)とした座標値である。幅w、高さhは例えばピクセル数でよい。候補検出部27は、このような候補画像枠情報を、候補画像枠E2,E3についても生成し、制御部30に受け渡す。
 後続のフレームFR2、FR3・・・についても同様に、候補検出部27は候補画像の抽出を行い、それぞれの候補画像枠について、候補画像枠情報を生成して制御部30に受け渡していく。
 制御部30は、各フレームの候補画像枠情報を取り込む度に、各候補画像枠についてサイズとして枠面積(h×w)を算出し、さらにその枠面積の変化量として、前フレームの当該候補画像のサイズとの差分を検出する。そしてその差分の変化を時間軸上で観測していくことで、各候補画像が接近傾向にあるか否かを判定する。
 例えば図4Bには、候補画像枠E1とされた被写体人物が、撮像装置1の方向に近寄ってきている際の、撮像画像の例を示している。あるフレームFRxでは、候補画像枠E1の枠面積は比較的小さいが、ある時間を経過した時点のフレームFRyでは、この候補画像枠E1の枠面積が大きくなる。このような候補画像枠のサイズ変化を観測して、被写体が近寄っているか否かを判定するものである。
 図5Aは、仮に候補画像枠E1,E2,E3が、ある期間継続してフレーム(FR1,FR2・・・)内に存在し続けたとして、算出される枠面積の変化の様子を示したものである。
 例えば撮像者が撮像装置10で、ある期間、3人の被写体をとらえていた場合を想定している。3人の各人が、それぞれ動いていたり、或いは撮像者が撮像装置10を持ちながら動いていたりすることで、時間軸上では、算出される各候補画像枠E1,E2,E3の枠面積距離は時間軸上で変化している。この例では、候補画像枠E1は、徐々に枠面積が大きくなっているが、候補画像枠E2,E3は、多少の変化はあっても平均的には大きな枠面積の変化はない。
 図5Bは、候補画像枠E1,E2,E3の枠面積の変化量の遷移を示している。例えば現在のフレームの枠面積から前フレームの枠面積を減算した差分として、各時点の値を示したものである。従って前の時点より撮像装置10に対する相対距離が近づくと、面積変化量の値は大きくなり、相対距離が変わらなければ面積変化量は0、遠ざかると面積変化量はマイナスの値になる。
 そこで、まず面積変化量によって、近づいているか否かを判定する距離判定閾値Thdを用いて、各面積変化量についての判定結果を得る。面積変化量が距離判定閾値Thdを越えている場合は、その時点は、所定距離以上の接近有りと判定される。
 図5Cに候補画像枠E1,E2,E3についての判定結果を示している。これは面積変化量が距離判定閾値Thdを越える値となっていると「H」レベルとなるフラグとする。
 図からわかるように、候補画像枠E1は面積変化量が常に高い値であり、E1判定結果は「1」を継続している。
 候補画像枠E2は面積変化量が高い値をとることもあったため、E2判定結果はある期間のみ「1」となっている。
 候補画像枠E3は面積変化量が常時低い値をとっていることで、E3判定結果は継続して「0」となっている。
 本例では、ある程度の時間、平均的、累積的、又は継続的に近寄っている被写体を接近傾向の被写体と判定する。図5Cの判定結果が「1」となる期間が長い被写体を接近傾向の被写体と判定することになる。例えば判定結果が「1」となる継続期間や累積期間などの期間長をカウントすれば、接近傾向の判定ができる。
 例えば候補画像枠E1については、判定結果が「1」であり期間が長いため、この判定
期間において接近傾向にあると判定できることになる。
 なお、候補画像枠E2は、例えば一時的に接近したり離れたりした被写体であるといえる。また候補画像枠E3は、比較的遠い位置を維持している被写体である。
 判定開始から判定終了までの期間は具体的な処理例によって異なる。後述の図6の処理例では、判定結果が「1」となる期間長をカウントし、その期間長が所定時間に達したら、その候補画像枠を接近傾向と判定する。その場合、例えば候補画像枠E1のように常時判定結果が「1」となる被写体が存在すれば、判定終了のタイミングは早くなる。つまり判定処理の状況によって判定期間長が変動する。他の例として判定開始から判定終了までの期間を固定期間長とする例もある。
 図6で制御部30の接近判定及び主要被写体判定処理の具体例を説明する。以下説明する処理は、制御部30において距離変化演算部30bと主要被写体判定部30aが機能して実行される処理である。
 制御部30は、接近判定及び主要被写体判定処理を開始する場合、まず初期設定としてステップF100で変数TSF=0とし、またカウント値Cnt(n)=0とする。
 変数TSFとは、主要被写体設定済みか否かを示すフラグである。TSF=「0」は、主要被写体が未判定の状態を示すこととなる。
 またカウント値Cnt(n)は、上述の面積変化量と距離判定閾値Thdを比較した判定結果について、時間長を判定するためのカウンタの値である。
 なお「n」は、自然数1,2,3・・・を表し、カウント値Cnt(n)は、候補画像枠E1,E2,E3のように、検出された候補画像枠E(n)にそれぞれ対応するカウント値としている。例えば3つの候補画像枠E1,E2,E3が検出される場合、カウント値として、Cnt1、Cnt2、Cnt3が用いられる。フローチャートの説明上、カウント値Cnt(n)についての処理とは、例えばCnt1、Cnt2、Cnt3のそれぞれを対象とする処理を示しているものと理解されたい。
 また図6の処理で説明する枠面積Area(n)も同様に各候補画像枠の枠面積を示すものとし、枠面積Area(n)についての処理とは、例えば候補画像枠E1,E2,E3・・・の枠面積Area1、Area2、Area3・・・のそれぞれについての処理という意味で用いる。
 さらに同様に、面積変化量Diff(n)も、各候補画像枠の面積変化量を示し、面積変化量Diff(n)についての処理とは、例えば候補画像枠E1,E2,E3・・・の面積変化量Diff1、Diff2、Diff3・・・のそれぞれについての処理という意味で用いる。
 判定フラグFlg(n)、オフセット値OFS(n)も同様とする。
 また、候補画像枠E(n)は候補画像枠E1,E2,E3・・・を表すが、これは複数フレームにわたって、被写体別に区別されることが望ましい。例えば候補検出部27が顔を抽出する例でいうと、人物A、人物B、人物Cが被写体となっている場合、各フレームにおいて共通に、人物Aの顔画像部分が候補画像枠E1、人物Bの顔画像部分が候補画像枠E2、人物Cの顔画像部分が候補画像枠E3というようにされる。もし途中の或るフレームで、人物Dのみが被写体に入っている状態になったとしても、人物Dの顔画像部分は候補画像枠E4とされる。従って候補検出部27は、単に「顔」を検出するのみでなく、個体(個人)判別も行うこととするとよい。
 制御部30は、例えば1フレームタイミング毎にステップF101~F116の処理を行う。
 ステップF101で制御部30は、候補検出部27から或るフレームについての候補画像枠情報を取り込む。例えば各候補画像枠E(n)について、位置情報として、画像データの二次元(x-y)座標値としてのx値、y値や、候補画像枠の幅w、高さhの情報を
取得する。
 ステップF102で制御部30は、各候補画像枠E(n)について枠面積Area(n)を算出する。枠面積Area(n)=幅w×高さhとして求める。なお、ここでは方形の枠を前提としているが、候補画像枠E(n)は必ずしも方形でなく、円形、楕円形、不定形などとすることも考えられる。その場合、枠面積Area(n)は、その候補画像枠E(n)に含まれるピクセル数とすればよい。
 次にステップF103で制御部30は、各候補画像枠E(n)について面積変化量Diff(n)を求める。面積変化量Diff(n)は、前フレームとの差分として求める。即ち
 面積変化量Diff(n)=Area(n)-Area(n)pre
として求める。Area(n)preは、候補画像枠E(n)の前フレームの枠面積Area(n)である。例えば1フレーム前の画像を対象とした際のステップF102で求められた枠面積Area(n)が、現フレームの処理時点では「Area(n)pre」とされる。
 ステップF104で制御部30は変数TSFを確認する。変数TSF=0であればステップF105に進む。
 なお、例えば主要被写体判定が行われた後であったり、動作モード設定等で主要被写体判定処理が不要な期間などは、変数TSF=1とされていることで、主要被写体判定処理が行われない。
 またユーザ操作や自動的な起動判断で、必要時に図6の主要被写体判定処理を実行するようにする場合などではステップF104の処理は不要としてもよい。
 ステップF105、F106、F107では、制御部30は各候補画像枠E(n)の面積変化量Diff(n)が、接近を示すものであるか否かを確認する。
 即ち面積変化量Diff(n)が、所定量以上の接近を示す変化量であるか否かを、図5Bで説明したように距離判定閾値Thdを用いて判定する。
 このため制御部30はステップF105で、各候補画像枠E(n)の面積変化量Diff(n)と距離判定閾値Thdを比較し、Diff(n)>ThdであればステップF106で判定フラグFlg(n)=1(近づいている)とする。またDiff(n)>ThdでなければステップF107で判定フラグFlg(n)=0(近づいていない)とする。
 判定フラグFlg(n)は図5Cで説明した「1」「0」の判定結果に相当する。
 続いてステップF108、F109、F110で制御部30は、判定フラグFlg(n)が「1」であるか「0」であるかによりカウント処理用のオフセット値OFS(n)を設定する。
 例えば制御部30は、判定フラグFlg(n)=1であればステップF109でオフセット値OFS(n)=αとする。αはカウンタをインクリメントする所定値である。例えばα=1とする。
 また制御部30は、判定フラグFlg(n)=0であればステップF110でオフセット値OFS(n)=βとする。βはカウント値をキープ、又はカウント値をデクリメントするための所定値である。カウント値をキープする場合は、β=0とする。カウンタをデクリメントする場合は、例えばβ=-1とする。
 そしてステップF111で制御部30は、接近が観測された時間長を計数するカウンタのカウント値CNT(n)の処理を行う。具体的には、
 CNT(n)=CNT(n)+OFS(n)
とする。
 上記のステップF109でα=1とされて、オフセット値OFS(n)が設定される場合、カウント値CNT(n)はインクリメントされる。
 ステップF110でβ=0(又はβ=-1)とされて、オフセット値OFS(n)が設定 される場合、カウント値CNT(n)はキープ(又はデクリメント)される。
 このようなカウント値CNT(n)は、接近が検出された際にインクリメントされるため、候補画像枠E(n)の被写体が近づいていると検出された期間の長さに相当する値となる。なお、接近が検出されない場合(例えば被写体人物が立ち止まった状況)は、カウント値CNT(n)はキープされるようにすれば、カウント値CNT(n)は接近検出の累積値となるため、立ち止まり等があっても近接に応じて上昇する。また、接近が検出されない場合にカウント値CNT(n)はデクリメントされるようにしても、カウント値CNT(n)は平均的な近接に応じて上昇する。但し、近接が検出されない場合は、その値は減算されることで、一時的に立ち止まったり後退すると、次の接近傾向の判断には不利となる。
 そしてステップF112で制御部30は各候補画像枠E(n)について、接近傾向にあるか否かを判定する。具体的には接近検出の時間長を示すカウント値CNT(n)が、所定の時間閾値Tht以上の値となっているか否かを判断する。
 各候補画像枠E(n)のカウント値Cnt(n)のいずれもが時間閾値Thtに達していなければ、ステップF113で変数TSF=0のままとし、ステップF116で判定終了とは判断せず、ステップF101に戻る。この場合、次のフレームについて入力される候補画像枠情報に基づいて、ステップF101以降の処理を上記同様に実行していく。
 なお、ステップF116は、変数TSF=0であれば、まだ主要被写体の判定は完了していないとして判定処理継続とし、変数TSF=1であれば、主要被写体判定は完了したとする。先に述べたステップF104で変数TSF=1が検出された場合、そのまま判定終了となる。
 詳しい説明は省略するが、本例の自動的な主要被写体判定とは並行して、例えばユーザが主要被写体を表示部34の画面上のタッチ操作、或いは被写体を画面上に所定位置に合わせてシャッタボタンを半押しするなどの操作として、主要被写体選択ができるようにしてもよい。図6の処理の実行中に、ユーザがこのような指定操作を行った場合、ユーザの操作を優先することが好ましい。そこで、そのようなマニュアル操作として主要被写体設定が行われた場合、変数TSF=1とする。この場合、図6の処理はステップF104,F116の判断により、処理を終了(中断終了)することとすればよい。
 接近判定による主要被写体判定は、或る時間長をもって判定されるため、ある程度の時間(フレーム数)での候補画像枠情報についての処理を経なければ、上記のようにステップF116で判定終了とはならずにステップF101に戻って処理が繰り返される。
 ここで、例えば図5で示したように或る候補画像枠E1が、非連続的でもよいが、複数のフレームで接近が検出される状況があったとする。すると時間が進むにつれ、候補画像枠E1のカウント値Cnt1のステップF111でのインクリメントの機会が多く発生し、カウント値Cnt1が、カウント値Cnt2、Cnt3よりも早く進む。
 すると或る時点で、カウント値Cnt1が時間閾値Thtに最初に到達することとなる。
 このような場合、制御部30は処理をステップF112からF114に進める。
 ステップF114で制御部30は、カウント値Cnt(n)が時間閾値Thtに達した候補画像枠E(n)を主要被写体と判定し、主要被写体設定を行う。そして変数TSF=1とする。つまり、ある期間で平均的に近づいている候補画像の被写体が「接近傾向」にある被写体と判定され、主要被写体に設定されることとなる。
 そしてステップF115で主要被写体情報が出力され、例えば主要被写体情報を用いるアプリケーションプログラムや制御プログラムに受け渡される。
 この場合ステップF116で判定終了とされる。即ち例えば候補画像枠E1が主要被写体と設定されるなどして、図6の接近判定及び主要被写体判定処理が完了することとなる。

 なお、この処理例では変数TSF=1となるまで続けられることになるが、実際には、所定の制限時間を設けておくことが適切である。即ち図6の処理開始時点から所定時間を経過しても主要被写体が判定できない場合は、主要被写体無しとして、処理を終了するようにする。
 以上のように接近判定及び主要被写体判定処理が行われる。
 この接近判定及び主要被写体判定処理では、抽出された候補画像の中で、複数のフレームでの接近傾向が判定される。
 例えばカメラを構えている撮像者が、ターゲットとして狙っていると思われる確度の高い被写体は、接近傾向を示すことが多々ある。例えば子供にカメラを向けると、その子供が近寄ってくるということが多くの場合に観察される。そこで近寄ってくる被写体を自動的に主要被写体と設定することで、撮像者にとって適切な処理となり、撮像時の操作性は格段に向上する。撮像操作に不慣れなユーザであっても、そのような主要被写体判定により、自動的にその主要被写体に対してフォーカス制御が行われたり、露光制御が行われるなどすれば、高品位な静止画/動画撮像が可能となる。
 なお、接近判定及び主要被写体判定処理としての具体的処理例は他に多様に考えられる。
 例えば図6のステップF110でβ=0とすると、カウント値CNT(n)は、累積的に接近検出がなされた回数の累積値に相当するものとなる。
 また図6のステップF110でβ=-1とすると、カウント値CNT(n)は、平均的に接近検出がなされた値とみることができる。
 つまりこのような場合、ステップF112の接近判定は、累積的或いは平均的に接近しているという判定となる。
 これに対して、所定期間以上、継続的に接近している場合を接近傾向と判定するようにしてもよい。そのためにはステップF108で判定フラグFlg(n)=1とされた場合には、カウント値CNT(n)をインクリメントし、ステップF108で判定フラグFlg(n)=0とされた場合には、カウント値CNT(n)をゼロにリセットすればよい。すると、判定フラグFlg(n)=1の状態が継続的に所定時間に達した場合、ステップF112でカウント値Cnt(n)が時間閾値Thtに達して候補画像枠E(n)が「接近傾向」と判定され、候補画像枠E(n)が主要被写体と判定されることになる。
 継続的に接近している被写体を接近傾向の被写体として主要被写体とすることによれば、例えば立ち止まったり、或いは一時的に離遠する被写体を主要被写体と判定することを避けることができる。従って主要被写体判定を慎重に行うには適している。逆に言えば、主要被写体の判定を短時間で行いたい場合や、なるべく主要被写体が設定されやすくしたい場合は、平均的或いは累積的に接近している被写体を接近傾向にあると判断することが好適である。
 なお、以上の累積判断、平均判断、継続判断の場合では、それぞれ時間閾値Thtに相当する具体的な判断値は異なることが適切である。
 また例えば所定の時間条件で、継続的又は累積的又は平均的という意味で接近が検出される場合を接近傾向と判定しているが、時間的に判定の重みを変化させてもよい。
 例えば図6のステップF109,F110で設定するオフセット値OFS(n)に代入する値α、βを、処理の進行に伴って変化させる。
 一般に撮像者がカメラを構える場合、最初は主役としたい被写体を特に決めない場合も多い。構えてみて、見える範囲で撮像対象を探すという場合である。その場合に、徐々に接近してくる人を見つけて、その人を写そうとする場合、撮像者は、徐々にその人物を中心に被写体方向を合わせていく動作を行う。つまり、時間が進むにつれ、画像内で接近が観測される被写体は、撮像者が主要被写体としたい被写体であると考えている確率が高い
。そこで接近判定及び主要被写体判定処理の実行中に、時間が進むほど、接近検出の重みを強くする。具体的にはステップF109でオフセット値OFS(n)に代入する値αを段階的に大きくする。このようにすることで、撮像者の考えに合致した主要被写体判定ができる可能性を高めることになる。
 また図6の例では、ある候補画像枠E(n)のカウント値CNT(n)が時間閾値Tht以上となった時点で主要被写体判定を行い、判定を終了させるため、判定期間は不定である。これに対して、一定の判定期間を設定し、その期間内に、カウント値CNT(n)が最も大きい候補画像枠E(n)、或いはカウント値CNT(n)が所定値以上となっている1又は複数の候補画像枠E(n)を、ステップF114の対象として主要被写体と判定する処理例も考えられる。
 また主要被写体と判定するためには接近傾向の判定に加えて、他の条件(AND条件)を加えることも考えられる。例えば被写体距離が所定距離以内となっていること、被写体画像が所定サイズ以上となっていること、特定の画像種別であること、接近傾向の被写体画像の重心がフレーム画像の中央点から所定距離(x,y座標上での距離)以内であることなどを条件に加えても良い。
 このような条件を加えることで、単に接近傾向にあるというだけでなく、より撮像者が撮像したいと思っている被写体を主要被写体と判定する確率を高めることができる。従ってユーザが、これらの追加条件を選択できるようにしてもよい。
<5.撮像装置としての第2の実施の形態>
 第2の実施の形態としての主要被写体判定の動作を説明する。これも第1の実施の形態と同じく図2Bで述べたサイズ判定方式の考え方で、近寄ってくる被写体を主要被写体と判定する例としている。
 この第2の実施の形態の場合、撮像装置10としての構成は図7のようになる。図7において図3と同一部分は同一符号を付し、説明を省略する。
 図7に示す撮像装置は、デジタル信号処理部20において属性識別部28が設けられる点で図3と異なる。
 属性識別部28は、例えば候補検出部27が画像解析により候補画像とした被写体についての属性を識別し、属性情報を制御部30に受け渡す。属性情報は、例えば候補画像とした被写体が大人であるか子供であるかの情報であったり、女性であるか男性であるかの情報である。属性識別部28は、例えば顔画像の特徴点を判別して、性別や年齢層を判定する。
 なお属性識別部28をデジタル信号処理部20で実行される機能構成とするのは一例であり、制御部30における処理機能として属性識別部28を実現する例も考えられる。
 図8に制御部30(主要被写体判定部30a及び距離変化演算部30b)の処理例を示す。上述の図6と同一の処理には同一のステップ番号を付して重複説明を避ける。図6と異なるのは、ステップF101A、F112Aの処理である。
 制御部30は、例えば1フレームタイミング毎にステップF101~F116の処理を行う。ステップF101Aで制御部30は、候補検出部27から或るフレームについての候補画像枠情報を取り込む。例えば各候補画像枠E(n)について、位置情報として、画像データの二次元(x-y)座標値としてのx値、y値や、候補画像枠の幅w、高さhの情報を取得する。さらに制御部30は、各候補画像枠E(n)について、属性識別部28からの属性情報AT(n)を取得する。例えば大人・子供の別、男性・女性の別などの識別情報である。具体的には候補画像枠E1,E2,E3が存在した場合、それぞれの属性
情報AT1,AT2,AT3を取得する。例えば属性情報AT1は「子供/女性」、属性情報AT2は「大人/男性」、属性情報AT3は「大人/女性」などとなる。
 ステップF102~F111では図6と同様に各候補画像枠E(n)についての接近傾向の判定のための処理を行う。
 この図8の場合、ステップF112では、接近傾向と判定するための時間閾値を、属性情報に対応した時間閾値Tht(ATn)とする。時間閾値Tht(ATn)とは、属性情報に応じて時間閾値としての値が切り換えられることを意味する。
 例えば「子供/女性」「子供/男性」の場合は比較的小さい値、大人/女性は比較的大きい値、大人/男性はさらに大きい値などとする。
 制御部30は内部記憶部でのテーブルデータとして属性情報に応じた閾値を記憶して置いても良いし、或いはプログラム上の数値設定で属性情報に応じた閾値が決められていたも良い。さらには、固定の閾値Thtに対する係数値として、属性毎の係数値が設定され、制御部30はステップF112Aの際に、属性情報に応じて閾値Tht(ATn)を求めるようにしてもよい。
 ステップF112Aで各候補画像枠E(n)についてのカウント値CNT(n)と時間閾値Tht(ATn)が比較され、その結果で接近傾向にあるか否かが判定される。そして接近傾向にある候補画像がステップF114で主要被写体と判定されることになる。
 この図8の処理例によれば、主要被写体としての判定されやすさが、属性情報によって異なるものとなる。例えば上記のように子供の場合の時間閾値Tht(ATn)が小さい値であれば、子供は主要被写体と判定されやすい。また女性の方が男性よりも時間閾値Tht(ATn)が小さい値であれば、女性の方が主要被写体と判定されやすい。
 このように被写体の属性によって主要被写体としての判定されやすさ、判定されにくさを調整することができる。従ってユーザの望む主要被写体判定がされやすくなる。例えば主に子供を撮像するユーザにとっては、上記のような時間閾値により主要被写体判定の精度が向上するとともに、判定時間が短縮されることになる。
 特に各種のユースケースに応じて、ユーザが優先順位を設定できるようにするとよい。例えば子供を撮像する場合は、子供を優先させる設定を行う。男性を撮像する場合は男性を優先させる設定を行う。このようにユーザが属性に応じた時間閾値を選択できれば、ユーザの撮像目的に応じた迅速かつ精度の高い主要被写体判定が実現される。
 なお属性情報はさらに多様に考えられる。例えば大人/子供という属性判断よりも細かく年齢を画像から推定し、年代(子供/青年/中年/老年)の識別を行って属性情報としてもよい。
 また顔の個人認識の手法を導入し、自分の子供、家族、知人などを判定し、その場合、時間閾値を下げて、そのような候補画像については主要被写体に判定されやすくすることも考えられる。例えば予め自分の子供や家族等の顔を登録しておき、その特徴データを求めておく。属性識別部28は特徴データに合致した顔を検出したら、近親者としての属性情報を生成し、制御部30は、その場合の時間閾値Tht(ATn)を小さい値とする。
 また、人物に限らず、犬、猫などの動物、或いは動物種別などの属性情報を生成して、時間閾値を変化させてもよい。
 またこの第2の実施の形態の処理も、第1の実施の形態の処理と同様の変形例が考えられる。
<6.撮像装置としての第3の実施の形態>
 第3の実施の形態としての主要被写体判定の動作を説明する。これも第1の実施の形態
と同じく図2Bで述べたサイズ判定方式の考え方であるが、遠ざかってく被写体を主要被写体と判定する例とする。
 図9A、図9B、図9Cは、先に説明した図5A、図5B、図5Cと同様に、仮に候補画像枠E1,E2,E3が、ある期間継続してフレーム(FR1,FR2・・・)内に存在し続けたとして、算出される枠面積の変化、面積変化量、及び距離判定閾値Thdを用いた判定結果を示したものである。
 この図9Aに示す場合、候補画像枠E1に注目すると、徐々に枠面積が小さくなっている。ここで、図9Bの面積変化量は、図5Bの面積変化量で説明した場合の、
 (面積変化量)=(現在のフレームの枠面積)-(前フレームの枠面積)
という定義とは異なり、
 (面積変化量)=(前フレームの枠面積)-(現在のフレームの枠面積)
とする。すると、面積変化量の値は、枠面積が小さくなって行く場合に大きい値をとることとなり、例えば図9Aの枠面積変化に応じて図9Bのようになる。この面積変化量について、距離判定閾値Thdと比較して判定を行うと、各候補画像枠E1、E2、E3について図9Cのようになる。
 この例の場合、候補画像枠E1は判定結果が「1」となることが継続している。
 候補画像枠E2は面積変化量が高い値をとった期間、判定結果は「1」となっている。
 候補画像枠E3は面積変化量が常時低い値をとっていることで、E3判定結果は継続して「0」となっている。
 第1の実施の形態と同様、判定結果が「1」となる継続期間や累積期間などの期間長をカウントすれば、平均的、累積的又は継続的に遠ざかっている被写体、つまり離遠傾向の被写体を判定できる。この図9の場合、候補画像枠E1はある程度の時間、平均的、累積的又は継続的に遠ざかっていることから、離遠傾向の被写体と判定される。
 図10に制御部30(主要被写体判定部30a及び距離変化演算部30b)の離遠判定及び主要被写体判定処理の例を示す。上述の図6と同一の処理には同一のステップ番号を付して重複説明を避ける。図6と異なるのは、ステップF103Bの処理である。
 制御部30は、例えば1フレームタイミング毎にステップF101~F116の処理を行う。この際にステップF103Bで制御部30は、各候補画像枠E(n)についての面積変化量Diff(n)としては、
 面積変化量Diff(n)=Area(n)pre-Area(n)
とする。Area(n)preは、候補画像枠E(n)の前フレームの枠面積Area(n)である。例えば1フレーム前の画像を対象とした際のステップF102で求められた枠面積Area(n)が、現フレームの処理時点では「Area(n)pre」とされる。
 以降のステップF104~F116の処理は、図6と同様に行う。
 ステップF103Bにおいて面積変化量Diff(n)を上記のように算出すると、枠面積が前フレームより小さくなる(=被写体が遠ざかる)場合に、面積変化量の値は高くなる。
 そのため、ステップF105~F107で距離判定閾値Thdと比較して判定フラグFlg(n)を設定し、ステップF108~F111でカウント値Cnt(n)の処理を行うと、平均的又は累積的に遠ざかっている被写体の候補画像枠E(n)について、ある時点でステップF112でカウント値Cnt(n)が時間閾値Thtに達する。この場合、当該候補画像枠E(n)の被写体は、離遠傾向にあるとして、ステップF114で主要被写体と選定されることになる。
 この図10の離遠判定及び主要被写体判定処理では、抽出された候補画像の中で、複数のフレームでの離遠傾向が判定される。そして離遠傾向の判定結果に基づいて主要被写体が判定される。

 例えばカメラを構えている撮像者にとっては、遠ざかる被写体を狙うというケースは多々ある。列車、航空機、モータスポーツなどの高速移動する被写体の写真を撮りたい場合や、野鳥、動物など、通常人間からは離れる方向に移動するものを撮りたい場合は、遠ざかる被写体を自動的に主要被写体と設定することで、撮像者にとって適切な処理となり、撮像時の操作性は格段に向上する。
 撮像操作に不慣れなユーザであっても、そのような主要被写体判定により、自動的にその主要被写体に対してフォーカス制御が行われたり、露光制御が行われるなどすれば、高品位な静止画/動画撮像が可能となる。
 なお、離遠判定及び主要被写体判定処理としての具体的処理例は他に多様に考えられる。例えば図6の近接判定の際に説明したが、図10の場合でもステップF110でβ=0とすると累積的に遠ざかる状況が検出された場合に離遠傾向と判定される。またステップF110でβ=-1とすると、平均的に遠ざかる状況が検出された場合に離遠傾向と判定される。さらには、ステップF108で判定フラグFlg(n)=0とされた場合にカウント値CNT(n)をゼロにリセットするものとすれば、継続して遠ざかる被写体のみが離遠傾向と判定されることとなる。
 継続的に離遠している被写体を離遠傾向と判定して主要被写体とすることによれば、主要被写体判定を慎重に行うには適している。特に遠ざかる列車、航空機等、或いは野鳥、動物などは、ほとんどの場合、継続的に遠ざかる状況が多い。そのような対象の撮像目的であれば継続判定によって主要被写体判定精度は向上する。
 一方で、必ずしも継続的な移動が観測されない被写体を目的とした場合に主要被写体の判定を短時間で行いたい場合や、なるべく主要被写体が多様に設定されやすくしたい場合は、平均的或いは累積的に離遠している被写体を離遠傾向にあると判断することが好適である。
 なお、以上の累積判断、平均判断、継続判断の場合では、それぞれ時間閾値Thtに相当する具体的な判断値は異なることが適切である。
 また例えば所定の時間条件で、継続的又は累積的又は平均的という意味で離遠が検出される場合を離遠傾向と判定しているが、時間的に判定の重みを変化させてもよい。具体的にはステップF109でオフセット値OFS(n)に代入する値αを段階的に大きくしたり、或いは逆に小さくしたりする。
 また一定の判定期間を設定し、その期間内に、カウント値CNT(n)が最も大きい候補画像枠E(n)、或いはカウント値CNT(n)が所定値以上となっている1又は複数の候補画像枠E(n)を、ステップF114の対象として主要被写体と判定する処理例も考えられる。
 また主要被写体と判定するためには離遠傾向の判定に加えて、他の条件をAND条件として加えることも考えられる。例えば被写体距離が所定距離以上となっていること、被写体画像が所定サイズ以下となっていること、特定の画像種別であること、離遠傾向の被写体画像の重心がフレーム画像の中央点から所定距離(x,y座標上での距離)以内であることなどを条件に加えても良い。
 このような条件を加えることで、単に離遠傾向にあるというだけでなく、より撮像者が撮像したいと思っている被写体を主要被写体と判定する確率を高めることができる。従ってユーザが、これらの追加条件を選択できるようにしてもよい。
 また離遠傾向の判定についても第2の実施の形態の考え方を適用して、属性情報に応じて異なる時間閾値Tht(ATn)を用いるようにしてもよい。
<7.撮像装置としての第4の実施の形態>
 第4の実施の形態としての主要被写体判定の動作を説明する。これは図2Cで述べたブロック判定方式の考え方で、近寄ってくる被写体を主要被写体と判定する例としている。
 この第2の実施の形態の場合、撮像装置10としての構成は図11のようになる。図11において図3と同一部分は同一符号を付し、説明を省略する。
 図11の撮像装置10は、距離センサ17を備えること、及びデジタル信号処理部20に距離算出部29としての機能を備える。
 距離センサ17は撮像方向の被写体距離を検出する。距離算出部29は距離センサ17の検出値を用いて、撮像画像を分割した分割領域(ブロック)毎の被写体距離を算出する。
 なお距離センサ17及び距離算出部29による被写体距離の検出技術については、位相差センサ方式、Time of Flight方式、Kinect方式など、公知の技術を用いることができる。例えば位相差センサ方式は、左右に配置したイメージャの撮像画像において、同一の対象被写体が検出される画素間の距離(ピクセル数)から、当該対象被写体の距離を求める方式である。またTime of Flight方式は、距離センサ17が赤外線の発光及び受光を行い、出射した赤外線が対象被写体に反射して受光されるまでの時間を赤外線速度で除算して距離を求める方式である。
 図12にブロック毎の距離検出動作を示している。
 図12Aは撮像装置10の光学系11,イメージャ12の動作によりデジタル信号処理部20に入力される撮像画像信号の各フレームFR1,FR2,FR3・・・を示している。このような画像入力と並行して、距離センサ17では被写体の距離測定のための動作が行われており、その検出情報が距離算出部29に入力される。
 距離算出部29は、各フレーム画像データFR1,FR2,FR3・・・について、それぞれブロック毎の被写体距離を算出する。
 制御部30には、主要被写体判定部30a及び距離変化演算部30bとしての機能が設けられる。
 このような撮像装置10において、図1で説明した画像処理装置1の構成部分は次のようになる。
 図1の画像処理装置1における主要被写体判定部2に相当する構成は、撮像装置10の制御部30において主要被写体判定部30aとしてソフトウエアにより実装される。また被写体距離変化判定部3に相当する構成は、距離算出部29と距離変化演算部30bとしてハードウエア又はソフトウエアにより実装される。
 なお、この図12の例では距離算出部29はデジタル信号処理部20で実行される機能構成としているが、これは一例であり、制御部30に距離算出部29としての機能をソフトウエアにより実装することも考えられる。
 図12Bに、分割領域としてのブロックの例を示している。1つの画像データを、破線で示すように多数のブロックに分割する。図12B下部に示すように、各ブロックを説明上、ブロックBK(BK1、BK2・・・BK(M))とする。
 距離算出部29は、各ブロックBK1、BK2・・・BK(M)について、被写体距離を求める。図12B下部には、各ブロックBKの被写体距離を例示している(メートル数値、又は無限遠∞)。例えばブロックBK4は20m、ブロックBK3は無限遠∞として例示している。
 距離算出部29は、例えばフレーム毎にこのように各ブロックBKについて被写体距離を求め、制御部30に各ブロックBKの距離情報を受け渡す。
 図13Aは、各ブロックBKについて、各フレーム毎に算出された被写体距離の変化の様子を示したものである。ここではブロックBK1,BK2,BK(x)を例示している

 この例では、ブロックBK(x)に写っている被写体は、徐々に距離が短くなっている。ブロックBK1,BK2に写っている被写体は、多少の変化はあっても平均的には大きな距離変化はない。
 なお、必ずしも同一の被写体が、撮像画像データ上で同じブロックに位置するわけではない。ここでは判定開始から判定終了までの期間、ブロックBK1,BK2,BK(x)には、それぞれ同一の被写体(例えば人物A,人物B,人物C)が写っているものとする。実際には被写体が撮像装置10に対して左右方向に動いたり、或いは撮像者が撮像装置10をパンニング、チルティングさせたりすると、ある被写体が写し込まれるブロックは、フレーム毎に変化する。そのような事情を考慮する必要性から、後述の図14の処理例ではステップF202でブロック毎の時間対応付け処理を加えている。
 今、図13AのブロックBK1,BK2,BK(x)には、継続して各フレームに人物A,人物B,人物Cが写っていたと仮定して説明を続ける。
 図13Bは、各ブロックBK1,BK2,BK(x)の距離の変化量の遷移を示している。例えば各ブロックBKについての現在のフレームでの距離から前フレームでの距離を減算した差分として、各時点の値を示したものである。従ってブロックBK内に存在する被写体が、前の時点より撮像装置10に対する相対距離が近づくと、距離変化量の値は小さく(マイナス値)、相対距離が変わらなければ距離化量は0、遠ざかると距離変化量は大きな値になる。
 そこで、まず距離変化量によって、近づいているか否かを判定する距離判定閾値Thdを用いて、各ブロックBKについての判定結果を得る。距離変化量が距離判定閾値Thd未満の場合は、その時点において、当該ブロックBKの被写体は、所定距離以上の接近有りと判定される。
 図13CにブロックBK1,BK2,BK(x)についての判定結果を示している。これは距離変化量が距離判定閾値Thd未満のときに「H」レベルとなるフラグとする。
 図からわかるように、ブロックBK(x)の判定結果は「1」を継続している。ブロックBK2は、一時的な接近を示すように、ある期間のみ「1」となっている。ブロックBK1の判定結果は継続して「0」となっている。
 本例では、ある程度の時間、平均的、累積的、又は継続的に近寄っている被写体を接近傾向の被写体と判定する。図13Cの判定結果が「1」となる期間が長い被写体を接近傾向の被写体と判定することになる。例えば判定結果が「1」となる継続期間や累積期間などの期間長をカウントすれば、接近傾向の判定ができる。
 例えばブロックBK(x)については、判定結果が「1」であり期間が長いため、この判定期間において、当該ブロックBK(x)に含まれる被写体は接近傾向にあると判定できることになる。
 なお、ブロックBK2は、例えば一時的に接近したり離れたりした被写体が含まれたブロックであるといえる。またブロックBK1は、比較的遠い位置を維持している被写体が含まれたブロックである。
 なお判定開始から判定終了までの期間は具体的な処理例によって異なる。後述の図14の処理例では、判定結果が「1」となる期間長をカウントし、その期間長が所定時間に達したら、そのブロックBKの被写体を接近傾向と判定する。その場合、例えばブロックBK(x)のように常時判定結果が「1」となる被写体が存在すれば、判定終了のタイミングは早くなる。つまり判定処理の状況によって判定期間長が変動する。他の例として判定開始から判定終了までの期間を固定期間長とする例もある。
 図14で制御部30の接近判定及び主要被写体判定処理の具体例を説明する。以下説明
する処理は、制御部30において距離変化演算部30bと主要被写体判定部30aが機能して実行される処理である。
 制御部30は、接近判定及び主要被写体判定処理を開始する場合、まず初期設定としてステップF200で主要被写体設定済みか否かを示すフラグである変数TSF=0(主要被写体が未判定)とし、またカウント値bCnt(m)=0とする。
 カウント値bCnt(m)は、上述の距離変化量と距離判定閾値Thdを比較した判定結果について、時間長を判定するためのカウンタの値である。
 なお「m」は、自然数1,2,3・・・を表し、カウント値bCnt(m)は、ブロックBK1,BK2,BK3・・・BK(M)の各ブロックBKに対応するカウント値としている。つまり処理上、各ブロックBK1~BK(M)についてのカウント値として、bCnt1、bCnt2、・・・bCnt(M)が用いられる。フローチャートの説明上、カウント値bCnt(m)についての処理とは、カウント値bCnt1、bCnt2、・・・bCnt(M)のそれぞれを対象とする処理を示すものとする。
 また図14の処理で説明するDb(m)は各ブロックについて検出された距離、bDiff(m)は各ブロックBKの距離変化量を示している。距離Db(m)、距離変化量bDiff(m)についての処理とは、各ブロックBK1~BK(M)についての距離及び距離変化量の処理という意味で用いる。
 判定フラグFlg(m)、オフセット値OFS(m)も同様とする。
 制御部30は、例えば1フレームタイミング毎にステップF201~F217の処理を行う。
 ステップF201で制御部30は、距離算出部29から或るフレームについての各ブロックBK1~BK(M)についての距離情報Db1~Db(M)を取り込む。例えば図12B下段に示した距離の値の情報である。
 そして制御部30はステップF202で各ブロックBK毎の時間対応付け処理を行ったうえで、ステップF203で各ブロックBK毎に距離変化量bDiff(m)を求める。即ち現フレームの距離値と前フレームの距離値との差分である。
 距離変化量bDiff(m)=Db(m)-Db(m)pre
として求める。Db(m)preは、現在処理対象のブロックBK(m)の前フレームにおける対応ブロックBK(m)の距離値である。
 ここで、ステップF202の時間対応付け処理について図15,図16で説明しておく。先に述べたように、時間が進行すると、必ずしも同一の被写体が、各フレームの撮像画像データ上で同じブロックに位置するわけではない。被写体と撮像装置10との間の左右上下方向の相対位置が変化すると、例えば1フレーム前ではある被写体がブロックBK4に位置していたのが、現フレームではブロックBK5に位置しているということがある。このような場合を考慮すると、単にブロックBK5の前フレームとの距離差分を出しても、それは被写体の距離変化量とはならない。そこでステップF202では、被写体とブロックの対応付け(トラッキング)を行うようにしている。
 図16で模式的に説明する。図16では現フレームFRcと前フレームFRpreで、ある被写体Pの画像内での位置がずれた様子を示している。
 現フレームFRcでは、被写体Pの顔部分がブロックBK(y)に存在するとする。ところが前フレームFRpreでは、同じブロックBK(y)preには顔部分が存在せず、ブロックBK(z)preの位置となっている。本来被写体Pの距離変化を求めることが必要であるため、現フレームFRcのブロックBK(y)について求めたい距離変化量bDiff(y)は、この場合、前フレームFRpreのブロックBK(z)preの距離値
との差分である。そこで、ここでいうブロックBK(z)preが、ブロックBK(y)についての前フレームのブロックとされるようにする時間対応付け処理を行う。
 ステップF202の時間対応付け処理を図15に詳しく示している。
 制御部30はまず図15のステップF230で、現フレームFRcの対象のブロックBK(m)に対応する、前フレームFRpreのブロックBK(m)preを中心とした9ブロックの距離情報を確認する。
 図16のブロックBK(y)についていえば、前フレームFRpreの同じブロックBK(y)preを中心として、太枠で囲った9個のブロックを確認する。図示のようにこれらの9ブロックをBKx1~BKx9とする。各ブロックBKx1~BKx9の距離値は図示のように「10」「10」「9」「10」「7」「6」「9」「7」「5」(単位は例えばメートル)であるとする。なお、現フレームのブロックBK(y)の距離値は「5」とする。
 このように各ブロックBKx1~BKx9の距離値を確認したら、ステップF231で制御部30は、現フレームFRcの対象のブロックBK(m)に対応する、前フレームFRpreの各ブロックBKx1~BKx9との絶対距離差bDiffX1~bDiffX9を次のように算出する。
 bDiffX1=|Db(m)-Db(BKx1)|
 bDiffX2=|Db(m)-Db(BKx2)|
・・・
 bDiffX9=|Db(m)-Db(BKx9)|
 ここで距離Db(m)は、対象のブロックBK(m)の距離値であり、図16の例でいえばブロックBK(y)の距離値「5」である。
 距離Db(BKx1)~Db(BKx9)は9個の各ブロックBKx1~BKx9の距離値であり、図16の例でいえば上記の「10」「10」「9」「10」「7」「6」「9」「7」「5」の各値となる。
 ステップF232で制御部30は、絶対距離差bDiffX1~bDiffX9のうちで最小値となるものを判定する。そしてステップF233で、絶対距離差が最小値となったブロックが、現在対象のブロックBK(m)に対応する前フレームのブロックBKであるとし、そのブロックBKの距離Dbを、前フレームの距離Db(m)preとする。そしてこの距離Db(m)preを用いて、図14のステップF203の距離変化量bDiff(m)=Db(m)-Db(m)preの演算を行う。
 例えば図16の例でいえば、ブロックBKx9が絶対距離差が最小のブロックとなるため、処理対象のブロックBK(y)に対応する前フレームのブロックはブロックBKx9であり、その距離値Db(m)pre=5とされることとなる。
 つまり1フレームの時間では、被写体距離や左右上下の位置は殆ど変わらないという前提のもと、現フレームのブロックについて、前フレームにおける同一ブロック近辺で、絶対距離差の小さいブロックを探索し、それを対応する(同一被写体の)ブロックとすることになる。
 図14のステップF202では、このように各ブロックBKについて対応付けを行う。これによりステップF203で算出される各ブロックBK(m)についての距離変化量bDiff(m)は、同じ被写体についての距離変化を表すこととなる。
 ステップF204で制御部30は変数TSFを確認する。変数TSF=0であればステップF205に進む。このステップF204の意味は図6のステップF104と同じである。
 ステップF205、F206、F207では、制御部30は各ブロックBK(m)の距
離変化量bDiff(m)が、接近を示すものであるか否かを確認する。
 即ち距離変化量bDiff(m)が、所定量以上の接近を示す変化量であるか否かを、図13Bで説明したように距離判定閾値Thdを用いて判定する。
 このため制御部30はステップF205で、各ブロックBKの距離変化量bDiff(m)と距離判定閾値Thdを比較し、bDiff(m)<ThdであればステップF206で判定フラグFlg(m)=1(近づいている)とする。またbDiff(m)<ThdでなければステップF207で判定フラグFlg(m)=0(近づいていない)とする。
 判定フラグFlg(n)は図13Cで説明した「1」「0」の判定結果に相当する。
 続いてステップF208、F209、F210で制御部30は、判定フラグFlg(m)が「1」であるか「0」であるかによりカウント処理用のオフセット値OFS(m)を設定する。
 例えば制御部30は、判定フラグFlg(m)=1であればステップF209でオフセット値OFS(m)=αとする。αはカウンタをインクリメントする所定値である。例えばα=1とする。
 また制御部30は、判定フラグFlg(m)=0であればステップF210でオフセット値OFS(m)=βとする。βはカウント値をキープ、又はカウント値をデクリメントするための所定値である。カウント値をキープする場合は、β=0とする。カウンタをデクリメントする場合は、例えばβ=-1とする。
 そしてステップF211で制御部30は、接近が観測された時間長を計数するカウンタのカウント値bCNT(m)の処理を行う。具体的には、
 bCNT(m)=bCNT(m)+OFS(m)
とする。
 上記のステップF209でα=1とされて、オフセット値OFS(m)が設定される場合、カウント値bCNT(m)はインクリメントされる。
 ステップF210でβ=0(又はβ=-1)とされて、オフセット値OFS(m)が設定される場合、カウント値bCNT(m)はキープ(又はデクリメント)される。
 このようなカウント値bCNT(m)は、接近が検出された際にインクリメントされるため、ブロックBK(m)の被写体が近づいていると検出された期間の長さに相当する値となる。なお、接近が検出されない場合(例えば被写体人物が立ち止まった状況)は、カウント値bCNT(m)がキープされるようにすれば、カウント値bCNT(m)は接近検出の累積値となるため近接検出が多ければ上昇する。また、接近が検出されない場合にカウント値bCNT(m)がデクリメントされるようにしても、カウント値bCNT(m)は平均的な近接に応じて上昇する。但し、近接が検出されない場合は、その値は減算されることで、一時的に立ち止まったり後退すると、次の接近傾向の判断には不利となる。
 そしてステップF212で制御部30は各ブロックBK(m)について、接近傾向にあるか否かを判定する。具体的には接近検出の時間長を示すカウント値bCNT(m)が、所定の時間閾値Tht以上の値となっているか否かを判断する。
 各ブロックBK(m)のカウント値bCnt(m)のいずれもが時間閾値Thtに達していなければ、ステップF213で変数TSF=0のままとし、ステップF217で判定終了とは判断せず、ステップF201に戻る。この場合、次のフレームについて入力される各ブロックBK(m)の距離情報Db(m)に基づいて、ステップF201以降の処理を上記同様に実行していく。
 なお、ステップF217は、変数TSF=0であれば、まだ主要被写体の判定は完了していないとして判定処理継続とし、変数TSF=1であれば、主要被写体判定は完了したとする。図6のステップF116と同様である。また例えば並行したユーザのマニュアル操作としての主要被写体設定が行われた場合も、ステップF217から処理を終了(中断
終了)することとすればよい。
 接近判定による主要被写体判定は、或る時間長をもって判定されるため、ある程度の時間(フレーム数)での各ブロックBK(m)についての処理を経なければ、ステップF217で判定終了とはならずにステップF201に戻って処理が繰り返される。
 ここで、例えば図13で示したように或るブロックBK(x)について、非連続的でもよいが、複数のフレームで被写体の接近が検出される状況があったとする。すると時間が進むにつれ、ブロックBK(x)のカウント値bCnt(x)のステップF211でのインクリメントの機会が多く発生し、カウント値bCnt(x)が、他のブロックのカウント値bCnt1、bCnt2等よりも早く進む。すると或る時点で、カウント値bCnt(x)が時間閾値Thtに最初に到達することとなる。
 このような場合、制御部30は処理をステップF212からF214に進める。
 ステップF214で制御部30は、カウント値bCnt(m)が時間閾値Thtに達したブロックBK(m)が、主要被写体を含むブロックであると判定し、主要被写体設定を行う。つまり、ある期間で平均的に被写体が近づいているブロックが「接近傾向」にある被写体を含むブロックと判定され、主要被写体設定が行われる。そしてステップF215で変数TSF=1とする。
 そしてステップF216で主要被写体情報が出力され、例えば主要被写体情報を用いるアプリケーションプログラムや制御プログラムに受け渡される。
 この場合ステップF217で判定終了とされる。
 ここで、ステップF214での主要被写体設定について説明する。この図14の処理例の場合、ステップF212で接近傾向が判定されるのはブロックBK単位であって、必ずしも被写体単位ではない。そこでステップF214では、ブロックに基づいて被写体範囲を探索し、その範囲を主要被写体と判定することが行われる。
 図17,図18で詳しく説明する。
 図18Aに、1フレームの画像データの一部を示している。破線はブロックBKを示す。
 今、被写体Pが近接していたとし、或る時点で或るブロックBK(p)について、ステップF212で接近傾向と判定されたとする。ところがこのブロックBK(p)は被写体Pの一部であって、ブロックBK(p)の部分のみを主要被写体とするのは適切ではない。そこで、この被写体Pの範囲を主要被写体と設定するために、制御部30はステップF214で図17に示す処理を行う。
 まずステップF240では、ステップF212で接近傾向と判定されたブロックBK(m)について、他の各ブロックBKとの距離差を算出する。つまり当該ブロックBK(m)として、例えば図18AのブロックBK(p)と、当該フレームにおける他の全ブロックBK1~BK(M)(但しブロックBK(p)を除く)との距離の値の差を求める。そしてステップF241で、距離差が所定値以内のブロックBKを抽出する。
 図18Bの斜線を付したブロックBKが、ブロックBK(p)と距離差が所定値以内であったとする。
 次に制御部30はステップF242で、以上のように抽出したブロックBKのうちで、接近傾向と判定されたブロックBK(m)(図18のブロックBK(p))と連続するブロックをグルーピングする。連続するブロックとは、ブロックBK(p)と隣接するブロック及び隣接ブロックにさらに隣接するブロックというように、画像平面上で物理的に連続する関係にあるブロックをいう。例えば図18Cに示すブロック群MAがグルーピングされることとなる。
 そしてステップF243で制御部30は、グルーピングされたブロック群MAを、主要
被写体画像を構成する領域とし、この画像範囲を主要被写体と設定して主要被写体情報を生成する。
 なお、結果的にステップF242で他のブロックに該当がなく、グルーピングされるのは1つのブロックのみということもあり得る。その場合は、接近傾向と判定されたブロックBK(m)の範囲のみが主要被写体と判定されればよい。
 このような処理を行うことで、ブロック単位で接近傾向の判定がなされた場合に、そのブロックに基づいて或る被写体の画像領域を適切に主要被写体画像と設定できる。同じ被写体であれば、距離の値の差は殆どないはずであるため、上記のように距離差の小さいブロックを抽出し、かつ連続ブロックをグルーピングすることで、被写体の範囲を適切に判定できるためである。
 なお、主要被写体と設定される被写体画像の領域は、グルーピングされたブロック群の領域そのものとしてもよいし、この複数ブロックの領域を円形、楕円形、方形に近似して主要被写体画像の領域と設定してもよい。
 さらにグルーピングされたブロック群の範囲で画像解析を行って顔検出、身体検出などで輪郭を判定し、それを主要被写体と判定してもよい。
 またステップF214の主要被写体判定のための処理は、上記処理以外でも可能である。例えば第1の実施の形態のように、デジタル信号処理部20もしくは制御部30内に候補検出部27を備えるようにして、図14の処理とは並行して候補画像抽出を行うようにしていてもよい。その場合、ステップF212で接近傾向と判定されたブロックBK(m)が含まれる候補画像枠を探して、その候補画像枠の被写体を主要被写体と設定すればよい。
 以上のように接近判定及び主要被写体判定処理が行われる。
 この接近判定及び主要被写体判定処理では、画像を分割したブロック毎に複数のフレームでの接近傾向が判定される。そして近接傾向のブロックの判定に基づいて主要被写体設定が行われる。これによって第1の実施の形態と同様に撮像時の操作性は格段に向上する。また主要被写体判定により、自動的にその主要被写体に対してフォーカス制御が行われたり、露光制御が行われるなどすれば、高品位な静止画/動画撮像が可能となる。
 なお、接近判定及び主要被写体判定処理としての具体的処理例は他にも多様に考えられる。例えば図6の近接判定の際にも説明したように、図14の場合でもステップF210でβ=0とすると累積的に接近する状況が検出された場合に接近傾向と判定される。またステップF210でβ=-1とすると、平均的に接近する状況が検出された場合に接近傾向と判定される。さらには、ステップF208で判定フラグFlg(n)=0とされた場合にカウント値bCNT(m)をゼロにリセットするものとすれば、継続して接近するブロックBKのみが接近傾向と判定されることとなる。それぞれ第1の実施の形態で説明した利点が得られる。
 また例えば所定の時間条件で、継続的又は累積的又は平均的という意味で接近が検出される場合を接近傾向と判定しているが、時間的に判定の重みを変化させてもよい。具体的にはステップF209でオフセット値OFS(m)に代入する値αを段階的に大きくしたり、或いは逆に小さくしたりする。
 また一定の判定期間を設定し、その期間内に、カウント値bCNT(m)が最も大きいブロックBK(m)、或いはカウント値bCNT(m)が所定値以上となっている1又は複数のブロックBK(m)を、ステップF214の対象として主要被写体と判定する処理例も考えられる。
 また主要被写体と判定するためには接近傾向の判定に加えて、他の条件をAND条件として加えることも考えられる。例えばブロックBK(m)の被写体距離が所定距離以内と
なっていること、ブロックBK(m)に含まれる被写体が特定の画像種別であること、フレーム画像の中央点から所定距離(x,y座標上での距離)以内のブロックBK(m)であることなどを条件に加えても良い。
 また、全ブロックBK1~BK(M)を対象として処理を行うものとしたが、例えば画像データの中央部近辺のブロックBKのみなど、一部のブロックBKを対象として図14の処理を行うものとしてもよい。例えば主要被写体としたいと撮像者が考えている被写体は、撮像者はなるべく画像の中央部近辺に捉えるように撮像方向を調整することを考えれば、中央部近辺のブロックBKのみを対象として図14の処理を行うことで、主要被写体設定の精度を向上させることができる。さらには制御部30の処理負荷の軽減にもなる。
 また図14ではステップF202で図15,図16で説明した時間対応付け処理を行うようにしたが、これを行わない処理例も考えられる。
 ブロック毎の時間対応付け処理を行わない場合、ブロックBKと被写体が判定期間中に継続して一致するのは、或る被写体が正面から撮像装置10の方向に直進して接近してくる場合のみとなる。例えば斜め方向に近づいてくる被写体の場合、その被写体はフレームが進むにつれて異なるブロックBKに含まれるような状況となる。
 これを逆に考えれば、ブロック毎の時間対応付け処理を行わなければ、自然に正面から近づいてくる被写体のみが主要被写体と選択されうるということになる。つまり正面方向での接近傾向ということを主要被写体の判定条件とする場合、図14のステップF202を無くした処理例とすればよい。
 ブロックBKの分割は多様に考えられる。
 上記例ではブロックBK1~BK(M)として説明したが、分割数は4分割、6分割、8分割、9分割・・・30分割、40分割など多様に考えられる。
 ブロック数が多いほど、近接判定の処理負担は増えるが、ズーム状態や被写体が小さい場合なども確度の高い主要被写体判定ができる。逆にブロック数が少ないほど処理負担は軽くなる。
 分割する各ブロックBKは、全てが同一の面積や同一の領域形状でなくてもよい。例えば画像の端部は1つのブロックBKを広い範囲とし、画面の中央部は細かいブロックBKに分割することなども考えられる。主要被写体の存在する位置として画面中央付近の確率が高いことを考えれば、画面中央部で細かく領域分割することは適切となる。
<8.プログラム及びコンピュータ装置への適用>
 以上、画像処理装置1、撮像装置10の実施の形態を説明してきたが、上述した主要被写体判定処理は、ハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。
 実施の形態のプログラムは、上述の実施の形態で示した処理を、例えばCPU(Central Processing Unit)、DSP(Digital Signal Processor)等の演算処理装置に実行させるプログラムである。
 即ちこのプログラムは、画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定する処理と、判定された各被写体の接離傾向に基づいて主要被写体を判定する処理とを演算処理装置に実行させるプログラムである。
 具体的には、実施の形態のプログラムは、図2、図6、図8、図10又は図14に示し
た処理を演算処理装置に実行させるプログラムとすればよい。
 このようなプログラムにより、上述した主要被写体判定を実行する装置を、演算処理装置を用いて実現できる。
 このようなプログラムはコンピュータ装置等の機器に内蔵されている記録媒体としてのHDDや、CPUを有するマイクロコンピュータ内のROM等に予め記録しておくことができる。
 あるいはまた、フレキシブルディスク、CD-ROM(Compact Disc Read Only Memory)、MO(Magnet optical)ディスク、DVD(Digital Versatile Disc)、ブルーレイディスク(Blu-ray Disc(登録商標))、磁気ディスク、半導体メモリ、メモリカードなどのリムーバブル記録媒体に、一時的あるいは永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体は、いわゆるパッケージソフトウェアとして提供することができる。
 また、このようなプログラムは、リムーバブル記録媒体からパーソナルコンピュータ等にインストールする他、ダウンロードサイトから、LAN(Local Area Network)、インターネットなどのネットワークを介してダウンロードすることもできる。
 またこのようなプログラムによれば、実施の形態の画像処理装置の広範な提供に適している。例えばパーソナルコンピュータ、携帯型情報処理装置、携帯電話機、ゲーム機器、ビデオ機器、PDA(Personal Digital Assistant)等にプログラムをダウンロードすることで、当該携帯型情報処理装置等を、本開示の画像処理装置とすることができる。
 例えば、図19に示されるようなコンピュータ装置において、図1の画像処理装置1や撮像装置10における主要被写体判定処理と同様の処理が実行されるようにすることもできる。
 図19において、コンピュータ装置70のCPU71は、ROM72に記憶されているプログラム、または記憶部78からRAM73にロードされたプログラムに従って各種の処理を実行する。RAM73にはまた、CPU71が各種の処理を実行する上において必要なデータなども適宜記憶される。
 CPU71、ROM72、およびRAM73は、バス74を介して相互に接続されている。このバス74にはまた、入出力インターフェース75も接続されている。
 入出力インターフェース75には、キーボード、マウスなどよりなる入力部76、CRT(Cathode Ray Tube)やLCD、或いは有機ELパネルなどよりなるディスプレイ、並びにスピーカなどよりなる出力部77、ハードディスクなどより構成される記憶部78、モデムなどより構成される通信部79が接続されている。通信部79は、インターネットを含むネットワークを介しての通信処理を行う。
 入出力インターフェース75にはまた、必要に応じてドライブ80が接続され、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア81が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部78にインストールされる。
 上述した主要被写体判定処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、ネットワークや記録媒体からインストールされる。
 この記録媒体は、例えば図19に示されるように、装置本体とは別に、ユーザにプログラムを配信するために配布される、プログラムが記録されている磁気ディスク(フレキシブルディスクを含む)、光ディスク(ブルーレイディスク、CD-ROM、DVDを含む)、光磁気ディスク(MD(Mini
Disc)を含む)、若しくは半導体メモリなどよりなるリ ムーバブルメディア81により構成される。或いは、装置本体に予め組み込まれた状態でユーザに配信される、プログラムが記録されているROM72や、記憶部78に含まれるハードディスクなどでも構成される。
 このようなコンピュータ装置70は、通信部79による受信動作や、或いはドライブ80(リムーバブルメディア81)もしくは記録部78での再生動作等により、動画データを入力した際に、CPU71がプログラムに基づいて、上述の被写体距離変化判定部3、主要被写体判定部2の機能、即ち図2、図6、図8、図10又は図14のような処理を実行することで、入力された画像データについて自動的に主要被写体判定を行うことができる。
<9.変形例>
 上述の実施の形態は、各種の変形例が考えられる。
 例えば第3の実施の形態として、図2Bで述べたサイズ判定方式の考え方で離遠傾向を判定する例を示したが、図2Cで述べたブロック判定方式の場合も、離遠傾向を判定し、遠ざかっていく被写体(ブロックBK)の中から主要被写体を判定することも可能である。一例として、図14の処理のステップF203を、距離変化量bDiff(m)=Db(m)pre-Db(m)の演算を行うように変形すれば良い。このようにすればブロック判定方式の場合でも離遠傾向のブロックを判定できることとなる。
 また、接近傾向の判定、離遠傾向の判定として各種処理を説明したが、ユーザが目的とする被写体に応じて、接近判定モード、離遠判定モードを切り換えることができるようにしてもよい。例えば子供等の人物を写すときは近接判定モードを選択する。すると第1の実施の形態の処理が実行される。一方、列車、航空機、野鳥等を撮像したい場合は離遠判定モードとする。すると第3の実施の形態の処理が実行されるようにするなどである。
 また、カメラモード(風景モード、ポートレートモード等)に応じて自動的に接近判定モードと離遠判定モードの切換が行われるようにしてもよい。
 また近接判定と離遠判定を同時に並行して行うことも考えられる。その場合、接近傾向、離遠傾向のいずれかで該当する被写体が見つけられた時点で、主要被写体と判定することなどが考えられる。
 各実施の形態の説明した時間閾値Tht、距離判定閾値Thdの設定は、撮像装置10や画像処理装置1としての製品、使用態様などに応じて適宜変更することが好適である。またユーザが任意に所望の値を設定できるようにしてもよい。
 時間閾値Thtや距離判定閾値Thdの設定により、主要被写体となりえる画像(候補画像枠E(n)やブロックBK(m))の基準を変更できる。また時間閾値Thtの設定により、迅速な判定を優先させるか、或いは確度の高い判定を優先するかを選択できる。
 また主要被写体情報は、画像効果処理や画像編集処理にも利用できると述べたが、そのためには再生画像を対象として主要被写体判定処理を行うことも好適である。
 このような再生画像を対象とする主要被写体判定処理は、図1の画像処理装置、図19の情報処理装置などにおいても当然に想定される。
 また、主要被写体判定処理の結果については、その後撮像されて記録された静止画データや動画データに、メタデータとして付加してもよい。つまり主要被写体を示す情報を静止画ファイル等に付加する。
 また、スルー画を表示させ、同時に主要被写体判定処理を行っている間に、撮像者の操
作による主要被写体指定操作を可能としてもよい。
 また、実施の形態では、主に静止画撮像を想定して主要被写体を判定する処理を説明したが、動画撮像のためのスタンバイ中や、動画の撮像及び記録の実行中においても、撮像される複数のフレームから主要被写体判定を行う処理として、上記実施の形態の処理を適用できる。
 なお本技術は以下のような構成も採ることができる。
 (1)画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定する被写体距離変化判定部と、
 上記被写体距離変化判定部で判定された各被写体の接離傾向に基づいて主要被写体を判定する主要被写体判定部と、
 を備えた画像処理装置。
 (2)上記被写体距離変化判定部は、各被写体の上記距離の時間的変化の情報に基づいて、各被写体の撮像位置への接近傾向の判定を行い、
 上記主要被写体判定部は、上記接近傾向の判定結果に基づいて主要被写体を判定する上記(1)に記載の画像処理装置。
 (3)上記被写体距離変化判定部は、上記距離の時間的変化として、画像内における被写体画像のサイズの時間的変化を検出する上記(1)又は(2)に記載の画像処理装置。
 (4)上記被写体距離変化判定部は、画像内で抽出された1又は複数の候補画像としての被写体画像について、上記距離の時間的変化として、画像内における被写体画像のサイズの時間的変化を検出する上記(1)乃至(3)のいずれかに記載の画像処理装置。
 (5)上記被写体距離変化判定部は、上記距離の時間的変化の検出結果として、平均的、又は累積的、又は継続的に接近している被写体を、接近傾向の被写体と判定し、
 上記主要被写体判定部は、接近傾向にあると判定された被写体の全部又は一部を主要被写体と判定する上記(1)乃至(4)のいずれかに記載の画像処理装置。
 (6)被写体の属性を識別して属性情報を出力する属性識別部を備え、
 上記被写体距離変化判定部は、被写体についての接近傾向の判定条件を上記属性情報に応じて変化させる上記(1)乃至(5)のいずれかに記載の画像処理装置。
 (7)上記被写体距離変化判定部は、画像内の分割領域毎の被写体の距離の時間的変化を検出する上記(1)又は(2)に記載の画像処理装置。
 (8)上記被写体距離変化判定部は、現在の処理対象の画像の分割領域の被写体が、単位時間前の画像において位置する分割領域を判定し、該判定した分割領域の被写体距離と、現在の処理対象の画像の分割領域の被写体距離の差分として、被写体の距離の時間的変化を検出する上記(7)に記載の画像処理装置。
 (9)上記被写体距離変化判定部は、上記距離の時間的変化の検出結果として、平均的、又は累積的、又は継続的に接近している分割領域の被写体を、接近傾向の被写体と判定し、
 上記主要被写体判定部は、被写体が接近傾向にあると判定された分割領域の情報に基づいて主要被写体を判定する上記(7)又は(8)に記載の画像処理装置。
 (10)上記主要被写体判定部は、被写体が接近傾向にあると判定された一の分割領域に含まれる被写体と、同一の被写体が含まれる他の分割領域をグルーピングし、グルーピングした1又は複数の分割領域の範囲に基づいて、主要被写体としての画像範囲を設定する上記(9)に記載の画像処理装置。
 (11)上記主要被写体判定部は、上記一の分割領域と、被写体距離の距離差が所定値以内であって、かつ上記一の分割領域から連続した領域となる上記他の分割領域をグルーピングする上記(10)に記載の画像処理装置。
 (12)上記被写体距離変化判定部は、各被写体の上記距離の時間的変化の情報に基づいて、各被写体の撮像位置への離遠傾向の判定を行い、

 上記主要被写体判定部は、上記離遠傾向の判定結果に基づいて主要被写体を判定する上記(1)に記載の画像処理装置。
 1…画像処理装置、2…主要被写体判定部、3…ローカル動き検出部、4…グローバル動き検出部、10…撮像装置、11…光学系、12…イメージャ、13…光学系駆動部、14…センサ部、15…記録部、16…通信部、17…距離センサ、20…デジタル信号処理部、21…前処理部、22…同時化部、23…YC生成部、24…解像度変換部、25…コーデック部、27…候補検出部、28…属性識別部、29…距離算出部、30…制御部、30a…主要被写体判定部、30b…距離変化演算部、32…UIコントローラ、33…ユーザインターフェース、34…表示部、35…操作部、70…コンピュータ装置、71…CPU

Claims (14)

  1.  画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定する被写体距離変化判定部と、
     上記被写体距離変化判定部で判定された各被写体の接離傾向に基づいて主要被写体を判定する主要被写体判定部と、
     を備えた画像処理装置。
  2.  上記被写体距離変化判定部は、各被写体の上記距離の時間的変化の情報に基づいて、各被写体の撮像位置への接近傾向の判定を行い、
     上記主要被写体判定部は、上記接近傾向の判定結果に基づいて主要被写体を判定する請求項1に記載の画像処理装置。
  3.  上記被写体距離変化判定部は、上記距離の時間的変化として、画像内における被写体画像のサイズの時間的変化を検出する請求項1に記載の画像処理装置。
  4.  上記被写体距離変化判定部は、画像内で抽出された1又は複数の候補画像としての被写体画像について、上記距離の時間的変化として、画像内における被写体画像のサイズの時間的変化を検出する請求項1に記載の画像処理装置。
  5.  上記被写体距離変化判定部は、上記距離の時間的変化の検出結果として、平均的、又は累積的、又は継続的に接近している被写体を、接近傾向の被写体と判定し、
     上記主要被写体判定部は、接近傾向にあると判定された被写体の全部又は一部を主要被写体と判定する請求項1に記載の画像処理装置。
  6.  被写体の属性を識別して属性情報を出力する属性識別部を備え、
     上記被写体距離変化判定部は、被写体についての接近傾向の判定条件を上記属性情報に応じて変化させる請求項1に記載の画像処理装置。
  7.  上記被写体距離変化判定部は、画像内の分割領域毎の被写体の距離の時間的変化を検出する請求項1に記載の画像処理装置。
  8.  上記被写体距離変化判定部は、現在の処理対象の画像の分割領域の被写体が、単位時間前の画像において位置する分割領域を判定し、該判定した分割領域の被写体距離と、現在の処理対象の画像の分割領域の被写体距離の差分として、被写体の距離の時間的変化を検出する請求項7に記載の画像処理装置。
  9.  上記被写体距離変化判定部は、上記距離の時間的変化の検出結果として、平均的、又は累積的、又は継続的に接近している分割領域の被写体を、接近傾向の被写体と判定し、
     上記主要被写体判定部は、被写体が接近傾向にあると判定された分割領域の情報に基づいて主要被写体を判定する請求項7に記載の画像処理装置。
  10.  上記主要被写体判定部は、被写体が接近傾向にあると判定された一の分割領域に含まれる被写体と、同一の被写体が含まれる他の分割領域をグルーピングし、グルーピングした1又は複数の分割領域の範囲に基づいて、主要被写体としての画像範囲を設定する請求項9に記載の画像処理装置。
  11.  上記主要被写体判定部は、上記一の分割領域と、被写体距離の距離差が所定値以内であって、かつ上記一の分割領域から連続した領域となる上記他の分割領域をグルーピングする請求項10に記載の画像処理装置。
  12.  上記被写体距離変化判定部は、各被写体の上記距離の時間的変化の情報に基づいて、各被写体の撮像位置への離遠傾向の判定を行い、
     上記主要被写体判定部は、上記離遠傾向の判定結果に基づいて主要被写体を判定する請求項1に記載の画像処理装置。
  13.  画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定し、
     判定された各被写体の接離傾向に基づいて主要被写体を判定する画像処理方法。
  14.  画像内に存在する被写体についての、撮像位置からの距離の時間的変化を検出し、該検出に基づいて被写体の撮像位置に対する接離傾向を判定する処理と、
     判定された各被写体の接離傾向に基づいて主要被写体を判定する処理と、
     を演算処理装置に実行させるプログラム。
PCT/JP2013/080606 2013-01-09 2013-11-12 画像処理装置、画像処理方法、プログラム WO2014109125A1 (ja)

Priority Applications (6)

Application Number Priority Date Filing Date Title
EP13870934.0A EP2945366B1 (en) 2013-01-09 2013-11-12 Image processing device, image processing method and program
US14/655,621 US10547774B2 (en) 2013-01-09 2013-11-12 Image processing device, image processing method, and program
CN201380069149.9A CN104919791A (zh) 2013-01-09 2013-11-12 图像处理设备、图像处理方法以及程序
EP19178866.0A EP3562143B1 (en) 2013-01-09 2013-11-12 Image processing device, image processing method, and program
JP2014556331A JP6319101B2 (ja) 2013-01-09 2013-11-12 画像処理装置、画像処理方法、プログラム
US16/713,766 US11012614B2 (en) 2013-01-09 2019-12-13 Image processing device, image processing method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013-001798 2013-01-09
JP2013001798 2013-01-09

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US14/655,621 A-371-Of-International US10547774B2 (en) 2013-01-09 2013-11-12 Image processing device, image processing method, and program
US16/713,766 Continuation US11012614B2 (en) 2013-01-09 2019-12-13 Image processing device, image processing method, and program

Publications (1)

Publication Number Publication Date
WO2014109125A1 true WO2014109125A1 (ja) 2014-07-17

Family

ID=51166790

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/080606 WO2014109125A1 (ja) 2013-01-09 2013-11-12 画像処理装置、画像処理方法、プログラム

Country Status (5)

Country Link
US (2) US10547774B2 (ja)
EP (2) EP2945366B1 (ja)
JP (1) JP6319101B2 (ja)
CN (1) CN104919791A (ja)
WO (1) WO2014109125A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017000576A1 (zh) * 2015-06-30 2017-01-05 中兴通讯股份有限公司 非接触式自动对焦方法和装置
EP3723358A1 (en) 2019-04-10 2020-10-14 Canon Kabushiki Kaisha Image processing apparatus, control method thereof, and program
WO2020209097A1 (ja) * 2019-04-10 2020-10-15 富士フイルム株式会社 画像表示装置、画像表示方法、及びプログラム
EP4096209A4 (en) * 2020-01-24 2023-01-18 Sony Group Corporation INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING METHOD AND INFORMATION PROCESSING PROGRAM

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9535423B1 (en) * 2016-03-29 2017-01-03 Adasworks Kft. Autonomous vehicle with improved visual detection ability
KR102623989B1 (ko) * 2016-08-01 2024-01-11 삼성전자주식회사 영상 처리 방법 및 이를 지원하는 전자 장치
JP6598748B2 (ja) * 2016-08-26 2019-10-30 任天堂株式会社 情報処理システム、情報処理プログラム、情報処理装置、および情報処理方法
KR102289837B1 (ko) * 2017-01-06 2021-08-17 삼성전자주식회사 촬영 방법 및 전자 장치
FR3063409B1 (fr) * 2017-02-28 2021-07-16 Thales Sa Procede de pilotage d'une camera ptz, produit programme d'ordinateur et dispositif de pilotage associes
JP6923754B2 (ja) 2017-06-09 2021-08-25 華為技術有限公司Huawei Technologies Co.,Ltd. 画像キャプチャ方法及び機器
CN110110189A (zh) * 2018-02-01 2019-08-09 北京京东尚科信息技术有限公司 用于生成信息的方法和装置
CN109064776A (zh) * 2018-09-26 2018-12-21 广东省交通规划设计研究院股份有限公司 预警方法、系统、计算机设备和存储介质
CN111432133B (zh) * 2019-01-09 2021-04-23 恒景科技股份有限公司 自动曝光成像系统与方法
JP2021034875A (ja) * 2019-08-23 2021-03-01 株式会社東海理化電機製作所 撮像制御システム、制御装置、およびコンピュータプログラム
CN111131717B (zh) * 2019-12-31 2021-10-26 深圳市维海德技术股份有限公司 聚焦方法、装置、设备与计算机可读存储介质
KR20210128736A (ko) 2020-04-17 2021-10-27 삼성전자주식회사 멀티 카메라를 포함하는 전자 장치 및 촬영 방법

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002228920A (ja) * 2001-01-30 2002-08-14 Minolta Co Ltd 主被写体検出装置及び自動焦点カメラ
JP2008281701A (ja) * 2007-05-09 2008-11-20 Canon Inc 焦点調節装置、撮像装置、および焦点調節方法
JP2010041076A (ja) * 2008-07-31 2010-02-18 Olympus Corp カメラ
JP2011146827A (ja) 2010-01-13 2011-07-28 Sony Corp 画像処理装置および方法、並びにプログラム
JP2011146826A (ja) 2010-01-13 2011-07-28 Sony Corp 画像処理装置および方法、並びにプログラム
JP2011160379A (ja) 2010-02-04 2011-08-18 Sony Corp 画像処理装置および方法、並びにプログラム
JP2011166305A (ja) 2010-02-05 2011-08-25 Sony Corp 画像処理装置および撮像装置

Family Cites Families (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4720673Y1 (ja) 1968-04-26 1972-07-11
US5012270A (en) * 1988-03-10 1991-04-30 Canon Kabushiki Kaisha Image shake detecting device
JP4140567B2 (ja) * 2004-07-14 2008-08-27 松下電器産業株式会社 物体追跡装置および物体追跡方法
JP2006094145A (ja) * 2004-09-24 2006-04-06 Casio Comput Co Ltd 撮影装置及びそのプログラム
US7881496B2 (en) * 2004-09-30 2011-02-01 Donnelly Corporation Vision system for vehicle
JP4693651B2 (ja) * 2006-02-20 2011-06-01 キヤノン株式会社 撮像装置及びその制御方法
JP4720673B2 (ja) * 2006-08-16 2011-07-13 株式会社ニコン 被写体追尾装置およびカメラ
US8253800B2 (en) * 2006-06-28 2012-08-28 Nikon Corporation Tracking device, automatic focusing device, and camera
US7725018B2 (en) 2006-08-01 2010-05-25 Canon Kabushiki Kaisha Focus control apparatus, image sensing apparatus and focus control method
JP2008052225A (ja) * 2006-08-28 2008-03-06 Olympus Imaging Corp カメラ、合焦制御方法、プログラム
JP4274233B2 (ja) * 2006-11-30 2009-06-03 ソニー株式会社 撮影装置、画像処理装置、および、これらにおける画像処理方法ならびに当該方法をコンピュータに実行させるプログラム
JP2009031760A (ja) * 2007-07-04 2009-02-12 Sanyo Electric Co Ltd 撮像装置及びオートフォーカス制御方法
JP2009110137A (ja) * 2007-10-29 2009-05-21 Ricoh Co Ltd 画像処理装置、画像処理方法及び画像処理プログラム
JP2009118009A (ja) * 2007-11-02 2009-05-28 Sony Corp 撮像装置、その制御方法およびプログラム
JP4964807B2 (ja) * 2008-03-07 2012-07-04 パナソニック株式会社 撮像装置及び撮像方法
CN103424959B (zh) * 2008-05-19 2016-12-28 佳能株式会社 图像拾取系统和透镜装置
JP5322629B2 (ja) * 2008-12-25 2013-10-23 キヤノン株式会社 自動焦点検出装置及びその制御方法、撮像装置
WO2010086866A1 (en) * 2009-02-02 2010-08-05 Eyesight Mobile Technologies Ltd. System and method for object recognition and tracking in a video stream
JP2010268441A (ja) * 2009-04-16 2010-11-25 Sanyo Electric Co Ltd 画像処理装置、撮像装置及び画像再生装置
JP5344608B2 (ja) 2009-08-24 2013-11-20 キヤノン株式会社 撮影システム
JP5538865B2 (ja) * 2009-12-21 2014-07-02 キヤノン株式会社 撮像装置およびその制御方法
US8379134B2 (en) * 2010-02-26 2013-02-19 Research In Motion Limited Object detection and selection using gesture recognition
EP2544161B1 (en) * 2010-03-03 2014-12-24 Honda Motor Co., Ltd. Surrounding area monitoring device for vehicle
JP5246275B2 (ja) 2011-01-25 2013-07-24 株式会社ニコン 撮像装置およびプログラム
JP5554261B2 (ja) * 2011-02-24 2014-07-23 アルパイン株式会社 立体物検出装置および立体物検出方法
JP2013013061A (ja) * 2011-05-27 2013-01-17 Sanyo Electric Co Ltd 撮像装置
US9266473B1 (en) * 2012-01-06 2016-02-23 Intuit Inc. Remote hands-free backseat driver
US20130258167A1 (en) * 2012-03-28 2013-10-03 Qualcomm Incorporated Method and apparatus for autofocusing an imaging device
JP2015111746A (ja) * 2012-04-09 2015-06-18 ソニー株式会社 画像処理装置、画像処理方法、プログラム
JP2014126710A (ja) * 2012-12-26 2014-07-07 Canon Inc 自動焦点検出装置およびその制御方法、撮像装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002228920A (ja) * 2001-01-30 2002-08-14 Minolta Co Ltd 主被写体検出装置及び自動焦点カメラ
JP2008281701A (ja) * 2007-05-09 2008-11-20 Canon Inc 焦点調節装置、撮像装置、および焦点調節方法
JP2010041076A (ja) * 2008-07-31 2010-02-18 Olympus Corp カメラ
JP2011146827A (ja) 2010-01-13 2011-07-28 Sony Corp 画像処理装置および方法、並びにプログラム
JP2011146826A (ja) 2010-01-13 2011-07-28 Sony Corp 画像処理装置および方法、並びにプログラム
JP2011160379A (ja) 2010-02-04 2011-08-18 Sony Corp 画像処理装置および方法、並びにプログラム
JP2011166305A (ja) 2010-02-05 2011-08-25 Sony Corp 画像処理装置および撮像装置

Non-Patent Citations (1)

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

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017000576A1 (zh) * 2015-06-30 2017-01-05 中兴通讯股份有限公司 非接触式自动对焦方法和装置
CN106324945A (zh) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 非接触式自动对焦方法和装置
EP3723358A1 (en) 2019-04-10 2020-10-14 Canon Kabushiki Kaisha Image processing apparatus, control method thereof, and program
WO2020209097A1 (ja) * 2019-04-10 2020-10-15 富士フイルム株式会社 画像表示装置、画像表示方法、及びプログラム
US11595562B2 (en) 2019-04-10 2023-02-28 Canon Kabushiki Kaisha Image processing apparatus, control method thereof, and storage medium
EP4096209A4 (en) * 2020-01-24 2023-01-18 Sony Group Corporation INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING METHOD AND INFORMATION PROCESSING PROGRAM

Also Published As

Publication number Publication date
JP6319101B2 (ja) 2018-05-09
EP3562143A1 (en) 2019-10-30
US20200120262A1 (en) 2020-04-16
EP2945366A1 (en) 2015-11-18
EP2945366B1 (en) 2019-10-16
EP2945366A4 (en) 2016-09-21
US10547774B2 (en) 2020-01-28
JPWO2014109125A1 (ja) 2017-01-19
EP3562143B1 (en) 2021-04-21
CN104919791A (zh) 2015-09-16
US11012614B2 (en) 2021-05-18
US20150350523A1 (en) 2015-12-03

Similar Documents

Publication Publication Date Title
JP6319101B2 (ja) 画像処理装置、画像処理方法、プログラム
US10848662B2 (en) Image processing device and associated methodology for determining a main subject in an image
JP5987306B2 (ja) 画像処理装置、画像処理方法、プログラム
JP5867424B2 (ja) 画像処理装置、画像処理方法、プログラム
JP6131948B2 (ja) 表示制御装置、表示制御方法、プログラム
US10455154B2 (en) Image processing device, image processing method, and program including stable image estimation and main subject determination
JP2011066873A (ja) 撮像装置及び画像処理装置
JP6337779B2 (ja) 画像処理装置、画像処理方法、プログラム
JP6274272B2 (ja) 画像処理装置、画像処理方法、プログラム
JP4807582B2 (ja) 画像処理装置、撮像装置及びそのプログラム
JP2011193066A (ja) 撮像装置
CN116076083A (zh) 成像装置,信息处理装置,信息处理方法和程序
JP2018056650A (ja) 光学装置、撮像装置および制御方法

Legal Events

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

Ref document number: 13870934

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2013870934

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2014556331

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14655621

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE