WO2013114884A1 - Program for identifying position of subject, device for identifying position of subject, and camera - Google Patents

Program for identifying position of subject, device for identifying position of subject, and camera Download PDF

Info

Publication number
WO2013114884A1
WO2013114884A1 PCT/JP2013/000530 JP2013000530W WO2013114884A1 WO 2013114884 A1 WO2013114884 A1 WO 2013114884A1 JP 2013000530 W JP2013000530 W JP 2013000530W WO 2013114884 A1 WO2013114884 A1 WO 2013114884A1
Authority
WO
WIPO (PCT)
Prior art keywords
subject position
evaluation value
specifying
procedure
target image
Prior art date
Application number
PCT/JP2013/000530
Other languages
French (fr)
Japanese (ja)
Inventor
啓之 阿部
Original Assignee
株式会社ニコン
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社ニコン filed Critical 株式会社ニコン
Publication of WO2013114884A1 publication Critical patent/WO2013114884A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Definitions

  • the present invention relates to an object position specifying program, an object position specifying device, and a camera.
  • This imaging apparatus performs a focus adjustment process on the AF area selected by the user (for example, Patent Document 1).
  • the subject position specifying program causes a computer to classify a single image into a plurality of segmented images based on color information or luminance information of the target image, and to classify each of the plurality of segmented images as the color information.
  • a binarization procedure for binarizing using luminance information to generate a plurality of binarized images, and for specifying a subject position in the target image for each of the plurality of binarized images
  • a first evaluation value calculating procedure for calculating a first evaluation value to be used; a first subject position specifying procedure for specifying a subject position in the target image based on the first evaluation value; Based on the subject position specified in the subject position specifying procedure, the subject position in the target image is specified again for each of the plurality of binarized images.
  • the subject position in the target image may be specified again based on both the second evaluation value and the first evaluation value.
  • the first evaluation value is at least a value related to an area of a white pixel region composed of white pixels in the binarized image and a value related to a distance between the white pixel region and a predetermined reference region.
  • the second evaluation value is at least a value related to the area and a value related to the distance between the white pixel region and the region based on the subject position specified in the first subject position specifying procedure. It may be calculated based on this.
  • Another object position specifying program is a computer program for generating a binarized image by binarizing pixels with a predetermined threshold value, and for the first pixel exceeding the predetermined threshold value, the 2
  • the first determination procedure for determining the degree of clustering of the first pixels with reference to a predetermined position of the binarized image and the first determination procedure determined that the first pixel is more than the predetermined threshold.
  • a second determination procedure for determining the degree of clumping of the first pixel with reference to a predetermined position in the clump of one pixel, and a determination procedure for determining a subject position based on the determination result of the second determination procedure And execute.
  • An apparatus for specifying a subject position includes: a division unit that divides one image into a plurality of divided images based on color information or luminance information of the target image; and the color information or luminance information for each of the plurality of divided images.
  • a binarization unit that binarizes using the image to generate a plurality of binarized images, and a first unit used to identify a subject position in the target image for each of the plurality of binarized images.
  • a first evaluation value calculation unit that calculates an evaluation value of the first object
  • a first subject position specification unit that specifies a subject position in the target image based on the first evaluation value
  • the first subject position A second evaluation value used to re-specify the subject position in the target image for each of the plurality of binarized images based on the subject position specified by the specifying unit.
  • the camera according to the present invention includes a division procedure for dividing one image into a plurality of divided images based on the color information or luminance information of the target image, and each of the plurality of divided images using the color information or luminance information.
  • a binarization procedure for binarizing and generating a plurality of binarized images, and a first evaluation value used for specifying a subject position in the target image for each of the plurality of binarized images A first evaluation value calculation procedure to be calculated, a first subject position specification procedure for specifying a subject position in the target image based on the first evaluation value, and a specification in the first subject position specification procedure Based on the subject position, a second evaluation value calculation for calculating a second evaluation value used to re-specify the subject position in the target image for each of the plurality of binarized images.
  • FIG. 1 is a block diagram showing a configuration of an embodiment of a camera according to the present embodiment.
  • the camera 100 includes an operation member 101, a lens 102, an image sensor 103, a control device 104, a memory card slot 105, and a monitor 106.
  • the operation member 101 includes various input members operated by the user, such as a power button, a release button, a zoom button, a cross key, an enter button, a play button, and a delete button.
  • the lens 102 is composed of a plurality of optical lenses, but is representatively represented by one lens in FIG.
  • the image sensor 103 is an image sensor such as a CCD or a CMOS, for example, and captures a subject image formed by the lens 102. Then, an image signal obtained by imaging is output to the control device 104.
  • the control device 104 generates a predetermined image format, for example, JPEG format image data (hereinafter referred to as “main image data”) based on the image signal input from the image sensor 103. Further, the control device 104 generates display image data, for example, thumbnail image data, based on the generated image data. The control device 104 generates an image file that includes the generated main image data and thumbnail image data, and further includes header information, and outputs the image file to the memory card slot 105. In the present embodiment, it is assumed that both the main image data and the thumbnail image data are image data expressed in the RGB color system.
  • the memory card slot 105 is a slot for inserting a memory card as a storage medium, and records and records the image file output from the control device 104 on the memory card.
  • the memory card slot 105 reads an image file stored in the memory card based on an instruction from the control device 104.
  • the monitor 106 is a liquid crystal monitor (rear monitor) mounted on the back surface of the camera 100, and the monitor 106 displays an image stored in a memory card, a setting menu for setting the camera 100, and the like. . Further, when the user sets the mode of the camera 100 to the shooting mode, the control device 104 outputs image data for display of images acquired from the image sensor 103 in time series to the monitor 106. As a result, a through image is displayed on the monitor 106.
  • the control device 104 includes a CPU, a memory, and other peripheral circuits, and controls the camera 100.
  • the memory constituting the control device 104 includes SDRAM and flash memory.
  • the SDRAM is a volatile memory that is used as a work memory for the CPU to develop a program when the program is executed, and also as a buffer memory for temporarily recording data.
  • the flash memory is a non-volatile memory in which data of a program executed by the control device 104, various parameters read during program execution, and the like are recorded.
  • control device 104 specifies the position of the subject in the image based on the color information or luminance information of the image.
  • FIG. 2A shows the target image itself
  • FIG. 2B shows the main subject as an illustration for the purpose of explanation.
  • the flower portion indicated by the frame F1 in FIG. 2B is a portion photographed as a main subject by the user.
  • control device 104 is executed by the control device 104 as a program that starts when input of image data from the image sensor 103 is started.
  • step S101 the control device 104 converts the target image into a YCbCr format image, and displays a Y component image (Y plane image), a Cr component image (Cr plane image), and a Cb component image (Cb plane image).
  • a target image represented in the RGB color system is represented by a luminance image composed of luminance components (Y components) in the YCbCr color space and color difference components (Cb components) using the following equations (1) to (3). , Cr component).
  • the control device 104 For the target image, the control device 104 generates a luminance image composed of the Y component as a Y plane image using the following equation (1), and a color difference composed of the Cb component using the following equations (2) and (3).
  • An image and a color difference image composed of Cr components are generated as a Cb plane image and a Cr plane image, respectively.
  • step S102 the control device 104 binarizes the Y plane image, the Cr plane image, and the Cb plane image generated in step S101 into nine sections.
  • the control device 104 examines the density values of all the pixels in the image for each of the Y plane image, the Cr plane image, and the Cb plane image generated in step S101, and calculates the average (Ave) of each density value and each density value. The standard deviation ( ⁇ ) is calculated. Then, the control device 104 binarizes the Y plane image, the Cb plane image, and the Cr plane image using the average of each density value and the standard deviation of each density.
  • FIG. 4 is a diagram schematically showing a binarization method for a Y plane image, a Cb plane image, and a Cr plane image.
  • the control device 104 generates three binarized images, that is, nine sections, for each of the Y plane image, the Cb plane image, and the Cr plane image.
  • Ave at each threshold indicates an average of the above-described density values
  • indicates a standard deviation of each of the above-described densities.
  • ⁇ and ⁇ are predetermined coefficients.
  • Fig. 5 shows an example of 9-level binarized images.
  • step S103 the control device 104 performs a labeling process on the binarized images of nine sections generated in step S102.
  • control device 104 extracts a set of white pixels and a set of black pixels in each binarized image as a labeling region for each of the nine binarized images generated in step S102. And the labeling area
  • step S104 the control device 104 calculates the area of each island (white pixel region) detected by the labeling process in step S103.
  • an island of a certain size or larger or an island of a certain size or smaller may be excluded.
  • an island with an area ratio of 60% or more with respect to the entire area of the binarized image or an island with an area ratio with respect to the area of the entire binarized image of 1% or less may be excluded.
  • step S105 the control device 104 calculates the moment of inertia of each island (white pixel region) detected by the labeling process in step S103.
  • the control device 104 calculates the moment of inertia around the center of the screen for the islands in the binarized image of nine sections generated in step S102. With this process, the moment of inertia around the center of the screen is calculated for each island in the binarized image.
  • the method of calculating the moment of inertia is well known and will not be described in detail. For example, it can be calculated by the sum of the square of the pixel distance from the center of the screen ⁇ (0 or 1) density value.
  • step S106 the control device 104 calculates a first evaluation value for each island based on the area of each island calculated in step S104 and the inertia moment of each island calculated in step S105.
  • the control device 104 calculates the first evaluation value by the following equation (4).
  • First evaluation value (area of each island calculated in step S104) ⁇ ⁇ ⁇ (moment of inertia of each island calculated in step S105) (4)
  • is a predetermined coefficient.
  • step S107 the control device 104 ranks the islands in the binarized image generated in step S102 based on the first evaluation value calculated in step S106.
  • the control device 104 compares the first evaluation value calculated in step S106 for each island specified in step S103, and specifies the island having the largest first evaluation value as a representative island.
  • FIG. 6 shows an example of a binarized image of nine sections in which representative islands are specified.
  • the control apparatus 104 ranks each island in the binarized image of 9 divisions produced
  • the result of ranking the representative islands of the binarized image based on the first representative evaluation value is, for example, as shown in FIG. 7, the representative island of M (Y2), the representative island of M (Y1), M (B3) The representative island of the pass, the representative island of the M (R1) pass, the representative island of the M (R2) pass, and the representative island of the M (Y3) pass.
  • the first to sixth positions are shown.
  • the first evaluation value calculated in step S106 increases as the area of the island increases and the inertia moment of the island decreases. For this reason, by ranking based on the first evaluation value, there are a large number of white pixels with a large area of the island and a high possibility of a subject, and the representative is a representative in the binarized image where the island is close to the center of the screen. The higher the island, the higher the ranking.
  • step S108 the control device 104 specifies the first subject position based on the result of the ranking performed in step S107.
  • the control device 104 specifies the position of the representative island with the highest rank as the subject position in the target image based on the ranking result performed in step S107. As shown in FIG. 7, the representative island of M (Y2) is ranked first. Therefore, the control device 104 specifies the envelope frame F2 of the representative island in M (Y2) as the first subject position.
  • FIGS. 8A and 8B show the envelope frame F2 applied to FIGS. 2A and 2B. As shown in FIGS. 8A and 8B, in the first subject position specification based on the first evaluation value, a position close to the center of the screen is likely to be prioritized, so that it is specified at a position different from the actual main subject.
  • step S109 the control device 104 recalculates the moment of inertia of the representative island in the higher rank among the representative islands of the binarized images specified in step S107.
  • the control device 104 recalculates the moment of inertia with respect to the representative island of the higher rank among the representative islands of the binarized images specified in step S107, with the center of gravity position of each representative island as the center.
  • step S105 The details of the method of calculating the moment of inertia are the same as in step S105 described above.
  • the moment of inertia is calculated assuming that the center of the screen is the subject position, whereas in step S109, the representatives ranked in step S107 are calculated.
  • the moment of inertia is recalculated using the position of the island as the subject position.
  • step S110 the control device 104 calculates a second evaluation value based on the area of each island calculated in step S104 and the inertia moment of each island calculated in step S109.
  • the control device 104 calculates the second evaluation value by the following equation (5).
  • Second evaluation value (area of each island calculated in step S104) ⁇ ⁇ ⁇ (moment of inertia of each island calculated in step S109) (5)
  • is a predetermined coefficient.
  • step S111 the control device 104 ranks the representative islands of the binarized images specified in step S107 based on the second evaluation value calculated in step S110.
  • the control device 104 re-ranks the representative islands of the respective binarized images specified in step S107 based on the second evaluation value of the representative island. Specifically, the ranking is performed such that the higher the second evaluation value of the representative island in each binarized image, the higher the ranking.
  • the ranking results of the representative islands of the binarized image based on the second representative evaluation value in this case are, for example, as shown in FIG. 9, the representative island of M (R1), the representative island of M (R2), M (Y2) The representative island of Kashiwa, the representative island of M (Y1), the representative island of M (B3), and the representative island of M (Y3).
  • the first to sixth positions are shown.
  • the second evaluation value calculated in step S110 is an evaluation value for re-evaluating the first evaluation value in consideration of the subject position specified based on the first evaluation value. For this reason, by ranking based on the second evaluation value, ranking according to the contents of the image can be performed.
  • step S112 the control device 104 specifies the second subject position based on the result of the ranking performed in step S111.
  • the control device 104 identifies the position of the representative island with the highest rank as the subject position in the target image based on the ranking result performed in step S111. As shown in FIG. 9, the representative island of M (R1) is ranked first. Therefore, the control device 104 specifies the envelope frame F3 of the representative island in M (R1) as the second subject position.
  • FIG. 10A and FIG. 10B show the envelope frame F3 applied to FIG. 2A and FIG. 2B.
  • the control device 104 ends the series of processes shown in FIG.
  • the example in which the second subject position is specified based only on the second evaluation value is shown.
  • the second subject position is specified based on both the first evaluation value and the second evaluation value. Also good.
  • the first evaluation value and the second evaluation value may be handled equivalently, or may be comprehensively evaluated by appropriately weighting.
  • a score is given according to the ranking based on the first evaluation value
  • a score is given according to the ranking based on the second evaluation value
  • the respective scores are added to obtain the total score of each binarized image. calculate.
  • the final subject position may be specified based on the binarized image having the highest total score.
  • the subject position may be specified in consideration of other conditions in addition to the first evaluation value and the second evaluation value. Which evaluation value and condition the subject position should be identified may be designated by the user or may be automatically selected by the control device 104.
  • the control device 104 divides one image into a plurality of divided images based on the color information or luminance information of the target image, and binarizes each of the plurality of divided images using the color information or information.
  • the binarized image is generated. Then, for each of the plurality of binarized images, a first evaluation value used for specifying the subject position in the target image is calculated, and based on the calculated first evaluation value, Specify the subject position. Further, based on the specified subject position, a second evaluation value used for re-specifying the subject position in the target image is calculated for each of the plurality of binarized images, and the calculated second evaluation value is calculated.
  • the subject position in the target image is specified again based on the value.
  • the subject position in the target image can be specified with high accuracy. Therefore, even when the camera user cannot catch the subject, such as when the subject moves fast or wants to take a quick shot, for example, the first subject is identified assuming that the subject is at the center of the camera screen. By specifying the second subject based on the result, the subject position can be specified with high accuracy.
  • the control device 104 re-specifies the subject position in the target image based on both the first evaluation value and the second evaluation value. As a result, the subject position can be specified with a better balance.
  • the control device 104 determines, as the first evaluation value, at least a value related to the area of the white pixel region composed of white pixels in the binarized image, and the distance between the white pixel region and the predetermined reference region And the second evaluation value is based on at least the value related to the area and the value related to the distance between the white pixel region and the region based on the subject position specified based on the first evaluation value.
  • the subject position can be specified with high accuracy in consideration of the area of the island, the position of the island, and the like.
  • the binarization process and the labeling process described in the above embodiment are examples, and the present invention is not limited to this example.
  • any method may be used as long as one image can be divided into a plurality of divided images based on color information or luminance information, and binarization based on color information or luminance information may be used. Any method may be used. Also, any method may be used for specifying the island by the labeling process.
  • the example in which the image data of the target image is image data expressed in the RGB color system has been shown.
  • color space conversion processing or the like is appropriately performed regardless of the data format. By doing so, the present invention can be applied as well.
  • the method of calculating each evaluation value described in the above embodiment is an example, and the present invention is not limited to this example.
  • the evaluation value is calculated based on the value related to the area of the white pixel region composed of white pixels in the binarized image and the value related to the distance between the white pixel region and a certain region, It can be anything.
  • the present invention is not limited to the configurations in the above-described embodiments as long as the characteristic functions of the present invention are not impaired. Moreover, it is good also as a structure which combined the above-mentioned embodiment and a some modification.
  • DESCRIPTION OF SYMBOLS 100 ... Camera, 101 ... Operation member, 102 ... Lens, 103 ... Image pick-up element, 104 ... Control device, 105 ... Memory card slot, 106 ... Monitor

Abstract

The position of a subject in an image is identified accurately, through execution by a computer of: a segmenting procedure for segmenting a single image into a plurality of segmental images on the basis of color information or luminance information of a target image; a binarization procedure for binarization employing color information or luminance information each of the plurality of segmental images, and generating a plurality of binary images; a first evaluation value computation procedure for computing a first evaluation value to be employed for identification of a subject position within the target image, for each of the plurality of binary images; a first subject position identification procedure for identifying the subject position within the target image, on the basis of the first evaluation value; a second evaluation value computation procedure for computing a second evaluation value to be employed for re-identification of the subject position within the target image, for each of the plurality of binary images, on the basis of the subject position identified in the first subject position identification procedure; and a second subject position identification procedure for re-identifying the subject position within the target image, on the basis of the second evaluation value.

Description

被写体位置特定用プログラム、被写体位置特定装置、およびカメラSubject position specifying program, subject position specifying device, and camera
 本発明は、被写体位置特定用プログラム、被写体位置特定装置、およびカメラに関する。 The present invention relates to an object position specifying program, an object position specifying device, and a camera.
 次のような撮像装置が知られている。この撮像装置は、使用者によって選択されたAF領域を対象として焦点調節処理を行う(例えば、特許文献1)。 The following imaging devices are known. This imaging apparatus performs a focus adjustment process on the AF area selected by the user (for example, Patent Document 1).
特開2004-205885号公報Japanese Patent Laid-Open No. 2004-205858
 しかしながら、従来の撮像装置では、使用者がAF枠を被写体に正確に合わせるのは困難であるため、使用者が選択したAF領域と、実際の被写体位置とにずれが生じている可能性があり、AF領域に基づいて正確な被写体位置を特定することは困難であった。 However, in the conventional imaging apparatus, it is difficult for the user to accurately align the AF frame with the subject, so there is a possibility that the AF area selected by the user is shifted from the actual subject position. Therefore, it is difficult to specify an accurate subject position based on the AF area.
 本発明による被写体位置特定用プログラムは、コンピュータに、対象画像の色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分する区分手順と、前記複数の区分画像のそれぞれを前記色情報または輝度情報を用いて2値化して複数の2値化画像を生成する2値化手順と、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を特定するために用いる第1の評価値を算出する第1の評価値算出手順と、前記第1の評価値に基づいて、前記対象画像内における被写体位置を特定する第1の被写体位置特定手順と、前記第1の被写体位置特定手順において特定した前記被写体位置に基づいて、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を再び特定するために用いる第2の評価値を算出する第2の評価値算出手順と、前記第2の評価値に基づいて、前記対象画像内における被写体位置を再び特定する第2の被写体位置特定手順とを実行させる。 The subject position specifying program according to the present invention causes a computer to classify a single image into a plurality of segmented images based on color information or luminance information of the target image, and to classify each of the plurality of segmented images as the color information. Alternatively, a binarization procedure for binarizing using luminance information to generate a plurality of binarized images, and for specifying a subject position in the target image for each of the plurality of binarized images A first evaluation value calculating procedure for calculating a first evaluation value to be used; a first subject position specifying procedure for specifying a subject position in the target image based on the first evaluation value; Based on the subject position specified in the subject position specifying procedure, the subject position in the target image is specified again for each of the plurality of binarized images. A second evaluation value calculation step of calculating the second evaluation values, on the basis of the second evaluation value, to execute a second subject position specifying step of specifying the object position again in the subject image.
 なお、前記第2の被写体位置特定手順では、前記第2の評価値と、前記第1の評価値との両方に基づいて、前記対象画像内における被写体位置を再び特定しても良い。 In the second subject position specifying procedure, the subject position in the target image may be specified again based on both the second evaluation value and the first evaluation value.
 また、前記第1の評価値は、少なくとも、2値化画像内における白画素で構成される白画素領域の面積に関する値と、前記白画素領域と所定の基準領域との距離とに関する値とに基づいて算出され、前記第2の評価値は、少なくとも、前記面積に関する値と、前記白画素領域と前記第1の被写体位置特定手順において特定した前記被写体位置に基づく領域との距離に関する値とに基づいて算出されても良い。 Further, the first evaluation value is at least a value related to an area of a white pixel region composed of white pixels in the binarized image and a value related to a distance between the white pixel region and a predetermined reference region. And the second evaluation value is at least a value related to the area and a value related to the distance between the white pixel region and the region based on the subject position specified in the first subject position specifying procedure. It may be calculated based on this.
 本発明による別の被写体位置特定用プログラムは、コンピュータに、所定の閾値で画素を2値化して値化画像を生成する生成手順と、前記所定の閾値を越えた第1の画素について、前記2値化画像の所定位置を基準とした前記第1の画素のかたまり度合を判定する第1の判定手順と、前記第1の判定手順によって、前記所定の閾値以上にかたまっていると判定された第1の画素のかたまり内の所定位置を基準として前記第1の画素のかたまり度合を判定する第2の判定手順と、前記第2の判定手順の判定結果に基づいて、被写体位置を決定する決定手順とを実行させる。 Another object position specifying program according to the present invention is a computer program for generating a binarized image by binarizing pixels with a predetermined threshold value, and for the first pixel exceeding the predetermined threshold value, the 2 The first determination procedure for determining the degree of clustering of the first pixels with reference to a predetermined position of the binarized image and the first determination procedure determined that the first pixel is more than the predetermined threshold. A second determination procedure for determining the degree of clumping of the first pixel with reference to a predetermined position in the clump of one pixel, and a determination procedure for determining a subject position based on the determination result of the second determination procedure And execute.
 本発明による被写体位置特定用装置は、対象画像の色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分する区分部と、前記複数の区分画像のそれぞれを前記色情報または輝度情報を用いて2値化して複数の2値化画像を生成する2値化部と、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を特定するために用いる第1の評価値を算出する第1の評価値算出部と、前記第1の評価値に基づいて、前記対象画像内における被写体位置を特定する第1の被写体位置特定部と、前記第1の被写体位置特定部によって特定した前記被写体位置に基づいて、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を再び特定するために用いる第2の評価値を算出する第2の評価値算出部と、前記第2の評価値に基づいて、前記対象画像内における被写体位置を再び特定する第2の被写体位置特定部とを備える。 An apparatus for specifying a subject position according to the present invention includes: a division unit that divides one image into a plurality of divided images based on color information or luminance information of the target image; and the color information or luminance information for each of the plurality of divided images. A binarization unit that binarizes using the image to generate a plurality of binarized images, and a first unit used to identify a subject position in the target image for each of the plurality of binarized images. A first evaluation value calculation unit that calculates an evaluation value of the first object, a first subject position specification unit that specifies a subject position in the target image based on the first evaluation value, and the first subject position A second evaluation value used to re-specify the subject position in the target image for each of the plurality of binarized images based on the subject position specified by the specifying unit. Evaluation Comprising a calculation unit, on the basis of the second evaluation value, and a second subject position specifying unit configured to specify again the subject position in the target image.
 本発明によるカメラは、対象画像の色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分する区分手順と、前記複数の区分画像のそれぞれを前記色情報または輝度情報を用いて2値化して複数の2値化画像を生成する2値化手順と、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を特定するために用いる第1の評価値を算出する第1の評価値算出手順と、前記第1の評価値に基づいて、前記対象画像内における被写体位置を特定する第1の被写体位置特定手順と、前記第1の被写体位置特定手順において特定した前記被写体位置に基づいて、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を再び特定するために用いる第2の評価値を算出する第2の評価値算出手順と、前記第2の評価値に基づいて、前記対象画像内における被写体位置を再び特定する第2の被写体位置特定手順とを含む被写体位置特定用プログラムを実行するための実行手段を備える。 The camera according to the present invention includes a division procedure for dividing one image into a plurality of divided images based on the color information or luminance information of the target image, and each of the plurality of divided images using the color information or luminance information. A binarization procedure for binarizing and generating a plurality of binarized images, and a first evaluation value used for specifying a subject position in the target image for each of the plurality of binarized images A first evaluation value calculation procedure to be calculated, a first subject position specification procedure for specifying a subject position in the target image based on the first evaluation value, and a specification in the first subject position specification procedure Based on the subject position, a second evaluation value calculation for calculating a second evaluation value used to re-specify the subject position in the target image for each of the plurality of binarized images. Comprising a procedure, on the basis of the second evaluation values, the execution means for executing the subject position specifying program and a second subject position specifying step of specifying the object position again in the subject image.
カメラの一実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of one Embodiment of a camera. 対象画像の具体例を示す図である。It is a figure which shows the specific example of a target image. 被写体位置特定処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of a subject position specific process. Yプレーン画像、Cbプレーン画像、およびCrプレーン画像の2値化方法を模式的に示す図である。It is a figure which shows typically the binarization method of a Y plane image, a Cb plane image, and a Cr plane image. 9区分の2値化画像の例を示す図である。It is a figure which shows the example of a binarized image of 9 divisions. 代表島が特定された9区分の2値化画像の例を示す図である。It is a figure which shows the example of the binarized image of 9 divisions in which the representative island was specified. 第1の評価値に基づく順位付けの例を示す図である。It is a figure which shows the example of ranking based on a 1st evaluation value. 第1の被写体位置特定の例を示す図である。It is a figure which shows the example of 1st to-be-photographed object position specification. 第2の評価値に基づく順位付けの例を示す図である。It is a figure which shows the example of ranking based on a 2nd evaluation value. 第2の被写体位置特定の例を示す図である。It is a figure which shows the example of 2nd to-be-photographed object position specification.
 図1は、本実施の形態におけるカメラの一実施の形態の構成を示すブロック図である。カメラ100は、操作部材101と、レンズ102と、撮像素子103と、制御装置104と、メモリカードスロット105と、モニタ106とを備えている。操作部材101は、使用者によって操作される種々の入力部材、例えば電源ボタン、レリーズボタン、ズームボタン、十字キー、決定ボタン、再生ボタン、削除ボタンなどを含んでいる。 FIG. 1 is a block diagram showing a configuration of an embodiment of a camera according to the present embodiment. The camera 100 includes an operation member 101, a lens 102, an image sensor 103, a control device 104, a memory card slot 105, and a monitor 106. The operation member 101 includes various input members operated by the user, such as a power button, a release button, a zoom button, a cross key, an enter button, a play button, and a delete button.
 レンズ102は、複数の光学レンズから構成されるが、図1では代表して1枚のレンズで表している。撮像素子103は、例えばCCDやCMOSなどのイメージセンサーであり、レンズ102により結像した被写体像を撮像する。そして、撮像によって得られた画像信号を制御装置104へ出力する。 The lens 102 is composed of a plurality of optical lenses, but is representatively represented by one lens in FIG. The image sensor 103 is an image sensor such as a CCD or a CMOS, for example, and captures a subject image formed by the lens 102. Then, an image signal obtained by imaging is output to the control device 104.
 制御装置104は、撮像素子103から入力された画像信号に基づいて所定の画像形式、例えばJPEG形式の画像データ(以下、「本画像データ」と呼ぶ)を生成する。また、制御装置104は、生成した画像データに基づいて、表示用画像データ、例えばサムネイル画像データを生成する。制御装置104は、生成した本画像データとサムネイル画像データとを含み、さらにヘッダ情報を付加した画像ファイルを生成してメモリカードスロット105へ出力する。本実施の形態では、本画像データとサムネイル画像データとは、いずれもRGB表色系で表された画像データであるものとする。 The control device 104 generates a predetermined image format, for example, JPEG format image data (hereinafter referred to as “main image data”) based on the image signal input from the image sensor 103. Further, the control device 104 generates display image data, for example, thumbnail image data, based on the generated image data. The control device 104 generates an image file that includes the generated main image data and thumbnail image data, and further includes header information, and outputs the image file to the memory card slot 105. In the present embodiment, it is assumed that both the main image data and the thumbnail image data are image data expressed in the RGB color system.
 メモリカードスロット105は、記憶媒体としてのメモリカードを挿入するためのスロットであり、制御装置104から出力された画像ファイルをメモリカードに書き込んで記録する。また、メモリカードスロット105は、制御装置104からの指示に基づいて、メモリカード内に記憶されている画像ファイルを読み込む。 The memory card slot 105 is a slot for inserting a memory card as a storage medium, and records and records the image file output from the control device 104 on the memory card. The memory card slot 105 reads an image file stored in the memory card based on an instruction from the control device 104.
 モニタ106は、カメラ100の背面に搭載された液晶モニタ(背面モニタ)であり、当該モニタ106には、メモリカードに記憶されている画像やカメラ100を設定するための設定メニューなどが表示される。また、制御装置104は、使用者によってカメラ100のモードが撮影モードに設定されると、撮像素子103から時系列で取得した画像の表示用画像データをモニタ106に出力する。これによってモニタ106にはスルー画が表示される。 The monitor 106 is a liquid crystal monitor (rear monitor) mounted on the back surface of the camera 100, and the monitor 106 displays an image stored in a memory card, a setting menu for setting the camera 100, and the like. . Further, when the user sets the mode of the camera 100 to the shooting mode, the control device 104 outputs image data for display of images acquired from the image sensor 103 in time series to the monitor 106. As a result, a through image is displayed on the monitor 106.
 制御装置104は、CPU、メモリ、およびその他の周辺回路により構成され、カメラ100を制御する。なお、制御装置104を構成するメモリには、SDRAMやフラッシュメモリが含まれる。SDRAMは、揮発性のメモリであって、CPUがプログラム実行時にプログラムを展開するためのワークメモリとして使用されるとともに、データを一時的に記録するためのバッファメモリとしても使用される。また、フラッシュメモリは、不揮発性のメモリであって、制御装置104が実行するプログラムのデータや、プログラム実行時に読み込まれる種々のパラメータなどが記録されている。 The control device 104 includes a CPU, a memory, and other peripheral circuits, and controls the camera 100. Note that the memory constituting the control device 104 includes SDRAM and flash memory. The SDRAM is a volatile memory that is used as a work memory for the CPU to develop a program when the program is executed, and also as a buffer memory for temporarily recording data. The flash memory is a non-volatile memory in which data of a program executed by the control device 104, various parameters read during program execution, and the like are recorded.
 本実施の形態では、制御装置104は、画像の色情報または輝度情報に基づいて、画像内における被写体の位置を特定する。 In the present embodiment, the control device 104 specifies the position of the subject in the image based on the color information or luminance information of the image.
 以下、図2に示す画像を対象画像として被写体位置を特定する場合の処理について、図3に示すフローチャートを用いて説明する。なお、図2Aは、対象画像そのものを示し、図2Bは、説明のために主立った被写体をイラスト化して示している。以下では、図2Bにおいて枠F1で示した花の部分が、ユーザが主要被写体として撮影した部分であるものとして説明を行う。 Hereinafter, processing when the subject position is specified using the image shown in FIG. 2 as the target image will be described with reference to the flowchart shown in FIG. 2A shows the target image itself, and FIG. 2B shows the main subject as an illustration for the purpose of explanation. In the following description, it is assumed that the flower portion indicated by the frame F1 in FIG. 2B is a portion photographed as a main subject by the user.
 また、図3に示す処理は、撮像素子103からの画像データの入力が開始されると起動するプログラムとして、制御装置104によって実行される。 3 is executed by the control device 104 as a program that starts when input of image data from the image sensor 103 is started.
 ステップS101において、制御装置104は、対象画像をYCbCr形式の画像に変換し、Y成分の画像(Yプレーン画像)、Cr成分の画像(Crプレーン画像)、および、Cb成分の画像(Cbプレーン画像)をそれぞれ生成する。具体的には、RGB表色系で表されている対象画像を、次式(1)~(3)を用いてYCbCr色空間における輝度成分(Y成分)からなる輝度画像と色差成分(Cb成分、Cr成分)とからなる色差画像とに変換する。 In step S101, the control device 104 converts the target image into a YCbCr format image, and displays a Y component image (Y plane image), a Cr component image (Cr plane image), and a Cb component image (Cb plane image). ) Respectively. Specifically, a target image represented in the RGB color system is represented by a luminance image composed of luminance components (Y components) in the YCbCr color space and color difference components (Cb components) using the following equations (1) to (3). , Cr component).
 すなわち、制御装置104は、対象画像について、次式(1)を用いてY成分からなる輝度画像をYプレーン画像として生成し、次式(2)および(3)を用いてCb成分からなる色差画像とCr成分からなる色差画像とをそれぞれCbプレーン画像、およびCrプレーン画像として生成する。 That is, for the target image, the control device 104 generates a luminance image composed of the Y component as a Y plane image using the following equation (1), and a color difference composed of the Cb component using the following equations (2) and (3). An image and a color difference image composed of Cr components are generated as a Cb plane image and a Cr plane image, respectively.
 Y = 0.299R+0.587G+0.114B ・・・(1)
 Cb=-0.169R-0.332G+0.500B ・・・(2)
 Cr= 0.500R-0.419G-0.081B ・・・(3)
 ステップS102において、制御装置104は、ステップS101で生成したYプレーン画像、Crプレーン画像、および、Cbプレーン画像を9区分化して2値化する。
Y = 0.299R + 0.587G + 0.114B (1)
Cb = −0.169R−0.332G + 0.500B (2)
Cr = 0.500R−0.419G−0.081B (3)
In step S102, the control device 104 binarizes the Y plane image, the Cr plane image, and the Cb plane image generated in step S101 into nine sections.
 制御装置104は、ステップS101で生成したYプレーン画像、Crプレーン画像、および、Cbプレーン画像のそれぞれについて、画像内の全画素の濃度値を調べ、各濃度値の平均(Ave)と各濃度の標準偏差(σ)とを算出する。そして、制御装置104は、Yプレーン画像、Cbプレーン画像、およびCrプレーン画像を各濃度値の平均と各濃度の標準偏差とを用いて2値化する。 The control device 104 examines the density values of all the pixels in the image for each of the Y plane image, the Cr plane image, and the Cb plane image generated in step S101, and calculates the average (Ave) of each density value and each density value. The standard deviation (σ) is calculated. Then, the control device 104 binarizes the Y plane image, the Cb plane image, and the Cr plane image using the average of each density value and the standard deviation of each density.
 図4は、Yプレーン画像、Cbプレーン画像、およびCrプレーン画像の2値化方法を模式的に示す図である。図4に示すように、制御装置104は、Yプレーン画像、Cbプレーン画像、およびCrプレーン画像のそれぞれについて、3枚ずつの、すなわち、9区分の2値化画像を生成する。 FIG. 4 is a diagram schematically showing a binarization method for a Y plane image, a Cb plane image, and a Cr plane image. As shown in FIG. 4, the control device 104 generates three binarized images, that is, nine sections, for each of the Y plane image, the Cb plane image, and the Cr plane image.
 なお、図4の例では、「Ave+α・σ」、「Ave+σ」、「Ave-β・σ」の3つの閾値を用いている。各閾値におけるAveは、上述した各濃度値の平均を示し、σは、上述した各濃度の標準偏差を示す。また、α、βは所定の係数である。 In the example of FIG. 4, three threshold values “Ave + α · σ”, “Ave + σ”, and “Ave−β · σ” are used. Ave at each threshold indicates an average of the above-described density values, and σ indicates a standard deviation of each of the above-described densities. Α and β are predetermined coefficients.
 図5に、9区分の2値化画像の例を示す。 Fig. 5 shows an example of 9-level binarized images.
 ステップS103において、制御装置104は、ステップS102で生成した9区分の2値化画像を対象としてラベリング処理を行う。 In step S103, the control device 104 performs a labeling process on the binarized images of nine sections generated in step S102.
 制御装置104は、まず、ステップS102で生成した9区分の2値化画像のそれぞれを対象として、各2値化画像内の白画素のまとまりと黒画素のまとまりをラベリング領域として抽出する。そして、抽出したラベリング領域のうち、白画素で構成されるラベリング領域を島として検出する。 First, the control device 104 extracts a set of white pixels and a set of black pixels in each binarized image as a labeling region for each of the nine binarized images generated in step S102. And the labeling area | region comprised by a white pixel is detected as an island among the extracted labeling area | regions.
 ステップS104において、制御装置104は、ステップS103のラベリング処理で検出した各島(白画素領域)の面積を算出する。 In step S104, the control device 104 calculates the area of each island (white pixel region) detected by the labeling process in step S103.
 なお、面積を算出する際には、2値化画像内で検出した島の内、一定以上の大きさの島や、一定以下の大きさの島を除外しても良い。例えば、2値化画像全体の面積に対する面積比が60%以上の島や、2値化画像全体の面積に対する面積比が1%以下の島などを除外しても良い。 Note that when calculating the area, out of the islands detected in the binarized image, an island of a certain size or larger or an island of a certain size or smaller may be excluded. For example, an island with an area ratio of 60% or more with respect to the entire area of the binarized image or an island with an area ratio with respect to the area of the entire binarized image of 1% or less may be excluded.
 ステップS105において、制御装置104は、ステップS103のラベリング処理で検出した各島(白画素領域)の慣性モーメントを演算する。 In step S105, the control device 104 calculates the moment of inertia of each island (white pixel region) detected by the labeling process in step S103.
 制御装置104は、ステップS102で生成した9区分の2値化画像内の島を対象として画面中心を中心とした慣性モーメントを算出する。この処理により、2値化画像内の各島のそれぞれについて、画面中心周りの慣性モーメントが算出されることになる。なお、慣性モーメントの算出方法については、公知のため詳細な説明を省略するが、例えば、画面中心からの画素距離の2乗×(0または1)の濃度値の和により算出することができる。 The control device 104 calculates the moment of inertia around the center of the screen for the islands in the binarized image of nine sections generated in step S102. With this process, the moment of inertia around the center of the screen is calculated for each island in the binarized image. The method of calculating the moment of inertia is well known and will not be described in detail. For example, it can be calculated by the sum of the square of the pixel distance from the center of the screen × (0 or 1) density value.
 ステップS106において、制御装置104は、ステップS104で算出した各島の面積と、ステップS105で演算した各島の慣性モーメントに基づいて、島ごとに第1の評価値を算出する。 In step S106, the control device 104 calculates a first evaluation value for each island based on the area of each island calculated in step S104 and the inertia moment of each island calculated in step S105.
 制御装置104は、第1の評価値を次式(4)により算出する。 The control device 104 calculates the first evaluation value by the following equation (4).
 第1の評価値=(ステップS104で算出した各島の面積)^γ÷(ステップS105で演算した各島の慣性モーメント)・・・(4)
 式(4)において、γは所定の係数である。
First evaluation value = (area of each island calculated in step S104) ^ γ ÷ (moment of inertia of each island calculated in step S105) (4)
In equation (4), γ is a predetermined coefficient.
 ステップS107において、制御装置104は、ステップS106で算出した第1の評価値に基づいて、ステップS102で生成した2値化画像内の各島に順位付けを行う。 In step S107, the control device 104 ranks the islands in the binarized image generated in step S102 based on the first evaluation value calculated in step S106.
 制御装置104は、ステップS103で特定した各島について、ステップS106で算出した第1の評価値を比較し、第1の評価値が最も大きい島を代表島として特定する。図6に、代表島が特定された9区分の2値化画像の例を示す。 The control device 104 compares the first evaluation value calculated in step S106 for each island specified in step S103, and specifies the island having the largest first evaluation value as a representative island. FIG. 6 shows an example of a binarized image of nine sections in which representative islands are specified.
 そして、制御装置104は、当該代表島の第1の評価値に基づいて、ステップS102で生成した9区分の2値化画像内の各島を順位付けする。具体的には、各2値化画像内の代表島の第1の評価値が大きいほど順位が高くなるように順位付けを行う。この場合の第1の代表評価値に基づく2値化画像の代表島の順位付け結果は、例えば、図7に示すように、M(Y2)の代表島、M(Y1) の代表島、M(B3) の代表島、M(R1) の代表島、M(R2) の代表島、M(Y3) の代表島の順になる。なお、図7の例では、1位から6位までを示している。 And the control apparatus 104 ranks each island in the binarized image of 9 divisions produced | generated by step S102 based on the 1st evaluation value of the said representative island. Specifically, the ranking is performed such that the higher the first evaluation value of the representative island in each binarized image, the higher the ranking. In this case, the result of ranking the representative islands of the binarized image based on the first representative evaluation value is, for example, as shown in FIG. 7, the representative island of M (Y2), the representative island of M (Y1), M (B3) The representative island of the pass, the representative island of the M (R1) pass, the representative island of the M (R2) pass, and the representative island of the M (Y3) pass. In the example of FIG. 7, the first to sixth positions are shown.
 なお、ステップS106で算出した第1の評価値は、島の面積が大きく、かつ島の慣性モーメントが小さいほど大きくなる。このため、第1の評価値に基づいて順位付けを行うことにより、島の面積が大きく、被写体の可能性が高い白画素がまとまって存在し、島が画面中心に近い2値化画像における代表島ほど、順位が高くなる。 Note that the first evaluation value calculated in step S106 increases as the area of the island increases and the inertia moment of the island decreases. For this reason, by ranking based on the first evaluation value, there are a large number of white pixels with a large area of the island and a high possibility of a subject, and the representative is a representative in the binarized image where the island is close to the center of the screen. The higher the island, the higher the ranking.
 ステップS108において、制御装置104は、ステップS107で行った順位付けの結果に基づいて、第1の被写体位置特定を行う。 In step S108, the control device 104 specifies the first subject position based on the result of the ranking performed in step S107.
 制御装置104は、ステップS107で行った順位付けの結果に基づいて、順位が最も高い代表島の位置を対象画像内における被写体位置として特定する。図7に示したように、順位が1位となったのは、M(Y2) の代表島である。そのため、制御装置104は、M(Y2)における代表島の包絡枠F2を第1の被写体位置と特定する。この包絡枠F2を図2Aおよび図2Bに当てはめたものが図8Aおよび図8Bである。図8Aおよび図8Bに示すように、第1の評価値に基づく第1被写体位置特定では、画面中心に近いものが優先されやすいため、実際の主要被写体とは異なる位置に特定されている。 The control device 104 specifies the position of the representative island with the highest rank as the subject position in the target image based on the ranking result performed in step S107. As shown in FIG. 7, the representative island of M (Y2) is ranked first. Therefore, the control device 104 specifies the envelope frame F2 of the representative island in M (Y2) as the first subject position. FIGS. 8A and 8B show the envelope frame F2 applied to FIGS. 2A and 2B. As shown in FIGS. 8A and 8B, in the first subject position specification based on the first evaluation value, a position close to the center of the screen is likely to be prioritized, so that it is specified at a position different from the actual main subject.
 ステップS109において、制御装置104は、ステップS107で特定した各2値化画像の代表島のうち、高順位の代表島の慣性モーメントを再演算する。 In step S109, the control device 104 recalculates the moment of inertia of the representative island in the higher rank among the representative islands of the binarized images specified in step S107.
 制御装置104は、ステップS107で特定した各2値化画像の代表島のうち、高順位の代表島について、各代表島の重心位置を中心として慣性モーメントを再演算する。 The control device 104 recalculates the moment of inertia with respect to the representative island of the higher rank among the representative islands of the binarized images specified in step S107, with the center of gravity position of each representative island as the center.
 なお、慣性モーメントの算出方法の詳細は、上述したステップS105と同様である。また、上述したステップS105の時点においては、被写体位置が不明であるため、画面中心を被写体位置と仮定して慣性モーメントを演算したのに対して、ステップS109では、ステップS107において順位付けされた代表島の位置を被写体位置として、慣性モーメントを再演算することになる。 The details of the method of calculating the moment of inertia are the same as in step S105 described above. In addition, since the subject position is unknown at the time of step S105 described above, the moment of inertia is calculated assuming that the center of the screen is the subject position, whereas in step S109, the representatives ranked in step S107 are calculated. The moment of inertia is recalculated using the position of the island as the subject position.
 ステップS110において、制御装置104は、ステップS104で算出した各島の面積と、ステップS109で演算した各島の慣性モーメントに基づいて、第2の評価値を算出する。 In step S110, the control device 104 calculates a second evaluation value based on the area of each island calculated in step S104 and the inertia moment of each island calculated in step S109.
 制御装置104は、第2の評価値を次式(5)により算出する。 The control device 104 calculates the second evaluation value by the following equation (5).
 第2の評価値=(ステップS104で算出した各島の面積)^γ÷(ステップS109で演算した各島の慣性モーメント)・・・(5)
 式(5)において、γは所定の係数である。
Second evaluation value = (area of each island calculated in step S104) ^ γ ÷ (moment of inertia of each island calculated in step S109) (5)
In equation (5), γ is a predetermined coefficient.
 ステップS111において、制御装置104は、ステップS110で算出した第2の評価値に基づいて、ステップS107で特定した各2値化画像の代表島に順位付けを行う。 In step S111, the control device 104 ranks the representative islands of the binarized images specified in step S107 based on the second evaluation value calculated in step S110.
 制御装置104は、当該代表島の第2の評価値に基づいて、ステップS107で特定した各2値化画像の代表島を再び順位付けする。具体的には、各2値化画像内の代表島の第2の評価値が大きいほど順位が高くなるように順位付けを行う。この場合の第2の代表評価値に基づく2値化画像の代表島の順位付け結果は、例えば、図9に示すように、M(R1) の代表島、M(R2) の代表島、M(Y2) の代表島、M(Y1) の代表島、M(B3) の代表島、M(Y3) の代表島の順になる。なお、図9の例では、1位から6位までを示している。 The control device 104 re-ranks the representative islands of the respective binarized images specified in step S107 based on the second evaluation value of the representative island. Specifically, the ranking is performed such that the higher the second evaluation value of the representative island in each binarized image, the higher the ranking. The ranking results of the representative islands of the binarized image based on the second representative evaluation value in this case are, for example, as shown in FIG. 9, the representative island of M (R1), the representative island of M (R2), M (Y2) The representative island of Kashiwa, the representative island of M (Y1), the representative island of M (B3), and the representative island of M (Y3). In the example of FIG. 9, the first to sixth positions are shown.
 なお、ステップS110で算出した第2の評価値は、第1の評価値に基づいて特定した被写体位置を加味して、第1の評価値を再評価するための評価値である。このため、第2の評価値に基づいて順位付けを行うことにより、より画像の内容に応じた順位付けを行うことができる。 Note that the second evaluation value calculated in step S110 is an evaluation value for re-evaluating the first evaluation value in consideration of the subject position specified based on the first evaluation value. For this reason, by ranking based on the second evaluation value, ranking according to the contents of the image can be performed.
 ステップS112において、制御装置104は、ステップS111で行った順位付けの結果に基づいて、第2の被写体位置特定を行う。 In step S112, the control device 104 specifies the second subject position based on the result of the ranking performed in step S111.
 制御装置104は、ステップS111で行った順位付けの結果に基づいて、順位が最も高い代表島の位置を対象画像内における被写体位置として特定する。図9に示したように、順位が1位となったのは、M(R1) の代表島である。そのため、制御装置104は、M(R1)における代表島の包絡枠F3を第2の被写体位置と特定する。この包絡枠F3を図2Aおよび図2Bに当てはめたものが図10Aおよび図10Bである。図10Aおよび図10Bに示すように、第2の評価値に基づく第2被写体位置特定では、より画像の内容に応じた被写体特定が行われるため、実際の主要被写体が特定されている。制御装置104は、第2の被写体位置特定を行うと、図3に示す一連の処理を終了する。 The control device 104 identifies the position of the representative island with the highest rank as the subject position in the target image based on the ranking result performed in step S111. As shown in FIG. 9, the representative island of M (R1) is ranked first. Therefore, the control device 104 specifies the envelope frame F3 of the representative island in M (R1) as the second subject position. FIG. 10A and FIG. 10B show the envelope frame F3 applied to FIG. 2A and FIG. 2B. As shown in FIG. 10A and FIG. 10B, in the second subject position specification based on the second evaluation value, the subject is specified more according to the content of the image, and thus the actual main subject is specified. When the second subject position is specified, the control device 104 ends the series of processes shown in FIG.
 なお、上述した処理においては、第2の被写体位置特定を、第2の評価値のみに基づいて行う例を示したが、第1の評価値および第2の評価値の両方に基づいて行っても良い。なお、第1の評価値および第2の評価値は等価に扱っても良いし、適宜重み付けを行って総合的な評価をしても良い。 In the above-described processing, the example in which the second subject position is specified based only on the second evaluation value is shown. However, the second subject position is specified based on both the first evaluation value and the second evaluation value. Also good. Note that the first evaluation value and the second evaluation value may be handled equivalently, or may be comprehensively evaluated by appropriately weighting.
 例えば、第1の評価値に基づく順位に応じて得点を付けるとともに、第2の評価値に基づく順位に応じて得点を付け、それぞれの得点を加算することにより各2値化画像の合計得点を算出する。そして、合計得点が最も高い2値化画像に基づいて、最終的な被写体位置特定を行っても良い。 For example, a score is given according to the ranking based on the first evaluation value, a score is given according to the ranking based on the second evaluation value, and the respective scores are added to obtain the total score of each binarized image. calculate. Then, the final subject position may be specified based on the binarized image having the highest total score.
 なお、第1の評価値および第2の評価値の両方に基づいて、第2の被写体位置特定を行う場合には、式(4)および式(5)で説明した係数γを、第1の評価値および第2の評価値の算出時に変更しても良い。例えば、第1の評価値の算出時にはγ=1とし、第2の評価値の算出時にはγ=2.5とすることにより、よりバランスの良い特定を行うことができる。 In the case where the second subject position is specified based on both the first evaluation value and the second evaluation value, the coefficient γ described in Expression (4) and Expression (5) is used as the first object value. You may change at the time of calculation of an evaluation value and a 2nd evaluation value. For example, by setting γ = 1 when calculating the first evaluation value and setting γ = 2.5 when calculating the second evaluation value, it is possible to specify with better balance.
 さらに、第1の評価値および第2の評価値に加えて、その他の条件を加味して被写体位置特定を行っても良い。どのような評価値、条件に応じて被写体位置特定を行うかは、ユーザによって指定可能であっても良いし、制御装置104によって自動で選択可能であっても良い。 Furthermore, the subject position may be specified in consideration of other conditions in addition to the first evaluation value and the second evaluation value. Which evaluation value and condition the subject position should be identified may be designated by the user or may be automatically selected by the control device 104.
 以上説明した本実施の形態によれば、以下のような作用効果を得ることができる。 According to the present embodiment described above, the following operational effects can be obtained.
 (1)制御装置104は、対象画像の色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分し、複数の区分画像のそれぞれを色情報または情報を用いて2値化して複数の2値化画像を生成する。そして、複数の2値化画像のそれぞれに対して、対象画像内における被写体位置を特定するために用いる第1の評価値を算出し、算出した第1の評価値に基づいて、対象画像内における被写体位置を特定する。さらに、特定した被写体位置に基づいて、複数の2値化画像のそれぞれに対して、対象画像内における被写体位置を再び特定するために用いる第2の評価値を算出し、算出した第2の評価値に基づいて、対象画像内における被写体位置を再び特定するようにした。これによって、対象画像内における被写体位置を精度高く特定することができる。そのため、被写体の動きが速い場合や速写したい場合など、被写体をカメラの使用者が捉えられない場合にも、例えば被写体はカメラの画面中心に居ると仮定して第1の被写体特定を行い、この結果に基づいて第2の被写体特定を行うことにより、精度良く被写体位置の特定を行うことができる。 (1) The control device 104 divides one image into a plurality of divided images based on the color information or luminance information of the target image, and binarizes each of the plurality of divided images using the color information or information. The binarized image is generated. Then, for each of the plurality of binarized images, a first evaluation value used for specifying the subject position in the target image is calculated, and based on the calculated first evaluation value, Specify the subject position. Further, based on the specified subject position, a second evaluation value used for re-specifying the subject position in the target image is calculated for each of the plurality of binarized images, and the calculated second evaluation value is calculated. The subject position in the target image is specified again based on the value. Thereby, the subject position in the target image can be specified with high accuracy. Therefore, even when the camera user cannot catch the subject, such as when the subject moves fast or wants to take a quick shot, for example, the first subject is identified assuming that the subject is at the center of the camera screen. By specifying the second subject based on the result, the subject position can be specified with high accuracy.
 (2)制御装置104は、第1の評価値と第2の評価値との両方に基づいて、対象画像内における被写体位置を再び特定するようにした。これによって、よりバランスの良い被写体位置特定を行うことができる。 (2) The control device 104 re-specifies the subject position in the target image based on both the first evaluation value and the second evaluation value. As a result, the subject position can be specified with a better balance.
 (3)制御装置104は、第1の評価値を、少なくとも、2値化画像内における白画素で構成される白画素領域の面積に関する値と、白画素領域と所定の基準領域との距離とに関する値とに基づいて算出し、第2の評価値を、少なくとも、面積に関する値と、白画素領域と第1の評価値に基づいて特定した被写体位置に基づく領域との距離に関する値とに基づいて算出するようにした。これによって、島の面積や、島の位置などを加味して、精度高く被写体位置を特定することができる。 (3) The control device 104 determines, as the first evaluation value, at least a value related to the area of the white pixel region composed of white pixels in the binarized image, and the distance between the white pixel region and the predetermined reference region And the second evaluation value is based on at least the value related to the area and the value related to the distance between the white pixel region and the region based on the subject position specified based on the first evaluation value. To calculate. Accordingly, the subject position can be specified with high accuracy in consideration of the area of the island, the position of the island, and the like.
 <変形例>
 なお、上述した実施の形態のカメラは、以下のように変形することもできる。
<Modification>
The camera according to the above-described embodiment can be modified as follows.
 (1)上述した実施の形態では、本発明をカメラに適用する場合について説明した。しかしながら、本発明は、画像を読み込んで処理することができる他の装置、例えばパソコンや携帯端末などに適用することも可能である。 (1) In the above-described embodiment, the case where the present invention is applied to a camera has been described. However, the present invention can also be applied to other devices that can read and process images, such as personal computers and portable terminals.
 (2)上述した実施の形態で説明した2値化処理およびラベリング処理は一例であり本発明はこの例に限定されない。例えば、色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分可能な区分方法であればどのような方法を用いても良いし、色情報または輝度情報に基づく2値化であればどのような方法を用いても良い。また、ラベリング処理による島の特定についても、どのような方法を用いても良い。 (2) The binarization process and the labeling process described in the above embodiment are examples, and the present invention is not limited to this example. For example, any method may be used as long as one image can be divided into a plurality of divided images based on color information or luminance information, and binarization based on color information or luminance information may be used. Any method may be used. Also, any method may be used for specifying the island by the labeling process.
 また、上述した実施の形態では、対象画像の画像データはRGB表色系で表された画像データである例を示したが、どのようなデータ形式であっても、適宜色空間変換処理などを行うことにより、本発明を同様に適用することができる。 In the above-described embodiment, the example in which the image data of the target image is image data expressed in the RGB color system has been shown. However, color space conversion processing or the like is appropriately performed regardless of the data format. By doing so, the present invention can be applied as well.
 (3)上述した実施の形態で説明した各評価値の算出方法は一例であり、本発明はこの例に限定されない。例えば、2値化画像内における白画素で構成される白画素領域の面積に関する値と、白画素領域とある領域との距離との距離に関する値とに基づいて算出される評価値であれば、どのようなものであっても良い。 (3) The method of calculating each evaluation value described in the above embodiment is an example, and the present invention is not limited to this example. For example, if the evaluation value is calculated based on the value related to the area of the white pixel region composed of white pixels in the binarized image and the value related to the distance between the white pixel region and a certain region, It can be anything.
 なお、本発明の特徴的な機能を損なわない限り、本発明は、上述した実施の形態における構成に何ら限定されない。また、上述の実施の形態と複数の変形例を組み合わせた構成としてもよい。 Note that the present invention is not limited to the configurations in the above-described embodiments as long as the characteristic functions of the present invention are not impaired. Moreover, it is good also as a structure which combined the above-mentioned embodiment and a some modification.
100…カメラ、101…操作部材、102…レンズ、103…撮像素子、104 …制御装置、105…メモリカードスロット、106…モニタ DESCRIPTION OF SYMBOLS 100 ... Camera, 101 ... Operation member, 102 ... Lens, 103 ... Image pick-up element, 104 ... Control device, 105 ... Memory card slot, 106 ... Monitor

Claims (6)

  1.  コンピュータに、
     対象画像の色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分する区分手順と、
     前記複数の区分画像のそれぞれを前記色情報または輝度情報を用いて2値化して複数の2値化画像を生成する2値化手順と、
     前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を特定するために用いる第1の評価値を算出する第1の評価値算出手順と、
     前記第1の評価値に基づいて、前記対象画像内における被写体位置を特定する第1の被写体位置特定手順と、
     前記第1の被写体位置特定手順において特定した前記被写体位置に基づいて、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を再び特定するために用いる第2の評価値を算出する第2の評価値算出手順と、
     前記第2の評価値に基づいて、前記対象画像内における被写体位置を再び特定する第2の被写体位置特定手順とを実行させるための被写体位置特定用プログラム。
    On the computer,
    A division procedure for dividing one image into a plurality of divided images based on color information or luminance information of the target image;
    A binarization procedure for binarizing each of the plurality of segmented images using the color information or luminance information to generate a plurality of binarized images;
    A first evaluation value calculation procedure for calculating a first evaluation value used for specifying a subject position in the target image for each of the plurality of binarized images;
    A first subject position specifying procedure for specifying a subject position in the target image based on the first evaluation value;
    Based on the subject position specified in the first subject position specifying procedure, a second evaluation value used for re-specifying the subject position in the target image for each of the plurality of binarized images. A second evaluation value calculation procedure for calculating
    A program for specifying a subject position for executing a second subject position specifying procedure for specifying again a subject position in the target image based on the second evaluation value.
  2.  請求項1に記載の被写体位置特定用プログラムにおいて、
     前記第2の被写体位置特定手順では、前記第2の評価値と、前記第1の評価値との両方に基づいて、前記対象画像内における被写体位置を再び特定することを特徴とする被写体位置特定用プログラム。
    In the subject position specifying program according to claim 1,
    In the second subject position specifying procedure, the subject position in the target image is specified again based on both the second evaluation value and the first evaluation value. Program.
  3.  請求項1または請求項2に記載の被写体位置特定用プログラムにおいて、
     前記第1の評価値は、少なくとも、2値化画像内における白画素で構成される白画素領域の面積に関する値と、前記白画素領域と所定の基準領域との距離とに関する値とに基づいて算出され、
     前記第2の評価値は、少なくとも、前記面積に関する値と、前記白画素領域と前記第1の被写体位置特定手順において特定した前記被写体位置に基づく領域との距離に関する値とに基づいて算出されることを特徴とする被写体位置特定用プログラム。
    In the subject position specifying program according to claim 1 or 2,
    The first evaluation value is based on at least a value related to an area of a white pixel region formed of white pixels in the binarized image and a value related to a distance between the white pixel region and a predetermined reference region. Calculated,
    The second evaluation value is calculated based on at least a value related to the area and a value related to a distance between the white pixel region and a region based on the subject position specified in the first subject position specifying procedure. A program for specifying a subject position.
  4.  コンピュータに、
     所定の閾値で画素を2値化して値化画像を生成する生成手順と、
     前記所定の閾値を越えた第1の画素について、前記2値化画像の所定位置を基準とした前記第1の画素のかたまり度合を判定する第1の判定手順と、
     前記第1の判定手順によって、前記所定の閾値以上にかたまっていると判定された第1の画素のかたまり内の所定位置を基準として前記第1の画素のかたまり度合を判定する第2の判定手順と、
     前記第2の判定手順の判定結果に基づいて、被写体位置を決定する決定手順とを実行させるための被写体位置特定用プログラム。
    On the computer,
    A generation procedure for binarizing pixels with a predetermined threshold to generate a valued image;
    A first determination procedure for determining a degree of mass of the first pixel with reference to a predetermined position of the binarized image for the first pixel exceeding the predetermined threshold;
    A second determination procedure for determining the degree of clumping of the first pixel with reference to a predetermined position in the clump of the first pixel determined to be larger than the predetermined threshold by the first determination procedure. When,
    A subject position specifying program for executing a determination procedure for determining a subject position based on a determination result of the second determination procedure.
  5.  対象画像の色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分する区分部と、
     前記複数の区分画像のそれぞれを前記色情報または輝度情報を用いて2値化して複数の2値化画像を生成する2値化部と、
     前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を特定するために用いる第1の評価値を算出する第1の評価値算出部と、
     前記第1の評価値に基づいて、前記対象画像内における被写体位置を特定する第1の被写体位置特定部と、
     前記第1の被写体位置特定部によって特定した前記被写体位置に基づいて、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を再び特定するために用いる第2の評価値を算出する第2の評価値算出部と、
     前記第2の評価値に基づいて、前記対象画像内における被写体位置を再び特定する第2の被写体位置特定部と
     を備えることを特徴とする被写体位置特定装置。
    A division unit for dividing one image into a plurality of divided images based on color information or luminance information of the target image;
    A binarization unit that binarizes each of the plurality of segmented images using the color information or luminance information to generate a plurality of binarized images;
    A first evaluation value calculation unit that calculates a first evaluation value used for specifying a subject position in the target image for each of the plurality of binarized images;
    A first subject position specifying unit for specifying a subject position in the target image based on the first evaluation value;
    A second evaluation value used to re-specify the subject position in the target image for each of the plurality of binarized images based on the subject position specified by the first subject position specifying unit. A second evaluation value calculation unit for calculating
    A subject position specifying device comprising: a second subject position specifying unit that specifies again a subject position in the target image based on the second evaluation value.
  6.  対象画像の色情報または輝度情報に基づいて1つの画像を複数の区分画像に区分する区分手順と、
     前記複数の区分画像のそれぞれを前記色情報または輝度情報を用いて2値化して複数の2値化画像を生成する2値化手順と、
     前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を特定するために用いる第1の評価値を算出する第1の評価値算出手順と、
     前記第1の評価値に基づいて、前記対象画像内における被写体位置を特定する第1の被写体位置特定手順と、
     前記第1の被写体位置特定手順において特定した前記被写体位置に基づいて、前記複数の2値化画像のそれぞれに対して、前記対象画像内における被写体位置を再び特定するために用いる第2の評価値を算出する第2の評価値算出手順と、
     前記第2の評価値に基づいて、前記対象画像内における被写体位置を再び特定する第2の被写体位置特定手順とを含む被写体位置特定用プログラムを実行するための実行手段を備えることを特徴とするカメラ。 
    A division procedure for dividing one image into a plurality of divided images based on color information or luminance information of the target image;
    A binarization procedure for binarizing each of the plurality of segmented images using the color information or luminance information to generate a plurality of binarized images;
    A first evaluation value calculation procedure for calculating a first evaluation value used for specifying a subject position in the target image for each of the plurality of binarized images;
    A first subject position specifying procedure for specifying a subject position in the target image based on the first evaluation value;
    Based on the subject position specified in the first subject position specifying procedure, a second evaluation value used for re-specifying the subject position in the target image for each of the plurality of binarized images. A second evaluation value calculation procedure for calculating
    An execution means for executing a subject position specifying program including a second subject position specifying procedure for specifying again a subject position in the target image based on the second evaluation value. camera.
PCT/JP2013/000530 2012-02-01 2013-01-31 Program for identifying position of subject, device for identifying position of subject, and camera WO2013114884A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012-019959 2012-02-01
JP2012019959 2012-02-01

Publications (1)

Publication Number Publication Date
WO2013114884A1 true WO2013114884A1 (en) 2013-08-08

Family

ID=48904928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/000530 WO2013114884A1 (en) 2012-02-01 2013-01-31 Program for identifying position of subject, device for identifying position of subject, and camera

Country Status (1)

Country Link
WO (1) WO2013114884A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015106304A (en) * 2013-11-29 2015-06-08 株式会社ニコン Subject identifying apparatus, imaging apparatus, and program
JP2015148906A (en) * 2014-02-05 2015-08-20 株式会社ニコン Image processing apparatus, imaging apparatus, and image processing program
JP2015148905A (en) * 2014-02-05 2015-08-20 株式会社ニコン Subject detection device, imaging device, and program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019177A (en) * 2009-07-10 2011-01-27 Nikon Corp Program for specify subject position, and camera

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019177A (en) * 2009-07-10 2011-01-27 Nikon Corp Program for specify subject position, and camera

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015106304A (en) * 2013-11-29 2015-06-08 株式会社ニコン Subject identifying apparatus, imaging apparatus, and program
JP2015148906A (en) * 2014-02-05 2015-08-20 株式会社ニコン Image processing apparatus, imaging apparatus, and image processing program
JP2015148905A (en) * 2014-02-05 2015-08-20 株式会社ニコン Subject detection device, imaging device, and program

Similar Documents

Publication Publication Date Title
JP5246078B2 (en) Object location program and camera
WO2010128579A1 (en) Electron camera, image processing device, and image processing method
WO2013114884A1 (en) Program for identifying position of subject, device for identifying position of subject, and camera
JP5691617B2 (en) Subject identification device and subject tracking device
JP2012039210A (en) Object specification program and camera
JP4771536B2 (en) Imaging device and method of selecting face as main subject
JP5381498B2 (en) Image processing apparatus, image processing program, and image processing method
US9699371B1 (en) Image processing system with saliency integration and method of operation thereof
JP5240305B2 (en) Subject identification program and camera
JP5434057B2 (en) Image display device and image display program
JP6776532B2 (en) Image processing equipment, imaging equipment, electronic devices and image processing programs
JP2018152095A (en) Image processing apparatus, imaging apparatus, and image processing program
JP6326841B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP4770965B2 (en) Image matching device and camera
JP2011147076A (en) Image processing apparatus, image capturing apparatus and program
JP2010245923A (en) Subject tracking device, and camera
JP4661957B2 (en) Image matching device and camera
JP2010197968A (en) Focus evaluation apparatus, camera and program
JP6405638B2 (en) Subject detection device, imaging device, and program
JP6318661B2 (en) Subject detection device, imaging device, and image processing program
JP2019036972A (en) Subject detection device, imaging device and program
JP6326840B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2019008830A (en) Subject detection device, imaging device, and program
JP2018141991A (en) Subject detector
JP2009140285A (en) Image identification device, image identification method, and imaging device

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: 13743264

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13743264

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP