WO2013042768A1 - Image processing device, program, image processing method, and imaging device - Google Patents

Image processing device, program, image processing method, and imaging device Download PDF

Info

Publication number
WO2013042768A1
WO2013042768A1 PCT/JP2012/074230 JP2012074230W WO2013042768A1 WO 2013042768 A1 WO2013042768 A1 WO 2013042768A1 JP 2012074230 W JP2012074230 W JP 2012074230W WO 2013042768 A1 WO2013042768 A1 WO 2013042768A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
unit
color
text
image data
Prior art date
Application number
PCT/JP2012/074230
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
Priority claimed from JP2012206299A external-priority patent/JP2013141200A/en
Priority claimed from JP2012206297A external-priority patent/JP2013080464A/en
Priority claimed from JP2012206298A external-priority patent/JP2013141199A/en
Priority claimed from JP2012206296A external-priority patent/JP2013140559A/en
Application filed by 株式会社ニコン filed Critical 株式会社ニコン
Priority to CN201280039636.6A priority Critical patent/CN103718172A/en
Priority to US14/239,445 priority patent/US20140198234A1/en
Publication of WO2013042768A1 publication Critical patent/WO2013042768A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Definitions

  • the present invention relates to an image processing device, a program, an image processing method, and an imaging device.
  • the present application includes Japanese Patent Application No. 2011-266143 filed on Dec. 5, 2011, Japanese Patent Application No. 2011-206024 filed on Sep. 21, 2011, and Japanese Patent Application No. 2011 filed on Dec. 6, 2011. -266805, Japanese Patent Application No. 2011-267882 filed on December 7, 2011, Japanese Patent Application No. 2012-206296 filed on September 19, 2012, Japanese Patent Application filed on September 19, 2012 Claims priority based on 2012-206297, Japanese Patent Application No. 2012-206298 filed on September 19, 2012, and Japanese Patent Application No. 2012-206299 filed on September 19, 2012. This is incorporated here.
  • character information such as a birthday person name corresponding to an imaging date and an event name corresponding to an imaging date is given to a captured image by registering a birthday of the specific person, an event date and the like in advance.
  • a technique is disclosed (for example, see Patent Document 1).
  • the image is divided into predetermined pattern areas, and a histogram of the distribution regarding the color of each area is created.
  • the most frequently appearing color exceeding a specific threshold is determined as the representative region color of the region.
  • the feature amount of the region is extracted, and based on the determined feature amount of the region and the representative color, an image from which the feature amount is extracted is defined, and an image dictionary is constructed.
  • a representative color of a large area at the top of an image is extracted, and an image dictionary is defined by defining “blue sky”, “cloudy sky”, “night sky”, etc. based on the extracted representative color. It comprised (for example, refer patent document 2).
  • Patent Document 3 a technique for superimposing a text related to a captured image on the captured image is disclosed (for example, see Patent Document 3).
  • a composite image is generated by superimposing text on a non-important area other than an important area in which a relatively important subject is captured in a captured image.
  • an area in which a person is shown is classified as an important area, and text is superimposed on a non-important area that does not include the center of the image.
  • Patent Document 4 a technique for performing predetermined color conversion on image data is disclosed (for example, see Patent Document 4).
  • the image data is classified into image image data, character image data, and non-image image data other than characters, and image image data Is subjected to first color conversion, character image data is subjected to first color conversion or second color conversion, and non-image image data other than characters is subjected to first color conversion or second color conversion. Apply.
  • Patent Document 1 can only add character information registered in advance by a user to a captured image.
  • the font color when the font color is fixed, the contrast between the font color of the text and the color of the image area in which the text is drawn is almost eliminated depending on the contents of the given image, and the readability of the text is significantly reduced.
  • the font color when the font color is fixed or a complementary color calculated from image information is used as the font color, the impression of the image may be greatly changed.
  • An object of one embodiment of the present invention is to provide a technique capable of giving more flexible character information to a captured image.
  • Another object is to provide an image processing device, an imaging device, and a program that can reduce the load of arithmetic processing for labeling an image.
  • Another object is to provide an image processing device, a program, an image processing method, and an imaging device that can synthesize text in an image so that a viewer can easily read the text.
  • Another object is to provide an image processing device, a program, an image processing method, and an imaging device that can synthesize text into an image with an appropriate font color.
  • An image processing apparatus includes an image input unit that inputs a captured image, and a sentence template that inserts a word into a predetermined blank part to complete a sentence.
  • a storage unit for storing a person image template used for creation and a landscape image template used for creating a sentence for a landscape image whose landscape is a subject; and whether the captured image is the person image or the landscape image
  • the sentence template of either the person image template or the landscape image template is read out from the storage unit and read out according to a determination result by the determination unit for determining whether the image is a captured image or the landscape image template
  • a word corresponding to the feature amount or the imaging condition of the captured image is inserted into the blank portion of the sentence template, and the imaging is performed. Characterized in that it comprises a sentence creation unit for creating a text for the image.
  • An image processing apparatus is configured to determine an image input unit to which a captured image is input, a text corresponding to at least one of a feature amount of the captured image and an imaging condition of the captured image. Part, a determination part for determining whether the captured image is a first type image or a second type image different from the first type, and a sentence syntax used for the first type.
  • a storage unit that stores a first syntax and a second syntax that is a syntax of a sentence used for the second type; and the determination unit determines that the captured image is the first type image, The sentence of the first syntax is created using the text determined by the determination unit, and when the determination unit determines that the captured image is the second type image, the determination unit determines The second syntax using text Characterized in that it contains the sentence creation unit that creates a sentence.
  • An imaging apparatus includes an imaging unit that images a subject and generates a captured image, and a person whose subject is a subject as a sentence template that completes a sentence by inserting a word into a predetermined blank part
  • a storage unit that stores a template for a human image used for creating a sentence for an image and a template for a landscape image used for creating a sentence for a landscape image whose scenery is a subject, and the captured image is the person image.
  • a determination unit that determines whether the image is a landscape image, and the storage unit that stores either the person image template or the landscape image template according to a determination result by the determination unit on the captured image.
  • the word corresponding to the feature amount or the imaging condition of the captured image is inserted into the blank part of the sentence template read out from Characterized in that it comprises a sentence creation unit for creating a sentence with respect to the captured image Te.
  • a program includes a person image template used for creating a sentence for a person image in which a person is a subject as a sentence template for completing a sentence by inserting a word into a predetermined blank space, and a landscape.
  • the sentence template of either the person image template or the landscape image template is determined according to a determination step of determining whether the image is a landscape image or a determination result of the determination step for the captured image.
  • An image processing apparatus includes a determination unit that determines a character having a predetermined meaning from a captured image, and whether the captured image is a person image or an image different from the person image.
  • a determination unit for determining a storage unit that stores a first syntax that is a syntax of a sentence used for the person image; and a second syntax that is a syntax of a sentence used for an image different from the person image;
  • the determination unit determines that the image is the person image, the first syntax sentence is output using characters having the predetermined meaning, and the captured image is an image different from the person image.
  • an output unit that outputs the sentence of the second syntax using the character having the predetermined meaning when determined by the determination unit.
  • An image processing apparatus includes an image acquisition unit that acquires captured image data, a scene determination unit that determines a scene from the acquired image data, and a color from the acquired image data.
  • a main color extracting unit that extracts a main color based on a frequency distribution of information; a storage unit in which color information and a first label are associated in advance for each scene; and a main unit extracted from the storage unit.
  • a first label generation unit that reads the first label stored in advance in association with the color and the determined scene, and generates the read first label as a label of the acquired image data; It is characterized by that.
  • An imaging apparatus includes the image processing apparatus described above.
  • a program according to another aspect of the present invention is a program for causing a computer to execute image processing of an image processing apparatus having an imaging unit, an image acquisition procedure for acquiring captured image data, and the acquired image data
  • a scene determination procedure for determining a scene from the main color extraction procedure for extracting a main color based on a frequency distribution of color information from the acquired image data, the extracted main color, color information for each scene
  • a first label generation procedure for reading the first label from a storage unit associated with one label in advance and generating the read first label as a label of the acquired image data; It is made to perform.
  • An image processing apparatus includes: a scene determination unit that determines whether or not a person photographing scene; and a color that is determined from the image data when the scene determination unit determines that the scene is not a person photographing scene.
  • a color extracting unit that extracts information; a storage unit that stores color information and characters having a predetermined meaning in association with each other; and the scene determination unit that determines that the color is not a person-captured scene.
  • a reading unit that reads out the character having the predetermined meaning corresponding to the color information extracted by the extraction unit from the storage unit.
  • An image processing apparatus includes an acquisition unit that acquires image data and text data, a detection unit that detects an edge of the image data acquired by the acquisition unit, and a detection unit that detects the image data and text data.
  • An area determining unit that determines an area in which the text data is arranged in the image data, and an image generating unit that generates an image in which the text data is arranged in the area determined by the area determining unit It is characterized by including these.
  • An image processing apparatus includes an image input unit that inputs image data, an edge detection unit that detects an edge in the image data input by the image input unit, and a text input that inputs text data
  • a region determining unit that determines a combined region of the text data in the image data based on the edge detected by the edge detecting unit, and the text data is combined with the combined region determined by the region determining unit
  • a synthesizing unit a synthesizing unit.
  • the program according to another aspect of the present invention includes a step of inputting image data, a step of inputting text data, a step of detecting an edge in the input image data, and the detected edge based on the detected edge.
  • a step of determining a synthesis region of the text data in the image data and a step of synthesizing the text data with the determined synthesis region are performed by a computer.
  • an image processing method in which an image processing device inputs image data, the image processing device inputs text data, and the image processing device receives the input.
  • An imaging apparatus includes the above-described image processing apparatus.
  • An image processing apparatus includes: a detection unit that detects an edge of image data; and an arrangement region in which characters in the image data are arranged based on the position of the edge detected by the detection unit And an image generation unit that generates an image in which the characters are arranged in the arrangement region determined by the region determination unit.
  • An image processing apparatus includes an image input unit for inputting image data, a text setting unit for setting text data, and the text setting unit for image data input by the image input unit.
  • a text composition area setting section for setting a text composition area, which is an area for synthesizing set text data, and image data input by the image input section and the text composition area set by the text composition area setting section.
  • a font setting unit that sets a font color in which the tone is changed while keeping the hue unchanged, and a font setting unit that sets a font including at least the font color;
  • the text composition area setting is set.
  • Combined image data which is image data obtained by combining the text data set by the text setting unit using a font including at least the font color set by the font setting unit in the text synthesis area set by the unit.
  • a synthesized image generation unit for generating.
  • a program comprising: a step of inputting image data; a step of setting text data; and a text composition which is an area for combining the set text data in the input image data.
  • an image processing method in which an image processing apparatus inputs image data, the image processing apparatus sets text data, and the image processing apparatus receives the input.
  • Setting a text composition area which is an area in which the set text data is synthesized in the image data, and the image processing apparatus comprising a PCCS table based on the input image data and the set text composition area.
  • a step of setting a font color in which the tone is changed with the hue unchanged and setting a font including at least a font color with respect to the tone and hue of the color system; and the image processing apparatus in the input image data A font including at least the set font color in the set text composition area.
  • An imaging apparatus includes the above-described image processing apparatus.
  • An image processing apparatus includes an acquisition unit that acquires image data and text data, an area determination unit that determines a text arrangement area in which the text data is arranged in the image data, and a text A color setting unit that sets a predetermined color in the data; and an image generation unit that generates an image in which the text data of the predetermined color is arranged in the text arrangement region, and the hue of the text arrangement region of the image data
  • the ratio of the value to the hue value of the text data is closer to 1 than the ratio of the tone value of the text arrangement area of the image data to the tone value of the text data.
  • An image processing apparatus includes a determination unit that determines an arrangement region in which characters in image data are arranged, a color setting unit that sets a predetermined color for the characters, and the characters in the arrangement region
  • An image generation unit configured to generate an image, wherein the color setting unit is configured such that a ratio between a hue value of the arrangement region and a hue value of the character is a ratio between a tone value of the arrangement region and a tone value of the character.
  • the predetermined color is set so as to be closer to 1.
  • the text can be synthesized in the image so that the viewer can easily read the text.
  • FIG. 53 is a conceptual diagram illustrating a result of clustering performed on the main region illustrated in FIG. 52. It is an example of the image which the text was added by the text addition part. It is another example of the image which the text was added by the text addition part. It is a figure which shows an example of the correspondence table of a color and a word. It is a figure which shows an example of the correspondence table for a distant view image (2nd scene image). It is a figure which shows an example of the corresponding
  • FIG. 1 is an example of a functional block diagram of an image processing apparatus 1001 according to the first embodiment of the present invention.
  • 2A to 2D are examples of sentence templates stored in the storage unit 1090.
  • FIG. 3A and 3B are examples of words stored in the storage unit 1090.
  • 4A to 4D are explanatory diagrams for explaining extraction of a color arrangement pattern of a captured image.
  • the image processing apparatus 1001 includes an image input unit 1010, a determination unit 1020, a sentence creation unit 1030, a sentence addition unit 1040, and a storage unit 1090, as shown in FIG.
  • the image input unit 1010 inputs a captured image via, for example, a network or a storage medium.
  • the image input unit 1010 outputs the captured image to the determination unit 1020.
  • the storage unit 1090 stores a sentence template that completes a sentence by inserting a word into a predetermined blank part.
  • the storage unit 1090 includes, as a sentence template, a person image template used to create a sentence for an image in which a person is a subject (hereinafter referred to as a person image), and a landscape (also referred to as a second type) as a subject.
  • a landscape image template used for creating a sentence for an image hereinafter referred to as a landscape image.
  • An example of a person image is a portrait (also referred to as a first type).
  • the storage unit 1090 stores two types of person image templates as shown in FIGS. 2A and 2B. 2A and 2B, a blank portion for inserting a word corresponding to the number of subjects (blank portion ⁇ number of people ⁇ ) and a word corresponding to a color arrangement pattern of the captured image are inserted. It has a blank part (shown as a blank part ⁇ adjective ⁇ ).
  • the storage unit 1090 stores two types of landscape image templates as shown in FIGS. 2C and 2D.
  • a blank portion (blank portion ⁇ date ⁇ ) for inserting a word corresponding to the imaging condition (date and time) of the captured image and a word corresponding to the color arrangement pattern of the captured image are inserted. It has a blank part.
  • the landscape image template shown in FIG. 2D includes a blank portion (denoted as blank portion ⁇ place ⁇ ) for inserting a word corresponding to the imaging condition (location) of the captured image, and a word corresponding to the color arrangement pattern of the captured image. It has the blank part which inserts.
  • the person image template described above is a sentence template that is focused on a person imaged as a subject, that is, a sentence template in which a blank portion is set in a sentence from the viewpoint of a person imaged as a subject. is there.
  • the word “spent” in the person image template in FIG. 2A and the word “pose” in the person image template in FIG. 2B express the viewpoint of the person who is captured.
  • the landscape image template described above is a text template that is imaged from the entire captured image, that is, a text template in which a blank portion is set in text from the viewpoint of the photographer who captured the subject.
  • the wording “one piece” in the landscape image template in FIG. 2C and the wording “scenery” in the landscape image template in FIG. 2D express the viewpoint of the photographer.
  • the storage unit 1090 stores a word to be inserted into each blank portion of the sentence template in addition to the sentence template (person image template, landscape image template). For example, as illustrated in FIG. 3A, the storage unit 1090 stores a word related to the number of people as a word to be inserted into the blank portion ⁇ number of people ⁇ in association with the number of subjects of the captured image.
  • the sentence creation unit 1030 reads out a sentence template to be used from the storage unit 1090 and inserts a word in the blank part (described later).
  • the storage unit 1090 is associated with the color arrangement pattern of the captured image as a word to be inserted into the blank portion ⁇ adjective ⁇ of the person image template or the blank portion ⁇ adjective ⁇ of the landscape image template.
  • the color arrangement pattern of the entire region of the captured image has the first color “color 1”, the second color “color 2”, and the third color “color 3” shown in FIG. 4A.
  • the word “cool” is inserted into the blank field ⁇ adjective ⁇ of the person image template.
  • the color arrangement pattern of the entire area of the captured image has the first color “color 2”, the second color “color 1”, and the third color “color 4” shown in FIG. 4B.
  • the word “lively” is inserted into the blank field ⁇ adjective ⁇ of the landscape image template.
  • the above-described colors 1 to 5 are obtained by classifying individual colors actually expressed in the captured image into five colors (five representative colors) based on a standard such as a warm color / cold color.
  • the above-described colors 1 to 5 are obtained by classifying the pixel values of each pixel of the captured image into five colors based on, for example, a warm color / cold color standard.
  • the first color constituting the color arrangement pattern is the color most expressed in the captured image among the colors 1 to 5
  • the second color is the second color in the captured image out of the colors 1 to 5.
  • the third color is the color most expressed in the captured image among the colors 1 to 5.
  • the color having the largest number of pixels classified when the pixel values are classified into colors 1 to 5 is the first color
  • the number of pixels classified when the pixel values are classified into colors 1 to 5 is The second most common color is the second color
  • the third color is the third largest number of pixels.
  • the text creation unit 1030 extracts a color arrangement pattern from the captured image.
  • a color arrangement pattern in a partial area on the captured image may be used instead of the color arrangement pattern in the entire area of the captured image. That is, the sentence creation unit 1030 may insert an adjective corresponding to the color arrangement pattern of a partial area on the captured image into the blank part. Specifically, the text creation unit 1030 determines a predetermined area on the captured image according to whether the captured image is a person image or a landscape image, and according to the determined color arrangement pattern of the predetermined area on the captured image An adjective may be inserted in the blank. For example, when the captured image is a person image as shown in FIG.
  • the sentence creation unit 1030 determines the central area of the human image as a predetermined area, extracts the color arrangement pattern of the central area, An adjective corresponding to the extracted color arrangement pattern may be inserted into the blank section.
  • the text creation unit 1030 determines a region above the landscape image as a predetermined region, and extracts and extracts a color scheme pattern of the above region. Adjectives corresponding to the color arrangement pattern may be inserted into the blank section.
  • the storage unit 1090 associates with the imaging date and time and inserts the word related to the date and time as a word to be inserted into the blank field ⁇ date and time ⁇ (for example, time, “good morning”, “dusk”, “midsummer”). !! ", 7) is memorized.
  • the storage unit 1090 associates with the shooting location with a word related to the location as a word to be inserted into the blank portion ⁇ location ⁇ (for example, “North Country”, “Old City” “Mt. Fuji”, “Kaminarimon”,. ) Is memorized.
  • the determination unit 1020 acquires a captured image from the image input unit 1010.
  • the determination unit 1020 determines whether the acquired captured image is a person image or a landscape image.
  • the determination of the person image / landscape image by the determination unit 1020 will be described in detail.
  • the first threshold value also referred to as “Flow”
  • the second threshold value also referred to as “Fhigh”.
  • R Sf / Sp (1)
  • Sf in the above formula (1) is the size of the face area. Specifically, the length in the longitudinal direction of the rectangle circumscribing the face area (or the length of the major axis of the ellipse surrounding the face area ( Long diameter)) is used.
  • the determination unit 1020 that calculated the ratio R compares the ratio R with the first threshold value Flow. If the determination unit 1020 determines that the ratio R is less than the first threshold value Flow, the determination unit 1020 determines that the captured image is a landscape image. On the other hand, when the determination unit 1020 determines that the ratio R is equal to or greater than the first threshold value Flow, the determination unit 1020 compares the ratio R with the second threshold value Fhigh.
  • the determination unit 1020 determines that the ratio R is equal to or greater than the second threshold Fhigh, the determination unit 1020 determines that the captured image is a person image. On the other hand, when the determination unit 1020 determines that the ratio R is less than the second threshold value Fhigh, the determination unit 1020 determines that the captured image is a landscape image.
  • the determination unit 1020 calculates a ratio R (i) of the size of each face area to the size of the captured image according to the following equation (2).
  • R (i) Sf (i) / Sp (2)
  • Sp in the above formula (2) is the same as that in the above formula (1).
  • Sf (i) in the above formula (2) is the size of the i-th face area. Specifically, the length of the rectangle circumscribing the i-th face area (or the face area) The major axis length (major axis) of the enclosing ellipse is used.
  • the determination unit 1020 that calculated R (i) calculates the maximum value (Rmax) of R (i). That is, the determination unit 1020 calculates the ratio Rmax of the maximum face area size to the size of the captured image.
  • the determination unit 1020 that has calculated the ratio Rmax compares the ratio Rmax with the first threshold value Flow. If the determination unit 1020 determines that the ratio Rmax is less than the first threshold value Flow, the determination unit 1020 determines that the captured image is a landscape image. On the other hand, when the determination unit 1020 determines that the ratio Rmax is greater than or equal to the first threshold value Flow, the ratio Rmax is compared with the second threshold value Fhigh.
  • the determination unit 1020 determines that the ratio Rmax is equal to or greater than the second threshold value Fhigh, the captured image is determined to be a person image. On the other hand, when the determination unit 1020 determines that the ratio Rmax is less than the second threshold value Fhigh, the determination unit 1020 calculates the standard deviation ⁇ of R (i).
  • the following formula (3) is a formula for calculating the standard deviation ⁇ .
  • the determination unit 1020 that has calculated the standard deviation ⁇ compares the standard deviation ⁇ with a third threshold value (also referred to as Fstdev). If the determination unit 1020 determines that the standard deviation ⁇ is less than the third threshold Fstdev, the determination unit 1020 determines that the captured image is a person image. On the other hand, when the determination unit 1020 determines that the standard deviation ⁇ is greater than or equal to the third threshold value Fstdev, the determination unit 1020 determines that the captured image is a landscape image.
  • a third threshold value also referred to as Fstdev
  • the determination unit 1020 when the determination unit 1020 recognizes a plurality of face areas in the captured image, the ratio Rmax of the maximum face area size to the size of the captured image is greater than or equal to the second threshold Fhigh. Determines that the captured image is a person image. In addition, even if the ratio Rmax is less than the second threshold value Fhigh, the determination unit 1020 determines that the standard deviation ⁇ of the ratio R (i) of the plurality of face regions is not greater than the first threshold value Flow. When it is less than the third threshold Fstdev, it is determined that the captured image is a person image.
  • the determination unit 1020 replaces the determination with the standard deviation ⁇ of the ratio R (i) of the plurality of face areas and the third threshold value Fstdev, and the variance ⁇ and the distribution ⁇ of the ratio R (i) of the plurality of face areas
  • the determination may be made using the threshold value.
  • the determination unit 1020 may use the standard deviation (or variance) of the plurality of face regions Sf (i) instead of the standard deviation (or variance) of the ratio R (i) of the plurality of face regions ( In this case, the threshold value for the face area Sf (i) is used).
  • the determination unit 1020 determines (counts) the number of subjects based on the number of face areas having a ratio R (i) equal to or greater than the first threshold value Flow. That is, the determination unit 1020 determines that each face area having a ratio R (i) equal to or greater than the first threshold value Flow is an individual subject, and determines the number of face areas equal to or greater than the first threshold value Flow as the number of subjects. To do.
  • the determination unit 1020 outputs the determination result to the sentence creation unit 1030. Specifically, when the determination unit 1020 determines that the captured image is a person image, the image determination result information indicating the determination result indicating that the captured image is a person image, and the number determination result information indicating the determination result of the number of subjects. Is output to the sentence creation unit 1030. On the other hand, if the determination unit 1020 determines that the captured image is a landscape image, the determination unit 1020 outputs image determination result information indicating a determination result indicating that the image is a landscape image to the sentence creation unit 1030. Also, the determination unit 1020 outputs the captured image acquired from the image input unit 1010 to the text creation unit 1030.
  • the sentence creation unit 1030 acquires a determination result and a captured image from the determination unit 1020.
  • the text creation unit 1030 reads from the storage unit 1090 a text template of either a person image template or a landscape image template according to the acquired determination result. Specifically, when the text creation unit 1030 acquires image determination result information indicating a determination result indicating that the image is a person image, the sentence creation unit 1030 selects from two types of person image templates stored in the storage unit 1090. One of the randomly selected person image templates is read out. In addition, when the text creation unit 1030 acquires image determination result information indicating a determination result indicating that it is a landscape image, the text creation unit 1030 randomly selects from two types of landscape image templates stored in the storage unit 1090. The one person image template thus read is read out.
  • the sentence creation unit 1030 creates a sentence for the captured image by inserting a word corresponding to the feature amount or the imaging condition of the captured image into the blank part of the read sentence template (person image template or landscape image template).
  • the word corresponding to the feature amount is an adjective corresponding to the color arrangement pattern of the captured image, or a word corresponding to the number of subjects (word related to the number of subjects).
  • the word corresponding to the imaging condition of the captured image is a word corresponding to the imaging date and time (word related to the date and time) or a word corresponding to the imaging location (word related to the location).
  • the text creation unit 1030 acquires the number of subjects of the captured image from the number determination result information, and stores it in association with the number of persons.
  • a word word related to the number of people
  • a color arrangement pattern of the captured image is extracted, and a word (person image) stored in association with the extracted color arrangement pattern For example) is read from the storage unit 1090 and inserted into the blank part ⁇ adjective ⁇ to create a sentence for this captured image.
  • the sentence creation unit 1030 Create the sentence "Cool memories spent alone”.
  • the sentence creation unit 1030 reads out words related to the number of people from the storage unit 1090 as in FIG.
  • the adjective for the person image is read out from the storage unit 1090 and inserted into the blank part ⁇ adjective ⁇ to create a sentence for the captured image.
  • the sentence creating unit 1030 Sentence "Hot feeling? Pause with many people! ! Is created.
  • the text creation unit 1030 acquires the imaging date and time from the additional information of the captured image (for example, Exif; Exchangeable Image File Format).
  • the words stored in association with the acquired imaging date and time are read from the storage unit 1090 and inserted into the blank portion ⁇ date and time ⁇ , the color arrangement pattern of this captured image is extracted, and the extracted color arrangement
  • a word (adjective for a landscape image) stored in association with a pattern is read from the storage unit 1090 and inserted into a blank field ⁇ adjective ⁇ to create a sentence for this captured image.
  • the sentence creation unit 1030 displays the sentence “Midsummer! ! . Create a piece that feels hot.
  • the text creation unit 1030 acquires an imaging location from the additional information of the captured image, and stores it in association with the acquired imaging location.
  • a word (a word related to a place) is read from the storage unit 1090 and inserted into a blank part ⁇ place ⁇ , a color arrangement pattern of this captured image is extracted, and a word (landscape) stored in association with the extracted color arrangement pattern
  • the image adjective is read from the storage unit 1090 and inserted into the blank field ⁇ adjective ⁇ , and a sentence for this captured image is created.
  • the sentence creation unit 1030 reads the sentence“ Old city. The soft scenery at that time! Is created.
  • the sentence creation unit 1030 that created the sentence outputs the created sentence and the captured image to the sentence addition unit 1040.
  • the sentence adding unit 1040 acquires a sentence and a captured image from the sentence creating unit 1030.
  • the sentence adding unit 1040 adds (synthesizes) the sentence to the captured image.
  • 5 and 6 are flowcharts showing an example of the operation of the image processing apparatus 1001.
  • the image input unit 1010 inputs a captured image (step S1010).
  • the image input unit 1010 outputs the captured image to the determination unit 1020.
  • the determination unit 20 determines whether or not there is one or more face areas in the captured image (step S1012). If the determination unit 1020 determines that there is one or more face areas in the captured image (step S1012: Yes), the ratio of the size of the face area to the size of the captured image is calculated for each face area (step S1014). ), The maximum value of the ratio is calculated (step S1016).
  • the determination unit 1020 determines whether or not the maximum value calculated in step S1016 is greater than or equal to the first threshold (step S1020). If the determination unit 1020 determines that the maximum value calculated in step S1016 is equal to or greater than the first threshold (step S1020: Yes), the determination unit 1020 determines whether the maximum value is equal to or greater than the second threshold (Ste S1022). If the determination unit 1020 determines that the maximum value is greater than or equal to the second threshold (step S1022: Yes), the determination unit 1020 determines that the captured image is a person image (step S1030).
  • the determination unit 1020 counts the number of face areas having a ratio equal to or higher than the first threshold as the number of subjects (step 1032). Subsequent to step S1032, the determination unit 1020 writes a determination result (image determination result information indicating a determination result indicating that the image is a person image and number determination result information indicating a determination result of the number of subjects) and the captured image as text. The data is output to the creation unit 1030.
  • step S1022 determines whether or not there are two or more face regions in the captured image ( Step S1040). If the determination unit 1020 determines that there are two or more face regions in the captured image (step S1040: Yes), the determination unit 1020 calculates the standard deviation of the ratio calculated in step S1014 (step S1042), and the standard deviation is It is determined whether or not the threshold value is less than 3 (step S1044). If the determination unit 1020 determines that the standard deviation is less than the third threshold (step S1044: Yes), the process proceeds to step S1030.
  • step S1012 determines that there is no face area in the captured image (step S1012: No), or if it is determined in step S1020 that the maximum value is less than the first threshold (step S1020). : No) or when it is determined in step S1040 that there is only one face area in the captured image (step S1040: No), the determination unit 1020 determines that the captured image is a landscape image (step S1050). ). Subsequent to step S1050, the determination unit 1020 outputs a determination result (image determination result information indicating a determination result indicating that the image is a landscape image) to the sentence creation unit 1030.
  • a determination result image determination result information indicating a determination result indicating that the image is a landscape image
  • step S1040 described above is a process for preventing a captured image having one face area from being always determined to be a person image.
  • step S1040 described above there are a very large number of very small face areas with the same size in addition to the face area having the largest ratio of the size of the face area to the size of the captured image. If so, the standard deviation is small, so that it may be determined that the image is a person image. Therefore, in order to reduce the above-described determination as much as possible, the determination unit 1020 may determine whether there are two or more face regions having a predetermined size. For example, the determination unit 1020 may determine whether there are two or more face regions in which the above-described ratio is equal to or greater than a first threshold.
  • the sentence creation unit 1030 reads either a person image template or a landscape image template from the storage unit 1090 according to the determination result acquired from the determination unit 1020.
  • a word corresponding to the feature amount or the imaging condition of the captured image is inserted into the blank portion of the read sentence template to create a sentence for the captured image (step S1100).
  • FIG. 6 shows details of step S1100.
  • the text creation unit 1030 determines whether or not the captured image is a person image (step S1102). Specifically, when the sentence creation unit 1030 has acquired image determination result information indicating a determination result indicating that the image is a person image as a determination result from the determination unit 1020, the captured image is a person image. If image determination result information indicating a determination result indicating that the image is a landscape image has been acquired, it is determined that the captured image is not a person image.
  • the document creation unit 1030 reads a person image template from the storage unit 1090 (step S1104). Specifically, the sentence creation unit 1030 reads one person image template randomly selected from the two types of person image templates stored in the storage unit 1090.
  • the sentence creation unit 1030 inserts a word corresponding to the number of subjects in the blank portion ⁇ number of people ⁇ of the person image template (step S1110). Specifically, the text creation unit 1030 acquires the number of subjects from the number determination result information, reads words stored in association with the number of people (words related to the number of people) from the storage unit 1090, and reads the person image. Insert it into the blank field ⁇ number of people ⁇ of the template.
  • the sentence creation unit 1030 inserts a word corresponding to the color arrangement pattern of the captured image (person image) into the blank portion ⁇ adjective ⁇ of the person image template (step S1120). Specifically, the sentence creation unit 1030 extracts a color arrangement pattern in the central area of the captured image (person image) and stores a word (adjective for person image) stored in association with the color arrangement pattern. It is read from the part 1090 and inserted into the blank part ⁇ adjective ⁇ of the person image template.
  • step S1102 when it is determined in step S1102 that the captured image is a landscape image (step S1102: No), the text creation unit 1030 reads a landscape image template from the storage unit 1090 (step S1106). Specifically, the text creation unit 1030 reads one landscape image template randomly selected from the two types of landscape image templates stored in the storage unit 1090.
  • the sentence creation unit 1030 inserts a word corresponding to the color arrangement pattern of the captured image (landscape image) into the blank field ⁇ adjective ⁇ of the landscape image template (step S1130). Specifically, the sentence creation unit 1030 extracts a color arrangement pattern of the upper region of the captured image (landscape image), and stores a word (landscape image adjective) stored in association with the color arrangement pattern. It is read out from 1090 and inserted into the blank field ⁇ adjective ⁇ of the landscape image template.
  • the sentence creation unit 1030 determines whether or not a blank part ⁇ date ⁇ exists in the read sentence template (step S1132).
  • the landscape image template in FIG. 2C has a blank space ⁇ date ⁇ , but the person image template in FIGS. 2A and 2B and the landscape image in FIG. 2D.
  • the blank template ⁇ date and time ⁇ does not exist in the template for use. Therefore, if the landscape image template of FIG. 2C has been read in step S1106, the text creation unit 1030 determines that there is a blank portion ⁇ date ⁇ , and in step S1104, the person image of FIG. 2A or FIG. 2B.
  • the template for reading is read out, or when the landscape image template of FIG. 2D is read out in step S1106, it is determined that the blank part ⁇ date ⁇ does not exist.
  • step S1132: Yes the sentence creation unit 1030 determines that there is a blank part ⁇ date ⁇ in the read sentence template.
  • step S1140 the text creation unit 1030 acquires the imaging date / time from the additional information of the captured image (landscape image), and stores the word (word related to the date / time) stored in association with the imaging date / time. Is inserted into the blank field ⁇ date and time ⁇ of the landscape image template.
  • step S1132: No the process skips step S1140 and proceeds to step S1142.
  • the sentence creation unit 1030 determines whether or not a blank part ⁇ place ⁇ exists in the read sentence template (step S1142).
  • the landscape image template in FIG. 2D has a blank portion ⁇ place ⁇ , but the person image template in FIGS. 2A and 2B and the landscape image in FIG. 2C.
  • the blank template ⁇ place ⁇ does not exist in the template for use.
  • the text creation unit 1030 determines that a blank portion ⁇ place ⁇ exists, and in step S1104, the person image of FIG. 2A or FIG. 2B.
  • the template for reading is read out, or when the landscape image template of FIG. 2C is read out in step S1106, it is determined that the blank portion ⁇ place ⁇ does not exist.
  • Step S1142 When the sentence creating unit 1030 determines that the blank part ⁇ place ⁇ exists in the read sentence template (step S1142: Yes), the word corresponding to the imaging condition (place) of the captured image is changed to a blank part ⁇ place ⁇ of the sentence template. (Step S1150). Specifically, the text creation unit 1030 acquires an imaging location from the additional information of the captured image (landscape image), and stores a word (word related to the location) stored in association with the imaging location. Is inserted into the blank field ⁇ place ⁇ of the landscape image template. Then, the flowchart shown in FIG. 6 ends, and the process returns to the flowchart shown in FIG. On the other hand, when the sentence creating unit 1030 determines that the blank part ⁇ place ⁇ does not exist in the read sentence template (step S1142: No), step S1150 is skipped and the process returns to the flowchart shown in FIG.
  • the sentence creation unit 1030 that created the sentence outputs the created sentence and the captured image to the sentence addition unit 1040.
  • the sentence adding unit 1040 acquires a sentence and a captured image from the sentence creating unit 1030.
  • the text adding unit 1040 adds (synthesizes) the text acquired from the text creating unit 1030 to the captured image acquired from the text creating unit 1030. Then, the flowchart shown in FIG. 5 ends.
  • FIGS. 7A to 7E are examples of captured images to which sentences are added by the sentence adding unit 1040.
  • FIG. The captured image in FIG. 7A is determined to be a person image because one person's face is greatly reflected. That is, in this captured image, it is determined that the maximum value of the ratio of the size of the face area to the size of the captured image (the ratio of this one face area) is greater than or equal to the second threshold (step S1022 (Yes )).
  • the captured image in FIG. 7B is determined to be a human image because the faces of the two people are shown large. That is, in this captured image, it is determined that the maximum value of the ratio of the size of the face area to the size of the captured image is greater than or equal to the second threshold (step S1022 (Yes)).
  • the captured image in FIG. 7C has a face of a certain size and has a uniform size, and thus is determined to be a person image. That is, in this captured image, although the maximum value of the ratio of the size of the face area to the size of the captured image is greater than or equal to the first threshold and less than the second threshold (step S1022 (No)), the standard deviation is It is determined that it is less than the third threshold (step S1044 (Yes)).
  • the captured image in FIG. 7D includes a face of a certain size, but is not uniform in size, and thus is determined to be a landscape image. That is, in this captured image, although the maximum value of the ratio of the size of the face area to the size of the captured image is greater than or equal to the first threshold and less than the second threshold (step S1022 (No)), the standard deviation is It is determined that the value is greater than or equal to the third threshold (step S1044 (No)).
  • the captured image in FIG. 7E is determined to be a landscape image because no face is captured (step S1012 (No)).
  • the image processing apparatus 1001 classifies captured images into human images and landscape images, and for human images, creates a text for human images using a human image template stored in advance, For landscape images, landscape image text is created using a prestored landscape image template, so that more flexible text information can be given according to the captured content.
  • the image input unit 1010 may store the captured image in the storage unit 1090 when the captured image is input, and the determination unit 1020 may read and acquire a desired captured image from the storage unit 1090 when necessary.
  • the example in which the number of colors of the first color constituting the color arrangement pattern uses five colors 1 to 5 has been described.
  • the number of colors may be 6 or more. Good.
  • the second color and the third color has been described, but the number of colors constituting the color arrangement pattern is not limited to this.
  • a color arrangement pattern composed of two colors or four or more colors may be used.
  • the sentence creating unit 1030 reads one person image template randomly selected from the two types stored in the storage unit 1090 when the captured image is a person image.
  • the mode of selecting one of the two types of person image templates to be read is not limited to this.
  • the text creation unit 1030 may select one person image template designated by the user via the operation unit (not shown).
  • the text creation unit 1030 may select one landscape image template designated by the user via the designation receiving unit.
  • a word to be inserted into the blank portion of the selected template is always obtained from the storage unit 1090.
  • a word to be inserted into the blank portion of the selected template is obtained from the storage unit 1090.
  • another template may be selected again. For example, when the landscape image template of FIG. 2D having a blank portion ⁇ location ⁇ is selected for creating a sentence of a certain captured image, but the imaging location cannot be acquired from the additional information of the captured image, the blank portion The landscape image template may be selected again in FIG. 2C without ⁇ place ⁇ .
  • the image processing apparatus 1001 has described the example in which the person image template having the blank portion ⁇ number ⁇ and the blank portion ⁇ adjective ⁇ is stored in the storage unit 1090.
  • the number and type of parts are not limited to this.
  • the person image template may have one or both of the blank part ⁇ date ⁇ and the blank part ⁇ location ⁇ in addition to the blank part ⁇ number of people ⁇ and the blank part ⁇ adjective ⁇ .
  • the person image template includes a blank part ⁇ blank part ⁇ illuminance ⁇ ) for inserting words according to the imaging condition (illuminance) of the captured image, and the imaging condition of the captured image ( It may have a blank part ⁇ blank part ⁇ temperature ⁇ ) for inserting a word corresponding to (temperature).
  • the person image template does not necessarily have the blank portion ⁇ number of people ⁇ .
  • An example of the case where the person image template does not have a blank portion ⁇ number of people ⁇ is a case where a sentence including words corresponding to the number of subjects is not created for the person image.
  • the image processing apparatus 1001 naturally needs to store a person image template having a blank part ⁇ number of persons] in the storage unit 1090. There is no.
  • Another example of the case where the person image template does not have a blank portion ⁇ number of people ⁇ is a case where a plurality of person image templates corresponding to the number of subjects are stored in the storage unit 1090.
  • the image processing apparatus 1001 inserts a word corresponding to the number of subjects in the blank portion ⁇ number ⁇ for the person image.
  • a person image template corresponding to the number of subjects is read from the storage unit 1090, and a sentence including words according to the number of subjects is created. .
  • the image processing apparatus 1001 also includes a landscape image template having a blank portion ⁇ date ⁇ and a blank portion ⁇ adjective ⁇ , and a landscape image template having a blank portion ⁇ location ⁇ and a blank portion ⁇ adjective ⁇ .
  • the number and type of blank sections included in the landscape image template are not limited to this.
  • the above-described blank portion ⁇ illuminance ⁇ , blank portion ⁇ temperature ⁇ , and the like may be included.
  • the example in which the image processing apparatus 1001 stores two types of person image templates in the storage unit 1090 has been described, but one type or three or more types of person image templates are stored in the storage unit 1090. May be.
  • the image processing apparatus 1001 may store one type or three or more types of landscape image templates in the storage unit 1090.
  • the image processing apparatus 1001 has described the example in which the sentence is added to the captured image when the sentence for the captured image is created.
  • the image may be stored in the storage unit 1090 in association with the captured image.
  • the storage unit 1090 also has a first syntax that is a syntax of a sentence used for an image of a first type (for example, portrait) and a syntax of a sentence that is used for an image of a second type (for example, a landscape). Two syntaxes may be stored.
  • the sentence creating unit 1030 is determined when the determination unit 1020 determines that the captured image is the first type image (that is, the determination unit When it is determined that 1020 is a human image), a sentence having the first syntax is created using a predetermined text, and when the determination unit 1020 determines that the captured image is a second type image (ie, When the determination unit 1020 determines that the image is a landscape image), a sentence having the second syntax may be created using a predetermined text.
  • the image processing apparatus 1001 includes a determination unit (not shown) that determines text corresponding to at least one of the feature amount of the captured image and the imaging condition (text according to the feature amount of the captured image or / and the imaging condition). You may do it. For example, when the image input unit 1010 inputs (acquires) a captured image, the determination unit determines a text corresponding to the feature amount or / and the imaging condition of the captured image as the predetermined text used for document creation. More specifically, for example, a plurality of texts are stored in advance in the storage unit 1090 in association with the feature amounts and the imaging conditions, and the determination unit determines whether the feature amount or / or from the plurality of texts in the storage unit 1090. The text corresponding to the imaging condition is selected.
  • the sentence generation unit 1030 when the determination unit 1020 determines that the captured image is the first type image, the sentence generation unit 1030 generates a sentence of the first syntax using the text determined by the determination unit as described above.
  • the determination unit 1020 determines that the captured image is the second type image, the determination unit creates a sentence of the second syntax using the text determined as described above.
  • FIG. 8 is an example of a functional block diagram of an imaging apparatus 1100 according to the second embodiment of the present invention.
  • the imaging device 1100 according to the present embodiment includes an imaging unit 1110, a buffer memory unit 1130, an image processing unit (image processing device) 1140, a display unit 1150, a storage unit 1160, a communication unit 1170, and an operation unit. 1180, a CPU (Central Processing Unit) 1190, and a bus 1300.
  • an imaging unit 1110 includes an imaging unit 1110, a buffer memory unit 1130, an image processing unit (image processing device) 1140, a display unit 1150, a storage unit 1160, a communication unit 1170, and an operation unit.
  • 1180 Central Processing Unit
  • CPU Central Processing Unit
  • the imaging unit 1110 includes an optical system 1111, an imaging element 1119, and an A / D (Analog to Digital) conversion unit 1120.
  • the optical system 1111 includes one or more lenses.
  • the image sensor 1119 converts, for example, an optical image formed on the light receiving surface into an electric signal and outputs the electric signal to the A / D converter 1120.
  • the image sensor 1119 uses the image data (electric signal) obtained when a still image capturing instruction is received via the operation unit 1180 as captured image data (electric signal) of the captured still image as an A / D.
  • the data is output to the conversion unit 1120 or stored in the storage medium 1200 via the A / D conversion unit 1120 or the image processing unit 1140.
  • the image sensor 1119 captures moving image data (electrical signals) continuously captured at predetermined intervals obtained when a moving image capturing instruction is received via the operation unit 1180.
  • Data (electrical signal) is output to the A / D conversion unit 1120 or stored in the storage medium 1200 via the A / D conversion unit 1120 or the image processing unit 1140.
  • the image sensor 1119 uses image data (electrical signal) obtained continuously as through image data (captured image) (electrical signal) in a state where no imaging instruction is received via the operation unit 1180.
  • the data is output to the / D conversion unit 1120 or continuously output to the display unit 1150 via the A / D conversion unit 1120 and the image processing unit 1140.
  • optical system 1111 may be attached to and integrated with the imaging device 1100, or may be detachably attached to the imaging device 1100.
  • the A / D conversion unit 1120 performs analog / digital conversion on the electrical / electronic signal (analog signal) of the image converted by the image sensor 1119, and captures image data (captured image) that is a digital signal obtained by this conversion. Output.
  • the imaging unit 1110 is controlled by the CPU 1190 based on the instruction content received from the user through the operation unit 1180 and the set imaging conditions, and forms an optical image via the optical system 1111 on the imaging element 1119.
  • a captured image based on the optical image converted into a digital signal by the A / D converter 1120 is generated.
  • the imaging conditions define conditions at the time of imaging such as an aperture value and an exposure value, for example.
  • the imaging conditions can be stored in the storage unit 1160 and referred to by the CPU 1190, for example.
  • the image data output from the A / D conversion unit 1120 is stored based on the set image processing flow conditions, for example, the image processing unit 1140, the display unit 1150, the buffer memory unit 1130, (via the communication unit 1170). Input to one or more of the media 1200.
  • the image processing flow condition is a flow for processing image data such as outputting image data output from the A / D conversion unit 1120 to the storage medium 1200 via the image processing unit 1140, for example.
  • the image processing flow conditions can be stored in the storage unit 1160 and referred to by the CPU 1190, for example.
  • an electrical signal of an image obtained when the imaging device 1119 receives a still image imaging instruction via the operation unit 1180 is input to the A / D conversion unit 1120 as an electrical signal of the captured still image.
  • the image data of the still image output from the A / D conversion unit 1120 is stored in the storage medium 1200 via the image processing unit 1140.
  • an electrical signal of a moving image continuously captured at a predetermined interval obtained when the imaging element 1119 receives a moving image capturing instruction via the operation unit 1180 is used as an electrical signal of the captured moving image as A /
  • the image data of the moving image output from the A / D conversion unit 1120 is stored in the storage medium 1200 via the image processing unit 1140.
  • the electrical signal of a continuously obtained image is output to the A / D conversion unit 1120 as an electrical signal of a through image.
  • the live view image data output from the A / D conversion unit 1120 is continuously output to the display unit 1150 via the image processing unit 1140.
  • the image data output from the A / D conversion unit 1120 is directly input to the image processing unit 1140.
  • a configuration may be used, or the image data output from the A / D converter 1120 is stored in the buffer memory unit 1130, and the image data stored in the buffer memory unit 1130 is input to the image processing unit 1140.
  • a configuration may be used.
  • the image processing unit 1140 executes image processing on the image data stored in the buffer memory unit 1130 based on the image processing conditions stored in the storage unit 1160. Details of the image processing unit 1140 will be described later. Note that the image data stored in the buffer memory unit 1130 is image data input to the image processing unit 1140. For example, the image data read from the above-described captured image data, through image data, or the storage medium 1200 is read. This is taken image data.
  • the image processing unit 1140 performs predetermined image processing on the input image data.
  • image data to be input to the image processing unit 1140 there is image data output from the A / D conversion unit 1120.
  • image data stored in the buffer memory unit 1130 is read out.
  • image data stored in the storage medium 1200 can be read out and input via the communication unit 1170.
  • the operation unit 1180 includes, for example, a power switch, a shutter button, a cross key, a confirmation button, and other operation keys.
  • the operation unit 1180 receives a user operation input by being operated by the user, and outputs it to the CPU 1190.
  • the display unit 1150 is a liquid crystal display, for example, and displays image data, an operation screen, and the like. For example, the display unit 1150 displays a captured image to which text is added by the image processing unit 1140.
  • the display unit 1150 can input and display image data that has been subjected to predetermined image processing by the image processing unit 1140, and can output image data output from the A / D conversion unit 1120, a buffer Image data read from the memory unit 1130 or image data read from the storage medium 1200 can be input and displayed.
  • the storage unit 1160 stores various information.
  • the buffer memory unit 1130 temporarily stores image data captured by the imaging unit 1110.
  • the buffer memory unit 1130 temporarily stores the image data read from the storage medium 1200.
  • the communication unit 1170 is connected to a removable storage medium 1200 such as a card memory, and writes (stores) captured image data to the storage medium 1200, reads image data from the storage medium 1200, or The image data stored in the storage medium 1200 is erased.
  • the storage medium 1200 is a storage unit that is detachably connected to the imaging apparatus 1100, and stores, for example, image data (captured / captured image data) generated by the imaging unit 1110.
  • the CPU 1190 controls each component included in the imaging device 1100.
  • the bus 1300 is connected to the imaging unit 1110, the CPU 1190, the operation unit 1180, the image processing unit 1140, the display unit 1150, the storage unit 1160, the buffer memory unit 1130, and the communication unit 1170, and outputs from each unit.
  • the transferred image data and control signals are transferred.
  • the image processing unit 1140 of the imaging device 1100 corresponds to the determination unit 1020, the text creation unit 1030, and the text addition unit 1040 of the image processing device 1001 according to the first embodiment.
  • the storage unit 1160 of the imaging device 1100 corresponds to the storage unit 1090 of the image processing device 1001 according to the first embodiment.
  • the image processing unit 1140 executes the processes of the determination unit 1020, the sentence creation unit 1030, and the sentence addition unit 1040 of the image processing apparatus 1001 according to the first embodiment.
  • the storage unit 1160 stores at least information stored in the storage unit 1090 of the image processing apparatus 1001 according to the first embodiment.
  • a program for executing each process of the image processing apparatus 1001 according to the first embodiment is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed.
  • the “computer system” includes hardware such as an OS (Operating System) and peripheral devices.
  • the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
  • Computer-readable recording medium refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM (Read Only Memory), a writable nonvolatile memory such as a flash memory, or a CD (Compact Disc) -ROM.
  • USB Universal Serial Bus
  • a storage device such as a USB memory connected via an I / F (interface) or a hard disk built in a computer system.
  • the “computer-readable recording medium” means a volatile memory (for example, DRAM (Dynamic DRAM) in a computer system that becomes a server or a client when a program is transmitted through a network such as the Internet or a communication line such as a telephone line. Random Access Memory)), etc., which hold programs for a certain period of time.
  • the program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium.
  • the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.
  • the program may be for realizing a part of the functions described above. Furthermore, what can implement
  • FIG. 9 is a schematic block diagram illustrating a configuration of the imaging system 2001 according to the present embodiment.
  • the imaging device 2100 illustrated in FIG. 9 includes an imaging unit 2002, a camera control unit 2003, an image processing unit 2004, a storage unit 2005, a buffer memory unit 2006, a display unit 2007, an operation unit 2011, a communication unit 2012, a power supply unit 2013, and a bus. 2015 is provided.
  • the imaging unit 2002 includes a lens unit 2021, an imaging element 2022, and an AD conversion unit 2023.
  • the imaging unit 2002 images a subject and generates image data.
  • the imaging unit 2002 is controlled by the camera control unit 2003 based on the set imaging conditions (for example, aperture value, exposure, etc.), and the imaging element 2022 captures the optical image of the subject input via the lens unit 2021. Form an image on the surface.
  • the imaging unit 2002 converts the analog signal output from the imaging element 2022 into a digital signal in the AD conversion unit 2023, and generates image data.
  • the lens unit 2021 described above may be attached to and integrated with the imaging device 2100, or may be detachably attached to the imaging device 2100.
  • the imaging element 2022 outputs an analog signal obtained by photoelectrically converting the optical image formed on the imaging surface to the AD conversion unit 2023.
  • the AD conversion unit 2023 converts the analog signal input from the image sensor 2022 into a digital signal, and outputs image data that is the converted digital signal.
  • the imaging unit 2002 outputs image data of a captured still image in response to a still image shooting operation in the operation unit 2011. Further, the imaging unit 2002 outputs image data of moving images continuously captured at a predetermined interval in accordance with a moving image shooting operation in the operation unit 2011. Then, still image data and moving image data captured by the imaging unit 2002 are recorded in the storage medium 2200 via the buffer memory unit 2006 and the image processing unit 2004 under the control of the camera control unit 2003. Further, the imaging unit 2002 outputs image data obtained continuously at a predetermined interval as through image data (through image) in a shooting standby state in which no shooting operation is performed in the operation unit 2011. The through image data obtained by the imaging unit 2002 is displayed on the display unit 2007 via the buffer memory unit 2006 and the image processing unit 2004 under the control of the camera control unit 2003.
  • the image processing unit 2004 executes image processing on the image data stored in the buffer memory unit 2006 based on the image processing conditions stored in the storage unit 2005.
  • the image data stored in the buffer memory unit 2006 or the storage medium 2200 is, for example, still image data, through-image data, or moving image data captured by the imaging unit 2002, or the storage medium 2200.
  • the storage unit 2005 stores predetermined shooting conditions, image processing conditions, reproduction control conditions, display control conditions, recording control conditions, output control conditions, and the like for controlling the imaging apparatus 2100.
  • the storage unit 2005 is a ROM.
  • the storage unit 2005 may record image data of captured moving images and image data of still images.
  • the storage unit 2005 may be a flash memory or the like.
  • the buffer memory unit 2006 is used as a work area when the camera control unit 2003 controls the imaging apparatus 2100. Still image data, through image data, or moving image data captured by the imaging unit 2002, or image data read from the storage medium 2200 is buffered in the course of image processing under the control of the camera control unit 2003. Unit 2006 is temporarily stored.
  • the buffer memory unit 2006 is, for example, a RAM (Random Access Memory).
  • the display unit 2007 is a liquid crystal display, for example, and is an image based on image data captured by the imaging unit 2002, an image based on image data read from the storage medium 2200, a menu screen, or the operation of the imaging device 2100. Displays information about status and settings.
  • the operation unit 2011 includes an operation switch for an operator to input an operation to the imaging apparatus 2100.
  • the operation unit 2011 includes a power switch, a release switch, a mode switch, a menu switch, an up / down / left / right selection switch, a confirmation switch, a cancel switch, and other operation switches.
  • Each of the switches provided in the operation unit 2011 outputs an operation signal corresponding to each operation to the camera control unit 2003 in response to the operation.
  • a removable storage medium 2200 such as a card memory is inserted into the communication unit 2012.
  • the image data is written to, read from, or deleted from the storage medium 2200 via the communication unit 2012.
  • the storage medium 2200 is a storage unit that is detachably connected to the imaging device 2100.
  • image data generated by being captured by the imaging unit 2002 is recorded therein.
  • the image data recorded on the storage medium 2200 is, for example, an Exif file.
  • the power supply unit 2013 supplies power to each unit included in the imaging apparatus 2100.
  • the power supply unit 2013 includes, for example, a battery, and converts the voltage of power supplied from the battery into the operating voltage in each of the above-described units.
  • the power supply unit 2013 supplies the converted power of the operating voltage to the above-described units under the control of the camera control unit 2003 based on the operation mode (for example, the shooting operation mode or the sleep mode) of the imaging device 2100.
  • the bus 2015 is connected to an imaging unit 2002, a camera control unit 2003, an image processing unit 2004, a storage unit 2005, a buffer memory unit 2006, a display unit 2007, an operation unit 2011, and a communication unit 2012, and image data output from each unit. And transfer control signals.
  • the camera control unit 2003 controls each unit included in the imaging device 2100.
  • FIG. 10 is a block diagram of the image processing unit 2004 according to the present embodiment.
  • the image processing unit 2004 includes an image acquisition unit 2041, an image identification information acquisition unit 2042 (scene determination unit), a color space vector generation unit 2043, a main color extraction unit 2044, a table storage unit 2045, A label generation unit 2046, a second label generation unit 2047, and a label output unit 2048 are provided.
  • the image acquisition unit 2041 reads the image data captured by the imaging unit 2002 and the image identification information stored in association with the image data from the storage medium 2200 via the bus 2015.
  • Image data read by the image acquisition unit 2041 is image data selected by the user of the imaging system 2001 by operating the operation unit 2011.
  • the image acquisition unit 2041 outputs the acquired image data to the color space vector generation unit 2043.
  • the image acquisition unit 2041 outputs the acquired image identification information to the image identification information acquisition unit 2042.
  • FIG. 11 is a diagram illustrating an example of image identification information stored in association with image data in the storage medium 2200 according to the present embodiment.
  • the left column is an example item
  • the right column is an example of information.
  • items stored in association with image data are: imaging date / time, overall image resolution, shutter speed, aperture value (F value), ISO sensitivity, photometry mode, presence / absence of flash use, scene Mode, still image / moving image, etc.
  • These pieces of image identification information are information set by the photographer using the operation unit 2011 of the imaging system 2001 at the time of imaging and information automatically set by the imaging apparatus 2100. Further, the Exif standard information stored in association with the image data may be used as the image identification information.
  • “scene” (also referred to as a shooting mode) is a combination pattern such as shutter speed, F value, ISO sensitivity, and focal length preset in the imaging apparatus 2100. These combination patterns are preset according to the object to be imaged, stored in the storage medium 2200, and manually selected by the user from the operation unit 2011.
  • the scene is, for example, portrait, landscape, sport, night view portrait, party, beach, snow, sunset, night view, close-up, cooking, museum, fireworks, backlight, children, pets, and the like.
  • the image identification information acquisition unit 2042 extracts the shooting information set in the captured image data from the image identification information output by the image acquisition unit 2041, and uses the extracted shooting information as the first label.
  • the data is output to the generation unit 2046.
  • the shooting information is information necessary for the first label generation unit 2046 to generate the first label, such as a scene and shooting date / time.
  • the color space vector generation unit 2043 converts the image data output from the image acquisition unit 2041 into a predetermined color space vector.
  • the predetermined color space is, for example, HSV (Hue (Hue), Saturation (Saturation), Brightness (Brightness))).
  • the color space vector generation unit 2043 classifies all pixels of the image data for each color vector, detects the frequency for each color vector, and generates a color vector frequency distribution.
  • the color space vector generation unit 2043 outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044.
  • the image data is HSV
  • the color vector is expressed as the following equation (4).
  • i, j, and k are natural numbers of 0 to 100, respectively, when the hue is normalized to 0 to 100%.
  • the main color extraction unit 2044 extracts three colors as main colors in order of frequency from the information indicating the frequency distribution of the color vectors output from the color space vector generation unit 2043, and generates information indicating the extracted main colors as a first label. To the unit 2046. In addition, a color with high frequency is a color with many pixels of the same color vector. The information indicating the main color is the color vector of Expression (4) and the frequency (number of pixels) for each color vector. In the present embodiment, the main color extraction unit 2044 may be configured by a color space vector generation unit 2043 and a main color extraction unit 2044.
  • a first label is stored in association with each scene and each combination of main colors.
  • FIG. 12 is a diagram illustrating an example of combinations of primary colors and first labels stored in the table storage unit 2045 according to the present embodiment.
  • the first color having the highest frequency
  • the second color having the second highest frequency after the first color
  • the second frequency having the second highest frequency.
  • a first label is defined in advance for each combination of the three colors of the third color and for each scene, and is stored in the table storage unit 2045. For example, when the first color is color 1, the second color is color 2, and the third color is color 3, the first label of scene 1 is label (1, 1), and the label of scene n is label (1 , N).
  • the first color is the color m
  • the second color is the color m
  • the third color is the color m
  • the first label of the scene 1 is the label (m, 1)
  • the label of the scene n is the label ( m, n).
  • the first label generation unit 2046 is stored in association with the shooting information output by the image identification information acquisition unit 2042 and the information indicating the main color output by the main color extraction unit 2044.
  • the label is read from the table storage unit 2045.
  • the first label generation unit 2046 outputs information indicating the read first label and information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047.
  • the first label generation unit 2046 determines a scene using, for example, information included in Exif that is imaging information.
  • the second label generation unit 2047 extracts the frequency for each color vector from the information indicating the main color output from the main color extraction unit 2044, normalizes the frequency of the three color vectors using the extracted frequency, and outputs the three main colors. Calculate the color ratio.
  • the second label generation unit 2047 generates a modification label (third label) that modifies the first label based on the calculated ratio of the three main colors, and the first label generation unit 2046 outputs the generated modification label.
  • the first label is modified by being modified to one label to generate a second label for the image data.
  • the second label generation unit 2047 outputs information indicating the generated second label to the label output unit 2048.
  • the label output unit 2048 stores information indicating the second label output from the second label generation unit 2047 in the table storage unit 2045 in association with the image data.
  • the label output unit 2048 stores information indicating the label output from the second label generation unit 2047 in the storage medium 2200 in association with the image data.
  • FIG. 13 is a diagram illustrating an example of main colors of image data according to the present embodiment.
  • the horizontal axis is a color vector
  • the vertical axis is the frequency of a color vector (color information).
  • Example of FIG. 13, the color space vector generation unit 2043, the color decomposed image data into HSV vector (HSV (i m, j m, k m); m is a natural number from 0 to 100) a graph of the frequency distribution of It is.
  • FIGS. 13, 14 ⁇ / b> A, and 14 ⁇ / b> B are diagrams illustrating an example of labeling of main colors extracted in FIG.
  • the color vectors in FIGS. 13, 14 ⁇ / b> A, and 14 ⁇ / b> B will be described assuming that the scene mode is portrait image data, for example.
  • FIG. 14A is an example of the first color, the second color, and the third color extracted in FIG. As shown in FIG. 14A, they are schematically shown in the order of the color vectors shown in FIG. 13 from the left.
  • the first label generation unit 2046 reads out the first label stored in association with the combination of the first color, the second color, and the third color extracted by the main color extraction unit 2044 from the table storage unit 2045.
  • the first label of the combination of the first color, the second color, and the third color is stored as “fun”.
  • the widths of the first color, the second color, and the third color before normalization are L2001, L2002, and L2003, and the widths L2001, L2002, and L2003 are equal in length.
  • the length L2010 is the sum of the widths L2001, L2002, and L2003.
  • the extracted first color, second color, and third color are normalized with frequency, and the widths of the first color, the second color, and the third color are set to L2001 ′, L2002 ′, and L2003 ′. It is a figure after correcting as follows.
  • the total width L2010 is the same as in FIG. 14A.
  • the second label generation unit 2047 since the frequency of the first color is higher than the frequencies of the other second and third colors, the second label generation unit 2047 reads the first label “pleasant” read by the first label generation unit 2046. ”Is generated based on a predetermined rule, the decoration label“ Very ”for modifying the first label“ pleasant ”.
  • the predetermined rule is that when the first color is more frequent than the predetermined threshold value than the other second color and the third color, the second label generation unit 2047 uses the modified label “
  • the first label is modified by generating the “very” and modifying the generated modified label to the first label “fun” to generate the second label “very fun”.
  • the modification label is, for example, a word that emphasizes the first label.
  • the width or area of the three colors extracted by the main color extraction unit 2044 is 1: 1: 1.
  • the widths or areas of the three colors are corrected as shown in FIG. 14B.
  • the second label generation unit 2047 modifies the first label by modifying “very” as the modification label to the first label. 2 labels.
  • the ratio of the first color is larger than about 50% and smaller than 67% of the entire L2010, the second label generation unit 2047 determines that there is no decoration label.
  • the second label generation unit 2047 sets the first label as the second label without correcting it.
  • the second label generation unit 2047 modifies the first label by modifying “first” as the decoration label, and changes the second label Label.
  • the second label generation unit 2047 generates a modification label to be modified according to the first label. For example, for each first label, a modifiable modification label may be stored in advance in association with the table storage unit 2045.
  • FIGS. 15A to 17B are diagrams of sports image data and color vectors according to the present embodiment.
  • FIG. 15A shows sports image data
  • FIG. 15B is a graph of sports color vectors.
  • 16A and 16B are diagrams of portrait image data and color vectors according to the present embodiment.
  • FIG. 16A shows portrait image data
  • FIG. 16B is a graph of portrait color vectors.
  • 17A and 17B are views of landscape image data and color vectors according to the present embodiment.
  • FIG. 17A is image data of a landscape
  • FIG. 17B is a graph of a landscape color vector.
  • the horizontal axis is a color vector
  • the vertical axis is frequency (number of pixels).
  • the image data of FIG. 15A is decomposed into color vectors for each pixel, and the frequency (number of pixels) of each color vector is graphed as shown in FIG. 15B.
  • the main color extraction unit 2044 extracts, for example, three colors c2011, c2012, and c2013 having a large number of pixels from such color vector information.
  • the image data of FIG. 16A is decomposed into color vectors for each pixel, and the frequency (number of pixels) of each color vector is graphed as shown in FIG. 16B.
  • the main color extraction unit 2044 extracts, for example, three colors c2021, c2022, and c2023 having a large number of pixels from such color vector information.
  • the image data of FIG. 17A is decomposed into color vectors for each pixel, and the frequency (number of pixels) of each color vector is graphed as shown in FIG. 17B.
  • the main color extraction unit 2044 extracts, for example, three colors c2031, c2032, and c2033 having a large number of pixels from such color vector information.
  • FIG. 18 is a diagram for explaining an example of a first label of a combination of main colors for each scene according to the present embodiment.
  • rows represent scenes, and columns represent color vectors.
  • the hue, saturation, and intensity of the HSV of the color combination are, for example, color 1 (94, 100, 25) (maroon , Maroon), color 2 is (8, 100, 47) (cigarette color, coffee brown), and color 3 is (81, 100, 28) (deep purple, Dusky Violet).
  • the hue, saturation, and intensity of the HSV of the color vector are, for example, that the color 4 is (1, 69, 100) (rose, rose), and the color 5 is (13, 25, 100) (ivory color, ivory) and color 6 is (52, 36, 91) (light blue, aqua blue).
  • the hue, saturation, and intensity of the HSV of the color vector are, for example, that color 7 is (40, 65, 80) (dark blue magnetic color, emerald) and color 8 is ( 0, 0, 100) (white, white), and color 9 is (59, 38, 87) (salvia, salvia blue).
  • the first label whose scene is a portrait is stored in the table storage unit 2045 as “dandy”.
  • the first label of the scene is landscape is stored in the table storage unit 2045 as “interesting”.
  • the first label in which the scene is sports even in the same color combination is stored in the table storage unit 2045 as “(Rugby style) masculine”.
  • the combination of colors is (color 4, color 5, color 6)
  • the first label whose scene is portrait is “childish” in the table storage unit 2045. It is remembered.
  • the first label of a scene that is a scene of the same color combination (color 4, color 5, and color 6) is stored in the table storage unit 2045 as “soft”.
  • the first label in which the scene is a sport with the same color combination (color 4, color 5, and color 6) is stored in the table storage unit 2045 as “(tennis style) lively”.
  • the table storage unit 2045 indicates that the first label whose scene is portrait is “youthful”. Is remembered.
  • the first label whose scene is landscape with the same color combination (color 7, color 8, and color 9) is stored in the table storage unit 2045 as “(fresh green image) refreshing”.
  • the first label in which the scene is sport even in the same color combination (color 7, color 8, and color 9) is stored in the table storage unit 2045 as “(Sea sports style) refreshing”. Also, as shown in FIG. 18, the information stored in the table storage unit 2045 stores not only the color combination and the first label of the adjective or adverb but also the word representing the image in association with each other. Also good. Note that the word representing an image is, for example, a rugby image or a fresh green image.
  • FIG. 19 is a diagram illustrating an example of a first label based on time, season, and color vector according to the present embodiment.
  • the color vector is HSV image data and the color combination (color 7, color 8, and color 9) described in FIG.
  • the columns represent time and season, and the rows are labels of each time and season for color combinations (color 7, color 8, color 9).
  • the first label of the combination of colors (color 7, color 8, color 9) is “fresh” when the time is morning, “rainy” when the time is noon, In the case of night, it is stored in the table storage unit 2045 that “dawn is near”. As shown in FIG.
  • the first label of the color combination (color 7, color 8, color 9) is “chilly” when the season is spring, “cool” when the season is summer, and “cool” when the season is autumn When the season is winter, “cold” is stored in the table storage unit 2045.
  • the first label generation unit 2046 reads the first label from the table storage unit 2045 based on the shooting date and time included in the image identification information acquired by the image identification information acquisition unit 2042. Further, as shown in FIG. 19, the first label may be the same in spring and autumn for the same color combination (color 7, color 8, and color 9).
  • FIG. 20 is a flowchart of label generation performed by the imaging apparatus 2100 according to this embodiment.
  • Step S2001 The imaging unit 2002 of the imaging apparatus 2100 captures an image based on the control of the camera control unit 2003.
  • the imaging unit 2002 converts the captured image data into digital data by the AD conversion unit 2023, and stores the converted image data in the storage medium 2200.
  • the camera control unit 2003 captures image identification information including imaging conditions set or selected by the user by the operation unit 2011 at the time of imaging and information automatically set or acquired by the imaging device 2100 at the time of imaging.
  • the image data is stored in the storage medium 2200 in association with the image data.
  • Step S2002 the image acquisition unit 2041 of the image processing unit 2004 stores the image data captured by the imaging unit 2002 via the bus 2015 and the image identification information stored in association with the image data. Read from the medium 2200. Note that the image data read by the image acquisition unit 2041 is image data selected by the user of the imaging system 2001 by operating the operation unit 2011. Next, the image acquisition unit 2041 outputs the acquired image data to the color space vector generation unit 2043. Next, the image acquisition unit 2041 outputs the acquired image identification information to the image identification information acquisition unit 2042. After step S2002, the process proceeds to step S2003.
  • Step S2003 the image identification information acquisition unit 2042 extracts shooting information set in the imaged image data captured from the image identification information output by the image acquisition unit 2041, and uses the extracted shooting information as the first label. The data is output to the generation unit 2046. After step S2003 ends, the process proceeds to step S2004.
  • Step S2004 the color space vector generation unit 2043 converts the image data output from the image acquisition unit 2041 into a vector in a predetermined color space.
  • the predetermined color space is, for example, HSV.
  • the color space vector generation unit 2043 classifies all pixels of the image data for each generated color vector, detects the frequency for each color vector, and generates a color vector frequency distribution.
  • the color space vector generation unit 2043 outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044.
  • step S2004 ends, the process proceeds to step S2005.
  • Step S2005 Next, the main color extraction unit 2044 extracts three colors as the main colors in order of frequency from the information indicating the frequency distribution of the color vectors output from the color space vector generation unit 2043, and the extracted main colors are extracted. The indicated information is output to the first label generation unit 2046. After step S2005, the process proceeds to step S2006.
  • the first label generation unit 2046 is stored in association with the photographing information output by the image identification information acquisition unit 2042 and the information indicating the main color output by the main color extraction unit 2044.
  • One label is read from the table storage unit 2045.
  • the first label generation unit 2046 outputs information indicating the read first label and information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047.
  • the first label generation unit 2046 is stored in the table storage unit 2045 in association with the shooting information output by the image identification information acquisition unit 2042 and the information indicating the main color output by the main color extraction unit 2044.
  • the first label is not stored, for example, it is determined whether or not the first label of another scene is recorded for the same main color.
  • the first label generation unit 2046 When it is determined that the first label of another scene is recorded for the same main color, the first label generation unit 2046 reads the first label of another scene for the same main color from the table storage unit 2045. Also good. On the other hand, if it is determined that the first label of another scene is not recorded for the same main color, the first label generation unit 2046 associates the main color with the color vector that is closest to the main color and has the same scene. The stored label may be read from the table storage unit 2045. After step S2006 ends, the process proceeds to step S2007.
  • Step S2007 Next, the second label generation unit 2047 normalizes the frequency of each color vector from the information indicating the main color output by the main color extraction unit 2044, and calculates the ratio of the three main colors. After step S2007 ends, the process proceeds to step S2008.
  • Step S2008 Next, the second label generation unit 2047 generates a modification label that modifies the first label output by the first label generation unit 2046 based on the calculated ratio of the three main colors, and the generated modification The first label is modified by modifying the first label with the label to generate a second label.
  • the second label generation unit 2047 outputs information indicating the generated second label to the label output unit 2048.
  • step S2008 ends, the process proceeds to step S2009.
  • Step S2009 the label output unit 2048 stores information indicating the second label output by the second label generation unit 2047 in the table storage unit 2045 in association with the image data.
  • step S2006 when the first label stored in association with the information indicating the scene and the information indicating the main color is not stored in the table storage unit 2045, the label output unit 2048 determines in step S2006.
  • the read first label and the extracted main color may be associated with each other and newly stored in the table storage unit 2045.
  • generation process which the image process part 2004 performs is complete
  • the imaging apparatus 2100 according to the present embodiment can extract the main color that is the feature amount of the image data with a small amount of calculation compared to the conventional technique. Furthermore, the imaging apparatus 2100 according to the present embodiment performs scene discrimination using information included in Exif, and the number of scenes stored in the table storage unit 2045 is selected based on the discrimination result. Scenes can be identified by the amount of computation. As a result, the imaging apparatus 2100 of the present embodiment can generate many labels with less arithmetic processing and fewer options for image data than in the related art. That is, the image processing unit 2004 extracts three main colors having a high frequency from color vectors obtained by converting image data into a color space, and stores the first label stored in advance in association with the extracted main colors. Extract.
  • the image processing unit 2004 is extracted from the image data. Even if the main colors are the same, different first labels can be generated for each scene, time, and season, so that an optimum label for image data can be generated for each scene. Further, the image processing unit 2004 normalizes the frequencies of the three main colors, generates a modified label that modifies the generated first label according to the ratio of the most frequent first color, and generates the generated modification The first label is modified by modifying the first label with the label to generate a second label.
  • the image processing unit 2004 generates the second label by modifying the first label with the modification label based on the ratio of the color arrangement of the main color of the image data. Compared with the case where labels are generated by extracting colors, a more optimal label can be generated for image data for each scene.
  • the color space vector generation unit 2043 generates color vectors of image data in the HSV color space.
  • RGB red, green, blue
  • a luminance signal a luminance signal
  • two color difference signals YCrCb or YPbPr HLS based on hue, saturation, and lightness
  • Lab which is a kind of complementary color space
  • PCCS Japan Color Coordinating System
  • the color space vector generation unit 2043 has described an example in which the frequency distribution of the color vector is generated and information indicating the frequency distribution of the generated color vector is output to the main color extraction unit 2044.
  • the color space vector generation unit 2043 may detect the frequency for each color vector and output information indicating the frequency for each detected color vector to the main color extraction unit 2044. Also in this case, for example, each RGB value stored in the table storage unit 2045 may be a color selected by the table creator from an interval of every 1 or 10 or the like.
  • the label output unit 2048 has described the example in which the information indicating the label is stored in the table storage unit 2045 in association with the image data.
  • the image data selected by the user may be displayed on the display unit 2007 in a superimposed manner.
  • the first label and the second label are examples of adjectives or adverbs.
  • the first label and the second label may be nouns, for example.
  • the first label is, for example, “exhilarating”, “rejuvenation”, “dandy”, and the like.
  • the main color extraction unit 2044 extracts three colors that are separated by a predetermined distance between adjacent color vectors. It may be.
  • the adjacent color vectors are, for example, color vectors (50, 50, 50) and (50, 50, 51) when the image data is HSV.
  • the distance between adjacent colors may be set based on a known threshold value that can identify a human visual color. For example, WEB256 colors recommended for use in WEB and monotone 256 colors that can be expressed in black and white may be used.
  • the main color extraction unit 2044 performs a smoothing process on the frequency distribution of the color vectors generated by the color space vector generation unit 2043 using a known method before calculating the main color. Also good.
  • the color space vector generation unit 2043 may perform a color reduction process using a known method before generating a color space vector. For example, the color space vector generation unit 2043 may reduce the image data to WEB color.
  • the main color extraction unit 2044 has described an example in which three frequently used colors are extracted from image data as main colors. However, the number of colors to be extracted is not limited to three, and two or more colors are extracted. If it is.
  • HSV (0,0,0), (1,0, 0), (1, 1, 0)... (100, 100, 99), (100, 100, 100) may be selected by the table creator.
  • HSV (0,0,0), (10,0,0), (10,10,0) (100, 100, 90), (100, 90, etc.) 100, 100, 100) may be selected by the table creator.
  • the interval of each value in the color vector to a predetermined value such as 10 or the like, the capacity to be stored in the table storage unit 2045 can be reduced, and the calculation amount can also be reduced.
  • FIG. 21 is a block diagram of the image processing unit 2004a according to the present embodiment.
  • the image processing unit 2004a includes an image acquisition unit 2041a, an image identification information acquisition unit 2042, a color space vector generation unit 2043, a main color extraction unit 2044, a table storage unit 2045, a first label generation unit 2046a, A second label generation unit 2047, a label output unit 2048, a feature amount extraction unit 2241, and a scene determination unit 2242 are provided.
  • functional units having the same functions as those of the third embodiment are denoted by the same reference numerals, and description thereof is omitted.
  • the image acquisition unit 2041a reads the image data captured by the imaging unit 2002 and the image identification information stored in association with the image data from the storage medium 2200 via the bus 2015.
  • the image acquisition unit 2041a outputs the acquired image data to the color space vector generation unit 2043 and the feature amount extraction unit 2241.
  • the image acquisition unit 2041a outputs the acquired image identification information to the image identification information acquisition unit 2242.
  • the feature amount extraction unit 2241 extracts feature amounts from the image data output by the image acquisition unit 2041a by a known method. Known methods use, for example, methods such as image binarization, smoothing, edge detection, and contour detection. The feature amount extraction unit 2241 outputs information indicating the extracted feature amount to the scene determination unit 2242.
  • the scene discrimination unit 2242 discriminates the scene of the image data acquired by the image acquisition unit 2041a using a known method based on the information indicating the feature amount output by the feature amount extraction unit 2241.
  • the known method used for scene discrimination is, for example, as in the prior art described in Patent Document 2, the scene discrimination unit 2242 divides image data into a plurality of predetermined areas, and each area is divided. Based on the feature amount, it is determined whether a person is reflected in the image data or whether the sky is reflected. Based on the determination result, the scene determination unit 2242 determines the scene of the image data.
  • the scene determination unit 2242 outputs information indicating the determined scene to the first label generation unit 2046a.
  • the scene determination unit 2242 may be configured by a feature amount extraction unit 2241 and a scene determination unit 2242.
  • the first label generation unit 2046a stores the first label stored in association with the information indicating the scene output from the scene determination unit 2242 and the information indicating the main color output from the main color extraction unit 2044. Read from 2045. The first label generation unit 2046a outputs the information indicating the read first label and the information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047.
  • step S2001 and step S2002 in the same manner as in the third embodiment.
  • Step S2003 Next, the feature amount extraction unit 2241 extracts the feature amount from the image data output by the image acquisition unit 2041a by a known method, and outputs information indicating the extracted feature amount to the scene determination unit 2242. .
  • the scene discriminating unit 2242 extracts a scene, which is shooting information of the image data acquired by the image acquisition unit 2041a, using a known method based on the information indicating the feature amount output by the feature amount extraction unit 2241.
  • the information indicating the acquired scene is output to the first label generation unit 2046a.
  • the image processing unit 2004a performs steps S2004 and S2005 in the same manner as in the third embodiment. After step S2005, the process proceeds to step S2006.
  • Step S2006 Next, the first label generation unit 2046a stores the information indicating the scene output by the scene determination unit 2242 and the information indicating the main color output by the main color extraction unit 2044 in association with each other. One label is read from the table storage unit 2045. Next, the first label generation unit 2046a outputs information indicating the read first label and information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047. After step S2006 is completed, the image processing unit 2004a performs steps S2007 to S2009 in the same manner as in the third embodiment.
  • the image processing unit 2004a discriminates scenes of captured image data using a predetermined method, and performs the third implementation based on the determined scenes and the three main colors extracted from the image data.
  • the label is generated in the same way as the form.
  • the image processing unit 2004a can generate an optimum label for the image data even when the image identification information is not stored in the storage medium 2200 in association with the image data.
  • the shooting information is also generated. It may be used to determine the scene.
  • the image processing unit 2004a may extract information indicating the date and time of image capture from the image identification information, and generate a label based on the extracted image capture date and scene determined from the image data. More specifically, when the scene is “landscape” and the imaging date is “autumn”, the first label stored in association with the scenes “landscape”, “autumn”, and main colors is read out and read out. A label may be generated based on the two first labels. Alternatively, the main color and the first label may be stored in the table storage unit 2045 with the scene as “autumn scenery”.
  • FIG. 22 is a block diagram of the image processing unit 2004b according to the embodiment of the present embodiment.
  • the image processing unit 2004b includes an image acquisition unit 2041b, an image identification information acquisition unit 2042b, a color space vector generation unit 2043b, a main color extraction unit 2044, a table storage unit 2045, a first label generation unit 2046, A second label generation unit 2047, a label output unit 2048, and an area extraction unit 2341 are provided.
  • functional units having the same functions as those of the third embodiment are denoted by the same reference numerals, and description thereof is omitted.
  • the image acquisition unit 2041b reads the image data captured by the imaging unit 2002 and the image identification information stored in association with the image data from the storage medium 2200 via the bus 2015.
  • the image acquisition unit 2041b outputs the acquired image data to the region extraction unit 2341 and the color space vector generation unit 2043b.
  • the image acquisition unit 2041b outputs the acquired image identification information to the image identification information acquisition unit 2042b.
  • the image identification information acquisition unit 2042b extracts shooting information set in the imaged image data captured from the image identification information output by the image acquisition unit 2041b, and uses the extracted shooting information as a first label generation unit 2046 and a region extraction unit. 2341.
  • the region extraction unit 2341 extracts a region for extracting a main color from the image data output from the image identification information acquisition unit 2042b based on the shooting information output from the image identification information acquisition unit 2042b.
  • the region extraction unit 2341 extracts image data of a region for extracting the extracted main color from the image data output by the image identification information acquisition unit 2042b, and outputs the image data of the extracted region to the color space vector generation unit 2043b.
  • a region to be extracted from the entire image may be set in advance for each scene. For example, when the scene is “landscape”, the area is two-thirds from the top of the image data.
  • the area has a predetermined size at the center of the image data.
  • the region from which the feature amount is extracted may be extracted as a region for extracting the main color.
  • a plurality of areas may be extracted from the image data.
  • the scene determination unit 2242 in FIG. 21 performs face detection using a technique such as feature amount extraction.
  • the scene determination unit 2242 detects the main color from each of the detected regions.
  • the first label generation unit 2046 and the second label generation unit 2047 may generate a plurality of labels for each detected main color.
  • determination part 2242 may output a discrimination
  • the color space vector generation unit 2043b converts the image data output from the region extraction unit 2341 into a vector of a predetermined color space.
  • the predetermined color space is, for example, HSV.
  • the color space vector generation unit 2043b classifies all pixels of the image data for each generated color vector, detects the frequency for each color vector, and generates a color vector frequency distribution.
  • the color space vector generation unit 2043b outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044.
  • FIG. 23 is a flowchart of label generation performed by the imaging apparatus 2100 according to the present embodiment.
  • the imaging device 2100 performs step S2001 as in the third embodiment. After step S2001, the process proceeds to step S2101.
  • Step S2101 the image acquisition unit 2041b of the image processing unit 2004b stores the image data captured by the imaging unit 2002 via the bus 2015 and the image identification information stored in association with the image data. Read from the medium 2200. Next, the image acquisition unit 2041b outputs the acquired image data to the region extraction unit 2341 and the color space vector generation unit 2043b. Next, the image acquisition unit 2041b outputs the acquired image identification information to the image identification information acquisition unit 2042b. After step S2101, the process proceeds to step S2003.
  • Step S2003 The image processing unit 2004b performs step S2003 in the same manner as in the third embodiment. After step S2003 is completed, the process proceeds to step S2102.
  • Step S2102 the area extraction unit 2341 selects main colors from image data output from the image identification information acquisition unit 2042b by a predetermined method based on the shooting information output from the image identification information acquisition unit 2042b. Extract the area to be extracted.
  • the region extraction unit 2341 extracts image data of a region from which the extracted main color is extracted from the image data output from the image identification information acquisition unit 2042b, and the color space vector generation unit 2043b extracts the image data of the extracted region. Output to.
  • step S2102 the process proceeds to step S2103.
  • Step S2103 the color space vector generation unit 2043b converts the image data of the region output from the region extraction unit 2341 into a vector of a predetermined color space.
  • the color space vector generation unit 2043b classifies all pixels of the image data for each generated color vector, detects the frequency for each color vector, and generates a color vector frequency distribution.
  • the color space vector generation unit 2043b outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044.
  • step S2103 ends, the process proceeds to step S2005.
  • the image processing unit 2004b performs steps S2005 to S2009 in the same manner as in the third embodiment.
  • the image processing unit 2004b extracts a region for extracting a main color from captured image data based on shooting information such as a scene. Then, the image processing unit 2004b generates a label in the same manner as in the third embodiment, based on the three main colors extracted from the image data of the region from which the main color is extracted. As a result, the image processing unit 2004b extracts the main color from the image data of the area corresponding to the scene, and generates a label based on the extracted main color of the area. Therefore, the third and fourth embodiments. As compared with the above, it is possible to generate an optimum label for image data suitable for a scene.
  • FIG. 24 is a diagram illustrating an example of extracting a plurality of color vectors from image data according to the present embodiment.
  • the horizontal axis represents the color vector
  • the vertical axis represents the frequency.
  • description will be made assuming that the main color extraction unit 2044 has extracted the first color vector c2021, the second color vector c2022, and the third color vector c2023 as in FIG. 16B.
  • the main color extraction unit 2044 extracts the color vectors c2024, c2025, c2026 as the fourth main color.
  • the table storage unit 2045 stores labels for each scene including the fourth color in addition to the first to third colors described in FIG.
  • the main color extraction unit 2044 reads the first label of the combination of the first color to the fourth color stored in the table storage unit 2045, and stores the stored first label. To extract.
  • the main color extraction unit 2044 selects the first label read from the table storage unit 2045 first. Or you may make it select at random.
  • the main color extraction unit 2044 may select three colors as main colors from the extracted four colors. In this case, the main color extraction unit 2044 may calculate the degree of approximation of the four extracted colors, and calculate the three colors having a low degree of approximation as the main color. For example, in FIG. 24, the degree of color approximation will be described assuming that four color vectors c2022 to c2025 are extracted as the first to fourth colors. The main color extraction unit 2044 reduces the four extracted colors from an 8-bit color space to, for example, a 7-bit color space.
  • the main color extraction unit 2044 determines that the color vectors c2024 and c2025 are approximate colors. Then, the main color extracting unit 2044 selects one of the color vectors c2024 and c2025 as the third main color. In this case, in the frequency distribution of FIG. 24, the main color extraction unit 2044 selects a color vector having a larger distance away from the first color vector c2022 and the second color vector c2023 in the horizontal axis direction. You may make it like, You may select at random. In addition, if the four color vectors remain separated even when the color is reduced to the 7-bit color space, the color space vector generation unit 2043 performs the color reduction until the four color vectors are integrated into the three color vectors.
  • the image processing unit 2004 extracts four frequently used colors from color vectors obtained by converting image data into a color space, and stores them in association with the four extracted colors in advance. Extract the first label. Since the first label is stored in advance in association with the four extracted main color vectors for each piece of shooting information, for example, for each scene, for each time or season, the image processing unit 2004 is extracted from the image data.
  • the image processing unit 2004 normalizes the frequencies of the four main colors, and adds a second label for emphasizing the first label to the generated first label according to the ratio of the most frequent first color. Appends to generate a label.
  • the image processing unit 2004 can generate an optimum label for image data based on the four main colors as compared with the third to fifth embodiments.
  • the image processing unit 2004 extracts three main colors from the extracted four main colors by subtractive color or the like, and performs label generation processing on the extracted three main colors as in the third embodiment. Do. As a result, the image processing unit 2004 can generate an optimum label for the image data even if the image data has a small frequency vector frequency difference.
  • the main colors to be extracted are not limited to four colors, and may be more than that.
  • the first label corresponding to the number of extracted main colors may be stored in the table storage unit 2045.
  • the main color extracting unit 2044 performs color reduction and integrates the approximate colors into three main colors from the extracted plurality of main colors. You may make it extract again.
  • the main color extracting unit 2044 first performs the first group of the first color to the third color and the remaining fourth color to the sixth color in descending order of frequency. Separate into a second group.
  • the fourth color has fewer pixels than the third color and more pixels than the fifth color, and the fifth color has fewer pixels than the fourth color.
  • the first label generation unit 2046 extracts a first label corresponding to the first group and a first label corresponding to the second group.
  • generation part 2046 uses a 1st label with a modification label about the two 1st labels extracted in this way according to the frequency of the 1st color or the 4th color like 3rd Embodiment. It may be modified by modification to generate a plurality of labels.
  • the second label generation unit 2047 may integrate a plurality of labels generated in this way to generate one label.
  • the second label generation unit 2047 when the label by the first group is “very refreshing” and the label by the second group is “a little childish”, the second label generation unit 2047 “is very refreshing and a little childish”. May be generated.
  • the second label generation unit 2047 determines which of the two labels is arranged first in the second label generation unit 2047 and can generate an appropriate label.
  • a processing function unit that performs a language analysis process (not shown) may be provided.
  • the color space vector generation unit 2043 (including 2043b) generates a color vector frequency distribution for each divided region divided into an upper half and a lower half in the image data of FIG. 17A.
  • the main color extraction unit 2044 extracts each main color by three colors from the frequency vector frequency distribution for each divided area.
  • the first label generation unit 2046 may extract a label for each region from the table storage unit 2045.
  • the label output unit 2048 may store the plurality of labels generated in this manner in the storage medium 2200 in association with the image data.
  • the example in which the three main colors and the first label are associated with each other and stored in the table storage unit 2045 has been described.
  • a single color is used for each scene.
  • the first label may be associated with each other and stored in the table storage unit 2045.
  • the table storage unit 2045 stores the three main colors and the first label in association with each scene, and further stores the single color and the first label for each scene. You may make it memorize
  • the image processing unit 2004 detects four colors as main colors as in the sixth embodiment, only the first group of the first to third colors, and the remaining fourth colors.
  • the label may be read from the table storage unit 2045 as a single color.
  • the first label generation unit 2046 has two extracted main colors (first color and second color). Read each first label.
  • the second label generation unit 2047 normalizes the two main colors based on the frequency of the extracted two main colors, and generates a modified label for the first color label based on the ratio of the first colors.
  • the second label of the first color may be generated by modifying and correcting the first label of the first color with the generated modified label.
  • the second label generation unit 2047 generates two labels, the first label of the first color and the first label of the second color generated as described above, or the first label of the first color And the first label of the second color may be integrated to generate one label.
  • the image data selected by the user is read from the storage medium 2200
  • the image data used for the label generation process is stored in the storage medium 2200 as a raw (RAW) signal.
  • RAW Raster Image Writer
  • JPEG Joint Photographic Experts Group
  • thumbnail image data reduced for display on the display unit 2007 is stored in the storage medium 2200
  • a label may be generated using the thumbnail image data.
  • the color space vector generation unit 2043 (including 2043b) determines the resolution of the image data output from the image acquisition unit 2041 (including 2041a and 2041b) in advance. Image data reduced in resolution may be generated, and the frequency of color vectors and main colors may be extracted from the reduced image data.
  • a program for realizing the function of each unit of the image processing unit 2004 in FIG. 10, the image processing unit 2004a in FIG. 21, or the image processing unit 2004b in FIG. 22 is recorded on a computer-readable recording medium.
  • the program recorded on the recording medium may be read into a computer system and executed to execute the processing of each unit.
  • the program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
  • FIG. 25 is a block diagram showing a functional configuration of an image processing unit 3140 (image processing unit 1140 in FIG. 8) according to the present embodiment.
  • An image processing unit (image processing apparatus) 3140 includes an image input unit 3011, a text input unit 3012, a first position input unit 3013, an edge detection unit 3014, a face detection unit 3015, and a character size determination unit 3016.
  • the cost calculation unit 3017, the region determination unit 3018, and the synthesis unit 3019 are included.
  • the image input unit 3011 inputs still image data or moving image data.
  • the image input unit 3011 outputs the input image data to the edge detection unit 3014 and the character size determination unit 3016.
  • the image input unit 3011 may input image data via a network or a storage medium, for example.
  • an image indicated by the image data input to the image input unit 3011 is set as an input image.
  • an XY coordinate system is defined with the width direction of the rectangular image format in the input image as the X-axis direction and the direction (height direction) orthogonal to the X-axis direction as the Y-axis direction.
  • the text input unit 3012 inputs text data corresponding to the input image.
  • the text data corresponding to the input image is data relating to the text to be superimposed on the input image, and includes text, initial character size, line feed position, number of rows, number of columns, and the like.
  • the initial character size is an initial value of the character size of the text, and is the character size designated by the user.
  • the text input unit 3012 outputs the input text data to the character size determination unit 3016.
  • the first position input unit 3013 receives an input of an important position in the input image (hereinafter, referred to as an important position (first position)). For example, the first position input unit 3013 displays an input image on the display unit 1150 and sets a position designated by the user on the touch panel installed on the display unit 1150 as an important position. Alternatively, a first position input unit 3013 may receive an input of the direct coordinate values of key position (x 0, y 0). The first position input unit 3013 outputs the coordinate value (x 0 , y 0 ) of the important position to the cost calculation unit 3017. Note that the first position input unit 3013 sets a predetermined position (for example, the center of the input image) set in advance as the important position when the user does not input the important position.
  • a predetermined position for example, the center of the input image
  • the edge detection unit 3014 detects an edge in the image data input from the image input unit 3011 using, for example, the Canny algorithm. Then, the edge detection unit 3014 outputs the image data and data indicating the position of the edge detected from the image data to the cost calculation unit 3017.
  • the edge is detected using the Canny algorithm. For example, the edge is detected based on an edge detection method using a differential filter or a high-frequency component in the result of two-dimensional Fourier transform. A method or the like may be used.
  • the face detection unit 3015 detects a human face in the image data input from the image input unit 3011 by pattern matching or the like. Then, the face detection unit 3015 outputs the image data and data indicating the position of the person's face detected from the image data to the cost calculation unit 3017.
  • the character size determination unit 3016 determines the text based on the image size (width and height) of the image data input from the image input unit 3011 and the number of rows and columns of the text data input from the text input unit 3012. Determine the character size of the data. Specifically, the character size determination unit 3016 sets f satisfying the following expression (5) as the character size so that all texts in the text data can be combined with the image data.
  • m is the number of text data columns
  • l is the number of text data rows
  • L ( ⁇ 0) is a parameter indicating the ratio of line spacing to character size.
  • w is the width of the image area in the image data
  • h is the height of the image area in the image data.
  • Expression (5) represents that the width of the text is smaller than the width of the image area in the image data, and the height of the text is smaller than the height of the image area in the image data.
  • the character size determination unit 3016 gradually decreases the character size until Expression (5) is satisfied.
  • the character size determining unit 3016 sets the initial character size included in the text data as the character size of the text data. Then, the character size determining unit 3016 outputs the text data and the character size of the text data to the region determining unit 3018.
  • the cost calculation unit 3017 calculates the cost of each coordinate position (x, y) in the image data based on the position of the edge in the image data, the position of the person's face, and the important position.
  • the cost represents importance in the image data. For example, the cost calculation unit 3017 calculates the cost of each position so that the cost of the position where the edge is detected by the edge detection unit 3014 is high.
  • the cost calculation unit 3017 increases the cost as it is closer to the important position, and lowers the cost as it is farther from the important position.
  • the cost calculation unit 3017 increases the cost of the area having the human face.
  • the cost calculation unit 3017 uses, for example, a global cost image c g (x, y) indicating the cost based on the important position (x 0 , y 0 ) using a Gaussian function expressed by the following equation (6). ) Is generated.
  • x 0 is the X coordinate value of the critical position
  • y 0 is the Y-coordinate values of the critical position
  • S 1 (> 0) is a parameter that determines how the cost spreads in the width direction (X-axis direction)
  • S 2 (> 0) is a parameter that determines how the cost spreads in the height direction (Y-axis direction). It is.
  • Parameter S 1 and parameter S 2 can be set by the user, for example, by setting screen or the like. Than to change the parameters S 1 and parameter S 2, it is possible to adjust the shape of the distribution in the global cost image.
  • a global cost image is generated by a Gaussian function.
  • the cost calculation unit 3017 generates a face cost image c f (x, y) indicating the cost based on the position of the person's face by the following equations (7) and (8).
  • (x (i) , y (i) ) is the center position of the i (1 ⁇ i ⁇ n) -th face among the detected n faces, and s (i) is the i-th face It is a size. That is, the cost calculation unit 3017 generates a face cost image in which the pixel value in the human face region is “1” and the pixel value in the unexpected region is “0”.
  • the cost calculation unit 3017 generates an edge cost image c e (x, y) indicating the cost based on the edge by the following equation (9).
  • the cost calculation unit 3017 generates an edge cost image in which the pixel value of the edge portion is “1” and the pixel value of the region other than the edge is “0”.
  • the edge portion may be a position where the edge is present, or may be a region including the position where the edge is present and its periphery.
  • the cost calculation unit 3017 generates a final cost image c (x, y) based on the global cost image, the face cost image, and the edge cost image by the following equation (10).
  • C g ( ⁇ 0) is a parameter of the weighting coefficient of the global cost image
  • C f ( ⁇ 0) is a parameter of the weighting coefficient of the face cost image
  • C e ( ⁇ 0) is the weighting of the edge cost image.
  • This is a coefficient parameter.
  • the ratio of the parameter C g , the parameter C e and the parameter C f can be changed by the user on the setting screen or the like.
  • the final cost image c (x, y) shown in Expression (10) is normalized so that 0 ⁇ c (x, y) ⁇ 1.
  • the cost calculation unit 3017 outputs the image data and the final cost image of the image data to the region determination unit 3018.
  • the parameter C g , the parameter C e and the parameter C f may be 1 or less.
  • the image processing unit 3140 may automatically change the ratio of the parameter C g , the parameter C e, and the parameter C f according to the input image. For example, if the input image is a landscape image, the larger the parameter C g than other parameters. Further, when the input image is a portrait (person image) increases the parameter C f than other parameters. Further, when the input image is a large building images building or the like increases the parameter C e than other parameters. Specifically, the cost calculation unit 3017, when the face of a person is detected by the face detection unit 3015 determines the input image portrait and, to increase the parameter C f than other parameters.
  • the cost calculation unit 3017 determines that the input image is a landscape image and makes the parameter Cg larger than the other parameters. Also, the cost calculating unit 3017, if detected edge by the edge detection unit 3014 is greater than the predetermined value, determines the input image as a building image, to increase the parameter C e than other parameters.
  • the image processing unit 3140 has a landscape image mode, a portrait mode, and a building image mode, and the parameter C g , the parameter C e, and the parameter according to the mode currently set in the image processing unit 3140. The ratio of C f may be changed.
  • the cost calculation unit 3017 calculates an average value of costs of a plurality of frame images included in the moving image data for each coordinate position. Specifically, the cost calculation unit 3017 acquires a frame image of a moving image at a predetermined time (for example, 3 seconds) interval, and generates a final cost image for each acquired frame image. Then, the cost calculation unit 3017 generates an average final cost image obtained by averaging the final cost images of the respective frame images.
  • the pixel value at each position in the average final cost image is an average value of the pixel values at each position in each final cost image.
  • the average value of costs of a plurality of frame images is calculated, but for example, a total value may be calculated.
  • the area determination unit 3018 determines a synthesis area in which text in the image data is combined based on the final cost image input by the cost calculation unit 3017 and the character size of the text data input by the character size determination unit 3016. . Specifically, first, the area determination unit 3018 determines the width w text and the height h text of a text rectangular area that is a rectangular area for displaying text, based on the number of rows and columns of text data and the character size. Is calculated. The text rectangular area is an area corresponding to the synthesis area. Subsequently, the region determination unit 3018 calculates the total cost c * text (x, y) in the text rectangular region at each coordinate position (x, y) by the following equation (11).
  • the area determination unit 3018 sets the coordinate position (x, y) at which the total cost c * text (x, y) in the text rectangular area is minimum as the text synthesis position.
  • the region determination unit 3018 sets the text rectangular region having the coordinate position (x, y) at which the total cost c * text (x, y) in the text rectangular region is minimum as the upper left vertex as the text synthesis region.
  • the area determination unit 3018 outputs image data, text data, and data indicating a text synthesis area to the synthesis unit 3019.
  • the area determination unit 3018 determines the synthesis area based on the total cost (total value) in the text rectangular area. For example, the average cost in the text rectangular area is the highest. A small area may be used as a synthesis area.
  • the region determination unit 3018 may set a region having the smallest cost weighted average value obtained by increasing the weight of the center of the text rectangular region as the composite region.
  • the composition unit 3019 receives image data, text data, and data indicating a text composition area.
  • the synthesizing unit 3019 generates and outputs image data of a synthesized image obtained by superimposing the text of the text data on the image data synthesis area.
  • FIG. 26A to 26F are image diagrams showing examples of the input image, the cost image, and the composite image according to the present embodiment.
  • FIG. 26A shows an input image.
  • FIG. 26B shows a global cost image. In the example shown in FIG. 26B, the center of the input image is the important position. As shown in FIG. 26B, the pixel value of the global cost image is closer to “1” as it is closer to the center, and closer to “0” as it is farther from the center.
  • FIG. 26C shows a face cost image. As shown in FIG. 26C, the pixel value of the face cost image is “1” in the area of the human face and “0” in the area other than the human face.
  • FIG. 26D shows an edge cost image. As illustrated in FIG. 26D, the pixel value of the edge cost image is “1” in the edge portion and “0” in the region other than the edge portion.
  • FIG. 26E shows a final cost image obtained by combining a global cost image, a face cost image, and an edge cost image.
  • FIG. 26F shows a synthesized image obtained by superimposing text on the input image. As shown in FIG. 26F, the text of the text data is superimposed on an area where the total cost in the final cost image is small.
  • FIG. 27 is a flowchart illustrating a procedure of still image composition processing according to the present embodiment.
  • the image input unit 3011 accepts input of still image data (hereinafter referred to as still image data).
  • the text input unit 3012 receives input of text data corresponding to the input still image data.
  • the first position input unit 3013 receives input of an important position in the input still image data.
  • step S3104 the character size determination unit 3016 determines the character size of the text data based on the size of the input still image data and the number of rows and columns of the input text data.
  • step S3105 the face detection unit 3015 detects the position of the person's face in the input still image data.
  • step S3106 the edge detection unit 3014 detects the position of the edge in the input still image data.
  • step S3107 the cost calculation unit 3017 generates a global cost image based on the designated (input) important position. That is, the cost calculation unit 3017 generates a global cost image that has a higher cost as it is closer to the important position and a lower cost as it is farther from the important position.
  • step S3108 the cost calculation unit 3017 generates a face cost image based on the detected face position of the person. That is, the cost calculation unit 3017 generates a face cost image in which the cost of the human face region is high and the cost of the region other than the human face is low.
  • step S3109 the cost calculation unit 3017 generates an edge cost image based on the detected edge position. That is, the cost calculation unit 3017 generates an edge cost image in which the cost of the edge portion is high and the cost of the region other than the edge is low.
  • step S3110 the cost calculation unit 3017 generates a final cost image by combining the generated global cost image, face cost image, and edge cost image.
  • step S ⁇ b> 3111 the area determination unit 3018 determines a text synthesis area in the still image data based on the generated final cost image and the determined character size of the text data.
  • step S3112 the synthesis unit 3019 superimposes the text data on the determined synthesis area to synthesize still image data and text data.
  • FIG. 28 is a flowchart showing the procedure of the moving image composition process according to this embodiment.
  • the image input unit 3011 receives input of moving image data (hereinafter referred to as moving image data).
  • the text input unit 3012 receives input of text data corresponding to the input moving image data.
  • the first position input unit 3013 accepts designation of an important position in the input moving image data.
  • step S3204 the character size determination unit 3016 determines the character size of the text data based on the size of the moving image data and the number of rows and columns of the text data.
  • step S3205 the cost calculation unit 3017 acquires the first frame image from the moving image data.
  • step S3206 the face detection unit 3015 detects the position of the person's face in the acquired frame image.
  • step S3207 the edge detection unit 3014 detects the position of the edge in the acquired frame image.
  • step S3212 the cost calculation unit 3017 determines whether the current frame image is the last frame image in the moving image data. If the current frame image is not the last frame image (step S3212: No), in step S3213, the cost calculation unit 3017 uses a frame image that is a predetermined time t seconds (eg, 3 seconds) from the current frame image as moving image data. And the process returns to step S3206.
  • t seconds e.g, 3 seconds
  • step S3214 the cost calculation unit 3017 generates an average final cost image by averaging the final cost images of the respective frame images. To do.
  • the pixel value at each coordinate position in the average final cost image is the average value of the pixel values at each coordinate position in the final cost image of each frame image.
  • step S3215 the region determination unit 3018 determines a text synthesis region in the moving image data based on the generated average final cost image and the determined character size of the text data.
  • step S3216 the synthesizer 3019 synthesizes the moving image data and the text data by superimposing the text data on the determined synthesis area.
  • the composite area in the entire moving image data is determined based on the average final cost image, but the composite area may be determined every predetermined time of the moving image data.
  • the image processing unit 3140 sets the synthesis area r 1 based on the first frame image as the synthesis area of the frame image from 0 seconds to t ⁇ 1 seconds, and sets the synthesis area r 2 based on the frame image of t seconds from t seconds.
  • the composite region of frame images up to 2t-1 seconds is determined, and the composite region of each frame image is determined in the same manner.
  • the text can be synthesized at an optimal position in accordance with the movement of the subject in the moving image data.
  • the image processing unit 3140 determines a synthesis area in which text is synthesized based on an edge cost image indicating a cost related to an edge in image data. Therefore, it is possible to synthesize text in a region with few edges (that is, a region where no complex texture exists). Thereby, since it is possible to prevent the outline of the font used for text display and the texture edge from overlapping, the text can be synthesized in the input image so that the viewer can easily read the text.
  • the image processing unit 3140 determines a synthesis area for text synthesis based on a face cost image indicating a cost related to a person's face in the image data, and therefore synthesizes text in an area other than the person's face. can do.
  • the image processing unit 3140 determines a synthesis area for synthesizing text based on a global cost image indicating a cost related to an important position in the image data.
  • the image processing unit 3140 can synthesize text in an area away from the important position. It can. For example, in many images, a subject is present in the central portion, and text can be synthesized in an area other than the subject by setting the central portion as an important position. Further, in the image processing unit 3140 according to the present embodiment, since the user can designate an important position, for example, in the input image A, the central portion is set as the important position, and in the input image B, the end portion is set as the important position. The important position can be changed.
  • the image processing unit 3140 determines a synthesis region in which text is synthesized based on a final cost image obtained by combining a global cost image, a face cost image, and an edge cost image. Therefore, it is possible to synthesize text at an optimal position comprehensively.
  • the image processing unit 3140 changes the character size of the text data in accordance with the image size of the input image, so that the entire text can be stored in the input image.
  • the image processing unit 3140 can synthesize text with moving image data. Thereby, for example, it can be applied to a service or the like that dynamically displays a comment received from a user in an image while a moving image is distributed and reproduced by broadcasting or the Internet.
  • the image processing unit 3140 determines the synthesis region using the average final cost image of a plurality of frame images, the image processing unit 3140 synthesizes the text into a comprehensively optimal region considering the movement of the subject in the entire moving image. be able to.
  • FIG. 29 is a block diagram illustrating a functional configuration of the image processing unit 3140a according to the present embodiment.
  • the image processing unit 3140a includes a second position input unit 3021 in addition to the configuration of the image processing unit 3140 shown in FIG.
  • the second position input unit 3021 receives an input of a position (hereinafter referred to as a text position (second position)) where text is combined in the image data.
  • the second position input unit 3021 displays the image data input to the image input unit 3011 on the display unit 1150, and sets the position specified by the user on the touch panel installed on the display unit 1150 as the text position.
  • the second position input unit 3021 may directly accept input of coordinate values (x 1 , y 1 ) of the text position.
  • the second position input unit 3021 outputs the coordinate value (x 1 , y 1 ) of the text position to the cost calculation unit 3017a.
  • the cost calculation unit 3017a based on the text position (x 1 , y 1 ) input by the second position input unit 3021, the position of the edge in the image data, the position of the person's face, and the important position, The cost of each coordinate position (x, y) in the image data is calculated. Specifically, the cost calculation unit 3017a combines the text position cost image indicating the cost based on the text position (x 1 , y 1 ), the global cost image, the face cost image, and the edge cost image to obtain the final cost. Generate an image. The generation method of the global cost image, the face cost image, and the edge cost image is the same as that in the seventh embodiment.
  • the cost calculation unit 3017a generates a text position cost image c t (x, y) by the following equation (12).
  • S 3 is a parameter that determines how the cost spreads in the width direction (X-axis direction)
  • S 4 is a parameter that determines how the cost spreads in the height direction (Y-axis direction). It is.
  • the text position cost image is an image that has a lower cost as it is closer to the text position (x 1 , y 1 ), and has a higher cost as it is farther from the text position.
  • the cost calculation unit 3017a generates a final cost image c (x, y) by the following equation (13).
  • C t ( ⁇ 0) is a parameter of the weighting coefficient of the text position cost image.
  • the cost calculation unit 3017a calculates an average value of the costs of a plurality of frame images included in the moving image data for each coordinate position. Specifically, the cost calculation unit 3017a acquires a frame image of a moving image at a predetermined time (for example, 3 seconds) interval, and generates a final cost image for each acquired frame image. Then, the cost calculation unit 3017a generates an average final cost image obtained by averaging the final cost images of the respective frame images.
  • FIG. 30 is a flowchart showing the procedure of the composition processing according to this embodiment.
  • the processing shown in steps S3301 to S3303 is the same as the processing shown in steps S3101 to S3103 described above.
  • the second position input unit 3021 accepts designation of a text position in the input image data.
  • the processing shown in steps S3305 to S3307 is the same as the processing shown in steps S3104 to S3106 described above.
  • step S3308 the cost calculation unit 3017a generates a text position cost image based on the designated text position.
  • the processing shown in steps S3309 to S3311 is the same as the processing shown in steps S3107 to S3109 described above.
  • step S3312 the cost calculation unit 3017a generates a final cost image by combining the text position cost image, the global cost image, the face cost image, and the edge cost image.
  • step S3313 the area determination unit 3018 determines a text synthesis area in the image data based on the generated final cost image and the determined character size of the text data.
  • step S3314 the synthesis unit 3019 superimposes the text data on the determined synthesis area, and synthesizes the image data and the text data.
  • the text position is specified in the second position input unit 3021.
  • an area in which text is to be synthesized may be specified.
  • the cost calculation unit 3017a generates a text position cost image in which the pixel value of the designated area is “0” and the pixel value of the other area is “1”. That is, the cost calculation unit 3017a reduces the cost of the designated area.
  • the user can designate the position where the text is to be synthesized, and the image processing unit 3140a determines the synthesis area by reducing the cost of the designated text position.
  • the image processing unit 3140a determines the synthesis area by reducing the cost of the designated text position.
  • FIG. 31 is a block diagram illustrating a functional configuration of the image processing unit 3140b according to the present embodiment.
  • the image processing unit 3140b includes a second position input unit 3031 in addition to the configuration of the image processing unit 3140 shown in FIG.
  • the second position input unit 3031 accepts input of a text position (second position) in either the X-axis direction (width direction) or the Y-axis direction (height direction).
  • the text position is a position where the text is synthesized in the image data.
  • the second position input unit 3031 displays the image data input to the image input unit 3011 on the display unit 1150, and sets the position specified by the user on the touch panel installed on the display unit 1150 as the text position.
  • the second position input unit 3031 may directly accept the input of the X coordinate value x 2 or the Y coordinate value y 2 of the text position.
  • the second position input unit 3031 outputs the X-coordinate value x 2 or Y-coordinate value y 2 of the text located in the region determination unit 3018B.
  • the region determination unit 3018 b fixes the X coordinate value to x 2 in the above-described formula (11) and sets c * text (x 2 , A Y coordinate value y min that minimizes y) is obtained. Then, the region determination unit 3018b sets the position (x 2 , y min ) as the synthesis position.
  • the region determination unit 3018 b fixes the Y coordinate value to y 2 in the above-described equation (11), and c * text ( x min where x, y 2 ) is minimized is obtained. Then, the region determination unit 3018b sets the position (x min , y 2 ) as the synthesis position.
  • FIG. 32 is a flowchart showing the procedure of the synthesis process according to this embodiment.
  • the processing from step S3401 to S3403 is the same as the processing from step S3101 to S3103 described above.
  • the second position input unit 3031 receives an X input of the coordinate values x 2 or Y-coordinate value y 2 text position.
  • the processing from step S3405 to S3411 is the same as the processing from step S3104 to S3110 described above.
  • step S3412 the area determining portion 3018b is the X coordinate value x 2 or Y-coordinate value y 2 in the specified text position, a character size of the text data, based on the final cost image, A text synthesis area in image data is determined.
  • step S3413 the synthesis unit 3019 superimposes the text data on the determined synthesis area to synthesize the image data and the text data.
  • the image processing unit 3140b sets the optimum region based on the final cost image among the designated positions in the width direction or height direction as the synthesis region.
  • the text can be superimposed on an optimum area (for example, an area with high text readability, an area without a human face, or an area other than the important position) which is an area desired by the user.
  • a program for realizing each step shown in FIG. 27, FIG. 28, FIG. 30 or FIG. 32 is recorded on a computer-readable recording medium, and the program recorded on this recording medium is read into a computer system.
  • the image data and the text data may be combined.
  • the program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium.
  • the program may be for realizing a part of the functions described above. Furthermore, what can implement
  • the character size determination unit 3016 sets f satisfying the following expression (14) as the character size.
  • M 1 is a parameter indicating the size of the width direction of the margin
  • M 2 is a parameter indicating the size of the height direction of the margin.
  • the cost calculation units 3017 and 3017a generate a final cost image of an area excluding the margin in the image data.
  • the region determination units 3018 and 3018b select a composite region from regions excluding margins (M 1 ⁇ x ⁇ w ⁇ M 1 , M 2 ⁇ y ⁇ h ⁇ M 2 ).
  • the important position is input by the first position input unit 3013.
  • a global cost image is generated using a predetermined position (for example, the center of the image data) as the important position. Good.
  • the cost calculation units 3017 and 3017a generate a global cost image according to the following equation (15).
  • S (> 0) is a parameter that determines how the cost spreads.
  • the global cost image is determined by the image size. Therefore, a global cost image may be prepared in advance for each image size and stored in the storage unit 1160.
  • the cost calculation units 3017 and 3017a read a global cost image corresponding to the image size of the input image from the storage unit 1160 and generate a final cost image. This eliminates the need to generate a global cost image for each process of combining text data with image data, thereby reducing the overall processing time.
  • a face cost image based on a person's face region is generated.
  • a cost image based on an arbitrary feature amount for example, an object or an animal
  • the cost calculation units 3017 and 3017a generate feature amount cost images in which the cost of the feature amount region is high.
  • the cost calculation units 3017 and 3017a generate a feature amount cost image in which the pixel value of the region of the feature amount detected by object recognition or the like is “1” and the pixel value of the other region is “0”. Then, the cost calculation unit 3017 generates a final cost image based on the feature amount cost image.
  • the area determination units 3018 and 3018b calculate all the coordinate positions (x, y) in advance by the following equation (16) before calculating the total cost c * text (x, y) in the text rectangular area.
  • a differential image may be generated.
  • the area determination units 3018 and 3018b calculate the total cost c * text (x, y) in the text rectangular area by the following equation (17).
  • FIG. 33 is an image diagram showing a method of calculating the total cost in the text rectangular area.
  • the total cost c * text (x, y) in the text rectangular area can be calculated by four operations.
  • the processing time can be shortened compared to the case where the total cost c * text (x, y) in the text rectangular area is calculated by the above-described equation (11).
  • FIG. 34 is a block diagram showing a functional configuration of an image processing unit (image processing apparatus) 4140 (the image processing unit 1140 in FIG. 8) according to the tenth embodiment of the present invention.
  • the image processing unit 4140 includes an image input unit 4011, a text setting unit 4012, a text composition region setting unit 4013, a font setting unit 4014, and a composite image generation unit 4015.
  • a storage unit 4016 includes a font color setting unit 4021.
  • the image input unit 4011 inputs image data of a still image, a moving image, or a through image.
  • the image input unit 4011 outputs the input image data to the text setting unit 4012.
  • the image input unit 4011 inputs, for example, image data output from the A / D conversion unit 1120, image data stored in the buffer memory unit 1130, or image data stored in the storage medium 1200.
  • a configuration in which the image input unit 4011 inputs image data via a network may be used.
  • a text setting unit 4012 receives image data from the image input unit 4011 and sets text data to be superimposed (synthesized) on the image data.
  • the text setting unit 4012 outputs the image data and the set text data to the text composition area setting unit 4013.
  • the text data may include, for example, information on the size of characters constituting the text.
  • any method may be used as a method of setting text data to be superimposed on the image data.
  • text data fixedly determined in advance may be stored in the storage unit 4016, and the text setting unit 4012 may read the text data from the storage unit 4016 and set it.
  • the text setting unit 4012 may detect and set text data designated by the user by operating the operation unit 1180.
  • a rule for determining text data based on image data is stored in the storage unit 4016, and the text setting unit 4012 reads the rule from the storage unit 4016, and the image data is read according to the rule.
  • Text data may be determined and set.
  • a rule for example, a rule that defines the correspondence between a predetermined feature or a predetermined feature amount of image data and text data can be used.
  • the text setting unit 4012 sets a predetermined feature for the image data. Or a predetermined feature amount is detected, and text data corresponding to the detection result is determined according to the above-described rule (the above-described correspondence).
  • the text composition area setting unit 4013 receives the image data and the set text data from the text setting section 4012, and sets an area (text composition area) for synthesizing the text data with the image data.
  • the text composition area setting unit 4013 outputs the image data, the set text data, and information for specifying the set text composition area to the font setting unit 4014.
  • any method may be used as a method of setting a region (text combining region) in which text data is combined with image data.
  • a fixed text synthesis area may be stored in the storage unit 4016, and the text synthesis area setting unit 4013 may read the text synthesis area from the storage unit 4016 and set it.
  • the text composition region setting unit 4013 may detect and set a text composition region designated by the user operating the operation unit 1180.
  • a rule for determining a text composition area based on image data is stored in the storage unit 4016, and the text composition area setting unit 4013 reads the rule from the storage unit 4016, and according to the rule, The text synthesis area may be determined and set from the image data.
  • a rule for determining a text synthesis area so that text is superimposed on a non-important area other than an important area where a relatively important subject is captured in an image can be used.
  • it is possible to use a configuration in which an area in which a person is captured is classified as an important area, and text is superimposed on a non-important area that does not include the center of the image.
  • Various other rules may also be used.
  • the text composition area setting unit 4013 sets the set text when the size of the preset text is large enough that the set text does not fit in the text composition area.
  • the size of the text is changed to be small so that the whole of the text fits in the text composition area.
  • various shapes of regions may be used as the text composition region, and for example, an internal region surrounded by a rectangular frame such as a rectangle or a square can be used. As another example, an internal area surrounded by a frame partially or entirely made of a curve may be used as the text synthesis area.
  • the font setting unit 4014 inputs image data, set text data, and information for specifying the set text composition region from the text composition region setting unit 4013, and based on one or more of these, this text Set the data font (including at least the font color).
  • the font setting unit 4014 outputs this image data, set text data, information for specifying the set text composition area, and information for specifying the set font to the composite image generation unit 4015.
  • the font setting unit 4014 mainly sets the font color of the text data by the font color setting unit 4021.
  • the font color is included in the font as one of the fonts.
  • fonts other than the font color may be arbitrary, for example, may be fixedly set in advance.
  • the font color setting unit 4021 is text data input from the text composition region setting unit 4013 to the font setting unit 4014 based on the image data and text composition region input from the text composition region setting unit 4013 to the font setting unit 4014. Set the font color. Note that when setting the font color by the font color setting unit 4021, for example, text data input from the text composition region setting unit 4013 to the font setting unit 4014 may be considered.
  • the composite image generation unit 4015 inputs image data, set text data, information for specifying the set text composition area, and information for specifying the set font from the font setting unit 4014, Image data (composite image data) obtained by synthesizing the text data with the font (including at least the font color) is generated in the text synthesis area of the data.
  • the composite image generation unit 4015 outputs the generated composite image data to, for example, one or more of the storage unit 1200 (via the communication unit 1170), the display unit 1150, the buffer memory unit 1130, and the like.
  • the composite image generation unit 4015 outputs data of the generated composite image to a network (not shown) may be used.
  • the storage unit 4016 stores various types of information.
  • the storage unit 4016 includes information that is referred to by the text setting unit 4012, information that is referred to by the text composition region setting unit 4013, and a font setting unit 4014 (including the font color setting unit 4021). Store referenced information.
  • PCCS color system Practical Color Coordinate System Color System
  • the PCCS color system is a color system in which hue, brightness, and saturation are determined based on human sensitivity.
  • tone tone
  • tone in addition to expressing the color by the three attributes of the color (hue, lightness, and saturation), the concept of tone can also be defined to express the color by tone and hue.
  • Tone There are 12 types of tones for chromatic colors and 5 types for achromatic colors. Twenty-four or twelve hues are determined depending on the tone.
  • FIG. 41 is a diagram illustrating an example of a hue circle of the PCCS color system in gray scale.
  • FIG. 42 is a diagram illustrating an example of a PCCS color system tone in gray scale.
  • the horizontal axis of the tone corresponds to the saturation, and the vertical axis of the tone corresponds to the lightness. 41 and 42 shown in color are published on, for example, the web page of DIC Color Design Co., Ltd.
  • hues In the example of the hue circle shown in FIG. 41, 24 types of hues are defined such as warm color systems 1 to 8, neutral color systems 9 to 12, cold color systems 13 to 19, and neutral color systems 20 to 24. Has been.
  • FIG. 43 is a diagram illustrating twelve chromatic color tones.
  • twelve chromatic tones include vivid tone (symbol v), strong tone (symbol s), and bright tone (bright tone: symbol b). ),
  • FIG. 44 is a diagram showing five types of achromatic tones.
  • the correspondence between the tone name, tone symbol, PCCS number, R (red) value, G (green) value, and B (blue) value is shown.
  • white tone white tone: symbol W
  • light gray tone symbol ltGy
  • medium gray tone medium gray tone
  • dark gray tone symbol dkGy
  • black tone symbol Bk
  • the font color setting unit 4021 is based on the PCCS color system, based on the image data and the text composition region input from the text composition region setting unit 4013 to the font setting unit 4014, and based on the text composition region setting unit 4013.
  • the font color of the text data input is set.
  • the text composition area setting unit 4013 when setting the font color for displaying text in the image, the text composition area setting unit 4013 optimizes the position of the text displayed in the image (text composition area). The position in the image (text synthesis area) when the text is displayed in the image is determined.
  • the font color setting unit 4021 first determines the average color of the text composition area in the image data (text in the image based on the image data and the text composition area input from the text composition area setting unit 4013 to the font setting unit 4014). The average color of the image area in which is displayed.
  • the font color setting unit 4021 is based on the image data input to the font setting unit 4014 from the text composition region setting unit 4013 and the text composition region, and the pixels inside the text composition region in this image data ( For the pixel), an average value for each R, an average value for each G, and an average value for each B are calculated, and a combination of these R, G, and B average values is obtained as an RGB average color.
  • the font color setting unit 4021 then converts the obtained average RGB color to the tone and hue of the PCCS color system based on the conversion table information 4031 from the RGB system to the PCCS color system stored in the storage unit 4016.
  • the tone and hue of the PCCS color system obtained by conversion are used as the average color of the PCCS color system.
  • each of the pixels inside the text composition area in the image data has respective values of R, G, and B (for example, values of 0 to 255).
  • the value is added for each R, G, and B, and the result of dividing each addition result by the number of all pixels is the average value for each R, G, and B.
  • a combination of average values is an RGB average color.
  • the conversion table specified by the conversion table information 4031 from the RGB system to the PCCS color system which is referred to when converting the RGB average color to the tone and hue of the PCCS color system, is an RGB average color. And the correspondence between the tone and hue of the PCCS color system. As such a conversion table, those having various conversion contents may be used. Usually, since RGB can take more values than the PCCS color system, RGB values and PCCS tables can be used. The correspondence with the values of the color system is a many-to-one correspondence. In this case, several different RGB values are converted into the same PCCS color system value as the representative value.
  • the average RGB color is converted into the PCCS color system tone and hue based on the conversion table.
  • the RGB average color is converted into the PCCS color system tone and hue.
  • the storage unit 4016 stores conversion formula information that defines the content to be converted, and the font color setting unit 4021 reads the conversion formula information from the storage unit 4016 and calculates the conversion formula.
  • a configuration may be used in which average RGB colors are converted into PCCS color system tones and hues.
  • the font color setting unit 4021 determines the text input from the text composition region setting unit 4013 to the font setting unit 4014 based on the PCCS color system tone and hue, which are the average colors of the PCCS color system. Set the font color of the data. Specifically, the font color setting unit 4021 performs tone conversion stored in the storage unit 4016 while maintaining the hue as it is for the tone and hue of the PCCS color system, which is the average color of the obtained PCCS color system. Based on the table information 4032, only the tone is changed to set the font color (color) of the text data input from the text composition region setting unit 4013 to the font setting unit 4014. The information specifying the font color set in this way is included in the information specifying the font by the font setting unit 4014 and output to the composite image generating unit 4015.
  • the font color setting unit 21 sets them.
  • the tone t * and the hue h * of the font color to be expressed are expressed by the formula ().
  • the font color in which the tone of the PCCS color system is changed is applied to the text data with respect to the average color of the text composition area in which the text data is arranged in the image data.
  • a font color with contrast
  • FIG. 35 is a diagram showing the relationship of the harmony of the contrast by the tone in the PCCS color system. Note that the contents of FIG. 35 are disclosed, for example, on the web page of DIC Color Design Co., Ltd.
  • information 4032 of the tone conversion table that defines the correspondence between the tone before conversion and the tone after conversion is stored in the storage unit 4016.
  • Various contents may be set and used as the contents of the tone conversion table (correspondence between the tone before conversion and the tone after conversion).
  • the PCCS color system shown in FIG. Is set in consideration of the relationship of the harmony of the contrast by tone.
  • a white tone or a light gray tone is assigned to a dark tone.
  • a bright tone for example, another tone having a harmonious relationship of contrast shown in FIG. 35 is assigned.
  • a chromatic color having a harmonious relationship with a contrast can be assigned.
  • the chromatic one is adopted.
  • the brighter tone for example, the most vivid tone
  • the one closer to dp is adopted.
  • FIG. 36 is a flowchart illustrating a procedure of processing performed in the image processing unit 4140 according to the present embodiment.
  • step S4001 the image input unit 4011 inputs image data.
  • step S4002 the text setting unit 4012 sets text data.
  • step S4003 the text composition area setting unit 4013 sets a text composition area when the text data is synthesized with the image data.
  • step S4004 the font setting unit 4014 sets a font including a font color when the text data is combined with the text composition area set in the image data.
  • step S4005 the composite image generation unit 4015 applies the set font to the text data to synthesize the text data in the text composition area set in the image data. Thus, the data of the composite image is generated.
  • step S4006 the composite image generation unit 4015 outputs the generated composite image data to, for example, another component unit via the bus 1300.
  • FIG. 37 is a flowchart showing a procedure of processing performed in the font setting unit 4014 according to this embodiment.
  • the procedure of this process is the details of the process of step S4004 shown in FIG.
  • the font color setting unit 4021 in the font setting unit 4014 includes the image data, text data, and text composition area to be processed in this image data to display the text data.
  • the average color of the set text composition area is determined in RGB.
  • the font color setting unit 4021 in the font setting unit 4014 obtains the corresponding PCCS color system tone and hue from the obtained average RGB color.
  • step S4013 the font color setting unit 4021 in the font setting unit 4014 changes the obtained tone to another tone.
  • step S4014 the font color setting unit 4021 in the font setting unit 4014 uses the color of the PCCS color system determined by the combination of the changed tone (the other tone) and the obtained hue as it is as the font color. Set.
  • step S4015 the font setting unit 4014 sets a font including the font color set by the font color setting unit 4021 for the text data.
  • FIG. 38 is a diagram illustrating an example of the image data 4901. 38 shows a case where the image data 4901 shown in FIG. 38 is input by the image input unit 4011 of the image processing unit 4140.
  • FIG. 39 is a diagram showing an example of the composite image data 4911 in this case.
  • the composite image data 4911 illustrated in FIG. 39 is output from the composite image generation unit 4015 and is output from the image processing unit 4140.
  • the text setting unit 4012 further sets the text composition region 4921 set by the text composition region setting unit 4013 in the same image as the image data 4901 shown in FIG. Text data 4922 (in the example of FIG. 39, the character data “Memories spent on weekdays with everyone (2010/10/06)”) are set in the font set by the font setting unit 4014 (at least the font The image data 4901 and the text data 4922 are combined so that the image data 4901 is displayed.
  • the text synthesis area 4921 is shown in the synthesized image data 4911 for easy understanding of the text synthesis area 4921. However, in the present embodiment, in the actual display, text synthesis is performed. An area 4921 (in the example of FIG. 39, a rectangular frame) is not displayed, and only text data 4922 is combined with the original image data 4901 and displayed.
  • the font color of the text is set using the color information of the image area (text synthesis area) in which the text is displayed in the image.
  • the image processing unit 4140 according to the present embodiment sets a font color in which only the tone is changed without changing the hue in the PCCS color system, for the color information based on the text synthesis area. For example, the impression of the original image can be prevented from changing by displaying text.
  • the image processing unit 4140 when displaying text in a digital image such as a still image or a moving image, an image region (in which the text is displayed in the image so that the viewer can easily read it)
  • the optimum font color can be obtained in consideration of the color information in the text synthesis area.
  • an image of one image frame that is a still image or one image frame that constitutes a moving image for example, one image frame selected to represent a plurality of image frames.
  • the text data to be superimposed (synthesized) on this image data the text composition area to synthesize this text data on this image data, and the font containing the font color of this text data to be synthesized on this image data
  • these settings can be performed for image data of two or more image frames constituting a moving image.
  • the values of the corresponding pixels in the frame are averaged.
  • the same processing as in the present embodiment can be performed on image data (averaged image data) of one image frame formed from the average result.
  • the font color setting unit 4021 determines the ratio of the hue value of a region (text placement region) in which text is placed in the image data and the hue value of the text data to the text data of the image data.
  • a configuration in which the value is closer to 1 than the ratio between the tone value of the arrangement area and the tone value of the text data can also be used.
  • the text arrangement area corresponds to the text composition area.
  • an acquisition unit image input unit 4011 and text setting unit 4012 in the example of FIG. 34
  • a region determining unit to be determined (in the example of FIG.
  • a text composition region setting unit 4013 and a color setting unit for setting a predetermined color.
  • an image generation unit (a composite image generation unit 4015 in the example of FIG. 34) that generates an image in which the text data of the predetermined color is arranged in the text arrangement region, and the text arrangement of the image data
  • the ratio of the hue value of the area to the hue value of the text data is the tone value of the text arrangement area of the image data, (In the example of FIG. 34, the image processing unit 4140)
  • the image processing apparatus characterized in that close to 1 than the ratio between the tone value of the text data can be configured.
  • the color setting unit (the font color setting unit 4021 of the font setting unit 4014 in the example of FIG. 34) is The tone value and hue value of the PCCS color system are obtained from the average RGB color in the text arrangement area, and only the tone value of the PCCS color system is changed without changing the hue of the PCCS color system.
  • An image processing apparatus characterized by the above can be configured. It should be noted that the ratio between the hue value of the text layout area (text layout area) and the hue value of the text data in the image data is the tone value of the text layout area of the image data and the tone value of the text data. Various values may be used as the value of each ratio when the value is closer to 1 than the ratio of. Even in such a configuration, it is possible to obtain the same effect as in the present embodiment.
  • the functional block diagram of the imaging apparatus according to the present embodiment is the same as that shown in FIG. 8 according to the second embodiment.
  • the block diagram showing the functional configuration of the image processing unit according to the present embodiment is the same as that shown in FIG. 34 according to the tenth embodiment.
  • portions different from the second and tenth embodiments will be described in detail.
  • the same reference numerals as those used in FIGS. 8, 34, 36, and 37 are used.
  • the font setting unit 4014 receives image data, set text data, and information for specifying the set text composition region from the text composition region setting unit 4013, and the text data font. Is set by the font color setting unit 4021, and a predetermined outline is set as one of the fonts of the text data based on the outline information 4033 stored in the storage unit 4016. .
  • the predetermined outline for example, a shadow or a trimming can be used.
  • a predetermined outline type for example, shadow, trimming, etc.
  • the font setting unit 4014 can switch the type of outline to be used in accordance with the instruction.
  • the color of the predetermined outline for example, black or a tone color darker than the font color tone can be used.
  • the color of the predetermined outline is fixedly set in advance.
  • the operation unit 1180 receives the color from the user.
  • the font setting unit 4014 can switch the outline color to be used.
  • the outline information 4033 stored in the storage unit 4016 information referred to when the font setting unit 4014 sets an outline for text is used. For example, one or more types of outlines that can be used Or information specifying the color is used.
  • FIG. 40 is a diagram illustrating an example of the composite image data 4931.
  • the composite image data 4931 shown in FIG. 40 the same image as the original image data (not shown) composed of images other than the text data 4941 is set by the text composition region setting unit 4013.
  • text data 4941 in the example of FIG. 40, character data “Like” set by the text setting unit 4012 is used as the font set by the font setting unit 4014.
  • This image data and this text data 4941 are synthesized so as to be displayed (including at least font color and outline).
  • the example of FIG. 40 shows a case where a shadow is used as an outline.
  • the font setting unit 4014 uses a font including the font color set by the font color setting unit 4021 as text.
  • a predetermined outline font is set.
  • the font color of the text is set using the color information of the image area (text synthesis area) in which the text is displayed in the image, and the font. Set the outline as.
  • the image processing unit 4140 it is possible to obtain the same effects as those of the tenth embodiment, and to add fonts with outlines such as shadows to the set font color for text.
  • the outline By enhancing the outline, the color contrast can be increased.
  • Such an outline is particularly effective when the font color set for the text is white, for example.
  • FIG. 8 The functional block diagram of the imaging apparatus according to the present embodiment is the same as that shown in FIG. 8 according to the second embodiment.
  • the block diagram showing the functional configuration of the image processing unit according to the present embodiment is the same as that shown in FIG. 34 according to the tenth embodiment.
  • FIGS. 8, 34, and 37 portions different from the second and tenth embodiments will be described in detail.
  • the same reference numerals as those used in FIGS. 8, 34, and 37 are used.
  • the font setting unit 4014 receives image data, set text data, and information specifying the set text composition region from the text composition region setting unit 4013, and the font color setting unit 4021
  • the font color of the text data is set, based on the color change determination condition information 4034 stored in the storage unit 4016, the color change is greater than or equal to a predetermined value in the text composition area where the text is displayed. If it is determined that the color change is greater than or equal to a predetermined value in the text composition area, two or more font colors are set in the text composition area.
  • the font color setting unit 4021 determines that the color change is less than a predetermined value in the text composition area, one type of font color is used for the entire text composition area as in the tenth embodiment. Set.
  • the font color setting unit 4021 divides a text composition area for displaying text into a plurality of areas (referred to as divided areas in the present embodiment), and sets an average RGB color for each divided area.
  • the required processing (same processing as step S4011 shown in FIG. 37) is executed.
  • the font color setting unit 4021 determines whether or not there is a difference greater than or equal to a predetermined value with respect to the average color values of RGB in the plurality of divided areas. It is determined that the color change is greater than or equal to a predetermined value in the text composition area.
  • the font color setting unit 4021 determines that there is no difference greater than or equal to a predetermined value with respect to the average color value of RGB in the plurality of divided areas, the color change in the text composition area is less than the predetermined value. judge.
  • various methods may be used as a method for determining whether or not there is a difference of a predetermined value or more with respect to the average color values of RGB in a plurality of divided regions.
  • the difference between the average color values of RGB in any two divided areas out of a plurality of divided areas is equal to or greater than a predetermined value
  • the average color value of RGB in the plurality of divided areas is equal to or greater than a predetermined value
  • the difference between the RGB average color values of the two divided areas of the divided area having the lowest RGB average color value and the largest divided area is not less than a predetermined value.
  • a method for determining that there is a difference of a predetermined value or more in the average color values of RGB in a plurality of divided regions it is possible to use a method for determining that there is a difference of a predetermined value or more in the average color values of RGB in a plurality of divided regions.
  • a dispersion value of RGB average color values is obtained for all of a plurality of divided areas, and when this dispersion value is equal to or greater than a predetermined value, an average of RGB values of the plurality of divided areas is obtained.
  • a method of determining that there is a difference of a predetermined value or more in the color value can be used.
  • RGB average color values of RGB
  • only one of R, G, and B can be compared.
  • two or three of R, G, and B can be combined into a single value for comparison.
  • two or more of R, G, and B can be compared separately.
  • one of the comparisons is greater than or equal to a predetermined value.
  • a method of determining that there is a difference of a predetermined value or more as a whole can be used, or when there is a difference of a predetermined value or more for all the comparisons (only), there is a difference of a predetermined value or more as a whole. Can be used.
  • Various methods may be used as a method of dividing a text composition region for displaying text into a plurality of regions (divided regions).
  • a technique in which a delimiter area for each character is used as a divided area can be used.
  • a rectangular area including the periphery of each character is set in advance, and the entire text synthesis area is configured by a combination of all character areas included in the text.
  • region for every character may differ for every size of a character, for example.
  • an area obtained by dividing a text composition area by a predetermined number of divisions or a predetermined size (for example, a horizontal length, a vertical length, or a block size such as a rectangle).
  • a predetermined number of divisions or a predetermined size for example, a horizontal length, a vertical length, or a block size such as a rectangle.
  • the color change is greater than or equal to a predetermined value in the text synthesis area composed of the plurality of divided areas.
  • a predetermined value in the text synthesis area composed of the plurality of divided areas.
  • the PCCS color system values of a plurality of divided areas for example, values specifying the tone and hue of the PCCS color system
  • whether the color change is greater than or equal to a predetermined value in the text composition area A configuration for determining whether or not may be used.
  • the font color setting unit 4021 determines that the color change in the text composition area for displaying the text is greater than or equal to a predetermined value, for each divided area.
  • processing for obtaining the average color of RGB processing similar to step S4011 shown in FIG. 37
  • processing for obtaining the tone and hue of the PCCS color system processing similar to step S4012 shown in FIG. 37.
  • Processing for changing the tone processing similar to step S4013 shown in FIG. 37
  • processing for setting the font color processing similar to step S4014 shown in FIG. 37
  • executing font color for each divided area Set For example, if the process for obtaining the average RGB color (the same process as step S4011 shown in FIG. 37) has already been performed, the process may not be performed again.
  • the entire font color set for each of the plurality of divided areas is set as the font color set for the text data.
  • the font color when there are two or more divided areas in which the average color difference of RGB is less than a predetermined value among the plurality of divided areas, for example, For these two or more divided areas, the font color may be obtained for only one of the divided areas, and the same font color may be set for all of the two or more divided areas.
  • the font color setting unit 4021 sets the font color for each of the plurality of divided areas, and then regarding the setting contents so that the entire font color of the text composition area becomes a gradation in a certain direction. It is also possible to adjust the tone and hue of the PCCS color system.
  • the color change determination condition information 4034 stored in the storage unit 4016 is used when the font color setting unit 21 determines whether or not the color change is greater than or equal to a predetermined value in the text composition area where the text is displayed.
  • Information to be referenced is used, for example, information specifying a method for dividing a text synthesis area into a plurality of divided areas, and determining whether there is a difference of a predetermined value or more in an average color value of the plurality of divided areas
  • Information for specifying a method, information for specifying a predetermined value (threshold value) used for various determinations, and the like are used.
  • the image processing unit 4140 when there is a large change in color in an image area (text synthesis area) for displaying text, two types of the image area are displayed accordingly. Set the above font color. Further, according to the image processing unit 4140 according to the present embodiment, as a configuration example, the tone and hue of the PCCS color system are adjusted so that the font color of the entire text becomes a gradation in a certain direction.
  • the readability of the text can be improved even when there is a large color change in the image area (text synthesis area) where the text is displayed. For example, if there is a large change in color in an image area (text synthesis area) that displays text, if the font color is calculated from a single average color in that image area, the contrast of a part of the text cannot be obtained, and the text
  • the image processing unit 4140 according to the present embodiment such a problem can be solved.
  • a font with a predetermined outline may be set by the font setting unit 4014.
  • Processing may be performed by causing a computer system to read and execute a program recorded on the recording medium.
  • the program may be transmitted from a computer system storing the program in a recording device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium.
  • the program may be for realizing a part of the functions described above. Furthermore, what can implement
  • FIG. 45 is a diagram schematically illustrating an example of a process for extracting a feature amount of a captured image used for determining a sentence to be arranged on an image.
  • the determination unit of the image processing device classifies the scene of the captured image into a person image or a landscape image.
  • the image processing apparatus extracts a feature amount of the captured image according to the scene.
  • the feature amount can be the number of faces (number of subjects) and the average color (color arrangement pattern) in the case of a person image, and can be the average color (color arrangement pattern) in the case of a landscape image. . Based on these feature quantities, words (adjectives and the like) to be inserted into the person image template or the landscape image template are determined.
  • the color arrangement pattern is composed of a combination of a plurality of representative colors that constitute the captured image. Therefore, the color arrangement pattern can represent the average color (average color) of the captured image.
  • “first color”, “second color”, and “third color” are defined as a color arrangement pattern, and based on a combination of these three colors, that is, based on three average colors, a person image Or a word (adjective) to be inserted into a text template for a landscape image.
  • the scene of the captured image is classified into two types (a person image and a landscape image).
  • the scene of the captured image can be classified into three or more types (3, 4, 5, 6, 7, 8, 9, or 10 types or more).
  • FIG. 46 is a diagram schematically illustrating another example of the process of extracting the feature amount of the captured image used for determining the text arranged on the image.
  • the scene of the captured image can be classified into three or more types.
  • the determination unit of the image processing apparatus determines whether the captured image is a person image (first mode image), a distant view image (second mode image), or another image (third mode image). judge. First, as in the example of FIG. 45, the determination unit determines whether the captured image is a person image or an image different from the person image.
  • the determination unit determines whether the captured image is a distant view image (second mode image) or another image (third mode image). To do. This determination can be performed using, for example, a part of the image identification information given to the captured image.
  • the focal length that is a part of the image identification information can be used.
  • the determination unit determines that the captured image is a distant view image when the focal distance is greater than or equal to a preset reference distance, and determines the captured image as another image when the focal distance is less than the reference distance.
  • the captured image is classified into three types of scenes: a person image (first mode image), a distant view image (second mode image), or another image (third mode image).
  • first mode image a distant view image
  • second mode image distant view image
  • third mode images include landscape images such as the sea and mountains
  • examples of other images (third mode images) include flowers and pets.
  • the image processing apparatus extracts the feature amount of the captured image according to the scene.
  • the captured image is a human image (first scene image)
  • a smile level can be used. That is, when the captured image is a human image, a word to be inserted into the human image template may be determined based on the determination result of the smile level in addition to or instead of the determination result of the number of faces (number of subjects). it can.
  • a smile level determination method will be described with reference to FIG.
  • the determination unit of the image processing apparatus detects a face area from a person image by a method such as face recognition (step S5001).
  • the degree of smile of a person image is calculated by digitizing the degree of ascending of the mouth corner.
  • various known techniques for face recognition can be used for calculating the smile level.
  • the determination unit compares the smile level with a preset first smile threshold value ⁇ (step S5002). When it is determined that the smile level is greater than or equal to ⁇ , the determination unit determines that the smile level of the person image is “smile: large”.
  • the determination unit compares the smile level with a second smile threshold value ⁇ set in advance (step S5003).
  • the determination unit determines that the smile level of this person image is “smile: medium”.
  • the determination unit determines that the smile level of the person image is “smile: small”.
  • the word to be inserted into the person image template is determined based on the determination result of the smile level of the person image.
  • examples of the word corresponding to the smile level of “smile: large” include “full of joy” and “very good”.
  • Examples of words that correspond to the smile level of “smile: medium” include “joyful” and “good calm”.
  • Examples of words corresponding to the smile level of “smile: small” include “seriously seems” and “cool”.
  • FIG. 48A is an example of an output image showing the operation result of the image processing apparatus, and this output image has a sentence determined based on the example of FIG.
  • the captured image is determined to be a person image, and the number of subjects and the color arrangement pattern (average color) are extracted as the feature amount. Further, the word inserted into the person image template is determined as “heavy” according to the color arrangement pattern. As a result, the output result shown in FIG. 48A is obtained. That is, in the example of FIG. 48A, the word “heavy” (adjective, combined form) is determined based on the average color of the captured image.
  • FIG. 48B is another example of an output image showing the operation result of the image processing apparatus, and this output image has a sentence determined based on the example of FIG.
  • the captured image is determined to be a person image, and the number of subjects and the smile level are extracted as the feature amount. Further, according to the smile level, the word inserted into the person image template is determined as “good expression”. As a result, the output result shown in FIG. 48B is obtained. That is, in the example of FIG. 48B, the word (end form) of “good expression” is determined based on the smile level of the person in the captured image.
  • the word output using the smile level for the person image it is possible to attach character information that is relatively close to the impression received from the image.
  • a representative color can be used instead of the average color.
  • the “first color” in the color arrangement pattern that is, the most frequently used color in the captured image can be used.
  • the representative color can be determined using clustering as described below.
  • FIG. 49 is a schematic block diagram showing an internal configuration of an image processing unit included in the imaging apparatus.
  • the image processing unit 5040 of the image processing apparatus includes an image data input unit 5042, an analysis unit 5044, a text creation unit 5052, and a text addition unit 5054.
  • the image processing unit 5040 performs various types of analysis processing on the image data generated by the imaging unit or the like, thereby acquiring various types of information regarding the content of the image data, and creating text that is highly consistent with the content of the image data. Then, text can be added to the image data.
  • the analysis unit 5044 includes a color information extraction unit 5046, a region extraction unit 5048, and a clustering unit 5050, and performs analysis processing on the image data.
  • the color information extraction unit 5046 extracts first information regarding color information of each pixel included in the image data from the image data.
  • the first information is a total of the HSV values of all the pixels included in the image data.
  • the first information is the frequency at which the predetermined color appears in the image (frequency in pixel units, area ratio, etc.) for a predetermined color associated with similarity (for example, associated with a predetermined color space).
  • the color resolution and the type of color space are not limited.
  • the first information may be information indicating how many pixels of each color are included in the image data for each color represented by an HSV space vector (HSV value) or RGB value.
  • HSV value HSV space vector
  • RGB value RGB value
  • the color resolution in the first information may be changed as appropriate in consideration of the burden of calculation processing, and the type of color space is not limited to HSV or RGB, and may be CMY, CMYK, or the like.
  • FIG. 50 is a flowchart showing the flow of representative color determination performed in the analysis unit 5044.
  • step S5101 the image processing apparatus starts calculating the representative color of specific image data 5060 (captured image, see FIG. 51).
  • step S5102 the image data input unit 5042 of the image processing apparatus outputs the image data to the analysis unit 5044.
  • the color information extraction unit 5046 of the analysis unit 5044 calculates first information 5062 regarding the color information of each pixel included in the image data (see FIG. 51).
  • FIG. 51 is a conceptual diagram showing a calculation process of the first information 5062 performed by the color information extraction unit 5046 in step S5102.
  • the color information extraction unit 5046 aggregates the color information included in the image data 5060 for each color (for example, for each gradation of 256 gradations) to obtain first information 5062.
  • 51 represents an image of the first information 5062 calculated by the color information extraction unit 5046.
  • the horizontal axis of the histogram in FIG. 51 is color, and the vertical axis represents how many pixels of a predetermined color are included in the image data 5060.
  • the region extraction unit 5048 of the analysis unit 5044 extracts the main region in the image data 5060.
  • the area extraction unit 5048 extracts a focused area from the image data 5060 shown in FIG. 51, and recognizes the central portion of the image data 5060 as the main area (see the main area 5064 in FIG. 52). ).
  • the region extraction unit 5048 of the analysis unit 5044 determines a target region for clustering performed in step S5105.
  • the area extraction unit 5048 recognizes that part of the image data 5060 is the main area 5064 in step S5103 and extracts the main area 5064, the clustering target is set as the main area 5064.
  • the first information 5062 main first information 5066
  • the histogram shown in the lower part of FIG. 52 represents an image of the main first information 5066.
  • the region extraction unit 5048 displays the first information corresponding to the entire region of the image data 5060 as shown in FIG. 5062 is determined as a clustering target. Note that there is no difference in the subsequent processing between the case where the main region 5064 is extracted and the case where it is not extracted, except that the target region for clustering is different. I will explain.
  • step S5105 the clustering unit 5050 of the analysis unit 5044 performs clustering on the main first information 5066 that is the first information 5062 of the region determined in step S5104.
  • FIG. 53 is a conceptual diagram showing the result of clustering performed by the clustering unit 5050 on the primary first information 5066 in the primary region 5064 shown in FIG.
  • the clustering unit 5050 classifies the main information 5066 having 256 gradations (see FIG. 52) into a plurality of clusters by the k-means method.
  • the clustering is not limited to the k-means method (k average method). In other examples, other methods such as the shortest distance method can be used.
  • the upper part of FIG. 53 shows which cluster each pixel is classified, and the histogram shown at the lower part of FIG. 53 shows the number of pixels belonging to each cluster.
  • the 256 first main information 5066 (FIG. 52) is classified into less than 256 clusters (three in the example shown in FIG. 53).
  • the result of clustering can include information about the size of each cluster and information about the color of each cluster (the position of the cluster in the color space).
  • step S5106 the clustering unit 5050 of the analysis unit 5044 determines a representative color of the image data 5060 based on the clustering result.
  • the clustering unit 5050 obtains a clustering result as shown in FIG. 53
  • the color belonging to the maximum cluster 5074 including the most pixels among the plurality of calculated clusters is set as the representative color of the image data 5060. To do.
  • the text creation unit 5052 creates a text using information on the representative color and assigns the text to the image data 5060.
  • the text creation unit 5052 reads a text template for a landscape image, for example, and applies a word (for example, “2012/03/10”) corresponding to the generation date and time of the image data 5060 to ⁇ date / time ⁇ of the text template.
  • the analysis unit 5044 can retrieve information related to the generation date and time of the image data 5060 from the storage medium and output the information to the text creation unit 5052.
  • the sentence creation unit 5052 applies the word corresponding to the representative color of the image data 5060 to the ⁇ adjective ⁇ of the sentence template.
  • the sentence creation unit 5052 reads the correspondence information from the storage unit 5028 and applies it to the sentence template.
  • the storage unit 5028 stores a table in which colors and words are associated with each scene.
  • the sentence creation unit 5052 can create a sentence (for example, “I found a very beautiful thing”) using words read from the table.
  • FIG. 54 shows image data 5080 to which text is given by the series of processes described above.
  • FIG. 55 shows an example of image data to which text is given by a series of processes similar to the above when the scene is a distant view image.
  • the scene is classified as a distant view image, and the representative color is determined to be blue.
  • the word “fresh” is associated with the representative color “blue”.
  • FIG. 56 is a diagram showing an example of a table having correspondence information between colors and words.
  • a color and a word are associated with each scene of a person image (first scene image), a distant view image (second scene image), and another image (third scene image).
  • the sentence creation unit 5052 uses a word corresponding to the representative color (for example, from the correspondence information in the table). “Classy”) and select ⁇ adjective ⁇ in the sentence template.
  • the color-word correspondence table can be set based on a color chart such as a PCCS color system, CICC color system, or NCS color system.
  • FIG. 57 shows an example of a correspondence table for a distant view image (second scene image) using a color chart of the CCIC display system.
  • FIG. 58 shows an example of a correspondence table for other images (third scene images) using a CCIC display color chart.
  • the horizontal axis corresponds to the hue of the representative color
  • the vertical axis corresponds to the tone of the representative color.
  • the representative color when the representative color is determined to be the area A5001, the name of the representative color (red, orange, yellow, blue, etc.) is applied to the word in the text as it is. For example, if the hue of the representative color is “red (R)” and the tone is “Vivid Tone (V)”, the adjective “crimson” representing the color is selected.
  • the adjective associated with the color is applied to the word in the text.
  • the representative color is determined to be the color (green) of the area A5003
  • the adjectives associated with green such as “comfortable” and “fresh”, are applied.
  • the representative color is determined to be the color of the region A5001 to A5005 and the tone is a vivid tone (V), strong tone (S), bright tone (B), or pale tone (LT) Applies adverbs that indicate the degree before the adjectives (eg, very, pretty, etc.).
  • the representative color is the area A5006, that is, “white tone (white)”, words that are associated with white, such as “clean” and “clear”, are selected.
  • the representative color is determined to be the area A5007, that is, a gray-based color (light gray tone: ltGY, medium gray tone: mGY, or dark gray tone: dkGY), it is a safe adjective. “Clean”, “nice”, etc. are selected.
  • a white or gray color that is, an achromatic color is a representative color
  • various colors are often included in the entire image. Therefore, by using words that are less related to color, it is possible to prevent text with inappropriate meanings from being added, and to add text that is relatively close to the image received from the image.
  • characters having a predetermined meaning can be selected as text. Characters having a predetermined meaning include, for example, “where is here”, “a”, and the like.
  • the present invention is not limited to this, and exception processing is sometimes performed in the selection of the sentence and the word. it can.
  • the text may be extracted from the “tweet dictionary” once every plural times (for example, once every 10 times).
  • the display content of the text is not necessarily patterned, so that the user can be prevented from getting bored with the display content.
  • the sentence adding unit arranges the text generated by the sentence creating unit at the upper part or the lower part of the image.
  • the present invention is not limited to this. It can also be arranged.
  • the present invention is not limited to this.
  • the text can be displayed so as to flow on the display unit of the image processing apparatus. Thereby, the input image is not easily affected by the text, or the text visibility is improved.
  • the present invention is not limited to this.
  • the text is not pasted. You may make it paste a text.
  • the sentence adding unit has described the case where the display method (font, color, display position, etc.) of the text generated by the sentence creating unit is determined by a predetermined method.
  • the display method (font, color, display position, etc.) of the text generated by the sentence creating unit is determined by a predetermined method.
  • a variety of text display methods can be determined. Hereinafter, some examples of these methods will be described.
  • the user can correct the text display method (font, color, display position) via the operation unit of the image processing apparatus.
  • the user can change or delete the contents (words) of the text.
  • the user can select not to display the entire text, that is, display / non-display of the text.
  • the size of the text can be changed according to the scene of the input image. For example, when the scene of the input image is a person image, the text can be reduced, and when the scene of the input image is a distant view image or other images, the text can be increased.
  • text can be highlighted and combined with image data.
  • a balloon can be given to the person and text can be placed in the balloon.
  • the display color of the text can be set based on the representative color of the input image. Specifically, a color having the same hue as the representative color of the input image and a different tone can be used as a text display color. As a result, it is possible to give a text that is in harmony with the input image without excessively claiming the text.
  • exception processing may be performed in determining the text display color.
  • the text color can be set to white and the peripheral portion of the text can be set to black.
  • the imaging device 1100 includes the image processing units (image processing devices) 3140, 3140a, 3140b, and 4140.
  • image processing devices image processing devices
  • a personal computer, a tablet PC (Personal Computer), a digital camera, and a mobile phone And the like may include image processing units 3140, 3140a, 3140b, and 4140, which are image processing apparatuses.
  • DESCRIPTION OF SYMBOLS 1001 ... Image processing apparatus, 1010 ... Image input part, 1020 ... Determination part, 1030 ... Text preparation part, 1040 ... Text addition part, 1090 ... Storage part, 1100 ... Imaging device, 1110 ... Imaging unit, 1111 ... Optical system, 1119 ... Image sensor, 1120 ... AD conversion unit, 1130 ... Buffer memory unit, 1140 ... Image processing unit, 1150 .. Display unit, 1160... Storage unit, 1170... Communication unit, 1180... Operation unit, 1190... CPU, 1200.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

This image processing device has: a decision unit that decides on a character having a predetermined meaning from a captured image; a judgment unit that judges whether the captured image is an image of a person, or an image differing from the image of a person; a recording unit that records a first syntax that is the syntax of a text used in the image of a person and a second syntax that is the syntax of a text used in the image differing from the image of a person; and an output unit that, when the judgment unit judges that the captured image is the image of a person, outputs a text of the first syntax using the character having the predetermined meaning, and when the judgment unit judges that the captured image is the image differing from the image of a person, outputs a text of the second syntax using the character having the predetermined meaning.

Description

画像処理装置、プログラム、画像処理方法及び撮像装置Image processing apparatus, program, image processing method, and imaging apparatus
 本発明は、画像処理装置、プログラム、画像処理方法及び撮像装置に関する。
 本願は、2011年12月5日に出願された特願2011-266143号、2011年9月21日に出願された特願2011-206024号、2011年12月6日に出願された特願2011-266805号、2011年12月7日に出願された特願2011-267882号、2012年9月19日に出願された特願2012-206296号、2012年9月19日に出願された特願2012-206297号、2012年9月19日に出願された特願2012-206298号、及び2012年9月19日に出願された特願2012-206299号に基づき優先権を主張し、その内容をここに援用する。
The present invention relates to an image processing device, a program, an image processing method, and an imaging device.
The present application includes Japanese Patent Application No. 2011-266143 filed on Dec. 5, 2011, Japanese Patent Application No. 2011-206024 filed on Sep. 21, 2011, and Japanese Patent Application No. 2011 filed on Dec. 6, 2011. -266805, Japanese Patent Application No. 2011-267882 filed on December 7, 2011, Japanese Patent Application No. 2012-206296 filed on September 19, 2012, Japanese Patent Application filed on September 19, 2012 Claims priority based on 2012-206297, Japanese Patent Application No. 2012-206298 filed on September 19, 2012, and Japanese Patent Application No. 2012-206299 filed on September 19, 2012. This is incorporated here.
 従来、特定の人物の誕生日、イベントの日時などを予め登録しておくことによって、撮像日時に対応する誕生日の人物名、撮像日時に対応するイベント名などの文字情報を撮像画像に付与する技術が開示されている(例えば、特許文献1参照)。 Conventionally, character information such as a birthday person name corresponding to an imaging date and an event name corresponding to an imaging date is given to a captured image by registering a birthday of the specific person, an event date and the like in advance. A technique is disclosed (for example, see Patent Document 1).
 また、画像を分類する従来技術の画像処理装置では、画像を予め定められているパターンの領域に分割し、各領域の色に関する分布のヒストグラムを作成する。そして、従来技術の画像処理装置では、特定のしきい値を超える最頻出色をその領域の代表領域色として決定する。さらに、従来技術の画像処理装置では、その領域の特徴量を抽出し、決定した領域の特徴量と代表色に基づき、特徴量を抽出した画像を定義して、画像辞書を構築していた。
 従来技術の画像処理装置では、例えば、画像上部の大きな領域の代表色を抽出して、抽出した代表色に基づいて、「青空」、「曇り空」、「夜空」などを定義して画像辞書を構成していた(例えば、特許文献2参照)。
Further, in a conventional image processing apparatus that classifies images, the image is divided into predetermined pattern areas, and a histogram of the distribution regarding the color of each area is created. In the conventional image processing apparatus, the most frequently appearing color exceeding a specific threshold is determined as the representative region color of the region. Further, in the conventional image processing apparatus, the feature amount of the region is extracted, and based on the determined feature amount of the region and the representative color, an image from which the feature amount is extracted is defined, and an image dictionary is constructed.
In a conventional image processing apparatus, for example, a representative color of a large area at the top of an image is extracted, and an image dictionary is defined by defining “blue sky”, “cloudy sky”, “night sky”, etc. based on the extracted representative color. It comprised (for example, refer patent document 2).
 また、現在、撮像画像に関連したテキストを、撮像画像に重畳させる技術が開示されている(例えば、特許文献3参照)。特許文献3に記載された技術では、撮像画像において、相対的に重要な被写体が写っている重要領域以外の非重要領域にテキストを重畳させて合成画像を生成する。具体的には、人物が写っている領域を重要領域に分類し、画像の中央を含まない非重要領域中にテキストを重畳させる。 Currently, a technique for superimposing a text related to a captured image on the captured image is disclosed (for example, see Patent Document 3). In the technique described in Patent Document 3, a composite image is generated by superimposing text on a non-important area other than an important area in which a relatively important subject is captured in a captured image. Specifically, an area in which a person is shown is classified as an important area, and text is superimposed on a non-important area that does not include the center of the image.
 また、画像データに所定の色変換を施す技術が開示されている(例えば、特許文献4参照)。特許文献4に記載された技術では、プリンタに所定の色変換を施した画像データを送出するに際して、画像データをイメージ画像データ、文字画像データ及び文字以外の非イメージ画像データに仕分け、イメージ画像データには第1の色変換を施し、文字画像データには第1の色変換又は第2の色変換を施し、文字以外の非イメージ画像データには第1の色変換又は第2の色変換を施す。 Further, a technique for performing predetermined color conversion on image data is disclosed (for example, see Patent Document 4). In the technique described in Patent Literature 4, when image data subjected to predetermined color conversion is sent to a printer, the image data is classified into image image data, character image data, and non-image image data other than characters, and image image data Is subjected to first color conversion, character image data is subjected to first color conversion or second color conversion, and non-image image data other than characters is subjected to first color conversion or second color conversion. Apply.
特開平2-303282号公報JP-A-2-303282 特開2001-160057号公報JP 2001-160057 A 特開2007-96816号公報JP 2007-96816 A 特開2008-293082号公報JP 2008-293082 A
 しかしながら、特許文献1に記載の従来技術は、ユーザが事前に登録した文字情報しか撮像画像に付与することができない。 However, the conventional technique described in Patent Document 1 can only add character information registered in advance by a user to a captured image.
 また、特許文献2に記載の従来技術では、予め定められた領域毎に抽出した特徴量と、最頻出色である代表色により分類していたため、画像を分類する(ラベリングする)ための演算処理の負担が大きかった。 Further, in the prior art described in Patent Document 2, since the classification is performed based on the feature amount extracted for each predetermined region and the representative color that is the most frequently appearing color, the arithmetic processing for classifying (labeling) the image The burden of was great.
 また、特許文献3に記載された従来技術では、テキストを画像に重畳したときの可読性については考慮されていない。このため、例えば、複雑なテクスチャが存在する領域にテキストを重畳すると、テキスト表示に使われるフォントのアウトラインとテクスチャのエッジが重なりテキストの可読性が低下することがある。すなわち、テキストが読み辛くなることがある。 In the prior art described in Patent Document 3, readability when text is superimposed on an image is not considered. For this reason, for example, when text is superimposed on an area where a complex texture exists, the outline of the font used for text display and the edge of the texture may overlap and the readability of the text may deteriorate. That is, the text may be difficult to read.
 また、特許文献4に記載された従来技術では、画像に関連したテキストをその画像に重畳させる場合に、そのテキストのフォントカラーを制御することについては、十分な考慮が為されていなかった。 In the prior art described in Patent Document 4, when text related to an image is superimposed on the image, sufficient consideration has not been given to controlling the font color of the text.
 例えば、フォントカラーを固定している場合には、与えられる画像の内容によっては、テキストのフォントカラーとそのテキストが描画される画像領域の色とのコントラストがほとんど無くなり、テキストの可読性が著しく低下する。
 また、フォントカラーを固定し、あるいは、フォントカラーとして画像情報から算出されるような補色を用いた場合には、その画像の印象を大きく変えてしまうことがある。
For example, when the font color is fixed, the contrast between the font color of the text and the color of the image area in which the text is drawn is almost eliminated depending on the contents of the given image, and the readability of the text is significantly reduced. .
In addition, when the font color is fixed or a complementary color calculated from image information is used as the font color, the impression of the image may be greatly changed.
 本発明の一態様は、撮像画像に対し、より柔軟な文字情報を付与することができる技術を提供することを目的とする。 An object of one embodiment of the present invention is to provide a technique capable of giving more flexible character information to a captured image.
 他の目的は、画像をラベリングするための演算処理の負荷を軽減できる画像処理装置、撮像装置、及びプログラムを提供することである。 Another object is to provide an image processing device, an imaging device, and a program that can reduce the load of arithmetic processing for labeling an image.
 また、他の目的は、閲覧者がテキストを読み易いように画像中にテキストを合成することができる画像処理装置、プログラム、画像処理方法及び撮像装置を提供することである。 Another object is to provide an image processing device, a program, an image processing method, and an imaging device that can synthesize text in an image so that a viewer can easily read the text.
 また、他の目的は、適度なフォントカラーでテキストを画像中に合成することができる画像処理装置、プログラム、画像処理方法及び撮像装置を提供することである。 Another object is to provide an image processing device, a program, an image processing method, and an imaging device that can synthesize text into an image with an appropriate font color.
 本発明の一態様である画像処理装置は、撮像画像を入力する画像入力部と、所定の空欄部に単語を挿入して文章を完成させる文章テンプレートとして、人物が被写体である人物画像に対する文章の作成に用いられる人物画像用テンプレートと、風景が被写体である風景画像に対する文章の作成に用いられる風景画像用テンプレートとを記憶する記憶部と、前記撮像画像が、前記人物画像であるか前記風景画像であるかを判定する判定部と、前記撮像画像に対する前記判定部による判定結果に応じて、前記人物画像用テンプレート又は前記風景画像用テンプレートの何れかの前記文章テンプレートを前記記憶部から読み出し、読み出した前記文章テンプレートの前記空欄部に前記撮像画像の特徴量又は撮像条件に応じた単語を挿入して前記撮像画像に対する文章を作成する文章作成部とを備えることを特徴とする。 An image processing apparatus according to one aspect of the present invention includes an image input unit that inputs a captured image, and a sentence template that inserts a word into a predetermined blank part to complete a sentence. A storage unit for storing a person image template used for creation and a landscape image template used for creating a sentence for a landscape image whose landscape is a subject; and whether the captured image is the person image or the landscape image The sentence template of either the person image template or the landscape image template is read out from the storage unit and read out according to a determination result by the determination unit for determining whether the image is a captured image or the landscape image template In addition, a word corresponding to the feature amount or the imaging condition of the captured image is inserted into the blank portion of the sentence template, and the imaging is performed. Characterized in that it comprises a sentence creation unit for creating a text for the image.
 本発明の他の態様である画像処理装置は、撮像画像が入力される画像入力部と、前記撮像画像の特徴量、及び、前記撮像画像の撮像条件の少なくとも一方に対応するテキストを決定する決定部と、前記撮像画像が第1種別の画像であるか、前記第1種別とは異なる第2種別の画像であるかを判定する判定部と、前記第1種別に用いられる文章の構文である第1構文と、前記第2種別に用いられる文章の構文である第2構文とを記憶する記憶部と、前記撮像画像が前記第1種別の画像であると前記判定部により判定されたとき、前記決定部が決定した前記テキストを用いて前記第1構文の文章を作成し、前記撮像画像が前記第2種別の画像であると前記判定部により判定されたとき、前記決定部が決定した前記テキストを用いて前記第2構文の文章を作成する文章作成部とを含むことを特徴とする。 An image processing apparatus according to another aspect of the present invention is configured to determine an image input unit to which a captured image is input, a text corresponding to at least one of a feature amount of the captured image and an imaging condition of the captured image. Part, a determination part for determining whether the captured image is a first type image or a second type image different from the first type, and a sentence syntax used for the first type. A storage unit that stores a first syntax and a second syntax that is a syntax of a sentence used for the second type; and the determination unit determines that the captured image is the first type image, The sentence of the first syntax is created using the text determined by the determination unit, and when the determination unit determines that the captured image is the second type image, the determination unit determines The second syntax using text Characterized in that it contains the sentence creation unit that creates a sentence.
 本発明の他の態様である撮像装置は、被写体を撮像して撮像画像を生成する撮像部と、所定の空欄部に単語を挿入して文章を完成させる文章テンプレートとして、人物が被写体である人物画像に対する文章の作成に用いられる人物画像用テンプレートと、風景が被写体である風景画像に対する文章の作成に用いられる風景画像用テンプレートとを記憶する記憶部と、前記撮像画像が、前記人物画像であるか前記風景画像であるかを判定する判定部と、前記撮像画像に対する前記判定部による判定結果に応じて、前記人物画像用テンプレート又は前記風景画像用テンプレートの何れかの前記文章テンプレートを前記記憶部から読み出し、読み出した前記文章テンプレートの前記空欄部に前記撮像画像の特徴量又は撮像条件に応じた単語を挿入して前記撮像画像に対する文章を作成する文章作成部とを備えることを特徴とする。 An imaging apparatus according to another aspect of the present invention includes an imaging unit that images a subject and generates a captured image, and a person whose subject is a subject as a sentence template that completes a sentence by inserting a word into a predetermined blank part A storage unit that stores a template for a human image used for creating a sentence for an image and a template for a landscape image used for creating a sentence for a landscape image whose scenery is a subject, and the captured image is the person image. A determination unit that determines whether the image is a landscape image, and the storage unit that stores either the person image template or the landscape image template according to a determination result by the determination unit on the captured image. The word corresponding to the feature amount or the imaging condition of the captured image is inserted into the blank part of the sentence template read out from Characterized in that it comprises a sentence creation unit for creating a sentence with respect to the captured image Te.
 本発明の他の態様であるプログラムは、所定の空欄部に単語を挿入して文章を完成させる文章テンプレートとして、人物が被写体である人物画像に対する文章の作成に用いられる人物画像用テンプレートと、風景が被写体である風景画像に対する文章の作成に用いられる風景画像用テンプレートとを記憶する記憶部を備える画像処理装置のコンピュータに、撮像画像を入力する画像入力ステップと、前記撮像画像が、前記人物画像であるか前記風景画像であるかを判定する判定ステップと、前記撮像画像に対する前記判定ステップによる判定結果に応じて、前記人物画像用テンプレート又は前記風景画像用テンプレートの何れかの前記文章テンプレートを前記記憶部から読み出し、読み出した前記文章テンプレートの前記空欄部に前記撮像画像の特徴量又は撮像条件に応じた単語を挿入して前記撮像画像に対する文章を作成する文章作成ステップとを実行させることを特徴とする。 A program according to another aspect of the present invention includes a person image template used for creating a sentence for a person image in which a person is a subject as a sentence template for completing a sentence by inserting a word into a predetermined blank space, and a landscape. An image input step of inputting a captured image to a computer of an image processing apparatus including a storage unit that stores a landscape image template used to create a sentence for a landscape image of which the subject is a subject, and the captured image is the person image The sentence template of either the person image template or the landscape image template is determined according to a determination step of determining whether the image is a landscape image or a determination result of the determination step for the captured image. Read from the storage unit and capture the image in the blank section of the read text template Characterized in that to execute the sentence generating step of generating a sentence by inserting a word corresponding to the feature amount or the imaging condition of the image relative to the captured image.
 本発明の他の態様である画像処理装置は、撮像画像から所定の意味を有する文字を決定する決定部と、前記撮像画像が人物画像であるか、前記人物画像とは異なる画像であるかを判定する判定部と、前記人物画像に用いられる文章の構文である第1構文と、前記人物画像とは異なる画像に用いられる文章の構文である第2構文とを記憶する記憶部と、前記撮像画像が前記人物画像であると前記判定部により判定されたとき、前記所定の意味を有する文字を用いて前記第1構文の文章を出力し、前記撮像画像が前記人物画像とは異なる画像であると前記判定部により判定されたとき、前記所定の意味を有する文字を用いて前記第2構文の文章を出力する出力部とを有することを特徴とする。 An image processing apparatus according to another aspect of the present invention includes a determination unit that determines a character having a predetermined meaning from a captured image, and whether the captured image is a person image or an image different from the person image. A determination unit for determining; a storage unit that stores a first syntax that is a syntax of a sentence used for the person image; and a second syntax that is a syntax of a sentence used for an image different from the person image; When the determination unit determines that the image is the person image, the first syntax sentence is output using characters having the predetermined meaning, and the captured image is an image different from the person image. And an output unit that outputs the sentence of the second syntax using the character having the predetermined meaning when determined by the determination unit.
 本発明の他の態様である画像処理装置は、撮像された画像データを取得する画像取得部と、前記取得された画像データからシーンを判別するシーン判別部と、前記取得された画像データから色情報の頻度分布に基づき主要色を抽出する主要色抽出部と、シーン毎に色情報と第1ラベルとが関連付けられて予め記憶されている記憶部と、前記記憶部から、前記抽出された主要色と前記判別されたシーンとに関連付けて予め記憶されている前記第1ラベルを読み出し、前記読み出した第1ラベルを前記取得された画像データのラベルとして生成する第1ラベル生成部と、を備えることを特徴とする。 An image processing apparatus according to another aspect of the present invention includes an image acquisition unit that acquires captured image data, a scene determination unit that determines a scene from the acquired image data, and a color from the acquired image data. A main color extracting unit that extracts a main color based on a frequency distribution of information; a storage unit in which color information and a first label are associated in advance for each scene; and a main unit extracted from the storage unit. A first label generation unit that reads the first label stored in advance in association with the color and the determined scene, and generates the read first label as a label of the acquired image data; It is characterized by that.
 本発明の他の態様である撮像装置は、上記に記載の画像処理装置を備えることを特徴とする。 An imaging apparatus according to another aspect of the present invention includes the image processing apparatus described above.
 本発明の他の態様であるプログラムは、撮像部を有する画像処理装置の画像処理をコンピュータに実行させるためのプログラムであり、撮像した画像データを取得する画像取得手順と、前記取得された画像データからシーンを判別するシーン判別手順と、前記取得された画像データから色情報の頻度分布に基づき主要色を抽出する主要色抽出手順と、前記抽出された主要色と、シーン毎に色情報と第1ラベルとが関連付けられて予め記憶されている記憶部から前記第1ラベルを読み出し、前記読み出した第1ラベルを前記取得された画像データのラベルとして生成する第1ラベル生成手順と、をコンピュータに実行させることを特徴とする。 A program according to another aspect of the present invention is a program for causing a computer to execute image processing of an image processing apparatus having an imaging unit, an image acquisition procedure for acquiring captured image data, and the acquired image data A scene determination procedure for determining a scene from the main color extraction procedure for extracting a main color based on a frequency distribution of color information from the acquired image data, the extracted main color, color information for each scene A first label generation procedure for reading the first label from a storage unit associated with one label in advance and generating the read first label as a label of the acquired image data; It is made to perform.
 本発明の他の態様である画像処理装置は、人物撮影シーンであるか否かを判別するシーン判別部と、前記シーン判別部により人物撮影シーンではないと判別されたとき、前記画像データから色情報を抽出する色抽出部と、色情報と所定の意味を有する文字とが関連付けられて予め記憶されている記憶部と、前記シーン判別部により人物撮影シーンではないと判別されたとき、前記色抽出部に抽出された前記色情報に対応する前記所定の意味を有する文字を前記記憶部から読み出す読み出し部とを備えることを特徴とする。 An image processing apparatus according to another aspect of the present invention includes: a scene determination unit that determines whether or not a person photographing scene; and a color that is determined from the image data when the scene determination unit determines that the scene is not a person photographing scene. A color extracting unit that extracts information; a storage unit that stores color information and characters having a predetermined meaning in association with each other; and the scene determination unit that determines that the color is not a person-captured scene. And a reading unit that reads out the character having the predetermined meaning corresponding to the color information extracted by the extraction unit from the storage unit.
 本発明の他の態様である画像処理装置は、画像データ、及び、テキストデータを取得する取得部と、前記取得部が取得した前記画像データのエッジを検出する検出部と、前記検出部により検出されたエッジに基づいて、前記画像データにおける前記テキストデータが配置される領域を決定する領域決定部と、前記領域決定部により決定された領域に前記テキストデータを配置した画像を生成する画像生成部と、を含むことを特徴とする。 An image processing apparatus according to another aspect of the present invention includes an acquisition unit that acquires image data and text data, a detection unit that detects an edge of the image data acquired by the acquisition unit, and a detection unit that detects the image data and text data. An area determining unit that determines an area in which the text data is arranged in the image data, and an image generating unit that generates an image in which the text data is arranged in the area determined by the area determining unit It is characterized by including these.
 本発明の他の態様である画像処理装置は、画像データを入力する画像入力部と、前記画像入力部により入力された画像データにおけるエッジを検出するエッジ検出部と、テキストデータを入力するテキスト入力部と、前記エッジ検出部により検出されたエッジに基づいて、前記画像データにおける前記テキストデータの合成領域を決定する領域決定部と、前記領域決定部により決定された合成領域に前記テキストデータを合成する合成部と、を備えることを特徴とする。 An image processing apparatus according to another aspect of the present invention includes an image input unit that inputs image data, an edge detection unit that detects an edge in the image data input by the image input unit, and a text input that inputs text data A region determining unit that determines a combined region of the text data in the image data based on the edge detected by the edge detecting unit, and the text data is combined with the combined region determined by the region determining unit And a synthesizing unit.
 本発明の他の態様であるプログラムは、画像データを入力するステップと、テキストデータを入力するステップと、前記入力された画像データにおけるエッジを検出するステップと、前記検出したエッジに基づいて、前記画像データにおける前記テキストデータの合成領域を決定するステップと、前記決定した合成領域に前記テキストデータを合成するステップと、をコンピュータに実行させることを特徴とする。 The program according to another aspect of the present invention includes a step of inputting image data, a step of inputting text data, a step of detecting an edge in the input image data, and the detected edge based on the detected edge. A step of determining a synthesis region of the text data in the image data and a step of synthesizing the text data with the determined synthesis region are performed by a computer.
 本発明の他の態様である画像処理方法は、画像処理装置が、画像データを入力するステップと、前記画像処理装置が、テキストデータを入力するステップと、前記画像処理装置が、前記入力された画像データにおけるエッジを検出するステップと、前記画像処理装置が、前記検出したエッジに基づいて、前記画像データにおける前記テキストデータの合成領域を決定するステップと、前記画像処理装置が、前記決定した合成領域に前記テキストデータを合成するステップと、を有することを特徴とする。 According to another aspect of the present invention, there is provided an image processing method in which an image processing device inputs image data, the image processing device inputs text data, and the image processing device receives the input. A step of detecting an edge in the image data; a step in which the image processing apparatus determines a synthesis area of the text data in the image data based on the detected edge; and Synthesizing the text data in a region.
 本発明の他の態様である撮像装置は、上述した画像処理装置を備えることを特徴とする。 An imaging apparatus according to another aspect of the present invention includes the above-described image processing apparatus.
 本発明の他の態様である画像処理装置は、画像データのエッジを検出する検出部と、前記検出部により検出された前記エッジの位置に基づいて、前記画像データにおける文字が配置される配置領域を決定する領域決定部と、前記領域決定部により決定された前記配置領域に前記文字を配置した画像を生成する画像生成部と、を含むことを特徴とする。 An image processing apparatus according to another aspect of the present invention includes: a detection unit that detects an edge of image data; and an arrangement region in which characters in the image data are arranged based on the position of the edge detected by the detection unit And an image generation unit that generates an image in which the characters are arranged in the arrangement region determined by the region determination unit.
 本発明の他の態様である画像処理装置は、画像データを入力する画像入力部と、テキストのデータを設定するテキスト設定部と、前記画像入力部により入力された画像データにおいて前記テキスト設定部により設定されたテキストのデータを合成する領域であるテキスト合成領域を設定するテキスト合成領域設定部と、前記画像入力部により入力された画像データおよび前記テキスト合成領域設定部により設定されたテキスト合成領域に基づくPCCS表色系のトーンおよび色相に対して、色相はそのままにしてトーンを変更したフォントカラーを設定するフォントカラー設定部を含み、少なくともフォントカラーを含むフォントを設定するフォント設定部と、前記画像入力部により入力された画像データにおいて前記テキスト合成領域設定部により設定されたテキスト合成領域に前記フォント設定部により設定された少なくともフォントカラーを含むフォントを用いて前記テキスト設定部により設定されたテキストのデータを合成した画像のデータである合成画像のデータを生成する合成画像生成部と、を備えることを特徴とする。 An image processing apparatus according to another aspect of the present invention includes an image input unit for inputting image data, a text setting unit for setting text data, and the text setting unit for image data input by the image input unit. A text composition area setting section for setting a text composition area, which is an area for synthesizing set text data, and image data input by the image input section and the text composition area set by the text composition area setting section. A font setting unit that sets a font color in which the tone is changed while keeping the hue unchanged, and a font setting unit that sets a font including at least the font color; In the image data input by the input unit, the text composition area setting is set. Combined image data, which is image data obtained by combining the text data set by the text setting unit using a font including at least the font color set by the font setting unit in the text synthesis area set by the unit. And a synthesized image generation unit for generating.
 本発明の他の態様であるプログラムは、画像データを入力するステップと、テキストのデータを設定するステップと、前記入力された画像データにおいて前記設定されたテキストのデータを合成する領域であるテキスト合成領域を設定するステップと、前記入力された画像データおよび前記設定されたテキスト合成領域に基づくPCCS表色系のトーンおよび色相に対して、色相はそのままにしてトーンを変更したフォントカラーを設定し、少なくともフォントカラーを含むフォントを設定するステップと、前記入力された画像データにおいて前記設定されたテキスト合成領域に前記設定された少なくともフォントカラーを含むフォントを用いて前記設定されたテキストのデータを合成した画像のデータである合成画像のデータを生成するステップと、をコンピュータに実行させることを特徴とする。 According to another aspect of the present invention, there is provided a program comprising: a step of inputting image data; a step of setting text data; and a text composition which is an area for combining the set text data in the input image data. A step of setting an area, and setting a font color in which the tone is changed while leaving the hue unchanged, for the tone and hue of the PCCS color system based on the input image data and the set text composition area, Setting a font including at least a font color; and combining the set text data using the font including at least the set font color in the set text composition area in the input image data. Generate composite image data that is image data Characterized in that to execute a step, to the computer.
 本発明の他の態様である画像処理方法は、画像処理装置が、画像データを入力するステップと、前記画像処理装置が、テキストのデータを設定するステップと、前記画像処理装置が、前記入力された画像データにおいて前記設定されたテキストのデータを合成する領域であるテキスト合成領域を設定するステップと、前記画像処理装置が、前記入力された画像データおよび前記設定されたテキスト合成領域に基づくPCCS表色系のトーンおよび色相に対して、色相はそのままにしてトーンを変更したフォントカラーを設定し、少なくともフォントカラーを含むフォントを設定するステップと、前記画像処理装置が、前記入力された画像データにおいて前記設定されたテキスト合成領域に前記設定された少なくともフォントカラーを含むフォントを用いて前記設定されたテキストのデータを合成した画像のデータである合成画像のデータを生成するステップと、を有することを特徴とする。 According to another aspect of the present invention, there is provided an image processing method in which an image processing apparatus inputs image data, the image processing apparatus sets text data, and the image processing apparatus receives the input. Setting a text composition area, which is an area in which the set text data is synthesized in the image data, and the image processing apparatus comprising a PCCS table based on the input image data and the set text composition area. A step of setting a font color in which the tone is changed with the hue unchanged and setting a font including at least a font color with respect to the tone and hue of the color system; and the image processing apparatus in the input image data A font including at least the set font color in the set text composition area. And having the steps of: generating data of a composite image which is the data of an image obtained by synthesizing the data of the set text using cement.
 本発明の他の態様である撮像装置は、上述した画像処理装置を備えることを特徴とする。 An imaging apparatus according to another aspect of the present invention includes the above-described image processing apparatus.
 本発明の他の態様である画像処理装置は、画像データ、及び、テキストデータを取得する取得部と、前記画像データにおける前記テキストデータが配置されるテキスト配置領域を決定する領域決定部と、テキストデータに所定の色を設定する色設定部と、前記テキスト配置領域に前記所定の色の前記テキストデータを配置した画像を生成する画像生成部とを含み、前記画像データの前記テキスト配置領域の色相値と、の前記テキストデータの色相値との比は、前記画像データの前記テキスト配置領域のトーン値と、の前記テキストデータのトーン値との比よりも1に近いことを特徴とする。 An image processing apparatus according to another aspect of the present invention includes an acquisition unit that acquires image data and text data, an area determination unit that determines a text arrangement area in which the text data is arranged in the image data, and a text A color setting unit that sets a predetermined color in the data; and an image generation unit that generates an image in which the text data of the predetermined color is arranged in the text arrangement region, and the hue of the text arrangement region of the image data The ratio of the value to the hue value of the text data is closer to 1 than the ratio of the tone value of the text arrangement area of the image data to the tone value of the text data.
 本発明の他の態様である画像処理装置は、画像データにおける文字が配置される配置領域を決定する決定部と、文字に所定色を設定する色設定部と、前記配置領域に前記文字を配置した画像を生成する画像生成部とを含み、前記色設定部は、前記配置領域の色相値と前記文字の色相値との比が、前記配置領域のトーン値と前記文字のトーン値との比よりも1に近くなるように前記所定色を設定することを特徴とする。 An image processing apparatus according to another aspect of the present invention includes a determination unit that determines an arrangement region in which characters in image data are arranged, a color setting unit that sets a predetermined color for the characters, and the characters in the arrangement region An image generation unit configured to generate an image, wherein the color setting unit is configured such that a ratio between a hue value of the arrangement region and a hue value of the character is a ratio between a tone value of the arrangement region and a tone value of the character. The predetermined color is set so as to be closer to 1.
 本発明の態様によれば、撮像画像に対し、柔軟に文字情報を付与することができる。 According to the aspect of the present invention, it is possible to flexibly add character information to a captured image.
 また、本発明の態様によれば、画像に適したラベリングを実現することができる In addition, according to the aspect of the present invention, it is possible to realize labeling suitable for an image.
 また、本発明の態様によれば、閲覧者がテキストを読み易いように画像中にテキストを合成することができる。 Further, according to the aspect of the present invention, the text can be synthesized in the image so that the viewer can easily read the text.
 また、本発明の態様によれば、適度なフォントカラーでテキストを画像中に合成することができる。 Further, according to the aspect of the present invention, it is possible to synthesize text into an image with an appropriate font color.
本発明の一実施形態による画像処理装置の機能ブロック図の一例である。It is an example of the functional block diagram of the image processing apparatus by one Embodiment of this invention. 記憶部に記憶される文章テンプレートの一例である。It is an example of the text template memorize | stored in a memory | storage part. 記憶部に記憶される文章テンプレートの一例である。It is an example of the text template memorize | stored in a memory | storage part. 記憶部に記憶される文章テンプレートの一例である。It is an example of the text template memorize | stored in a memory | storage part. 記憶部に記憶される文章テンプレートの一例である。It is an example of the text template memorize | stored in a memory | storage part. 記憶部に記憶される単語の一例である。It is an example of the word memorize | stored in a memory | storage part. 記憶部に記憶される単語の一例である。It is an example of the word memorize | stored in a memory | storage part. 撮像画像の配色パターンの抽出について説明するための説明図である。It is explanatory drawing for demonstrating extraction of the color scheme of a captured image. 撮像画像の配色パターンの抽出について説明するための説明図である。It is explanatory drawing for demonstrating extraction of the color scheme of a captured image. 撮像画像の配色パターンの抽出について説明するための説明図である。It is explanatory drawing for demonstrating extraction of the color scheme of a captured image. 撮像画像の配色パターンの抽出について説明するための説明図である。It is explanatory drawing for demonstrating extraction of the color scheme of a captured image. 画像処理装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of an image processing apparatus. 画像処理装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of an image processing apparatus. 文章付加部によって文章を付加された撮像画像の一例である。It is an example of the captured image with which the text was added by the text addition part. 文章付加部によって文章を付加された撮像画像の一例である。It is an example of the captured image with which the text was added by the text addition part. 文章付加部によって文章を付加された撮像画像の一例である。It is an example of the captured image with which the text was added by the text addition part. 文章付加部によって文章を付加された撮像画像の一例である。It is an example of the captured image with which the text was added by the text addition part. 文章付加部によって文章を付加された撮像画像の一例である。It is an example of the captured image with which the text was added by the text addition part. 他の一実施形態による撮像装置の機能ブロック図の一例である。It is an example of the functional block diagram of the imaging device by other one Embodiment. 他の一実施形態による撮像システムの構成を示す概略ブロック図である。It is a schematic block diagram which shows the structure of the imaging system by other one Embodiment. 画像処理部のブロック図である。It is a block diagram of an image processing part. 記憶媒体に画像データに関連付けられて記憶されている画像識別情報の一例を説明する図である。It is a figure explaining an example of the image identification information memorize | stored in association with image data on the storage medium. テーブル記憶部に記憶されている主要色の組み合わせと第1ラベルの一例を説明する図である。It is a figure explaining an example of the combination of the main color memorize | stored in the table memory | storage part, and a 1st label. 画像データの主要色の一例を説明する図である。It is a figure explaining an example of the main colors of image data. 図13で抽出された主要色のラベリングの一例を説明する図である。It is a figure explaining an example of labeling of the main color extracted in FIG. 図13で抽出された主要色のラベリングの一例を説明する図である。It is a figure explaining an example of labeling of the main color extracted in FIG. スポーツの画像データの一例である。It is an example of the image data of sports. 図15Aのスポーツの画像データの色ベクトルを表す図である。It is a figure showing the color vector of the image data of the sport of FIG. 15A. ポートレートの画像データの一例である。It is an example of portrait image data. 図16Aのポートレートの画像データの色ベクトルを表す図である。It is a figure showing the color vector of the image data of the portrait of FIG. 16A. 風景の画像データの一例である。It is an example of the image data of a landscape. 図17Aの風景の画像データの色ベクトルを表す図である。It is a figure showing the color vector of the image data of the scenery of FIG. 17A. シーン毎の主要色の組み合わせの第1ラベルの一例を説明する図である。It is a figure explaining an example of the 1st label of the combination of the main colors for every scene. 時刻、季節と色ベクトルによる第1ラベルの例を説明する図である。It is a figure explaining the example of the 1st label by time, a season, and a color vector. 撮像装置が行うラベル生成のフローチャートである。It is a flowchart of the label production | generation which an imaging device performs. 他の一実施形態による画像処理部のブロック図である。It is a block diagram of the image processing part by other one Embodiment. 他の一実施形態による画像処理部のブロック図である。It is a block diagram of the image processing part by other one Embodiment. 撮像装置が行うラベル生成のフローチャートである。It is a flowchart of the label production | generation which an imaging device performs. 他の一実施形態による画像データから、複数の色ベクトルを抽出する一例を説明する図である。It is a figure explaining an example which extracts a several color vector from the image data by other one Embodiment. 画像処理部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of an image process part. 入力画像の一例を示すイメージ図である。It is an image figure which shows an example of an input image. グローバルコスト画像の一例を示すイメージ図である。It is an image figure which shows an example of a global cost image. 顔コスト画像の一例を示すイメージ図である。It is an image figure which shows an example of a face cost image. エッジコスト画像の一例を示すイメージ図である。It is an image figure which shows an example of an edge cost image. 最終コスト画像の一例を示すイメージ図である。It is an image figure which shows an example of a final cost image. 合成画像の一例を示すイメージ図である。It is an image figure which shows an example of a synthesized image. 静止画の合成処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the synthesis process of a still image. 動画の合成処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the synthetic | combination process of a moving image. 他の一実施形態による画像処理部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image process part by other one Embodiment. 合成処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a synthetic | combination process. 他の一実施形態による画像処理部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image process part by other one Embodiment. 合成処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a synthetic | combination process. テキスト矩形領域内のコストの総和の算出方法を示すイメージ図である。It is an image figure which shows the calculation method of the sum total of the cost in a text rectangular area. 他の一実施形態に係る画像処理部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image process part which concerns on other one Embodiment. PCCS表色系におけるトーンによる対照の調和の関係を示す図である。It is a figure which shows the relationship of the harmony of the contrast by the tone in a PCCS color system. 画像処理部において行われる処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process performed in an image process part. フォント設定部において行われる処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process performed in a font setting part. 画像データの一例をイメージで示す図である。It is a figure which shows an example of image data with an image. 合成画像のデータの一例をイメージで示す図である。It is a figure which shows an example of the data of a synthesized image with an image. 合成画像のデータの一例をイメージで示す図である。It is a figure which shows an example of the data of a synthesized image with an image. PCCS表色系の色相環の一例をグレースケールで示す図である。It is a figure which shows an example of the hue ring of a PCCS color system in gray scale. PCCS表色系のトーンの一例をグレースケールで示す図である。It is a figure which shows an example of the tone of a PCCS color system in gray scale. 12種類の有彩色のトーンを示す図である。It is a figure which shows 12 types of chromatic color tones. 5種類の無彩色のトーンを示す図である。It is a figure which shows five types of achromatic tone. 撮像画像の特徴量を抽出するプロセスの一例を模式的に示す図である。It is a figure which shows typically an example of the process which extracts the feature-value of a captured image. 撮像画像の特徴量を抽出するプロセスの別の一例を模式的に示す図である。It is a figure which shows typically another example of the process which extracts the feature-value of a captured image. 笑顔レベルの判定方法を模式的に示すフローチャートである。It is a flowchart which shows typically the determination method of a smile level. 画像処理装置からの出力画像の一例を示す図である。It is a figure which shows an example of the output image from an image processing apparatus. 画像処理装置からの出力画像の別の例を示す図である。It is a figure which shows another example of the output image from an image processing apparatus. 撮像装置の画像処理部の内部構成を表す概略ブロック図である。It is a schematic block diagram showing the internal structure of the image process part of an imaging device. 代表色の決定の流れを示すフローチャートである。It is a flowchart which shows the flow of determination of a representative color. 画像処理部における処理の一例を示す概念図である。It is a conceptual diagram which shows an example of the process in an image process part. 画像処理部における処理の一例を示す概念図である。It is a conceptual diagram which shows an example of the process in an image process part. 図52に示す主要領域に対して実施されたクラスタリングの結果を示す概念図である。FIG. 53 is a conceptual diagram illustrating a result of clustering performed on the main region illustrated in FIG. 52. 文章付加部によって文章を付加された画像の一例である。It is an example of the image which the text was added by the text addition part. 文章付加部によって文章を付加された画像の別の一例である。It is another example of the image which the text was added by the text addition part. 色と単語との対応テーブルの一例を示す図である。It is a figure which shows an example of the correspondence table of a color and a word. 遠景画像(第2シーン画像)用の対応テーブルの一例を示す図である。It is a figure which shows an example of the correspondence table for a distant view image (2nd scene image). その他の画像(第3シーン画像)用の対応テーブルの一例を示す図である。It is a figure which shows an example of the corresponding | compatible table for other images (3rd scene image).
(第1の実施形態)
 以下、図面を参照しながら本発明の第1の実施形態について説明する。図1は、本発明の第1の実施形態による画像処理装置1001の機能ブロック図の一例である。図2A~2Dは、記憶部1090に記憶される文章テンプレートの一例である。図3A、3Bは、記憶部1090に記憶される単語の一例である。図4A~4Dは、撮像画像の配色パターンの抽出について説明するための説明図である。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is an example of a functional block diagram of an image processing apparatus 1001 according to the first embodiment of the present invention. 2A to 2D are examples of sentence templates stored in the storage unit 1090. FIG. 3A and 3B are examples of words stored in the storage unit 1090. 4A to 4D are explanatory diagrams for explaining extraction of a color arrangement pattern of a captured image.
 画像処理装置1001は、図1に示すように、画像入力部1010、判定部1020、文章作成部1030、文章付加部1040及び記憶部1090を備える。画像入力部1010は、例えば、ネットワーク又は記憶媒体を介して、撮像画像を入力する。画像入力部1010は、撮像画像を判定部1020に出力する。 The image processing apparatus 1001 includes an image input unit 1010, a determination unit 1020, a sentence creation unit 1030, a sentence addition unit 1040, and a storage unit 1090, as shown in FIG. The image input unit 1010 inputs a captured image via, for example, a network or a storage medium. The image input unit 1010 outputs the captured image to the determination unit 1020.
 記憶部1090は、所定の空欄部に単語を挿入して文章を完成させる文章テンプレートを記憶する。具体的には、記憶部1090は、文章テンプレートとして、人物が被写体である画像(以下、人物画像という)に対する文章の作成に用いられる人物画像用テンプレートと、風景(第2種別とも称する)が被写体である画像(以下、風景画像という)に対する文章の作成に用いられる風景画像用テンプレートとを記憶する。なお、人物画像の一例は、ポートレート(第1種別とも称する)である。 The storage unit 1090 stores a sentence template that completes a sentence by inserting a word into a predetermined blank part. Specifically, the storage unit 1090 includes, as a sentence template, a person image template used to create a sentence for an image in which a person is a subject (hereinafter referred to as a person image), and a landscape (also referred to as a second type) as a subject. And a landscape image template used for creating a sentence for an image (hereinafter referred to as a landscape image). An example of a person image is a portrait (also referred to as a first type).
 例えば、記憶部1090は、図2A、2Bに示すような2種類の人物画像用テンプレートを記憶する。なお、図2A、2Bに示す人物画像用テンプレートは、被写体の人数に応じた単語を挿入する空欄部(空欄部{人数}と表記)、及び、撮像画像の配色パターンに応じた単語を挿入する空欄部(空欄部{形容詞}と表記)を有している。 For example, the storage unit 1090 stores two types of person image templates as shown in FIGS. 2A and 2B. 2A and 2B, a blank portion for inserting a word corresponding to the number of subjects (blank portion {number of people}) and a word corresponding to a color arrangement pattern of the captured image are inserted. It has a blank part (shown as a blank part {adjective}).
 また例えば、記憶部1090は、図2C、2Dに示すような2種類の風景画像用テンプレートを記憶する。なお、図2Cに示す風景画像用テンプレートは、撮像画像の撮像条件(日時)に応じた単語を挿入する空欄部(空欄部{日時})、及び、撮像画像の配色パターンに応じた単語を挿入する空欄部を有している。また、図2Dに示す風景画像用テンプレートは、撮像画像の撮像条件(場所)に応じた単語を挿入する空欄部(空欄部{場所}と表記)、及び、撮像画像の配色パターンに応じた単語を挿入する空欄部を有している。 For example, the storage unit 1090 stores two types of landscape image templates as shown in FIGS. 2C and 2D. In the landscape image template shown in FIG. 2C, a blank portion (blank portion {date}) for inserting a word corresponding to the imaging condition (date and time) of the captured image and a word corresponding to the color arrangement pattern of the captured image are inserted. It has a blank part. In addition, the landscape image template shown in FIG. 2D includes a blank portion (denoted as blank portion {place}) for inserting a word corresponding to the imaging condition (location) of the captured image, and a word corresponding to the color arrangement pattern of the captured image. It has the blank part which inserts.
 なお、上述の人物画像用テンプレートは、被写体として撮像された人物に焦点をあててイメージされるような文章テンプレート、つまり、被写体として撮像された人物の視点による文章に空欄部を設定した文章テンプレートである。例えば、図2Aの人物画像用テンプレートの文言「過ごした」、図2Bの人物画像用テンプレートの文言「ポーズ」は撮像された人物の視点を表現している。また、上述の風景画像用テンプレートは、撮像画像全体からイメージされるような文章テンプレート、つまり、被写体を撮像した撮影者の視点による文章に空欄部を設定した文章テンプレートである。例えば、図2Cの風景画像用テンプレートの文言「一枚」、図2Dの風景画像用テンプレートの文言「景色」は撮影者の視点を表現している。 The person image template described above is a sentence template that is focused on a person imaged as a subject, that is, a sentence template in which a blank portion is set in a sentence from the viewpoint of a person imaged as a subject. is there. For example, the word “spent” in the person image template in FIG. 2A and the word “pose” in the person image template in FIG. 2B express the viewpoint of the person who is captured. The landscape image template described above is a text template that is imaged from the entire captured image, that is, a text template in which a blank portion is set in text from the viewpoint of the photographer who captured the subject. For example, the wording “one piece” in the landscape image template in FIG. 2C and the wording “scenery” in the landscape image template in FIG. 2D express the viewpoint of the photographer.
 さらに、記憶部1090は、文章テンプレート(人物画像用テンプレート、風景画像用テンプレート)に加え、文章テンプレートの各空欄部に挿入する単語を記憶する。例えば、記憶部1090は、図3Aに示すように、撮像画像の被写体の人数に対応付けて、空欄部{人数}に挿入する単語として人数に関連する単語を記憶する。 Further, the storage unit 1090 stores a word to be inserted into each blank portion of the sentence template in addition to the sentence template (person image template, landscape image template). For example, as illustrated in FIG. 3A, the storage unit 1090 stores a word related to the number of people as a word to be inserted into the blank portion {number of people} in association with the number of subjects of the captured image.
 例えば、人物画像用テンプレートを使用する場合に、被写体の人数が「1」であったときは、人物画像用テンプレートの空欄部{人数}には単語「ひとり」が挿入される。なお、文章作成部1030が、使用する文章テンプレートを記憶部1090から読み出して、空欄部に単語を挿入する(後述)。 For example, when a person image template is used and the number of subjects is “1”, the word “one person” is inserted into the blank portion {number of persons] of the person image template. Note that the sentence creation unit 1030 reads out a sentence template to be used from the storage unit 1090 and inserts a word in the blank part (described later).
 また、記憶部1090は、図3Bに示すように、撮像画像の配色パターンに対応付けて、人物画像用テンプレートの空欄部{形容詞}又は風景画像用テンプレートの空欄部{形容詞}に挿入する単語として人物画像用の形容詞及び風景画像用の形容詞を記憶する。 Further, as shown in FIG. 3B, the storage unit 1090 is associated with the color arrangement pattern of the captured image as a word to be inserted into the blank portion {adjective} of the person image template or the blank portion {adjective} of the landscape image template. Stores adjectives for person images and adjectives for landscape images.
 例えば、人物画像用テンプレートを使用する場合に、撮像画像の全領域の配色パターンが、図4Aに示す、第1色「色1」、第2色「色2」、第3色「色3」であったときは、人物画像用テンプレートの空欄部{形容詞}には単語「クールな」が挿入される。また、風景画像用テンプレートを使用する場合に、撮像画像の全領域の配色パターンが、図4Bに示す、第1色「色2」、第2色「色1」、第3色「色4」であったときは、風景画像用テンプレートの空欄部{形容詞}には単語「賑やかな」が挿入される。 For example, when a person image template is used, the color arrangement pattern of the entire region of the captured image has the first color “color 1”, the second color “color 2”, and the third color “color 3” shown in FIG. 4A. The word “cool” is inserted into the blank field {adjective} of the person image template. Further, when the landscape image template is used, the color arrangement pattern of the entire area of the captured image has the first color “color 2”, the second color “color 1”, and the third color “color 4” shown in FIG. 4B. The word “lively” is inserted into the blank field {adjective} of the landscape image template.
 上述の色1~色5は、撮像画像において実際に表現されている個々の色を、例えば、暖色系/寒色系などの基準によって5色(5つの代表色)に分類したものである。換言すれば、撮像画像の各画素の画素値を、例えば、暖色系/寒色系などの基準によって5色に分類したものが、上述の色1~色5である。
 また、配色パターンを構成する、第1色は色1~色5のうち、この撮像画像において最も多く表現されている色、第2色は色1~色5のうち、この撮像画像において2番目に多く表現されている色、第3色は色1~色5のうち、この撮像画像において3番目に多く表現されている色である。換言すれば、色1~色5に画素値を分類したときに分類された画素数が最も多い色が第1色、色1~色5に画素値を分類したときに分類された画素数が2番目に多い色が第2色、色1~色5に画素値を分類したときに分類された画素数が3番目に多い色が第3色である。
 なお、文章作成部1030が、撮像画像から配色パターンを抽出する。
The above-described colors 1 to 5 are obtained by classifying individual colors actually expressed in the captured image into five colors (five representative colors) based on a standard such as a warm color / cold color. In other words, the above-described colors 1 to 5 are obtained by classifying the pixel values of each pixel of the captured image into five colors based on, for example, a warm color / cold color standard.
The first color constituting the color arrangement pattern is the color most expressed in the captured image among the colors 1 to 5, and the second color is the second color in the captured image out of the colors 1 to 5. The third color is the color most expressed in the captured image among the colors 1 to 5. In other words, the color having the largest number of pixels classified when the pixel values are classified into colors 1 to 5 is the first color, and the number of pixels classified when the pixel values are classified into colors 1 to 5 is The second most common color is the second color, and when the pixel values are classified into colors 1 to 5, the third color is the third largest number of pixels.
Note that the text creation unit 1030 extracts a color arrangement pattern from the captured image.
 なお、撮像画像の全領域の配色パターンに代えて、撮像画像上の一部の領域における配色パターンを用いてもよい。つまり、文章作成部1030は、撮像画像上の一部の領域の配色パターンに応じた形容詞を空欄部に挿入してもよい。具体的には、文章作成部1030は、撮像画像が人物画像であるか風景画像であるかに応じて撮像画像上の所定領域を決定し、決定した撮像画像上の所定領域の配色パターンに応じた形容詞を空欄部に挿入してもよい。
 例えば、文章作成部1030は、図4Cに示すように撮像画像が人物画像であるときは、その人物画像の中央部の領域を所定領域として決定し、中央部の領域の配色パターンを抽出し、抽出した配色パターンに応じた形容詞を空欄部に挿入してもよい。また、文章作成部1030は、図4Dに示すように撮像画像が風景画像であるときは、その風景画像の上部の領域を所定領域として決定し、上記の領域の配色パターンを抽出し、抽出した配色パターンに応じた形容詞を空欄部に挿入してもよい。
Note that a color arrangement pattern in a partial area on the captured image may be used instead of the color arrangement pattern in the entire area of the captured image. That is, the sentence creation unit 1030 may insert an adjective corresponding to the color arrangement pattern of a partial area on the captured image into the blank part. Specifically, the text creation unit 1030 determines a predetermined area on the captured image according to whether the captured image is a person image or a landscape image, and according to the determined color arrangement pattern of the predetermined area on the captured image An adjective may be inserted in the blank.
For example, when the captured image is a person image as shown in FIG. 4C, the sentence creation unit 1030 determines the central area of the human image as a predetermined area, extracts the color arrangement pattern of the central area, An adjective corresponding to the extracted color arrangement pattern may be inserted into the blank section. In addition, when the captured image is a landscape image as illustrated in FIG. 4D, the text creation unit 1030 determines a region above the landscape image as a predetermined region, and extracts and extracts a color scheme pattern of the above region. Adjectives corresponding to the color arrangement pattern may be inserted into the blank section.
 また、図示は省略したが、記憶部1090は、撮像日時に対応付けて、空欄部{日時}に挿入する単語として日時に関連する単語(例えば、時刻、“おはよう”、“夕暮れ”、“真夏!!”、・・・)を記憶する。また、記憶部1090は、撮影場所に対応付けて、空欄部{場所}に挿入する単語として場所に関連する単語(例えば、“北国”、“古都”“富士山”、“雷門”、・・・)を記憶する。 Although not shown, the storage unit 1090 associates with the imaging date and time and inserts the word related to the date and time as a word to be inserted into the blank field {date and time} (for example, time, “good morning”, “dusk”, “midsummer”). !! ", ...) is memorized. In addition, the storage unit 1090 associates with the shooting location with a word related to the location as a word to be inserted into the blank portion {location} (for example, “North Country”, “Old City” “Mt. Fuji”, “Kaminarimon”,. ) Is memorized.
 判定部1020は、画像入力部1010から撮像画像を取得する。判定部1020は、取得した撮像画像が人物画像であるか風景画像であるかを判定する。以下、判定部1020による人物画像/風景画像の判定について詳細に説明する。なお、第1の閾値(Flowとも称する)は、第2の閾値(Fhighとも称する)よりも小さい値である。 The determination unit 1020 acquires a captured image from the image input unit 1010. The determination unit 1020 determines whether the acquired captured image is a person image or a landscape image. Hereinafter, the determination of the person image / landscape image by the determination unit 1020 will be described in detail. Note that the first threshold value (also referred to as “Flow”) is smaller than the second threshold value (also referred to as “Fhigh”).
 判定部1020は、撮像画像内の顔領域の認識を試みる。
(顔領域=0の場合)
 判定部1020は、撮像画像内に1つも顔領域を認識しなかった場合、この撮像画像は風景画像であると判定する。
The determination unit 1020 attempts to recognize a face area in the captured image.
(When face area = 0)
If no face area is recognized in the captured image, the determination unit 1020 determines that the captured image is a landscape image.
(顔領域=1の場合)
 判定部1020は、撮像画像内に1つの顔領域を認識した場合、下記式(1)に従って、撮像画像の大きさに対する顔領域の大きさの割合Rを算出する。
 R=Sf/Sp・・・(1)
 上記式(1)のSpは、撮像画像の大きさであって、具体的には、撮像画像の長手方向の長さを用いる。上記式(1)のSfは、顔領域の大きさであって、具体的には、顔領域に外接する矩形の長手方向の長さ(若しくは、顔領域を囲む楕円の長軸の長さ(長径))を用いる。
(When face area = 1)
When the determination unit 1020 recognizes one face area in the captured image, the determination unit 1020 calculates a ratio R of the size of the face area to the size of the captured image according to the following equation (1).
R = Sf / Sp (1)
Sp in the above formula (1) is the size of the captured image, and specifically, the length in the longitudinal direction of the captured image is used. Sf in the above formula (1) is the size of the face area. Specifically, the length in the longitudinal direction of the rectangle circumscribing the face area (or the length of the major axis of the ellipse surrounding the face area ( Long diameter)) is used.
 割合Rを算出した判定部1020は、割合Rと第1の閾値Flowとを比較する。判定部1020は、割合Rが第1の閾値Flow未満であると判定した場合、この撮像画像は風景画像であると判定する。一方、判定部1020は、割合Rが第1の閾値Flow以上であると判定した場合、割合Rと第2の閾値Fhighとを比較する。 The determination unit 1020 that calculated the ratio R compares the ratio R with the first threshold value Flow. If the determination unit 1020 determines that the ratio R is less than the first threshold value Flow, the determination unit 1020 determines that the captured image is a landscape image. On the other hand, when the determination unit 1020 determines that the ratio R is equal to or greater than the first threshold value Flow, the determination unit 1020 compares the ratio R with the second threshold value Fhigh.
 判定部1020は、割合Rが第2の閾値Fhigh以上であると判定した場合、この撮像画像は人物画像であると判定する。一方、判定部1020は、割合Rが第2の閾値Fhigh未満であると判定した場合、この撮像画像は風景画像であると判定する。 If the determination unit 1020 determines that the ratio R is equal to or greater than the second threshold Fhigh, the determination unit 1020 determines that the captured image is a person image. On the other hand, when the determination unit 1020 determines that the ratio R is less than the second threshold value Fhigh, the determination unit 1020 determines that the captured image is a landscape image.
(顔領域≧2の場合)
 判定部1020は、撮像画像内に複数の顔領域を認識した場合、下記式(2)に従って、撮像画像の大きさに対する各顔領域の大きさの割合R(i)を算出する。
 R(i)=Sf(i)/Sp・・・(2)
 上記式(2)のSpは、上記式(1)と同様である。上記式(2)のSf(i)は、i番目の顔領域の大きさであって、具体的には、i番目の顔領域に外接する矩形の長手方向の長さ(若しくは、顔領域を囲む楕円の長軸の長さ(長径))を用いる。
(If face area ≧ 2)
When recognizing a plurality of face areas in the captured image, the determination unit 1020 calculates a ratio R (i) of the size of each face area to the size of the captured image according to the following equation (2).
R (i) = Sf (i) / Sp (2)
Sp in the above formula (2) is the same as that in the above formula (1). Sf (i) in the above formula (2) is the size of the i-th face area. Specifically, the length of the rectangle circumscribing the i-th face area (or the face area) The major axis length (major axis) of the enclosing ellipse is used.
 R(i)を算出した判定部1020は、R(i)の最大値(Rmax)を算出する。即ち、判定部1020は、撮像画像の大きさに対する最大の顔領域の大きさの割合Rmaxを算出する。 The determination unit 1020 that calculated R (i) calculates the maximum value (Rmax) of R (i). That is, the determination unit 1020 calculates the ratio Rmax of the maximum face area size to the size of the captured image.
 割合Rmaxを算出した判定部1020は、割合Rmaxと第1の閾値Flowとを比較する。判定部1020は、割合Rmaxが第1の閾値Flow未満であると判定した場合、この撮像画像は風景画像であると判定する。一方、判定部1020は、割合Rmaxが第1の閾値Flow以上であると判定した場合、割合Rmaxと第2の閾値Fhighとを比較する。 The determination unit 1020 that has calculated the ratio Rmax compares the ratio Rmax with the first threshold value Flow. If the determination unit 1020 determines that the ratio Rmax is less than the first threshold value Flow, the determination unit 1020 determines that the captured image is a landscape image. On the other hand, when the determination unit 1020 determines that the ratio Rmax is greater than or equal to the first threshold value Flow, the ratio Rmax is compared with the second threshold value Fhigh.
 判定部1020は、割合Rmaxが第2の閾値Fhigh以上であると判定した場合、この撮像画像は人物画像であると判定する。一方、判定部1020は、割合Rmaxが第2の閾値Fhigh未満であると判定した場合、R(i)の標準偏差σを算出する。下記式(3)は、標準偏差σの算出式である。 When the determination unit 1020 determines that the ratio Rmax is equal to or greater than the second threshold value Fhigh, the captured image is determined to be a person image. On the other hand, when the determination unit 1020 determines that the ratio Rmax is less than the second threshold value Fhigh, the determination unit 1020 calculates the standard deviation σ of R (i). The following formula (3) is a formula for calculating the standard deviation σ.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 標準偏差σを算出した判定部1020は、標準偏差σと第3の閾値(Fstdevとも称する)とを比較する。判定部1020は、標準偏差σが第3の閾値Fstdev未満であると判定した場合、この撮像画像は人物画像であると判定する。一方、判定部1020は、標準偏差σが第3の閾値Fstdev以上であると判定した場合、この撮像画像は風景画像であると判定する。 The determination unit 1020 that has calculated the standard deviation σ compares the standard deviation σ with a third threshold value (also referred to as Fstdev). If the determination unit 1020 determines that the standard deviation σ is less than the third threshold Fstdev, the determination unit 1020 determines that the captured image is a person image. On the other hand, when the determination unit 1020 determines that the standard deviation σ is greater than or equal to the third threshold value Fstdev, the determination unit 1020 determines that the captured image is a landscape image.
 以上のように、判定部1020は、撮像画像内に複数の顔領域を認識した場合、その撮像画像の大きさに対する最大の顔領域の大きさの割合Rmaxが第2の閾値Fhigh以上であるときは、その撮像画像は人物画像であると判定する。また、判定部1020は、割合Rmaxが第2の閾値Fhigh未満であっても、割合Rmaxが第1の閾値Flow以上であるときは、複数の顔領域の割合R(i)の標準偏差σが第3の閾値Fstdev未満であるときは、その撮像画像は人物画像であると判定する。 As described above, when the determination unit 1020 recognizes a plurality of face areas in the captured image, the ratio Rmax of the maximum face area size to the size of the captured image is greater than or equal to the second threshold Fhigh. Determines that the captured image is a person image. In addition, even if the ratio Rmax is less than the second threshold value Fhigh, the determination unit 1020 determines that the standard deviation σ of the ratio R (i) of the plurality of face regions is not greater than the first threshold value Flow. When it is less than the third threshold Fstdev, it is determined that the captured image is a person image.
 なお、判定部1020は、複数の顔領域の割合R(i)の標準偏差σと第3の閾値Fstdevによる判定に代えて、複数の顔領域の割合R(i)の分散λと、分散λ用の閾値とを用いて判定をしてもよい。また、判定部1020は、複数の顔領域の割合R(i)の標準偏差(若しくは分散)に代えて、複数の顔領域Sf(i)の標準偏差(若しくは分散)を使用してもよい(この場合、顔領域Sf(i)用の閾値を用いる)。 Note that the determination unit 1020 replaces the determination with the standard deviation σ of the ratio R (i) of the plurality of face areas and the third threshold value Fstdev, and the variance λ and the distribution λ of the ratio R (i) of the plurality of face areas The determination may be made using the threshold value. Further, the determination unit 1020 may use the standard deviation (or variance) of the plurality of face regions Sf (i) instead of the standard deviation (or variance) of the ratio R (i) of the plurality of face regions ( In this case, the threshold value for the face area Sf (i) is used).
 また、判定部1020は、撮像画像を人物画像と判定した場合には、第1の閾値Flow以上の割合R(i)である顔領域の数に基づいて被写体の人数を判定(計数)する。つまり、判定部1020は、第1の閾値Flow以上の割合R(i)である顔領域の1つひとつを被写体一人ひとりと判定し、第1の閾値Flow以上の顔領域の数を被写体の人数とする。 Further, when determining that the captured image is a person image, the determination unit 1020 determines (counts) the number of subjects based on the number of face areas having a ratio R (i) equal to or greater than the first threshold value Flow. That is, the determination unit 1020 determines that each face area having a ratio R (i) equal to or greater than the first threshold value Flow is an individual subject, and determines the number of face areas equal to or greater than the first threshold value Flow as the number of subjects. To do.
 判定部1020は、判定結果を文章作成部1030に出力する。具体的には、判定部1020は、撮像画像を人物画像と判定した場合には、人物画像である旨の判定結果を示す画像判定結果情報、及び、被写体人数の判定結果を示す人数判定結果情報を文章作成部1030に出力する。一方、判定部1020は、撮像画像を風景画像と判定した場合には、風景画像である旨の判定結果を示す画像判定結果情報を文章作成部1030に出力する。
 また、判定部1020は画像入力部1010から取得した撮像画像を文章作成部1030に出力する。
The determination unit 1020 outputs the determination result to the sentence creation unit 1030. Specifically, when the determination unit 1020 determines that the captured image is a person image, the image determination result information indicating the determination result indicating that the captured image is a person image, and the number determination result information indicating the determination result of the number of subjects. Is output to the sentence creation unit 1030. On the other hand, if the determination unit 1020 determines that the captured image is a landscape image, the determination unit 1020 outputs image determination result information indicating a determination result indicating that the image is a landscape image to the sentence creation unit 1030.
Also, the determination unit 1020 outputs the captured image acquired from the image input unit 1010 to the text creation unit 1030.
 文章作成部1030は、判定部1020から判定結果及び撮像画像を取得する。文章作成部1030は、取得した判定結果に応じて、人物画像用テンプレート又は風景画像用テンプレートの何れかの文章テンプレートを記憶部1090から読み出す。具体的には、文章作成部1030は、人物画像である旨の判定結果を示す画像判定結果情報を取得した場合には、記憶部1090に記憶されている2種類の人物画像用テンプレートの中からランダムに選択された一方の人物画像用テンプレートを読み出す。また、文章作成部1030は、風景画像である旨の判定結果を示す画像判定結果情報を取得した場合には、記憶部1090に記憶されている2種類の風景画像用テンプレートの中からランダムに選択された一方の人物画像用テンプレートを読み出す。 The sentence creation unit 1030 acquires a determination result and a captured image from the determination unit 1020. The text creation unit 1030 reads from the storage unit 1090 a text template of either a person image template or a landscape image template according to the acquired determination result. Specifically, when the text creation unit 1030 acquires image determination result information indicating a determination result indicating that the image is a person image, the sentence creation unit 1030 selects from two types of person image templates stored in the storage unit 1090. One of the randomly selected person image templates is read out. In addition, when the text creation unit 1030 acquires image determination result information indicating a determination result indicating that it is a landscape image, the text creation unit 1030 randomly selects from two types of landscape image templates stored in the storage unit 1090. The one person image template thus read is read out.
 文章作成部1030は、読み出した文章テンプレート(人物画像用テンプレート又は風景画像用テンプレート)の空欄部に撮像画像の特徴量又は撮像条件に応じた単語を挿入してその撮像画像に対する文章を作成する。特徴量に応じた単語とは、撮像画像の配色パターンに応じた形容詞、又は、被写体の人数に応じた単語(人数に関連する単語)である。また、撮像画像の撮像条件に応じた単語とは、撮像日時に応じた単語(日時に関連する単語)、又は、撮像場所に応じた単語(場所に関連する単語)である。 The sentence creation unit 1030 creates a sentence for the captured image by inserting a word corresponding to the feature amount or the imaging condition of the captured image into the blank part of the read sentence template (person image template or landscape image template). The word corresponding to the feature amount is an adjective corresponding to the color arrangement pattern of the captured image, or a word corresponding to the number of subjects (word related to the number of subjects). The word corresponding to the imaging condition of the captured image is a word corresponding to the imaging date and time (word related to the date and time) or a word corresponding to the imaging location (word related to the location).
 一例として、文章作成部1030は、図2Aに示す人物画像用テンプレートを読み出した場合には、人数判定結果情報からこの撮像画像の被写体の人数を取得し、その人数に対応付けて記憶されている単語(人数に関連する単語)を記憶部1090から読み出して空欄部{人数}に挿入し、この撮像画像の配色パターンを抽出し、抽出した配色パターンに対応付けて記憶されている単語(人物画像用の形容詞)を記憶部1090から読み出して空欄部{形容詞}に挿入し、この撮像画像に対する文章を作成する。具体的には、被写体の人数が「1」、配色パターンが第1色「色1」、第2色「色2」、第3色「色3」であるならば、文章作成部1030は、文章『ひとりですごしたクールな思い出』を作成する。 As an example, when the person image template shown in FIG. 2A is read, the text creation unit 1030 acquires the number of subjects of the captured image from the number determination result information, and stores it in association with the number of persons. A word (word related to the number of people) is read from the storage unit 1090 and inserted into the blank portion {number of people}, a color arrangement pattern of the captured image is extracted, and a word (person image) stored in association with the extracted color arrangement pattern For example) is read from the storage unit 1090 and inserted into the blank part {adjective} to create a sentence for this captured image. Specifically, if the number of subjects is “1”, and the color arrangement pattern is the first color “color 1”, the second color “color 2”, and the third color “color 3”, the sentence creation unit 1030 Create the sentence "Cool memories spent alone".
 他の例として、文章作成部1030は、図2Bに示す人物画像用テンプレートを読み出した場合には、図2Aの場合と同様、記憶部1090から人数に関連する単語を読み出して空欄部{人数}に挿入し、記憶部1090から人物画像用の形容詞を読み出して空欄部{形容詞}に挿入し、この撮像画像に対する文章を作成する。具体的には、被写体の人数が「10」、配色パターンが第1色「色5」、第2色「色4」、第3色「色2」であるならば、文章作成部1030は、文章『熱い感じで?大勢でポーズ!!』を作成する。 As another example, when the person image template shown in FIG. 2B is read out, the sentence creation unit 1030 reads out words related to the number of people from the storage unit 1090 as in FIG. The adjective for the person image is read out from the storage unit 1090 and inserted into the blank part {adjective} to create a sentence for the captured image. Specifically, if the number of subjects is “10” and the color arrangement pattern is the first color “color 5”, the second color “color 4”, and the third color “color 2”, the sentence creating unit 1030 Sentence "Hot feeling? Pause with many people! ! Is created.
 他の例として、文章作成部1030は、図2Cに示す風景画像用テンプレートを読み出した場合には、この撮像画像の付加情報(例えばイグジフ(Exif;Exchangeable Image File Format))から撮像日時を取得し、取得した撮像日時に対応付けて記憶されている単語(日時に関連する単語)を記憶部1090から読み出して空欄部{日時}に挿入し、この撮像画像の配色パターンを抽出し、抽出した配色パターンに対応付けて記憶されている単語(風景画像用の形容詞)を記憶部1090から読み出して空欄部{形容詞}に挿入し、この撮像画像に対する文章を作成する。
 具体的には、記憶部1090に8月に対応付けて単語「真夏!!」が記憶されている場合に、撮像日時が2011年8月10日、配色パターンが第1色「色5」、第2色「色4」、第3色「色2」であるならば、文章作成部1030は、文章『真夏!!。暑い感じの一枚』を作成する。
As another example, when the landscape creation template 1030 reads the landscape image template shown in FIG. 2C, the text creation unit 1030 acquires the imaging date and time from the additional information of the captured image (for example, Exif; Exchangeable Image File Format). The words stored in association with the acquired imaging date and time (words related to the date and time) are read from the storage unit 1090 and inserted into the blank portion {date and time}, the color arrangement pattern of this captured image is extracted, and the extracted color arrangement A word (adjective for a landscape image) stored in association with a pattern is read from the storage unit 1090 and inserted into a blank field {adjective} to create a sentence for this captured image.
Specifically, when the word “Midsummer !!!” is stored in the storage unit 1090 in association with August, the imaging date and time is August 10, 2011, the color arrangement pattern is the first color “color 5”, If the second color is “color 4” and the third color is “color 2”, the sentence creation unit 1030 displays the sentence “Midsummer! ! . Create a piece that feels hot.
 他の例として、文章作成部1030は、図2Dに示す風景画像用テンプレートを読み出した場合には、この撮像画像の付加情報から撮像場所を取得し、取得した撮像場所に対応付けて記憶されている単語(場所に関連する単語)を記憶部1090から読み出して空欄部{場所}に挿入し、この撮像画像の配色パターンを抽出し、抽出した配色パターンに対応付けて記憶されている単語(風景画像用の形容詞)を記憶部1090から読み出して空欄部{形容詞}に挿入し、この撮像画像に対する文章を作成する。
 具体的には、記憶部1090に京都駅に対応付けて単語「古都」が記憶されている場合に、撮像場所が京都駅前、配色パターンが第1色「色1」、第2色「色2」、第3色「色5」であるならば、文章作成部1030は、文章『古都。あのときの柔らかい景色!』を作成する。
As another example, when the landscape image template shown in FIG. 2D is read, the text creation unit 1030 acquires an imaging location from the additional information of the captured image, and stores it in association with the acquired imaging location. A word (a word related to a place) is read from the storage unit 1090 and inserted into a blank part {place}, a color arrangement pattern of this captured image is extracted, and a word (landscape) stored in association with the extracted color arrangement pattern The image adjective) is read from the storage unit 1090 and inserted into the blank field {adjective}, and a sentence for this captured image is created.
Specifically, when the word “old capital” is stored in the storage unit 1090 in association with Kyoto Station, the imaging location is in front of Kyoto Station, the color arrangement pattern is the first color “Color 1”, and the second color “Color 2”. ”, The third color“ color 5 ”, the sentence creation unit 1030 reads the sentence“ Old city. The soft scenery at that time! Is created.
 文章を作成した文章作成部1030は、作成した文章、及び、撮像画像を文章付加部1040に出力する。文章付加部1040は、文章作成部1030から文章及び撮像画像を取得する。文章付加部1040は、この撮像画像にこの文章を付加(合成)する。 The sentence creation unit 1030 that created the sentence outputs the created sentence and the captured image to the sentence addition unit 1040. The sentence adding unit 1040 acquires a sentence and a captured image from the sentence creating unit 1030. The sentence adding unit 1040 adds (synthesizes) the sentence to the captured image.
 続いて、画像処理装置1001の動作を説明する。図5及び図6は、画像処理装置1001の動作の一例を示すフローチャートである。 Subsequently, the operation of the image processing apparatus 1001 will be described. 5 and 6 are flowcharts showing an example of the operation of the image processing apparatus 1001.
 図5において、画像入力部1010は、撮像画像を入力する(ステップS1010)。画像入力部1010は、撮像画像を判定部1020に出力する。判定部20は、撮像画像内に顔領域が1つ以上あるか否かを判定する(ステップS1012)。判定部1020は、撮像画像内に顔領域が1つ以上あると判定した場合(ステップS1012:Yes)、撮像画像の大きさに対する顔領域の大きさの割合を顔領域毎に算出し(ステップS1014)、その割合の最大値を算出する(ステップS1016)。 In FIG. 5, the image input unit 1010 inputs a captured image (step S1010). The image input unit 1010 outputs the captured image to the determination unit 1020. The determination unit 20 determines whether or not there is one or more face areas in the captured image (step S1012). If the determination unit 1020 determines that there is one or more face areas in the captured image (step S1012: Yes), the ratio of the size of the face area to the size of the captured image is calculated for each face area (step S1014). ), The maximum value of the ratio is calculated (step S1016).
 ステップS1016に続いて、判定部1020は、ステップS1016にて算出した最大値が第1の閾値以上であるか否かを判定する(ステップS1020)。判定部1020は、ステップS1016にて算出した最大値が第1の閾値以上であると判定した場合(ステップS1020:Yes)、その最大値が第2の閾値以上であるか否かを判定する(ステップS1022)。判定部1020は、その最大値が第2の閾値以上であると判定した場合(ステップS1022:Yes)、撮像画像は人物画像であると判定する(ステップS1030)。ステップS1030に続いて、判定部1020は、第1の閾値以上の割合である顔領域の数を被写体の人数として計数する(ステップ1032)。ステップS1032に続いて、判定部1020は、判定結果(人物画像である旨の判定結果を示す画像判定結果情報、及び、被写体人数の判定結果を示す人数判定結果情報)、及び、撮像画像を文章作成部1030に出力する。 Subsequent to step S1016, the determination unit 1020 determines whether or not the maximum value calculated in step S1016 is greater than or equal to the first threshold (step S1020). If the determination unit 1020 determines that the maximum value calculated in step S1016 is equal to or greater than the first threshold (step S1020: Yes), the determination unit 1020 determines whether the maximum value is equal to or greater than the second threshold ( Step S1022). If the determination unit 1020 determines that the maximum value is greater than or equal to the second threshold (step S1022: Yes), the determination unit 1020 determines that the captured image is a person image (step S1030). Subsequent to step S1030, the determination unit 1020 counts the number of face areas having a ratio equal to or higher than the first threshold as the number of subjects (step 1032). Subsequent to step S1032, the determination unit 1020 writes a determination result (image determination result information indicating a determination result indicating that the image is a person image and number determination result information indicating a determination result of the number of subjects) and the captured image as text. The data is output to the creation unit 1030.
 一方、ステップS1022において、最大値が第2の閾値未満であると判定した場合(ステップS1022:No)、判定部1020は、撮像画像内に顔領域が2つ以上あるか否かを判定する(ステップS1040)。判定部1020は、撮像画像内に顔領域が2つ以上あると判定した場合(ステップS1040:Yes)、ステップS1014にて算出した割合の標準偏差を算出し(ステップS1042)、その標準偏差が第3の閾値未満であるか否かを判定する(ステップS1044)。判定部1020は、その標準偏差が第3の閾値未満であると判定した場合(ステップS1044:Yes)、処理をステップS1030に進める。 On the other hand, when it is determined in step S1022 that the maximum value is less than the second threshold (step S1022: No), the determination unit 1020 determines whether or not there are two or more face regions in the captured image ( Step S1040). If the determination unit 1020 determines that there are two or more face regions in the captured image (step S1040: Yes), the determination unit 1020 calculates the standard deviation of the ratio calculated in step S1014 (step S1042), and the standard deviation is It is determined whether or not the threshold value is less than 3 (step S1044). If the determination unit 1020 determines that the standard deviation is less than the third threshold (step S1044: Yes), the process proceeds to step S1030.
 一方、ステップS1012において、撮像画像内に顔領域が1つもないと判定した場合(ステップS1012:No)、又は、ステップS1020において、最大値が第1の閾値未満であると判定した場合(ステップS1020:No)、又は、ステップS1040において、撮像画像内に顔領域が1つしかないと判定した場合(ステップS1040:No)、判定部1020は、撮像画像は風景画像であると判定する(ステップS1050)。ステップS1050に続いて、判定部1020は、判定結果(風景画像である旨の判定結果を示す画像判定結果情報)を文章作成部1030に出力する。 On the other hand, if it is determined in step S1012 that there is no face area in the captured image (step S1012: No), or if it is determined in step S1020 that the maximum value is less than the first threshold (step S1020). : No) or when it is determined in step S1040 that there is only one face area in the captured image (step S1040: No), the determination unit 1020 determines that the captured image is a landscape image (step S1050). ). Subsequent to step S1050, the determination unit 1020 outputs a determination result (image determination result information indicating a determination result indicating that the image is a landscape image) to the sentence creation unit 1030.
 なお、上述のステップS1040は、顔領域が1つである撮像画像が、人物画像であると常に判定されるのを防止するための処理である。また、上述のステップS1040では、撮像画像内に、撮像画像の大きさに対する顔領域の大きさの割合が最大の顔領域の他に、大きさが揃った非常に小さい顔領域が非常に多数存在していれば、標準偏差は小さくなるため、人物画像であると判定される可能性がある。従って、上述のような判定をなるべく減らすために、判定部1020は、所定の大きさの顔領域が2以上あるか否かを判定してもよい。例えば、判定部1020は、上述の割合が第1の閾値以上である顔領域が2つ以上あるか否かを判定してもよい。 Note that step S1040 described above is a process for preventing a captured image having one face area from being always determined to be a person image. In step S1040 described above, there are a very large number of very small face areas with the same size in addition to the face area having the largest ratio of the size of the face area to the size of the captured image. If so, the standard deviation is small, so that it may be determined that the image is a person image. Therefore, in order to reduce the above-described determination as much as possible, the determination unit 1020 may determine whether there are two or more face regions having a predetermined size. For example, the determination unit 1020 may determine whether there are two or more face regions in which the above-described ratio is equal to or greater than a first threshold.
 ステップS1032又はステップS1050に続いて、文章作成部1030は、判定部1020から取得した判定結果に応じて、人物画像用テンプレート又は風景画像用テンプレートの何れかの文章テンプレートを記憶部1090から読み出して、読み出した文章テンプレートの空欄部に撮像画像の特徴量又は撮像条件に応じた単語を挿入してその撮像画像に対する文章を作成する(ステップS1100)。 Subsequent to step S1032 or step S1050, the sentence creation unit 1030 reads either a person image template or a landscape image template from the storage unit 1090 according to the determination result acquired from the determination unit 1020. A word corresponding to the feature amount or the imaging condition of the captured image is inserted into the blank portion of the read sentence template to create a sentence for the captured image (step S1100).
 図6は、ステップS1100の詳細である。図6において、文章作成部1030は、撮像画像が人物画像であるか否かを判断する(ステップS1102)。具体的には、文章作成部1030は、判定部1020から判定結果として、人物画像である旨の判定結果を示す画像判定結果情報を取得していた場合には、撮像画像が人物画像であると判断し、風景画像である旨の判定結果を示す画像判定結果情報を取得していた場合には、撮像画像が人物画像でないと判断する。 FIG. 6 shows details of step S1100. In FIG. 6, the text creation unit 1030 determines whether or not the captured image is a person image (step S1102). Specifically, when the sentence creation unit 1030 has acquired image determination result information indicating a determination result indicating that the image is a person image as a determination result from the determination unit 1020, the captured image is a person image. If image determination result information indicating a determination result indicating that the image is a landscape image has been acquired, it is determined that the captured image is not a person image.
 文章作成部1030は、撮像画像が人物画像であると判断した場合(ステップS1102:Yes)、記憶部1090から人物画像用テンプレートを読み出す(ステップS1104)。具体的には、文章作成部1030は、記憶部1090に記憶されている2種類の人物画像用テンプレートの中からランダムに選択された一方の人物画像用テンプレートを読み出す。 When the sentence creation unit 1030 determines that the captured image is a person image (step S1102: Yes), the document creation unit 1030 reads a person image template from the storage unit 1090 (step S1104). Specifically, the sentence creation unit 1030 reads one person image template randomly selected from the two types of person image templates stored in the storage unit 1090.
 ステップS1104に続いて、文章作成部1030は、被写体の人数に応じた単語を人物画像用テンプレートの空欄部{人数}に挿入する(ステップS1110)。具体的には、文章作成部1030は、人数判定結果情報から被写体の人数を取得し、その人数に対応付けて記憶されている単語(人数に関連する単語)を記憶部1090から読み出して人物画像用テンプレートの空欄部{人数}に挿入する。 Subsequent to step S1104, the sentence creation unit 1030 inserts a word corresponding to the number of subjects in the blank portion {number of people} of the person image template (step S1110). Specifically, the text creation unit 1030 acquires the number of subjects from the number determination result information, reads words stored in association with the number of people (words related to the number of people) from the storage unit 1090, and reads the person image. Insert it into the blank field {number of people} of the template.
 ステップS1110に続いて、文章作成部1030は、撮像画像(人物画像)の配色パターンに応じた単語を人物画像用テンプレートの空欄部{形容詞}に挿入する(ステップS1120)。具体的には、文章作成部1030は、撮像画像(人物画像)の中央部の領域の配色パターンを抽出し、その配色パターンに対応付けて記憶されている単語(人物画像用の形容詞)を記憶部1090から読み出して人物画像用テンプレートの空欄部{形容詞}に挿入する。 Subsequent to step S1110, the sentence creation unit 1030 inserts a word corresponding to the color arrangement pattern of the captured image (person image) into the blank portion {adjective} of the person image template (step S1120). Specifically, the sentence creation unit 1030 extracts a color arrangement pattern in the central area of the captured image (person image) and stores a word (adjective for person image) stored in association with the color arrangement pattern. It is read from the part 1090 and inserted into the blank part {adjective} of the person image template.
 一方、ステップS1102において、文章作成部1030は、撮像画像が風景画像であると判断した場合(ステップS1102:No)、記憶部1090から風景画像用テンプレートを読み出す(ステップS1106)。具体的には、文章作成部1030は、記憶部1090に記憶されている2種類の風景画像用テンプレートの中からランダムに選択された一方の風景画像用テンプレートを読み出す。 On the other hand, when it is determined in step S1102 that the captured image is a landscape image (step S1102: No), the text creation unit 1030 reads a landscape image template from the storage unit 1090 (step S1106). Specifically, the text creation unit 1030 reads one landscape image template randomly selected from the two types of landscape image templates stored in the storage unit 1090.
 ステップS1106に続いて、文章作成部1030は、撮像画像(風景画像)の配色パターンに応じた単語を風景画像用テンプレートの空欄部{形容詞}に挿入する(ステップS1130)。具体的には、文章作成部1030は、撮像画像(風景画像)の上部の領域の配色パターンを抽出し、その配色パターンに対応付けて記憶されている単語(風景画像用の形容詞)を記憶部1090から読み出して風景画像用テンプレートの空欄部{形容詞}に挿入する。 Subsequent to step S1106, the sentence creation unit 1030 inserts a word corresponding to the color arrangement pattern of the captured image (landscape image) into the blank field {adjective} of the landscape image template (step S1130). Specifically, the sentence creation unit 1030 extracts a color arrangement pattern of the upper region of the captured image (landscape image), and stores a word (landscape image adjective) stored in association with the color arrangement pattern. It is read out from 1090 and inserted into the blank field {adjective} of the landscape image template.
 ステップS1120又はステップS1130に続いて、文章作成部1030は、読み出した文章テンプレートに空欄部{日時}が存在するか否かを判断する(ステップS1132)。本実施例の場合、図2A~2Dに示したように、図2Cの風景画像用テンプレートには空欄部{日時}が存在するが、図2A、2Bの人物画像用テンプレート及び図2Dの風景画像用テンプレートには空欄部{日時}が存在しない。従って、文章作成部1030は、ステップS1106にて図2Cの風景画像用テンプレートを読み出していた場合には、空欄部{日時}が存在すると判断し、ステップS1104にて図2A若しくは図2Bの人物画像用テンプレートを読み出していた場合、又は、ステップS1106にて図2Dの風景画像用テンプレートを読み出していた場合には、空欄部{日時}が存在しないと判断する。 Following step S1120 or step S1130, the sentence creation unit 1030 determines whether or not a blank part {date} exists in the read sentence template (step S1132). In the case of the present embodiment, as shown in FIGS. 2A to 2D, the landscape image template in FIG. 2C has a blank space {date}, but the person image template in FIGS. 2A and 2B and the landscape image in FIG. 2D. The blank template {date and time} does not exist in the template for use. Therefore, if the landscape image template of FIG. 2C has been read in step S1106, the text creation unit 1030 determines that there is a blank portion {date}, and in step S1104, the person image of FIG. 2A or FIG. 2B. When the template for reading is read out, or when the landscape image template of FIG. 2D is read out in step S1106, it is determined that the blank part {date} does not exist.
 文章作成部1030は、読み出した文章テンプレートに空欄部{日時}が存在すると判断した場合(ステップS1132:Yes)、撮像画像の撮像条件(日時)に応じた単語を文章テンプレートの空欄部{日時}に挿入する(ステップS1140)。具体的には、文章作成部1030は、撮像画像(風景画像)の付加情報から撮像日時を取得し、その撮像日時に対応付けて記憶されている単語(日時に関連する単語)を記憶部1090から読み出して風景画像用テンプレートの空欄部{日時}に挿入する。一方、文章作成部1030は、読み出した文章テンプレートに空欄部{日時}が存在しないと判断した場合(ステップS1132:No)、ステップS1140を飛ばして処理をステップS1142に進める。 If the sentence creation unit 1030 determines that there is a blank part {date} in the read sentence template (step S1132: Yes), the sentence corresponding to the imaging condition (date) of the captured image is changed to a blank part {date} of the sentence template. (Step S1140). Specifically, the text creation unit 1030 acquires the imaging date / time from the additional information of the captured image (landscape image), and stores the word (word related to the date / time) stored in association with the imaging date / time. Is inserted into the blank field {date and time} of the landscape image template. On the other hand, when the sentence creation unit 1030 determines that the blank part {date} does not exist in the read sentence template (step S1132: No), the process skips step S1140 and proceeds to step S1142.
 ステップS1132(No)又はステップS1140に続いて、文章作成部1030は、読み出した文章テンプレートに空欄部{場所}が存在するか否かを判断する(ステップS1142)。本実施例の場合、図2A~2Dに示したように、図2Dの風景画像用テンプレートには空欄部{場所}が存在するが、図2A、2Bの人物画像用テンプレート及び図2Cの風景画像用テンプレートには空欄部{場所}が存在しない。従って、文章作成部1030は、ステップS1106にて図2Dの風景画像用テンプレートを読み出していた場合には、空欄部{場所}が存在すると判断し、ステップS1104にて図2A若しくは図2Bの人物画像用テンプレートを読み出していた場合、又は、ステップS1106にて図2Cの風景画像用テンプレートを読み出していた場合には、空欄部{場所}が存在しないと判断する。 Following step S1132 (No) or step S1140, the sentence creation unit 1030 determines whether or not a blank part {place} exists in the read sentence template (step S1142). In the case of the present embodiment, as shown in FIGS. 2A to 2D, the landscape image template in FIG. 2D has a blank portion {place}, but the person image template in FIGS. 2A and 2B and the landscape image in FIG. 2C. The blank template {place} does not exist in the template for use. Accordingly, when the landscape image template of FIG. 2D is read in step S1106, the text creation unit 1030 determines that a blank portion {place} exists, and in step S1104, the person image of FIG. 2A or FIG. 2B. When the template for reading is read out, or when the landscape image template of FIG. 2C is read out in step S1106, it is determined that the blank portion {place} does not exist.
 文章作成部1030は、読み出した文章テンプレートに空欄部{場所}が存在すると判断した場合(ステップS1142:Yes)、撮像画像の撮像条件(場所)に応じた単語を文章テンプレートの空欄部{場所}に挿入する(ステップS1150)。具体的には、文章作成部1030は、撮像画像(風景画像)の付加情報から撮像場所を取得し、その撮像場所に対応付けて記憶されている単語(場所に関連する単語)を記憶部1090から読み出して風景画像用テンプレートの空欄部{場所}に挿入する。そして、図6に示すフローチャートは終了し、図5に示すフローチャートに戻る。一方、文章作成部1030は、読み出した文章テンプレートに空欄部{場所}が存在しないと判断した場合(ステップS1142:No)、ステップS1150は飛ばして、図5に示すフローチャートに戻る。 When the sentence creating unit 1030 determines that the blank part {place} exists in the read sentence template (step S1142: Yes), the word corresponding to the imaging condition (place) of the captured image is changed to a blank part {place} of the sentence template. (Step S1150). Specifically, the text creation unit 1030 acquires an imaging location from the additional information of the captured image (landscape image), and stores a word (word related to the location) stored in association with the imaging location. Is inserted into the blank field {place} of the landscape image template. Then, the flowchart shown in FIG. 6 ends, and the process returns to the flowchart shown in FIG. On the other hand, when the sentence creating unit 1030 determines that the blank part {place} does not exist in the read sentence template (step S1142: No), step S1150 is skipped and the process returns to the flowchart shown in FIG.
 図5に戻って、文章を作成した文章作成部1030は、作成した文章、及び、撮像画像を文章付加部1040に出力する。文章付加部1040は、文章作成部1030から文章及び撮像画像を取得する。文章付加部1040は、文章作成部1030から取得した撮像画像に、文章作成部1030から取得した文章を付加(合成)する。そして、図5に示すフローチャートは終了する。 Returning to FIG. 5, the sentence creation unit 1030 that created the sentence outputs the created sentence and the captured image to the sentence addition unit 1040. The sentence adding unit 1040 acquires a sentence and a captured image from the sentence creating unit 1030. The text adding unit 1040 adds (synthesizes) the text acquired from the text creating unit 1030 to the captured image acquired from the text creating unit 1030. Then, the flowchart shown in FIG. 5 ends.
 図7A~7Eは、文章付加部1040によって文章を付加された撮像画像の一例である。図7Aの撮像画像は、1人の顔が大きく写っているので人物画像であると判定されている。即ち、この撮像画像は、撮像画像の大きさに対する顔領域の大きさの割合の最大値(この1つの顔領域の割合)が第2の閾値以上であると判定されている(ステップS1022(Yes))。図7Bの撮像画像は、2人の顔が大きく写っているので人物画像であると判定されている。即ち、この撮像画像は、撮像画像の大きさに対する顔領域の大きさの割合の最大値が第2の閾値以上であると判定されている(ステップS1022(Yes))。 FIGS. 7A to 7E are examples of captured images to which sentences are added by the sentence adding unit 1040. FIG. The captured image in FIG. 7A is determined to be a person image because one person's face is greatly reflected. That is, in this captured image, it is determined that the maximum value of the ratio of the size of the face area to the size of the captured image (the ratio of this one face area) is greater than or equal to the second threshold (step S1022 (Yes )). The captured image in FIG. 7B is determined to be a human image because the faces of the two people are shown large. That is, in this captured image, it is determined that the maximum value of the ratio of the size of the face area to the size of the captured image is greater than or equal to the second threshold (step S1022 (Yes)).
 図7Cの撮像画像は、ある程度の大きさの顔が写っていて、かつ、大きさも揃っているので、人物画像であると判定されている。即ち、この撮像画像は、撮像画像の大きさに対する顔領域の大きさの割合の最大値が、第1の閾値以上かつ第2の閾値未満であるが(ステップS1022(No))、標準偏差が第3の閾値未満であると判定されている(ステップS1044(Yes))。 The captured image in FIG. 7C has a face of a certain size and has a uniform size, and thus is determined to be a person image. That is, in this captured image, although the maximum value of the ratio of the size of the face area to the size of the captured image is greater than or equal to the first threshold and less than the second threshold (step S1022 (No)), the standard deviation is It is determined that it is less than the third threshold (step S1044 (Yes)).
 図7Dの撮像画像は、ある程度の大きさの顔が写っているが、大きさが揃っていないので、風景画像であると判定されている。即ち、この撮像画像は、撮像画像の大きさに対する顔領域の大きさの割合の最大値が、第1の閾値以上かつ第2の閾値未満であるが(ステップS1022(No))、標準偏差が第3の閾値以上であると判定されている(ステップS1044(No))。図7Eの撮像画像は、顔が何も写っていないので、風景画像であると判定されている(ステップS1012(No))。 The captured image in FIG. 7D includes a face of a certain size, but is not uniform in size, and thus is determined to be a landscape image. That is, in this captured image, although the maximum value of the ratio of the size of the face area to the size of the captured image is greater than or equal to the first threshold and less than the second threshold (step S1022 (No)), the standard deviation is It is determined that the value is greater than or equal to the third threshold (step S1044 (No)). The captured image in FIG. 7E is determined to be a landscape image because no face is captured (step S1012 (No)).
 以上、画像処理装置1001によれば、撮像画像に対し、より柔軟な文字情報を付与することができる。即ち、画像処理装置1001は、撮像画像を人物画像と風景画像とに分類し、人物画像に対しては、予め記憶している人物画像用テンプレートを使用して人物画像用の文章を作成し、風景画像に対しては、予め記憶している風景画像用テンプレートを使用して風景画像用の文章を作成するため、撮像内容に応じて、より柔軟な文字情報を付与することができる。 As described above, according to the image processing apparatus 1001, more flexible character information can be given to the captured image. In other words, the image processing apparatus 1001 classifies captured images into human images and landscape images, and for human images, creates a text for human images using a human image template stored in advance, For landscape images, landscape image text is created using a prestored landscape image template, so that more flexible text information can be given according to the captured content.
 なお、上記実施例では、画像入力部1010は、撮像画像の入力時にその撮像画像を判定部1020に出力する例を説明したが、判定部1020が撮像画像を取得する態様はこれに限定されない。例えば、画像入力部1010は撮像画像の入力時にその撮像画像を記憶部1090に記憶し、判定部1020は必要時に記憶部1090から所望の撮像画像を読み出して取得してもよい。 In the above-described embodiment, an example in which the image input unit 1010 outputs the captured image to the determination unit 1020 when a captured image is input has been described, but the manner in which the determination unit 1020 acquires the captured image is not limited thereto. For example, the image input unit 1010 may store the captured image in the storage unit 1090 when the captured image is input, and the determination unit 1020 may read and acquire a desired captured image from the storage unit 1090 when necessary.
 なお、上記実施例では、配色パターンを構成する第1色の色数は、色1~色5の5色を用いる例を説明したが、説明の便宜上であって、6色以上であってもよい。第2色、第3色についても同様である。また、上記実施例では、第1色~第3色の3色から構成される配色パターンを用いる例を説明したが、配色パターンを構成する色数はこれに限定されない。例えば、2色又は4色以上から構成される配色パターンを用いてもよい。 In the above-described embodiment, the example in which the number of colors of the first color constituting the color arrangement pattern uses five colors 1 to 5 has been described. However, for convenience of explanation, the number of colors may be 6 or more. Good. The same applies to the second color and the third color. In the above-described embodiment, the example using the color arrangement pattern composed of the first to third colors has been described, but the number of colors constituting the color arrangement pattern is not limited to this. For example, a color arrangement pattern composed of two colors or four or more colors may be used.
 なお、上記実施例では、文章作成部1030は、撮像画像が人物画像である場合に、記憶部1090に記憶されている2種類の中からランダムに選択された一方の人物画像用テンプレートを読み出す例を説明したが、2種類の人物画像用テンプレートの中から読み出す一方を選択する態様はこれに限定されない。例えば、文章作成部1030は、操作部(非図示)を介してユーザが指定した一方の人物画像テンプレートを選択してもよい。同様に、文章作成部1030は、指定受付部を介してユーザが指定した一方の風景画像テンプレートを選択してもよい。 In the above embodiment, the sentence creating unit 1030 reads one person image template randomly selected from the two types stored in the storage unit 1090 when the captured image is a person image. However, the mode of selecting one of the two types of person image templates to be read is not limited to this. For example, the text creation unit 1030 may select one person image template designated by the user via the operation unit (not shown). Similarly, the text creation unit 1030 may select one landscape image template designated by the user via the designation receiving unit.
 また、上記実施例では、選択したテンプレートの空欄部に挿入するべき単語を記憶部1090から常に得られる例を説明したが、選択したテンプレートの空欄部に挿入するべき単語が記憶部1090から得られないときは、他のテンプレートを選択し直してもよい。例えば、ある撮像画像の文章を作成用に、空欄部{場所}を有する図2Dの風景画像用テンプレートを選択したが、この撮像画像の付加情報から撮像場所を取得できなかったときは、空欄部{場所}を有しない図2Cに風景画像用テンプレートを選択しなおしてもよい。 In the above-described embodiment, an example has been described in which a word to be inserted into the blank portion of the selected template is always obtained from the storage unit 1090. However, a word to be inserted into the blank portion of the selected template is obtained from the storage unit 1090. If not, another template may be selected again. For example, when the landscape image template of FIG. 2D having a blank portion {location} is selected for creating a sentence of a certain captured image, but the imaging location cannot be acquired from the additional information of the captured image, the blank portion The landscape image template may be selected again in FIG. 2C without {place}.
 また、上記実施例では、画像処理装置1001は、空欄部{人数}及び空欄部{形容詞}を有する人物画像用テンプレートを記憶部1090に記憶する例を説明したが、人物画像用テンプレートが有する空欄部の数、種類はこれに限定されない。例えば、人物画像用テンプレートは、空欄部{人数}及び空欄部{形容詞}に加え、空欄部{日時}又は空欄部{場所}の何れか一方又は両方を有していてもよい。また、画像処理装置1001が各種センサを備える場合、人物画像用テンプレートは、撮像画像の撮像条件(照度)に応じた単語を挿入する空欄部{空欄部{照度})、撮像画像の撮像条件(温度)に応じた単語を挿入する空欄部{空欄部{温度})などを有していてもよい。 In the above-described embodiment, the image processing apparatus 1001 has described the example in which the person image template having the blank portion {number} and the blank portion {adjective} is stored in the storage unit 1090. The number and type of parts are not limited to this. For example, the person image template may have one or both of the blank part {date} and the blank part {location} in addition to the blank part {number of people} and the blank part {adjective}. Further, when the image processing apparatus 1001 includes various sensors, the person image template includes a blank part {blank part {illuminance}) for inserting words according to the imaging condition (illuminance) of the captured image, and the imaging condition of the captured image ( It may have a blank part {blank part {temperature}) for inserting a word corresponding to (temperature).
 また、人物画像用テンプレートは、必ずしも空欄部{人数}を有していなくてもよい。人物画像用テンプレートが空欄部{人数}を有しない場合の一例は、人物画像に対し、被写体の人数に応じた単語を含む文章を作成しない場合である。人物画像に対し、被写体の人数に応じた単語を含む文章を作成しない場合には、当然に、画像処理装置1001は、空欄部{人数}を有する人物画像用テンプレートを記憶部1090に記憶する必要はない。
 人物画像用テンプレートが空欄部{人数}を有しない場合の他の例は、被写体の人数に応じた複数の人物画像用テンプレートを記憶部1090に記憶する場合である。被写体の人数に応じた複数の人物画像用テンプレートを記憶部1090に記憶する場合には、画像処理装置1001は、人物画像に対し、被写体の人数に応じた単語を空欄部{人数}に挿入して、被写体の人数に応じた単語を含む文章を作成するのではなく、被写体の人数に応じた人物画像用テンプレートを記憶部1090から読み出して、被写体の人数に応じた単語を含む文章を作成する。
Further, the person image template does not necessarily have the blank portion {number of people}. An example of the case where the person image template does not have a blank portion {number of people} is a case where a sentence including words corresponding to the number of subjects is not created for the person image. In the case where a sentence including words corresponding to the number of subjects is not created for a person image, the image processing apparatus 1001 naturally needs to store a person image template having a blank part {number of persons] in the storage unit 1090. There is no.
Another example of the case where the person image template does not have a blank portion {number of people} is a case where a plurality of person image templates corresponding to the number of subjects are stored in the storage unit 1090. When a plurality of person image templates corresponding to the number of subjects are stored in the storage unit 1090, the image processing apparatus 1001 inserts a word corresponding to the number of subjects in the blank portion {number} for the person image. Thus, instead of creating a sentence including words according to the number of subjects, a person image template corresponding to the number of subjects is read from the storage unit 1090, and a sentence including words according to the number of subjects is created. .
 また、上記実施例では、画像処理装置1001は、空欄部{日時}及び空欄部{形容詞}を有する風景画像用テンプレート、及び、空欄部{場所}及び空欄部{形容詞}を有する風景画像用テンプレートを記憶部1090に記憶する例を説明したが、風景画像用テンプレートが有する空欄部の数、種類はこれに限定されない。例えば、画像処理装置1001が各種センサを備える場合、上述の空欄部{照度}、空欄部{温度}などを有していてもよい。 In the above embodiment, the image processing apparatus 1001 also includes a landscape image template having a blank portion {date} and a blank portion {adjective}, and a landscape image template having a blank portion {location} and a blank portion {adjective}. However, the number and type of blank sections included in the landscape image template are not limited to this. For example, when the image processing apparatus 1001 includes various sensors, the above-described blank portion {illuminance}, blank portion {temperature}, and the like may be included.
 また、上記実施例では、画像処理装置1001は、2種類の人物画像用テンプレートを記憶部1090に記憶する例を説明したが、1種類又は3種類以上の人物画像テンプレートを記憶部1090に記憶してもよい。同様に、画像処理装置1001は、1種類又は3種類以上の風景画像テンプレートを記憶部1090に記憶してもよい。 In the above-described embodiment, the example in which the image processing apparatus 1001 stores two types of person image templates in the storage unit 1090 has been described, but one type or three or more types of person image templates are stored in the storage unit 1090. May be. Similarly, the image processing apparatus 1001 may store one type or three or more types of landscape image templates in the storage unit 1090.
 また、上記実施例では、画像処理装置1001は、撮像画像に対する文章を作成した場合にその文章をこの撮像画像に付加する例を説明したが、撮像画像に対する文章を作成した場合にその文章をこの撮像画像と対応付けて記憶部1090に記憶してもよい。 Further, in the above-described embodiment, the image processing apparatus 1001 has described the example in which the sentence is added to the captured image when the sentence for the captured image is created. The image may be stored in the storage unit 1090 in association with the captured image.
 また、記憶部1090は、第1種別(例えば、ポートレート)の画像に用いられる文章の構文である第1構文と、第2種別(例えば、風景)の画像に用いられる文章の構文である第2構文とを記憶してもよい。 The storage unit 1090 also has a first syntax that is a syntax of a sentence used for an image of a first type (for example, portrait) and a syntax of a sentence that is used for an image of a second type (for example, a landscape). Two syntaxes may be stored.
 文章作成部1030は、記憶部1090内に第1構文及び第2構文が記憶されている場合、撮像画像が第1種別の画像であると判定部1020により判定されたときは(即ち、判定部1020が人物画像であると判定したときは)、所定のテキストを用いて第1構文の文章を作成し、撮像画像が第2種別の画像であると判定部1020により判定されたときは(即ち、判定部1020が風景画像であると判定したときは)、所定のテキストを用いて第2構文の文章を作成してもよい。 When the first syntax and the second syntax are stored in the storage unit 1090, the sentence creating unit 1030 is determined when the determination unit 1020 determines that the captured image is the first type image (that is, the determination unit When it is determined that 1020 is a human image), a sentence having the first syntax is created using a predetermined text, and when the determination unit 1020 determines that the captured image is a second type image (ie, When the determination unit 1020 determines that the image is a landscape image), a sentence having the second syntax may be created using a predetermined text.
 また、画像処理装置1001は、撮像画像の特徴量及び撮像条件の少なくとも一方に対応するテキスト(撮像画像の特徴量又は/及び撮像条件に応じたテキスト)を決定する決定部(非図示)を備えるようにしてもよい。例えば、決定部は、画像入力部1010が撮像画像を入力(取得)した場合に、文書作成に用いる所定のテキストとして、その撮像画像の特徴量又は/及び撮像条件に応じたテキストを決定する。より詳細には、例えば、特徴量及び撮像条件に対応付けて複数のテキストを記憶部1090に予め記憶しておき、決定部は、記憶部1090内の複数のテキストのなかから、特徴量又は/及び撮像条件に応じたテキストを選択する。 The image processing apparatus 1001 includes a determination unit (not shown) that determines text corresponding to at least one of the feature amount of the captured image and the imaging condition (text according to the feature amount of the captured image or / and the imaging condition). You may do it. For example, when the image input unit 1010 inputs (acquires) a captured image, the determination unit determines a text corresponding to the feature amount or / and the imaging condition of the captured image as the predetermined text used for document creation. More specifically, for example, a plurality of texts are stored in advance in the storage unit 1090 in association with the feature amounts and the imaging conditions, and the determination unit determines whether the feature amount or / or from the plurality of texts in the storage unit 1090. The text corresponding to the imaging condition is selected.
 つまり、文章作成部1030は、撮像画像が第1種別の画像であると判定部1020により判定されたときは、決定部が上述の如く決定したテキストを用いて第1構文の文章を作成し、撮像画像が第2種別の画像であると判定部1020により判定されたとき、決定部が上述の如く決定したテキストを用いて第2構文の文章を作成する。 That is, when the determination unit 1020 determines that the captured image is the first type image, the sentence generation unit 1030 generates a sentence of the first syntax using the text determined by the determination unit as described above. When the determination unit 1020 determines that the captured image is the second type image, the determination unit creates a sentence of the second syntax using the text determined as described above.
(第2の実施形態)
 続いて、図面を参照しながら本発明の第2の実施形態について説明する。図8は、本発明の第2の実施形態による撮像装置1100の機能ブロック図の一例である。
 本実施形態に係る撮像装置1100は、図8に示すように、撮像部1110、バッファメモリ部1130、画像処理部(画像処理装置)1140、表示部1150、記憶部1160、通信部1170、操作部1180、CPU(Central processing unit)1190及びバス1300を備える。
(Second Embodiment)
Subsequently, a second embodiment of the present invention will be described with reference to the drawings. FIG. 8 is an example of a functional block diagram of an imaging apparatus 1100 according to the second embodiment of the present invention.
As illustrated in FIG. 8, the imaging device 1100 according to the present embodiment includes an imaging unit 1110, a buffer memory unit 1130, an image processing unit (image processing device) 1140, a display unit 1150, a storage unit 1160, a communication unit 1170, and an operation unit. 1180, a CPU (Central Processing Unit) 1190, and a bus 1300.
 撮像部1110は、光学系1111、撮像素子1119及びA/D(Analog to Digital)変換部1120を備える。光学系1111は、1又は2以上のレンズを備える。 The imaging unit 1110 includes an optical system 1111, an imaging element 1119, and an A / D (Analog to Digital) conversion unit 1120. The optical system 1111 includes one or more lenses.
 撮像素子1119は、例えば、受光面に結像した光学像を電気信号に変換して、A/D変換部1120に出力する。 The image sensor 1119 converts, for example, an optical image formed on the light receiving surface into an electric signal and outputs the electric signal to the A / D converter 1120.
 また、撮像素子1119は、操作部1180を介して静止画撮像指示を受け付けた際に得られる画像データ(電気信号)を、撮像された静止画の撮像画像データ(電気信号)として、A/D変換部1120に出力する、又はA/D変換部1120や画像処理部1140を介して、記憶媒体1200に記憶させる。
 また、撮像素子1119は、操作部1180を介して動画撮像指示を受け付けた際に得られる、所定の間隔で連続的に撮像した動画の画像データ(電気信号)を、撮像された動画の撮像画像データ(電気信号)として、A/D変換部1120に出力する、又はA/D変換部1120や画像処理部1140を介して、記憶媒体1200に記憶させる。
 また、撮像素子1119は、例えば、操作部1180を介して撮像指示を受け付けていない状態において、連続的に得られる画像データ(電気信号)をスルー画データ(撮像画像)(電気信号)として、A/D変換部1120に出力する、又はA/D変換部1120や画像処理部1140を介して、表示部1150に連続的に出力する。
Further, the image sensor 1119 uses the image data (electric signal) obtained when a still image capturing instruction is received via the operation unit 1180 as captured image data (electric signal) of the captured still image as an A / D. The data is output to the conversion unit 1120 or stored in the storage medium 1200 via the A / D conversion unit 1120 or the image processing unit 1140.
In addition, the image sensor 1119 captures moving image data (electrical signals) continuously captured at predetermined intervals obtained when a moving image capturing instruction is received via the operation unit 1180. Data (electrical signal) is output to the A / D conversion unit 1120 or stored in the storage medium 1200 via the A / D conversion unit 1120 or the image processing unit 1140.
In addition, the image sensor 1119, for example, uses image data (electrical signal) obtained continuously as through image data (captured image) (electrical signal) in a state where no imaging instruction is received via the operation unit 1180. The data is output to the / D conversion unit 1120 or continuously output to the display unit 1150 via the A / D conversion unit 1120 and the image processing unit 1140.
 なお、光学系1111は、撮像装置1100に取り付けられて一体とされていてもよいし、撮像装置1100に着脱可能に取り付けられてもよい。 Note that the optical system 1111 may be attached to and integrated with the imaging device 1100, or may be detachably attached to the imaging device 1100.
 A/D変換部1120は、撮像素子1119によって変換された画像の電気/電子信号(アナログ信号)をアナログ/デジタル変換し、この変換により得られたデジタル信号である撮像画像データ(撮像画像)を出力する。 The A / D conversion unit 1120 performs analog / digital conversion on the electrical / electronic signal (analog signal) of the image converted by the image sensor 1119, and captures image data (captured image) that is a digital signal obtained by this conversion. Output.
 ここで、撮像部1110は、操作部1180によりユーザから受け付けた指示内容や、設定された撮像条件に基づいてCPU1190により制御され、光学系1111を介した光学像を撮像素子1119に結像させ、A/D変換部1120によりデジタル信号に変換されたこの光学像に基づく撮像画像を生成する。 Here, the imaging unit 1110 is controlled by the CPU 1190 based on the instruction content received from the user through the operation unit 1180 and the set imaging conditions, and forms an optical image via the optical system 1111 on the imaging element 1119. A captured image based on the optical image converted into a digital signal by the A / D converter 1120 is generated.
 なお、撮像条件は、例えば、絞り値や露出値などのように、撮像時の条件を規定する。
 撮像条件は、例えば、記憶部1160に記憶して、CPU1190により参照することができる。
Note that the imaging conditions define conditions at the time of imaging such as an aperture value and an exposure value, for example.
The imaging conditions can be stored in the storage unit 1160 and referred to by the CPU 1190, for example.
 A/D変換部1120から出力される画像データは、設定された画像処理フロー条件に基づいて、例えば、画像処理部1140、表示部1150、バッファメモリ部1130、(通信部1170を介して)記憶媒体1200のうちの1つ以上に入力される。
 なお、画像処理フロー条件は、例えば、A/D変換部1120から出力される画像データを画像処理部1140を介して記憶媒体1200に出力するなどのように、画像データを処理するフロー(流れ)の条件を規定する。画像処理フロー条件は、例えば、記憶部1160に記憶して、CPU1190により参照することができる。
The image data output from the A / D conversion unit 1120 is stored based on the set image processing flow conditions, for example, the image processing unit 1140, the display unit 1150, the buffer memory unit 1130, (via the communication unit 1170). Input to one or more of the media 1200.
Note that the image processing flow condition is a flow for processing image data such as outputting image data output from the A / D conversion unit 1120 to the storage medium 1200 via the image processing unit 1140, for example. Specify the conditions. The image processing flow conditions can be stored in the storage unit 1160 and referred to by the CPU 1190, for example.
 具体的には、撮像素子1119が、操作部1180を介して静止画撮像指示を受け付けた際に得られる画像の電気信号を、撮像された静止画の電気信号として、A/D変換部1120に出力する場合には、A/D変換部1120から出力される静止画の画像データを画像処理部1140を経由させて、記憶媒体1200に記憶させる、ことなどを行う。
 また、撮像素子1119が、操作部1180を介して動画撮像指示を受け付けた際に得られる、所定の間隔で連続的に撮像した動画の電気信号を、撮像された動画の電気信号として、A/D変換部1120に出力する場合には、A/D変換部1120から出力される動画の画像データを画像処理部1140を経由させて、記憶媒体1200に記憶させる、ことなどを行う。
 また、撮像素子1119が、操作部1180を介して撮像指示を受け付けていない状態において、連続的に得られる画像の電気信号を、スルー画の電気信号として、A/D変換部1120に出力する場合には、A/D変換部1120から出力されるスルー画の画像データを画像処理部1140を経由させて、表示部1150に連続的に出力する、ことなどを行う。
Specifically, an electrical signal of an image obtained when the imaging device 1119 receives a still image imaging instruction via the operation unit 1180 is input to the A / D conversion unit 1120 as an electrical signal of the captured still image. When outputting, the image data of the still image output from the A / D conversion unit 1120 is stored in the storage medium 1200 via the image processing unit 1140.
In addition, an electrical signal of a moving image continuously captured at a predetermined interval obtained when the imaging element 1119 receives a moving image capturing instruction via the operation unit 1180 is used as an electrical signal of the captured moving image as A / When outputting to the D conversion unit 1120, the image data of the moving image output from the A / D conversion unit 1120 is stored in the storage medium 1200 via the image processing unit 1140.
In the case where the imaging element 1119 does not accept an imaging instruction via the operation unit 1180, the electrical signal of a continuously obtained image is output to the A / D conversion unit 1120 as an electrical signal of a through image. For example, the live view image data output from the A / D conversion unit 1120 is continuously output to the display unit 1150 via the image processing unit 1140.
 なお、A/D変換部1120から出力される画像データを画像処理部1140を経由させる構成としては、例えば、A/D変換部1120から出力される画像データを直接に画像処理部1140に入力する構成が用いられてもよく、あるいは、A/D変換部1120から出力される画像データをバッファメモリ部1130に記憶して、バッファメモリ部1130に記憶されたこの画像データを画像処理部1140に入力する構成が用いられてもよい。 As a configuration for causing the image data output from the A / D conversion unit 1120 to pass through the image processing unit 1140, for example, the image data output from the A / D conversion unit 1120 is directly input to the image processing unit 1140. A configuration may be used, or the image data output from the A / D converter 1120 is stored in the buffer memory unit 1130, and the image data stored in the buffer memory unit 1130 is input to the image processing unit 1140. A configuration may be used.
 画像処理部1140は、記憶部1160に記憶されている画像処理条件に基づいて、バッファメモリ部1130に記憶されている画像データに対して画像処理を実行する。画像処理部1140の詳細については後述する。なお、バッファメモリ部1130に記憶されている画像データとは、画像処理部1140に入力される画像データのことであり、例えば、上述した撮像画像データ、スルー画データ、または、記憶媒体1200から読み出された撮像画像データのことである。 The image processing unit 1140 executes image processing on the image data stored in the buffer memory unit 1130 based on the image processing conditions stored in the storage unit 1160. Details of the image processing unit 1140 will be described later. Note that the image data stored in the buffer memory unit 1130 is image data input to the image processing unit 1140. For example, the image data read from the above-described captured image data, through image data, or the storage medium 1200 is read. This is taken image data.
 画像処理部1140は、入力した画像データに対して所定の画像処理を実行する。
 ここで、画像処理部1140に入力する画像データとしては、一例として、A/D変換部1120から出力される画像データがあり、他の例として、バッファメモリ部1130に記憶された画像データを読み出して入力することもでき、また、他の例として、記憶媒体1200に記憶された画像データを通信部1170を介して読み出して入力することもできる。
The image processing unit 1140 performs predetermined image processing on the input image data.
Here, as an example of image data to be input to the image processing unit 1140, there is image data output from the A / D conversion unit 1120. As another example, image data stored in the buffer memory unit 1130 is read out. Alternatively, as another example, image data stored in the storage medium 1200 can be read out and input via the communication unit 1170.
 操作部1180は、例えば、電源スイッチ、シャッターボタン、十字キー、確定ボタン、および、その他の操作キーを含み、ユーザによって操作されることでユーザの操作入力を受け付け、CPU1190に出力する。 The operation unit 1180 includes, for example, a power switch, a shutter button, a cross key, a confirmation button, and other operation keys. The operation unit 1180 receives a user operation input by being operated by the user, and outputs it to the CPU 1190.
 表示部1150は、例えば液晶ディスプレイなどであって、画像データ、操作画面などを表示する。例えば、表示部1150は、画像処理部1140によって文章が付加された撮像画像を表示する。 The display unit 1150 is a liquid crystal display, for example, and displays image data, an operation screen, and the like. For example, the display unit 1150 displays a captured image to which text is added by the image processing unit 1140.
 また、例えば、表示部1150は、画像処理部1140によって所定の画像処理が実行された画像データを入力して表示することができ、また、A/D変換部1120から出力される画像データ、バッファメモリ部1130から読み出される画像データ、あるいは記憶媒体1200から読み出される画像データを入力して表示することもできる。 Further, for example, the display unit 1150 can input and display image data that has been subjected to predetermined image processing by the image processing unit 1140, and can output image data output from the A / D conversion unit 1120, a buffer Image data read from the memory unit 1130 or image data read from the storage medium 1200 can be input and displayed.
 記憶部1160は、種々の情報を記憶する。
 バッファメモリ部1130は、撮像部1110によって撮像された画像データを、一時的に記憶する。
 また、バッファメモリ部1130は、記憶媒体1200から読み出された画像データを、一時的に記憶する。
The storage unit 1160 stores various information.
The buffer memory unit 1130 temporarily stores image data captured by the imaging unit 1110.
The buffer memory unit 1130 temporarily stores the image data read from the storage medium 1200.
 通信部1170は、カードメモリ等の取り外しが可能な記憶媒体1200と接続され、この記憶媒体1200への撮影画像データの書き込み(記憶させる処理)、この記憶媒体1200からの画像データの読み出し、またはこの記憶媒体1200に記憶された画像データの消去を行う。
 記憶媒体1200は、撮像装置1100に対して着脱可能に接続される記憶部であり、例えば、撮像部1110によって生成された画像データ(撮像/撮影画像データ)を記憶する。
The communication unit 1170 is connected to a removable storage medium 1200 such as a card memory, and writes (stores) captured image data to the storage medium 1200, reads image data from the storage medium 1200, or The image data stored in the storage medium 1200 is erased.
The storage medium 1200 is a storage unit that is detachably connected to the imaging apparatus 1100, and stores, for example, image data (captured / captured image data) generated by the imaging unit 1110.
 CPU1190は、撮像装置1100が備える各構成部を制御する。バス1300は、撮像部1110と、CPU1190と、操作部1180と、画像処理部1140と、表示部1150と、記憶部1160と、バッファメモリ部1130と、通信部1170とに接続され、各部から出力された画像データや制御信号等を転送する。 The CPU 1190 controls each component included in the imaging device 1100. The bus 1300 is connected to the imaging unit 1110, the CPU 1190, the operation unit 1180, the image processing unit 1140, the display unit 1150, the storage unit 1160, the buffer memory unit 1130, and the communication unit 1170, and outputs from each unit. The transferred image data and control signals are transferred.
 なお、撮像装置1100の画像処理部1140は、第1の実施形態による画像処理装置1001の判定部1020、文章作成部1030及び文章付加部1040に相当する。
 また、撮像装置1100の記憶部1160は、第1の実施形態による画像処理装置1001の記憶部1090に相当する。
Note that the image processing unit 1140 of the imaging device 1100 corresponds to the determination unit 1020, the text creation unit 1030, and the text addition unit 1040 of the image processing device 1001 according to the first embodiment.
The storage unit 1160 of the imaging device 1100 corresponds to the storage unit 1090 of the image processing device 1001 according to the first embodiment.
 例えば、画像処理部1140は、第1の実施形態による画像処理装置1001の判定部1020、文章作成部1030及び文章付加部1040の処理を実行する。
 また、具体的には、記憶部1160は、少なくとも、第1の実施形態による画像処理装置1001の記憶部1090が記憶する情報を記憶する。
For example, the image processing unit 1140 executes the processes of the determination unit 1020, the sentence creation unit 1030, and the sentence addition unit 1040 of the image processing apparatus 1001 according to the first embodiment.
Specifically, the storage unit 1160 stores at least information stored in the storage unit 1090 of the image processing apparatus 1001 according to the first embodiment.
 なお、上記第1の実施形態による画像処理装置1001の各処理を実行するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、上記画像処理装置1001の各処理に係る上述した種々の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OS(Operating System)や周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM(Read Only Memory)、フラッシュメモリ等の書き込み可能な不揮発性メモリ、CD(Compact Disc)-ROM等の可搬媒体、USB(Universal Serial Bus) I/F(インタフェース)を介して接続されるUSBメモリ、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。 A program for executing each process of the image processing apparatus 1001 according to the first embodiment is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. By doing so, the above-described various processes related to each process of the image processing apparatus 1001 may be performed. Here, the “computer system” includes hardware such as an OS (Operating System) and peripheral devices. Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used. “Computer-readable recording medium” refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM (Read Only Memory), a writable nonvolatile memory such as a flash memory, or a CD (Compact Disc) -ROM. USB (Universal Serial Bus) A storage device such as a USB memory connected via an I / F (interface) or a hard disk built in a computer system.
 さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。 Further, the “computer-readable recording medium” means a volatile memory (for example, DRAM (Dynamic DRAM) in a computer system that becomes a server or a client when a program is transmitted through a network such as the Internet or a communication line such as a telephone line. Random Access Memory)), etc., which hold programs for a certain period of time. The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.
(第3の実施形態)
 図9は、本実施形態に係る撮像システム2001の構成を示す概略ブロック図である。
 図9に示す撮像装置2100は、撮像部2002、カメラ制御部2003、画像処理部2004、記憶部2005、バッファメモリ部2006、表示部2007、操作部2011、通信部2012、電源部2013、及びバス2015を備えている。
(Third embodiment)
FIG. 9 is a schematic block diagram illustrating a configuration of the imaging system 2001 according to the present embodiment.
The imaging device 2100 illustrated in FIG. 9 includes an imaging unit 2002, a camera control unit 2003, an image processing unit 2004, a storage unit 2005, a buffer memory unit 2006, a display unit 2007, an operation unit 2011, a communication unit 2012, a power supply unit 2013, and a bus. 2015 is provided.
 撮像部2002は、レンズ部2021、撮像素子2022、及びAD変換部2023を備えており、被写体を撮像して画像データを生成する。この撮像部2002は、設定された撮像条件(例えば絞り値、露出等)に基づいてカメラ制御部2003により制御され、レンズ部2021を介して入力された被写体の光学像を、撮像素子2022の撮像面上に結像させる。また、撮像部2002は、撮像素子2022から出力されたアナログ信号をAD変換部2023においてデジタル信号に変換し、画像データを生成する。
 なお、上述したレンズ部2021は、撮像装置2100に取り付けられて一体とされていてもよいし、撮像装置2100に着脱可能に取り付けられてもよい。
The imaging unit 2002 includes a lens unit 2021, an imaging element 2022, and an AD conversion unit 2023. The imaging unit 2002 images a subject and generates image data. The imaging unit 2002 is controlled by the camera control unit 2003 based on the set imaging conditions (for example, aperture value, exposure, etc.), and the imaging element 2022 captures the optical image of the subject input via the lens unit 2021. Form an image on the surface. In addition, the imaging unit 2002 converts the analog signal output from the imaging element 2022 into a digital signal in the AD conversion unit 2023, and generates image data.
Note that the lens unit 2021 described above may be attached to and integrated with the imaging device 2100, or may be detachably attached to the imaging device 2100.
 撮像素子2022は、撮像面に結像された光学像を光電変換したアナログ信号を、AD変換部2023に出力する。AD変換部2023は、撮像素子2022から入力されたアナログ信号をデジタル信号に変換し、この変換したデジタル信号である画像データを出力する。 The imaging element 2022 outputs an analog signal obtained by photoelectrically converting the optical image formed on the imaging surface to the AD conversion unit 2023. The AD conversion unit 2023 converts the analog signal input from the image sensor 2022 into a digital signal, and outputs image data that is the converted digital signal.
 例えば、撮像部2002は、操作部2011における静止画撮影操作に応じて、撮像した静止画の画像データを出力する。また、撮像部2002は、操作部2011における動画撮影操作に応じて、所定の間隔で連続的に撮像した動画の画像データを出力する。そして、撮像部2002によって撮像された静止画の画像データ及び動画の画像データは、カメラ制御部2003の制御により、バッファメモリ部2006や画像処理部2004を介して記憶媒体2200に記録される。また、撮像部2002は、操作部2011における撮影操作がされていない撮影待機状態の場合、所定の間隔で連続的に得られる画像データをスルー画像データ(スルー画)として出力する。そして、撮像部2002によって得られたスルー画像データは、カメラ制御部2003の制御により、バッファメモリ部2006や画像処理部2004を介して表示部2007に表示される。 For example, the imaging unit 2002 outputs image data of a captured still image in response to a still image shooting operation in the operation unit 2011. Further, the imaging unit 2002 outputs image data of moving images continuously captured at a predetermined interval in accordance with a moving image shooting operation in the operation unit 2011. Then, still image data and moving image data captured by the imaging unit 2002 are recorded in the storage medium 2200 via the buffer memory unit 2006 and the image processing unit 2004 under the control of the camera control unit 2003. Further, the imaging unit 2002 outputs image data obtained continuously at a predetermined interval as through image data (through image) in a shooting standby state in which no shooting operation is performed in the operation unit 2011. The through image data obtained by the imaging unit 2002 is displayed on the display unit 2007 via the buffer memory unit 2006 and the image processing unit 2004 under the control of the camera control unit 2003.
 画像処理部2004は、記憶部2005に記憶されている画像処理条件に基づいて、バッファメモリ部2006に記憶されている画像データに対して画像処理を実行する。ここで、バッファメモリ部2006または記憶媒体2200に記憶されている画像データとは、例えば、撮像部2002によって撮像された静止画の画像データ、スルー画像データ、もしくは動画の画像データ、または記憶媒体2200から読み出された画像データである。 The image processing unit 2004 executes image processing on the image data stored in the buffer memory unit 2006 based on the image processing conditions stored in the storage unit 2005. Here, the image data stored in the buffer memory unit 2006 or the storage medium 2200 is, for example, still image data, through-image data, or moving image data captured by the imaging unit 2002, or the storage medium 2200. The image data read out from.
 記憶部2005には、撮像装置2100を制御するための、予め定められた撮影条件、画像処理条件、再生制御条件、表示制御条件、記録制御条件、及び出力制御条件などが記憶されている。例えば、記憶部2005は、ROMである。
 なお、記憶部2005には、撮像された動画の画像データ及び静止画の画像データが記録されてもよい。この場合、例えば、記憶部2005は、フラッシュメモリ等であってもよい。
The storage unit 2005 stores predetermined shooting conditions, image processing conditions, reproduction control conditions, display control conditions, recording control conditions, output control conditions, and the like for controlling the imaging apparatus 2100. For example, the storage unit 2005 is a ROM.
Note that the storage unit 2005 may record image data of captured moving images and image data of still images. In this case, for example, the storage unit 2005 may be a flash memory or the like.
 バッファメモリ部2006は、カメラ制御部2003が撮像装置2100を制御する際の作業領域として利用される。撮像部2002によって撮像された静止画の画像データ、スルー画像データ、もしくは動画の画像データ、または記憶媒体2200から読み出された画像データは、カメラ制御部2003の制御による画像処理の過程においてバッファメモリ部2006に一時的に記憶される。バッファメモリ部2006は、例えばRAM(Random Access Memory)である。 The buffer memory unit 2006 is used as a work area when the camera control unit 2003 controls the imaging apparatus 2100. Still image data, through image data, or moving image data captured by the imaging unit 2002, or image data read from the storage medium 2200 is buffered in the course of image processing under the control of the camera control unit 2003. Unit 2006 is temporarily stored. The buffer memory unit 2006 is, for example, a RAM (Random Access Memory).
 表示部2007は、例えば、液晶ディスプレイであり、撮像部2002によって撮像された画像データに基づく画像、もしくは記憶媒体2200から読み出された画像データに基づく画像、またはメニュー画面、もしくは撮像装置2100の動作状態や設定に関する情報等を表示する。 The display unit 2007 is a liquid crystal display, for example, and is an image based on image data captured by the imaging unit 2002, an image based on image data read from the storage medium 2200, a menu screen, or the operation of the imaging device 2100. Displays information about status and settings.
 操作部2011は、撮像装置2100に対して操作者が操作入力するための操作スイッチを備えている。例えば、操作部2011は、電源スイッチ、レリーズスイッチ、モードスイッチ、メニュースイッチ、上下左右選択スイッチ、確定スイッチ、取消スイッチ、及びその他の操作スイッチを備えている。操作部2011が備えている上述のそれぞれのスイッチは、操作されることに応じて、それぞれの操作に対応した操作信号をカメラ制御部2003に出力する。 The operation unit 2011 includes an operation switch for an operator to input an operation to the imaging apparatus 2100. For example, the operation unit 2011 includes a power switch, a release switch, a mode switch, a menu switch, an up / down / left / right selection switch, a confirmation switch, a cancel switch, and other operation switches. Each of the switches provided in the operation unit 2011 outputs an operation signal corresponding to each operation to the camera control unit 2003 in response to the operation.
 通信部2012には、カードメモリ等の着脱可能な記憶媒体2200が挿入される。
 通信部2012を介して、この記憶媒体2200に画像データの書込み、読み出し、または消去が実行される。
 記憶媒体2200は、撮像装置2100に対して着脱可能に接続される記憶部であり、例えば、撮像部2002で撮像されて生成された画像データが記録される。なお、本実施形態において、記憶媒体2200に記録される画像データは、例えば、イグジフ(Exif)形式のファイルである。
A removable storage medium 2200 such as a card memory is inserted into the communication unit 2012.
The image data is written to, read from, or deleted from the storage medium 2200 via the communication unit 2012.
The storage medium 2200 is a storage unit that is detachably connected to the imaging device 2100. For example, image data generated by being captured by the imaging unit 2002 is recorded therein. In the present embodiment, the image data recorded on the storage medium 2200 is, for example, an Exif file.
 電源部2013は、撮像装置2100が備えている各部に電力を供給する。電源部2013は、例えばバッテリーを備えており、このバッテリーから供給される電力の電圧を、上述の各部における動作電圧に変換する。そして、電源部2013は、変換した動作電圧の電力を、撮像装置2100の動作モード(例えば、撮影動作モード、またはスリープモード)に基づいて、カメラ制御部2003の制御により上述の各部に供給する。 The power supply unit 2013 supplies power to each unit included in the imaging apparatus 2100. The power supply unit 2013 includes, for example, a battery, and converts the voltage of power supplied from the battery into the operating voltage in each of the above-described units. The power supply unit 2013 supplies the converted power of the operating voltage to the above-described units under the control of the camera control unit 2003 based on the operation mode (for example, the shooting operation mode or the sleep mode) of the imaging device 2100.
 バス2015は、撮像部2002、カメラ制御部2003、画像処理部2004、記憶部2005、バッファメモリ部2006、表示部2007、操作部2011、及び通信部2012と接続され、各部から出力された画像データや制御信号等を転送する。 The bus 2015 is connected to an imaging unit 2002, a camera control unit 2003, an image processing unit 2004, a storage unit 2005, a buffer memory unit 2006, a display unit 2007, an operation unit 2011, and a communication unit 2012, and image data output from each unit. And transfer control signals.
 カメラ制御部2003は、撮像装置2100が備えている各部を制御する。 The camera control unit 2003 controls each unit included in the imaging device 2100.
 図10は、本実施形態に係る画像処理部2004のブロック図である。
 図10に示すように、画像処理部2004は、画像取得部2041、画像識別情報取得部2042(シーン判別部)、色空間ベクトル生成部2043、主要色抽出部2044、テーブル記憶部2045、第1ラベル生成部2046、第2ラベル生成部2047、ラベル出力部2048を備えている。
FIG. 10 is a block diagram of the image processing unit 2004 according to the present embodiment.
As shown in FIG. 10, the image processing unit 2004 includes an image acquisition unit 2041, an image identification information acquisition unit 2042 (scene determination unit), a color space vector generation unit 2043, a main color extraction unit 2044, a table storage unit 2045, A label generation unit 2046, a second label generation unit 2047, and a label output unit 2048 are provided.
 画像取得部2041は、バス2015を介して、撮像部2002が撮像した画像データと、画像データと関連付けられて記憶されている画像識別情報とを記憶媒体2200から読み出す。画像取得部2041が読み出す画像データは、撮像システム2001の使用者が操作部2011の操作により選択した画像データである。画像取得部2041は、取得した画像データを、色空間ベクトル生成部2043に出力する。画像取得部2041は、取得した画像識別情報を画像識別情報取得部2042に出力する。 The image acquisition unit 2041 reads the image data captured by the imaging unit 2002 and the image identification information stored in association with the image data from the storage medium 2200 via the bus 2015. Image data read by the image acquisition unit 2041 is image data selected by the user of the imaging system 2001 by operating the operation unit 2011. The image acquisition unit 2041 outputs the acquired image data to the color space vector generation unit 2043. The image acquisition unit 2041 outputs the acquired image identification information to the image identification information acquisition unit 2042.
 図11は、本実施形態に係る記憶媒体2200に画像データに関連付けられて記憶されている画像識別情報の一例を説明する図である。
 図11において、左の列は項目例であり、右の列は情報の例である。図11に示すように、画像データと関連付けられて記憶されている項目は、撮像日時、画像全体の解像度、シャッタースピード、絞り値(F値)、ISO感度、測光モード、フラッシュ使用の有無、シーンモード、静止画・動画等である。これらの画像識別情報は、撮影者が撮像時に撮像システム2001の操作部2011で設定した情報と、撮像装置2100が自動的に設定した情報である。また、これらの画像識別情報は、画像データと関連付けられて記憶されているExif規格の情報を用いるようにしてもよい。
 項目において「シーン」(撮影モードともいう)とは、撮像装置2100に予め設定されているシャッタースピード、F値、ISO感度、及び焦点距離などの組み合わせパターンである。これらの組み合わせパターンは、撮像する対象に合わせて予め設定され、記憶媒体2200に記憶され、使用者が操作部2011から手動で選択する。シーンは、例えば、ポートレート、風景、スポーツ、夜景ポートレート、パーティー、ビーチ、雪、夕焼け、夜景、クローズアップ、料理、美術館、花火、逆光、子供、ペットなどである。
FIG. 11 is a diagram illustrating an example of image identification information stored in association with image data in the storage medium 2200 according to the present embodiment.
In FIG. 11, the left column is an example item, and the right column is an example of information. As shown in FIG. 11, items stored in association with image data are: imaging date / time, overall image resolution, shutter speed, aperture value (F value), ISO sensitivity, photometry mode, presence / absence of flash use, scene Mode, still image / moving image, etc. These pieces of image identification information are information set by the photographer using the operation unit 2011 of the imaging system 2001 at the time of imaging and information automatically set by the imaging apparatus 2100. Further, the Exif standard information stored in association with the image data may be used as the image identification information.
In the item, “scene” (also referred to as a shooting mode) is a combination pattern such as shutter speed, F value, ISO sensitivity, and focal length preset in the imaging apparatus 2100. These combination patterns are preset according to the object to be imaged, stored in the storage medium 2200, and manually selected by the user from the operation unit 2011. The scene is, for example, portrait, landscape, sport, night view portrait, party, beach, snow, sunset, night view, close-up, cooking, museum, fireworks, backlight, children, pets, and the like.
 図10に戻って、画像識別情報取得部2042は、画像取得部2041が出力する画像識別情報から、撮像された画像データに設定されている撮影情報を抽出し、抽出した撮影情報を第1ラベル生成部2046に出力する。なお、撮影情報とは、第1ラベル生成部2046が第1ラベルを生成するために必要な情報であり、例えばシーン、撮影日時等である。 Returning to FIG. 10, the image identification information acquisition unit 2042 extracts the shooting information set in the captured image data from the image identification information output by the image acquisition unit 2041, and uses the extracted shooting information as the first label. The data is output to the generation unit 2046. The shooting information is information necessary for the first label generation unit 2046 to generate the first label, such as a scene and shooting date / time.
 色空間ベクトル生成部2043は、画像取得部2041が出力する画像データを、予め定められている色空間のベクトルに変換する。予め定められている色空間は、例えばHSV(Hue(色相)、Saturation(彩度)、Brightness(明度))である。
 色空間ベクトル生成部2043は、画像データの全画素を色ベクトル毎に分類し、色ベクトル毎の頻度を検出し、色ベクトルの頻度分布を生成する。色空間ベクトル生成部2043は、生成した色ベクトルの頻度分布を示す情報を主要色抽出部2044に出力する。
 なお、画像データがHSVの場合、色ベクトルは、次式(4)のように表される。
The color space vector generation unit 2043 converts the image data output from the image acquisition unit 2041 into a predetermined color space vector. The predetermined color space is, for example, HSV (Hue (Hue), Saturation (Saturation), Brightness (Brightness))).
The color space vector generation unit 2043 classifies all pixels of the image data for each color vector, detects the frequency for each color vector, and generates a color vector frequency distribution. The color space vector generation unit 2043 outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044.
When the image data is HSV, the color vector is expressed as the following equation (4).
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
 なお、式(4)において、i、j、kは、色相を0~100%に正規化した場合、各々0から100の自然数である。 In equation (4), i, j, and k are natural numbers of 0 to 100, respectively, when the hue is normalized to 0 to 100%.
 主要色抽出部2044は、色空間ベクトル生成部2043が出力する色ベクトルの頻度分布を示す情報から頻度の高い順に3色を主要色として抽出し、抽出した主要色を示す情報を第1ラベル生成部2046に出力する。なお、頻度が高い色は、同じ色ベクトルの画素数が多い色である。また、主要色を示す情報とは、式(4)の色ベクトルと、この色ベクトル毎の頻度(画素数)である。
 なお、本実施形態において、主要色抽出部2044は、色空間ベクトル生成部2043と主要色抽出部2044とにより構成するようにしてもよい。
The main color extraction unit 2044 extracts three colors as main colors in order of frequency from the information indicating the frequency distribution of the color vectors output from the color space vector generation unit 2043, and generates information indicating the extracted main colors as a first label. To the unit 2046. In addition, a color with high frequency is a color with many pixels of the same color vector. The information indicating the main color is the color vector of Expression (4) and the frequency (number of pixels) for each color vector.
In the present embodiment, the main color extraction unit 2044 may be configured by a color space vector generation unit 2043 and a main color extraction unit 2044.
 テーブル記憶部2045(記憶部)には、シーン毎と主要色の組み合わせ毎に、第1ラベルが予め関連付けられて記憶されている。 In the table storage unit 2045 (storage unit), a first label is stored in association with each scene and each combination of main colors.
 図12は、本実施形態に係るテーブル記憶部2045に記憶されている主要色の組み合わせと第1ラベルの一例を説明する図である。
 図12に示すように、画像データから抽出された主要色の中で、頻度が1番高い第1色、第1色の次に頻度が高い第2色、第2色の次に頻度が高い第3色の3色の組み合わせ毎と、シーン毎に第1ラベルが予め定義され、テーブル記憶部2045に記憶されている。例えば、第1色が色1、第2色が色2、第3色が色3の組み合わせにおいて、シーン1の第1ラベルはラベル(1,1)であり、シーンnのラベルはラベル(1,n)である。同様に、第1色が色m、第2色が色m、第3色が色mの組み合わせにおいて、シーン1の第1ラベルはラベル(m,1)であり、シーンnのラベルはラベル(m,n)である。
 このように、シーン毎と主要な3色の組み合わせ毎のラベルを、予め実験やアンケートなどにより定義しておき、テーブル記憶部2045に記憶させておく。なお、第1色と第2色と第3色との頻度の比率は、1:1:1である。
FIG. 12 is a diagram illustrating an example of combinations of primary colors and first labels stored in the table storage unit 2045 according to the present embodiment.
As shown in FIG. 12, among the main colors extracted from the image data, the first color having the highest frequency, the second color having the second highest frequency after the first color, and the second frequency having the second highest frequency. A first label is defined in advance for each combination of the three colors of the third color and for each scene, and is stored in the table storage unit 2045. For example, when the first color is color 1, the second color is color 2, and the third color is color 3, the first label of scene 1 is label (1, 1), and the label of scene n is label (1 , N). Similarly, in the combination where the first color is the color m, the second color is the color m, and the third color is the color m, the first label of the scene 1 is the label (m, 1), and the label of the scene n is the label ( m, n).
In this way, labels for each scene and each combination of the three main colors are defined in advance by experiments, questionnaires, etc., and stored in the table storage unit 2045. The frequency ratio of the first color, the second color, and the third color is 1: 1: 1.
 図10に戻って、第1ラベル生成部2046は、画像識別情報取得部2042が出力する撮影情報と主要色抽出部2044が出力する主要色を示す情報とに関連付けられて記憶されている第1ラベルを、テーブル記憶部2045から読み出す。第1ラベル生成部2046は、読み出した第1ラベルを示す情報と、主要色抽出部2044が出力する主要色を示す情報とを第2ラベル生成部2047に出力する。また、第1ラベル生成部2046は、例えば、撮影情報であるExifに含まれる情報等を用いてシーン判別する。 Returning to FIG. 10, the first label generation unit 2046 is stored in association with the shooting information output by the image identification information acquisition unit 2042 and the information indicating the main color output by the main color extraction unit 2044. The label is read from the table storage unit 2045. The first label generation unit 2046 outputs information indicating the read first label and information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047. In addition, the first label generation unit 2046 determines a scene using, for example, information included in Exif that is imaging information.
 第2ラベル生成部2047は、主要色抽出部2044が出力する主要色を示す情報から色ベクトル毎の頻度を抽出し、抽出した頻度を用いて3つの色ベクトルの頻度を正規化し、3つの主要色の比率を算出する。第2ラベル生成部2047は、算出した3つの主要色の比率に基づき第1ラベルを修飾する修飾ラベル(第3ラベル)を生成し、生成した修飾ラベルを第1ラベル生成部2046が出力する第1ラベルに修飾さることで第1ラベルを修正して、画像データに対する第2ラベルを生成する。第2ラベル生成部2047は、生成した第2ラベルを示す情報をラベル出力部2048に出力する。 The second label generation unit 2047 extracts the frequency for each color vector from the information indicating the main color output from the main color extraction unit 2044, normalizes the frequency of the three color vectors using the extracted frequency, and outputs the three main colors. Calculate the color ratio. The second label generation unit 2047 generates a modification label (third label) that modifies the first label based on the calculated ratio of the three main colors, and the first label generation unit 2046 outputs the generated modification label. The first label is modified by being modified to one label to generate a second label for the image data. The second label generation unit 2047 outputs information indicating the generated second label to the label output unit 2048.
 ラベル出力部2048は、第2ラベル生成部2047が出力する第2ラベルを示す情報を画像データと関連付けてテーブル記憶部2045に記憶する。または、ラベル出力部2048は、第2ラベル生成部2047が出力するラベルを示す情報を画像データと関連付けて記憶媒体2200に記憶する。 The label output unit 2048 stores information indicating the second label output from the second label generation unit 2047 in the table storage unit 2045 in association with the image data. Alternatively, the label output unit 2048 stores information indicating the label output from the second label generation unit 2047 in the storage medium 2200 in association with the image data.
 図13は、本実施形態に係る画像データの主要色の一例を説明する図である。
 図13において、横軸は色ベクトルであり、縦軸は色ベクトル(色情報)の頻度である。
 図13の例は、色空間ベクトル生成部2043が、画像データをHSVに分解した色ベクトル(HSV=(i,j,k);mは0から100の自然数)の頻度分布のグラフである。また、図13は、左端にH(色相)=0、S(彩度)=0、V(明度)=0、右端にH=100、S=100、V=100を模式的に順番に並べたものである。そして、色ベクトル毎に頻度を算出した結果を、模式的に表したものである。図13の例では、頻度が1番高い第1色c2001が、ベクトルHSV=(i,j69,k100)、ばら色(ローズ)である。また、頻度が第1色の次に高い第2色c2002が、ベクトルHSV=(i13,j52,k100)、淡黄色(サルファー)である。さらに、頻度が第2色の次に高い第3色c2003が、ベクトルHSV=(i40,j65,k80)、冴青磁色(エメラルド)である。
FIG. 13 is a diagram illustrating an example of main colors of image data according to the present embodiment.
In FIG. 13, the horizontal axis is a color vector, and the vertical axis is the frequency of a color vector (color information).
Example of FIG. 13, the color space vector generation unit 2043, the color decomposed image data into HSV vector (HSV = (i m, j m, k m); m is a natural number from 0 to 100) a graph of the frequency distribution of It is. In FIG. 13, H (hue) = 0, S (saturation) = 0, V (lightness) = 0 on the left end, and H = 100, S = 100, V = 100 on the right end are arranged in order. It is a thing. The result of calculating the frequency for each color vector is schematically shown. In the example of FIG. 13, the first color c2001 having the highest frequency is the vector HSV = (i 1 , j 69 , k 100 ) and rose (rose). The second color c2002 having the second highest frequency after the first color is a vector HSV = (i 13 , j 52 , k 100 ) and light yellow (sulfur). Furthermore, the third color c2003 having the second highest frequency after the second color is a vector HSV = (i 40 , j 65 , k 80 ), and a bitumen magnetic color (emerald).
 図14A、14Bは、図13で抽出された主要色のラベリングの一例を説明する図である。なお、図13及び図14A、14Bの色ベクトルは、例えば、シーンモードがポートレートの画像データであるとして説明する。
 図14Aは、図13で抽出された第1色、第2色、第3色の例である。図14Aに示すように、模式的に左から図13で示した色ベクトルの順番に並べて表してある。第1ラベル生成部2046は、主要色抽出部2044が抽出した第1色、第2色、第3色の組み合わせと関連付けられて記憶されている第1ラベルをテーブル記憶部2045から読み出す。この場合、第1色、第2色、第3色の組み合わせの第1ラベルは、「愉快な」として記憶されている。また、図14Aに示すように、正規化前の第1色、第2色、第3色の各幅は、L2001、L2002及びL2003であり、幅L2001、L2002及びL2003の長さは等しい。また、長さL2010は、各幅L2001、L2002及びL2003の合計である。
14A and 14B are diagrams illustrating an example of labeling of main colors extracted in FIG. The color vectors in FIGS. 13, 14 </ b> A, and 14 </ b> B will be described assuming that the scene mode is portrait image data, for example.
FIG. 14A is an example of the first color, the second color, and the third color extracted in FIG. As shown in FIG. 14A, they are schematically shown in the order of the color vectors shown in FIG. 13 from the left. The first label generation unit 2046 reads out the first label stored in association with the combination of the first color, the second color, and the third color extracted by the main color extraction unit 2044 from the table storage unit 2045. In this case, the first label of the combination of the first color, the second color, and the third color is stored as “fun”. As shown in FIG. 14A, the widths of the first color, the second color, and the third color before normalization are L2001, L2002, and L2003, and the widths L2001, L2002, and L2003 are equal in length. The length L2010 is the sum of the widths L2001, L2002, and L2003.
 図14Bは、抽出された第1色、第2色、第3色を、頻度で正規化して、第1色、第2色、第3色の各幅をL2001’、L2002’、L2003’のように補正した後の図である。幅の合計L2010は、図14Aと同じである。図14Bの例では、第1色の頻度が他の第2色と第3色の頻度より高いため、第2ラベル生成部2047は、第1ラベル生成部2046が読み出した第1ラベル「愉快な」に対して、予め定められているルールに基づき、第1ラベル「愉快な」を修飾する修飾ラベル「とても」を生成する。予め定められているルールとは、第1色が、他の第2色と第3色より、予め定められているしきい値より頻度が多い場合、第2ラベル生成部2047は、修飾ラベル「とても」を生成して、生成した修飾ラベルを第1ラベル「愉快な」に修飾させることで第1ラベルを修正して、第2ラベル「とても愉快な」を生成する。なお、修飾ラベルは、例えば、第1ラベルを強調する単語である。 In FIG. 14B, the extracted first color, second color, and third color are normalized with frequency, and the widths of the first color, the second color, and the third color are set to L2001 ′, L2002 ′, and L2003 ′. It is a figure after correcting as follows. The total width L2010 is the same as in FIG. 14A. In the example of FIG. 14B, since the frequency of the first color is higher than the frequencies of the other second and third colors, the second label generation unit 2047 reads the first label “pleasant” read by the first label generation unit 2046. ”Is generated based on a predetermined rule, the decoration label“ Very ”for modifying the first label“ Pleasant ”. The predetermined rule is that when the first color is more frequent than the predetermined threshold value than the other second color and the third color, the second label generation unit 2047 uses the modified label “ The first label is modified by generating the “very” and modifying the generated modified label to the first label “fun” to generate the second label “very fun”. The modification label is, for example, a word that emphasizes the first label.
 次に、修飾ラベルの例について説明する。
 図14Aに示すように、正規化前は、主要色抽出部2044が抽出した3つの色の幅または面積は、1:1:1である。そして、色ベクトルの頻度に基づき正規化した後、3つの色の幅または面積は、図14Bのように補正される。例えば、第1色の比率が、全体L2010の約67%より大きい場合、第2ラベル生成部2047は、修飾ラベルとして「とても」を第1ラベルに修飾させることで第1ラベルを修正して第2ラベルとする。また、第1色の比率が、全体L2010の約50%より大きく67%より小さい場合、第2ラベル生成部2047は、修飾ラベルなしとする。すなわち、第2ラベル生成部2047は、第1ラベルを修正せずに第2ラベルとする。また、第1色の比率が、全体L2010の約33%の場合、第2ラベル生成部2047は、修飾ラベルとして「ちょっと」を第1ラベルに修飾させることで第1ラベルを修正して第2ラベルとする。
 このように、第2ラベル生成部2047は、第1ラベルに応じて、修飾する修飾ラベルを生成する。例えば、第1ラベル毎に、修飾可能な修飾ラベルを予めテーブル記憶部2045に関連付けて記憶させておいてもよい。
Next, examples of modification labels will be described.
As shown in FIG. 14A, before normalization, the width or area of the three colors extracted by the main color extraction unit 2044 is 1: 1: 1. Then, after normalization based on the frequency of the color vectors, the widths or areas of the three colors are corrected as shown in FIG. 14B. For example, when the ratio of the first color is larger than about 67% of the entire L2010, the second label generation unit 2047 modifies the first label by modifying “very” as the modification label to the first label. 2 labels. When the ratio of the first color is larger than about 50% and smaller than 67% of the entire L2010, the second label generation unit 2047 determines that there is no decoration label. That is, the second label generation unit 2047 sets the first label as the second label without correcting it. When the ratio of the first color is about 33% of the entire L2010, the second label generation unit 2047 modifies the first label by modifying “first” as the decoration label, and changes the second label Label.
As described above, the second label generation unit 2047 generates a modification label to be modified according to the first label. For example, for each first label, a modifiable modification label may be stored in advance in association with the table storage unit 2045.
 次に、シーン毎の主要色の例について、図15A~図17Bを用いて説明する。
 図15A、15Bは、本実施形態に係るスポーツの画像データと色ベクトルの図である。図15Aは、スポーツの画像データであり、図15Bは、スポーツの色ベクトルのグラフである。図16A、16Bは、本実施形態に係るポートレートの画像データと色ベクトルの図である。図16Aは、ポートレートの画像データであり、図16Bは、ポートレートの色ベクトルのグラフである。図17A、17Bは、本実施形態に係る風景の画像データと色ベクトルの図である。図17Aは、風景の画像データであり、図17Bは、風景の色ベクトルのグラフである。図15B、図16B、図17Bにおいて、横軸は色ベクトル、縦軸は頻度(画素数)である。
Next, examples of main colors for each scene will be described with reference to FIGS. 15A to 17B.
15A and 15B are diagrams of sports image data and color vectors according to the present embodiment. FIG. 15A shows sports image data, and FIG. 15B is a graph of sports color vectors. 16A and 16B are diagrams of portrait image data and color vectors according to the present embodiment. FIG. 16A shows portrait image data, and FIG. 16B is a graph of portrait color vectors. 17A and 17B are views of landscape image data and color vectors according to the present embodiment. FIG. 17A is image data of a landscape, and FIG. 17B is a graph of a landscape color vector. In FIG. 15B, FIG. 16B, and FIG. 17B, the horizontal axis is a color vector, and the vertical axis is frequency (number of pixels).
 図15Aと図15Bに示すように、図15Aの画像データを画素毎に色ベクトルに分解し、各色ベクトルの頻度(画素数)をグラフ化すると図15Bのようになる。主要色抽出部2044は、このような色ベクトルの情報から、例えば、画素数の多い3つの色c2011、c2012、c2013を抽出する。 15A and 15B, the image data of FIG. 15A is decomposed into color vectors for each pixel, and the frequency (number of pixels) of each color vector is graphed as shown in FIG. 15B. The main color extraction unit 2044 extracts, for example, three colors c2011, c2012, and c2013 having a large number of pixels from such color vector information.
 図16Aと図16Bに示すように、図16Aの画像データを画素毎に色ベクトルに分解し、各色ベクトルの頻度(画素数)をグラフ化すると図16Bのようになる。主要色抽出部2044は、このような色ベクトルの情報から、例えば、画素数の多い3つの色c2021、c2022、c2023を抽出する。
 図17Aと図17Bに示すように、図17Aの画像データを画素毎に色ベクトルに分解し、各色ベクトルの頻度(画素数)をグラフ化すると図17Bのようになる。主要色抽出部2044は、このような色ベクトルの情報から、例えば、画素数の多い3つの色c2031、c2032、c2033を抽出する。
As shown in FIGS. 16A and 16B, the image data of FIG. 16A is decomposed into color vectors for each pixel, and the frequency (number of pixels) of each color vector is graphed as shown in FIG. 16B. The main color extraction unit 2044 extracts, for example, three colors c2021, c2022, and c2023 having a large number of pixels from such color vector information.
As shown in FIGS. 17A and 17B, the image data of FIG. 17A is decomposed into color vectors for each pixel, and the frequency (number of pixels) of each color vector is graphed as shown in FIG. 17B. The main color extraction unit 2044 extracts, for example, three colors c2031, c2032, and c2033 having a large number of pixels from such color vector information.
 図18は、本実施形態に係るシーン毎の主要色の組み合わせの第1ラベルの一例を説明する図である。図18において、行はシーン、列は色ベクトルを表している。
 図18において、画像データがHSVの場合、色の組み合わせ(色1、色2、色3)のHSVの各色相、彩度及び強度は、例えば、色1が(94、100、25)(栗色、マルーン)、色2が(8、100、47)(たばこ色、コーヒー・ブラウン)、色3が(81、100、28)(深紫色、ダスキー・バイオレット)である。
 また、色ベクトル(色4、色5、色6)のHSVの各色相、彩度及び強度は、例えば、色4が(1、69、100)(ばら色、ローズ)、色5が(13、25、100)(象牙色、アイボリー)、色6が(52、36、91)(水色、アクア・ブルー)である。
 また、色ベクトル(色7、色8、色9)のHSVの各色相、彩度及び強度は、例えば、色7が(40、65、80)(冴青磁色、エメラルド)、色8が(0、0、100)(白色、ホワイト)、色9が(59、38、87)(サルビア色、サルビア・ブルー)である。
FIG. 18 is a diagram for explaining an example of a first label of a combination of main colors for each scene according to the present embodiment. In FIG. 18, rows represent scenes, and columns represent color vectors.
In FIG. 18, when the image data is HSV, the hue, saturation, and intensity of the HSV of the color combination (color 1, color 2, color 3) are, for example, color 1 (94, 100, 25) (maroon , Maroon), color 2 is (8, 100, 47) (cigarette color, coffee brown), and color 3 is (81, 100, 28) (deep purple, Dusky Violet).
The hue, saturation, and intensity of the HSV of the color vector (color 4, color 5, and color 6) are, for example, that the color 4 is (1, 69, 100) (rose, rose), and the color 5 is (13, 25, 100) (ivory color, ivory) and color 6 is (52, 36, 91) (light blue, aqua blue).
Further, the hue, saturation, and intensity of the HSV of the color vector (color 7, color 8, color 9) are, for example, that color 7 is (40, 65, 80) (dark blue magnetic color, emerald) and color 8 is ( 0, 0, 100) (white, white), and color 9 is (59, 38, 87) (salvia, salvia blue).
 図18に示すように、例えば、色の組み合わせが(色1、色2、色3)の場合、シーンがポートレートの第1ラベルは、「ダンディな」とテーブル記憶部2045に記憶されている。同じ色の組み合わせ(色1、色2、色3)でもシーンが風景の第1ラベルは、「趣深い」であるとテーブル記憶部2045に記憶されている。また、同じ色の組み合わせ(色1、色2、色3)でもシーンがスポーツの第1ラベルは、「(ラグビー風)男っぽい」であるとテーブル記憶部2045に記憶されている。
 また、図18に示すように、例えば、色の組み合わせが(色4、色5、色6)の場合、シーンがポートレートの第1ラベルは、「子供らしい」であるとテーブル記憶部2045に記憶されている。同じ色の組み合わせ(色4、色5、色6)でもシーンが風景の第1ラベルは、「やわらかい」であるとテーブル記憶部2045に記憶されている。また、同じ色の組み合わせ(色4、色5、色6)でもシーンがスポーツの第1ラベルは、「(テニス風)生き生きした」であるとテーブル記憶部2045に記憶されている。
 また、図18に示すように、例えば、色の組み合わせが(色7、色8、色9)の場合、シーンがポートレートの第1ラベルは、「若々しい」であるとテーブル記憶部2045に記憶されている。同じ色の組み合わせ(色7、色8、色9)でもシーンが風景の第1ラベルは、「(新緑のイメージ)すがすがしい」であるとテーブル記憶部2045に記憶されている。
 また、同じ色の組み合わせ(色7、色8、色9)でもシーンがスポーツの第1ラベルは、「(海上スポーツ風)さわやかな」であるとテーブル記憶部2045に記憶されている。
 また、図18に示したように、テーブル記憶部2045に記憶される情報は、色の組み合わせと形容詞や副詞の第1ラベルのみではなく、イメージを表す単語も関連付けて記憶させておくようにしてもよい。なお、イメージを表す単語とは、例えば、ラグビー風、新緑のイメージなどである。
As shown in FIG. 18, for example, when the combination of colors is (color 1, color 2, color 3), the first label whose scene is a portrait is stored in the table storage unit 2045 as “dandy”. . In the same color combination (color 1, color 2, color 3), the first label of the scene is landscape is stored in the table storage unit 2045 as “interesting”. Further, the first label in which the scene is sports even in the same color combination (color 1, color 2, and color 3) is stored in the table storage unit 2045 as “(Rugby style) masculine”.
Also, as shown in FIG. 18, for example, when the combination of colors is (color 4, color 5, color 6), the first label whose scene is portrait is “childish” in the table storage unit 2045. It is remembered. The first label of a scene that is a scene of the same color combination (color 4, color 5, and color 6) is stored in the table storage unit 2045 as “soft”. In addition, the first label in which the scene is a sport with the same color combination (color 4, color 5, and color 6) is stored in the table storage unit 2045 as “(tennis style) lively”.
Also, as shown in FIG. 18, for example, when the color combination is (color 7, color 8, color 9), the table storage unit 2045 indicates that the first label whose scene is portrait is “youthful”. Is remembered. The first label whose scene is landscape with the same color combination (color 7, color 8, and color 9) is stored in the table storage unit 2045 as “(fresh green image) refreshing”.
In addition, the first label in which the scene is sport even in the same color combination (color 7, color 8, and color 9) is stored in the table storage unit 2045 as “(Sea sports style) refreshing”.
Also, as shown in FIG. 18, the information stored in the table storage unit 2045 stores not only the color combination and the first label of the adjective or adverb but also the word representing the image in association with each other. Also good. Note that the word representing an image is, for example, a rugby image or a fresh green image.
 図19は、本実施形態に係る時刻、季節と色ベクトルによる第1ラベルの例を説明する図である。図19において、色ベクトルは、画像データがHSVであり、図18で説明した色の組み合わせ(色7、色8、色9)である。図19において、列は、時刻と季節を表し、行は、色の組み合わせ(色7、色8、色9)に対する各時刻と季節のラベルである。
 図19に示すように、色の組み合わせ(色7、色8、色9)の第1ラベルは、時刻が朝の場合、「すがすがしい」、時刻が昼の場合、「雨っぽい」、時刻が夜の場合、「夜明けが近い」であるとテーブル記憶部2045に記憶されている。
 図19に示すように、色の組み合わせ(色7、色8、色9)の第1ラベルは、季節が春の場合、「肌寒い」、季節が夏の場合、「涼しい」、季節が秋の場合、「肌寒い」、季節が冬の場合、「寒い」であるとテーブル記憶部2045に記憶されている。
 このような時刻、季節に関する情報は、画像識別情報取得部2042が取得した画像識別情報に含まれる撮影日時に基づき、第1ラベル生成部2046が第1ラベルをテーブル記憶部2045から読み出す。
 また、図19に示すように、同じ色の組み合わせ(色7、色8、色9)に対して、春と秋で第1ラベルが同じでもよい。
FIG. 19 is a diagram illustrating an example of a first label based on time, season, and color vector according to the present embodiment. In FIG. 19, the color vector is HSV image data and the color combination (color 7, color 8, and color 9) described in FIG. In FIG. 19, the columns represent time and season, and the rows are labels of each time and season for color combinations (color 7, color 8, color 9).
As shown in FIG. 19, the first label of the combination of colors (color 7, color 8, color 9) is “fresh” when the time is morning, “rainy” when the time is noon, In the case of night, it is stored in the table storage unit 2045 that “dawn is near”.
As shown in FIG. 19, the first label of the color combination (color 7, color 8, color 9) is “chilly” when the season is spring, “cool” when the season is summer, and “cool” when the season is autumn When the season is winter, “cold” is stored in the table storage unit 2045.
For such information regarding the time and season, the first label generation unit 2046 reads the first label from the table storage unit 2045 based on the shooting date and time included in the image identification information acquired by the image identification information acquisition unit 2042.
Further, as shown in FIG. 19, the first label may be the same in spring and autumn for the same color combination (color 7, color 8, and color 9).
 次に、撮像装置2100が行うラベル生成処理について、図20を用いて説明する。図20は、本実施形態に係る撮像装置2100が行うラベル生成のフローチャートである。 Next, label generation processing performed by the imaging apparatus 2100 will be described with reference to FIG. FIG. 20 is a flowchart of label generation performed by the imaging apparatus 2100 according to this embodiment.
 (ステップS2001)撮像装置2100の撮像部2002は、カメラ制御部2003の制御に基づき画像を撮像する。次に、撮像部2002は、撮像した画像データをAD変換部2023によりデジタルデータに変換し、変換した画像データを記憶媒体2200に記憶する。
 次に、カメラ制御部2003は、撮像時に操作部2011により使用者により設定または選択された撮影条件、及び撮像時に撮像装置2100が自動的に設定または取得した情報等を含む画像識別情報を、撮像された画像データと関連付けて記憶媒体2200に記憶する。ステップS2001終了後、ステップS2002に進む。
(Step S2001) The imaging unit 2002 of the imaging apparatus 2100 captures an image based on the control of the camera control unit 2003. Next, the imaging unit 2002 converts the captured image data into digital data by the AD conversion unit 2023, and stores the converted image data in the storage medium 2200.
Next, the camera control unit 2003 captures image identification information including imaging conditions set or selected by the user by the operation unit 2011 at the time of imaging and information automatically set or acquired by the imaging device 2100 at the time of imaging. The image data is stored in the storage medium 2200 in association with the image data. After step S2001 is completed, the process proceeds to step S2002.
 (ステップS2002)次に、画像処理部2004の画像取得部2041は、バス2015を介して、撮像部2002が撮像した画像データと、画像データと関連付けられて記憶されている画像識別情報とを記憶媒体2200から読み出す。なお、画像取得部2041が読み出す画像データは、撮像システム2001の使用者が操作部2011の操作により選択した画像データである。 
 次に、画像取得部2041は、取得した画像データを、色空間ベクトル生成部2043に出力する。次に、画像取得部2041は、取得した画像識別情報を画像識別情報取得部2042に出力する。ステップS2002終了後、ステップS2003に進む。
(Step S2002) Next, the image acquisition unit 2041 of the image processing unit 2004 stores the image data captured by the imaging unit 2002 via the bus 2015 and the image identification information stored in association with the image data. Read from the medium 2200. Note that the image data read by the image acquisition unit 2041 is image data selected by the user of the imaging system 2001 by operating the operation unit 2011.
Next, the image acquisition unit 2041 outputs the acquired image data to the color space vector generation unit 2043. Next, the image acquisition unit 2041 outputs the acquired image identification information to the image identification information acquisition unit 2042. After step S2002, the process proceeds to step S2003.
 (ステップS2003)次に、画像識別情報取得部2042は、画像取得部2041が出力する画像識別情報から撮像された画像データに設定されている撮影情報を抽出し、抽出した撮影情報を第1ラベル生成部2046に出力する。ステップS2003終了後、ステップS2004に進む。 (Step S2003) Next, the image identification information acquisition unit 2042 extracts shooting information set in the imaged image data captured from the image identification information output by the image acquisition unit 2041, and uses the extracted shooting information as the first label. The data is output to the generation unit 2046. After step S2003 ends, the process proceeds to step S2004.
 (ステップS2004)次に、色空間ベクトル生成部2043は、画像取得部2041が出力する画像データを予め定められている色空間のベクトルに変換する。予め定められている色空間は、例えばHSVである。次に、色空間ベクトル生成部2043は、生成した色ベクトル毎に画像データの全画素を分類し、色ベクトル毎の頻度を検出し、色ベクトルの頻度分布を生成する。次に、色空間ベクトル生成部2043は、生成した色ベクトルの頻度分布を示す情報を主要色抽出部2044に出力する。ステップS2004終了後、ステップS2005に進む。 (Step S2004) Next, the color space vector generation unit 2043 converts the image data output from the image acquisition unit 2041 into a vector in a predetermined color space. The predetermined color space is, for example, HSV. Next, the color space vector generation unit 2043 classifies all pixels of the image data for each generated color vector, detects the frequency for each color vector, and generates a color vector frequency distribution. Next, the color space vector generation unit 2043 outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044. After step S2004 ends, the process proceeds to step S2005.
 (ステップS2005)次に、主要色抽出部2044は、色空間ベクトル生成部2043が出力する色ベクトルの頻度分布を示す情報から頻度の高い順に3色を主要色として抽出し、抽出した主要色を示す情報を第1ラベル生成部2046に出力する。ステップS2005終了後、ステップS2006に進む。 (Step S2005) Next, the main color extraction unit 2044 extracts three colors as the main colors in order of frequency from the information indicating the frequency distribution of the color vectors output from the color space vector generation unit 2043, and the extracted main colors are extracted. The indicated information is output to the first label generation unit 2046. After step S2005, the process proceeds to step S2006.
 (ステップS2006)次に、第1ラベル生成部2046は、画像識別情報取得部2042が出力する撮影情報と主要色抽出部2044が出力する主要色を示す情報とに関連付けられて記憶されている第1ラベルを、テーブル記憶部2045から読み出す。次に、第1ラベル生成部2046は、読み出した第1ラベルを示す情報と、主要色抽出部2044が出力する主要色を示す情報とを第2ラベル生成部2047に出力する。
 なお、第1ラベル生成部2046は、テーブル記憶部2045に、画像識別情報取得部2042が出力する撮影情報と主要色抽出部2044が出力する主要色を示す情報とに関連付けられて記憶されている第1ラベルが記憶されていない場合、例えば、同じ主要色について別のシーンの第1ラベルが記録されているか否かを判別する。同じ主要色について別のシーンの第1ラベルが記録されていると判別した場合、第1ラベル生成部2046は、同じ主要色について別のシーンの第1ラベルをテーブル記憶部2045から読み出すようにしてもよい。一方、同じ主要色について別のシーンの第1ラベルが記録されていないと判別した場合、第1ラベル生成部2046は、主要色と最も色ベクトルの距離が近く且つシーンが同一の色ベクトルと関連付けられて記憶されているラベルをテーブル記憶部2045から読み出すようにしてもよい。
 ステップS2006終了後、ステップS2007に進む。
(Step S2006) Next, the first label generation unit 2046 is stored in association with the photographing information output by the image identification information acquisition unit 2042 and the information indicating the main color output by the main color extraction unit 2044. One label is read from the table storage unit 2045. Next, the first label generation unit 2046 outputs information indicating the read first label and information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047.
The first label generation unit 2046 is stored in the table storage unit 2045 in association with the shooting information output by the image identification information acquisition unit 2042 and the information indicating the main color output by the main color extraction unit 2044. When the first label is not stored, for example, it is determined whether or not the first label of another scene is recorded for the same main color. When it is determined that the first label of another scene is recorded for the same main color, the first label generation unit 2046 reads the first label of another scene for the same main color from the table storage unit 2045. Also good. On the other hand, if it is determined that the first label of another scene is not recorded for the same main color, the first label generation unit 2046 associates the main color with the color vector that is closest to the main color and has the same scene. The stored label may be read from the table storage unit 2045.
After step S2006 ends, the process proceeds to step S2007.
 (ステップS2007)次に、第2ラベル生成部2047は、主要色抽出部2044が出力する主要色を示す情報から各色ベクトルの頻度を正規化し、3つの主要色の比率を算出する。ステップS2007終了後、ステップS2008に進む。 (Step S2007) Next, the second label generation unit 2047 normalizes the frequency of each color vector from the information indicating the main color output by the main color extraction unit 2044, and calculates the ratio of the three main colors. After step S2007 ends, the process proceeds to step S2008.
 (ステップS2008)次に、第2ラベル生成部2047は、算出した3つの主要色の比率に基づき、第1ラベル生成部2046が出力する第1ラベルを修飾する修飾ラベルを生成し、生成した修飾ラベルで第1ラベルを修飾させることで第1ラベルを修正して第2ラベルを生成する。次に、第2ラベル生成部2047は、生成した第2ラベルを示す情報をラベル出力部2048に出力する。ステップS2008終了後、ステップS2009に進む。 (Step S2008) Next, the second label generation unit 2047 generates a modification label that modifies the first label output by the first label generation unit 2046 based on the calculated ratio of the three main colors, and the generated modification The first label is modified by modifying the first label with the label to generate a second label. Next, the second label generation unit 2047 outputs information indicating the generated second label to the label output unit 2048. After step S2008 ends, the process proceeds to step S2009.
 (ステップS2009)次に、ラベル出力部2048は、第2ラベル生成部2047が出力する第2ラベルを示す情報を画像データと関連付けてテーブル記憶部2045に記憶する。
 なお、ステップS2006において、テーブル記憶部2045に、シーンを示す情報と主要色を示す情報とに関連付けられて記憶されている第1ラベルが記憶されていない場合、ラベル出力部2048は、ステップS2006で読み出した第1ラベルと抽出された主要色とを関連付けて、テーブル記憶部2045に新たに記憶させるようにしてもよい。
 以上で、画像処理部2004が行うラベル生成処理を終了する。
(Step S2009) Next, the label output unit 2048 stores information indicating the second label output by the second label generation unit 2047 in the table storage unit 2045 in association with the image data.
In step S2006, when the first label stored in association with the information indicating the scene and the information indicating the main color is not stored in the table storage unit 2045, the label output unit 2048 determines in step S2006. The read first label and the extracted main color may be associated with each other and newly stored in the table storage unit 2045.
Above, the label production | generation process which the image process part 2004 performs is complete | finished.
 以上のように、本実施形態の撮像装置2100は、従来技術と比較して、少ない演算量で画像データの特徴量である主要色を抽出することができる。さらに、本実施形態の撮像装置2100は、Exifに含まれる情報等を用いてシーン判別して、判別結果に基づいてテーブル記憶部2045に記憶されているシーン毎のテーブルを選択するようにしたため少ない演算量でシーンを判別できる。この結果、本実施形態の撮像装置2100は、従来技術と比較して、画像データに対して少ない演算処理と少ない選択肢で、多くのラベル生成を行うことができる。
 すなわち、画像処理部2004は、画像データを色空間に変換した色ベクトルの中から、頻度の多い3つの主要色を抽出し、抽出した主要色に予め対応付けて記憶されている第1ラベルを抽出する。図18と図19に示したように、主要色に対して、シーン毎、時刻や季節毎に第1ラベルを予め対応付けて記憶させてあるため、画像処理部2004は、画像データから抽出された主要色が同じであっても、シーン毎、時刻や季節毎に異なる第1ラベルを生成することができるので、シーン毎に画像データに最適なラベルを生成することができる。
 さらに、画像処理部2004は、3つの主要色の頻度を正規化して、最も頻度の多い第1色の割合に応じて、生成された第1ラベルを修飾する修飾ラベルを生成し、生成した修飾ラベルで第1ラベルを修飾させることで第1ラベルを修正して第2ラベルを生成する。
 この結果、画像処理部2004は、画像データの主要色の配色の割合に基づき、第1ラベルを修飾ラベルで修飾して修正することで第2ラベルを生成するようにしたので、画像データから主要色を抽出してラベルを生成する場合と比較して、シーン毎に画像データにさらに最適なラベルを生成することができる。
As described above, the imaging apparatus 2100 according to the present embodiment can extract the main color that is the feature amount of the image data with a small amount of calculation compared to the conventional technique. Furthermore, the imaging apparatus 2100 according to the present embodiment performs scene discrimination using information included in Exif, and the number of scenes stored in the table storage unit 2045 is selected based on the discrimination result. Scenes can be identified by the amount of computation. As a result, the imaging apparatus 2100 of the present embodiment can generate many labels with less arithmetic processing and fewer options for image data than in the related art.
That is, the image processing unit 2004 extracts three main colors having a high frequency from color vectors obtained by converting image data into a color space, and stores the first label stored in advance in association with the extracted main colors. Extract. As shown in FIG. 18 and FIG. 19, since the first label is stored in association with the main color for each scene, for each time and for each season, the image processing unit 2004 is extracted from the image data. Even if the main colors are the same, different first labels can be generated for each scene, time, and season, so that an optimum label for image data can be generated for each scene.
Further, the image processing unit 2004 normalizes the frequencies of the three main colors, generates a modified label that modifies the generated first label according to the ratio of the most frequent first color, and generates the generated modification The first label is modified by modifying the first label with the label to generate a second label.
As a result, the image processing unit 2004 generates the second label by modifying the first label with the modification label based on the ratio of the color arrangement of the main color of the image data. Compared with the case where labels are generated by extracting colors, a more optimal label can be generated for image data for each scene.
 なお、本実施形態では、色空間ベクトル生成部2043が、画像データをHSVの色空間において色ベクトルを生成する例を説明したが、RGB(赤、緑、青)、輝度信号と2つの色差信号によるYCrCbまたはYPbPr、色相と彩度及び明度によるHLS、補色空間の一種であるLab、日本色研配色体系(PCCS;Practical Color Co-ordinate System)に基づく色空間などを用いてもよい。
 また、本実施形態では、色空間ベクトル生成部2043が、色ベクトルの頻度分布を生成して、生成した色ベクトルの頻度分布を示す情報を主要色抽出部2044に出力する例を説明したが、色空間ベクトル生成部2043は、色ベクトル毎の頻度を検出して、検出した色ベクトル毎の頻度を示す情報を主要色抽出部2044に出力するようにしてもよい。この場合においても、例えば、テーブル記憶部2045に記憶させるRGBの各値は、1毎、10毎等の間隔の中からテーブル作成者が選択した色であってもよい。
In the present embodiment, the example in which the color space vector generation unit 2043 generates color vectors of image data in the HSV color space has been described. However, RGB (red, green, blue), a luminance signal, and two color difference signals YCrCb or YPbPr, HLS based on hue, saturation, and lightness, Lab, which is a kind of complementary color space, and a color space based on the Japan Color Coordinating System (PCCS).
In the present embodiment, the color space vector generation unit 2043 has described an example in which the frequency distribution of the color vector is generated and information indicating the frequency distribution of the generated color vector is output to the main color extraction unit 2044. The color space vector generation unit 2043 may detect the frequency for each color vector and output information indicating the frequency for each detected color vector to the main color extraction unit 2044. Also in this case, for example, each RGB value stored in the table storage unit 2045 may be a color selected by the table creator from an interval of every 1 or 10 or the like.
 また、本実施形態では、ラベル出力部2048が、ラベルを示す情報を画像データと関連付けてテーブル記憶部2045に記憶する例を説明したが、第2ラベル生成部2047が出力するラベルを文字情報(テキスト)によるデータとして、使用者により選択された画像データに重ねて表示部2007に表示するようにしてもよい。
 また、本実施形態では、第1ラベルと第2ラベルは、形容詞または副詞の例を説明したが、第1ラベルと第2ラベルは、例えば名詞であってもよい。この場合、第1ラベルは、例えば、「爽快」、「若返り」、「ダンディ」などである。
In the present embodiment, the label output unit 2048 has described the example in which the information indicating the label is stored in the table storage unit 2045 in association with the image data. As text data, the image data selected by the user may be displayed on the display unit 2007 in a superimposed manner.
In the present embodiment, the first label and the second label are examples of adjectives or adverbs. However, the first label and the second label may be nouns, for example. In this case, the first label is, for example, “exhilarating”, “rejuvenation”, “dandy”, and the like.
 また、本実施形態では、画像データから主要色を算出する例を説明したが、主要色抽出部2044は、隣り合う色ベクトルが予め定められている距離だけ離れている3つの色を抽出するようにしてもよい。隣り合う色ベクトルとは、図15Bにおいて、例えば、画像データがHSVの場合、色ベクトル(50、50、50)と(50、50、51)とである。隣り合う色の距離は、ヒトの視覚的な色を識別できる公知の閾値に基づき設定するようにしてもよい。例えば、WEBで使用が推奨されているWEB256色と、白黒で表現できるモノトーン256色などを用いるようにしてもよい。 In this embodiment, an example in which the main color is calculated from the image data has been described. However, the main color extraction unit 2044 extracts three colors that are separated by a predetermined distance between adjacent color vectors. It may be. In FIG. 15B, the adjacent color vectors are, for example, color vectors (50, 50, 50) and (50, 50, 51) when the image data is HSV. The distance between adjacent colors may be set based on a known threshold value that can identify a human visual color. For example, WEB256 colors recommended for use in WEB and monotone 256 colors that can be expressed in black and white may be used.
 また、主要色抽出部2044は、主要色の算出の前に、色空間ベクトル生成部2043が生成した色ベクトルの頻度分布に対して、公知の手法を用いて、平滑化処理を行うようにしてもよい。または、色空間ベクトル生成部2043が色空間ベクトルを生成する前に、公知の手法を用いて、減色処理を行うようにしてもよい。例えば、色空間ベクトル生成部2043は、画像データをWEBカラーに減色するようにしてもよい。
 また、本実施形態では、主要色抽出部2044が、画像データから頻度の高い3つの色を主要色として抽出する例を説明したが、抽出する色の数は3色に限られず、2色以上であればよい。
Also, the main color extraction unit 2044 performs a smoothing process on the frequency distribution of the color vectors generated by the color space vector generation unit 2043 using a known method before calculating the main color. Also good. Alternatively, the color space vector generation unit 2043 may perform a color reduction process using a known method before generating a color space vector. For example, the color space vector generation unit 2043 may reduce the image data to WEB color.
In the present embodiment, the main color extraction unit 2044 has described an example in which three frequently used colors are extracted from image data as main colors. However, the number of colors to be extracted is not limited to three, and two or more colors are extracted. If it is.
 また、本実施形態では、色ベクトルとしてHSVを用いる例を説明した。テーブル記憶部2045には、図12に示したように3つの色の組み合わせを記憶させる場合、HSVの各値を1毎に設定されたHSV=(0,0,0)、(1,0,0)、(1,1,0)・・・(100、100、99)、(100、100、100)の中からテーブル作成者が選択するようにしてもよい。または、HSVの各値を10毎に設定されたHSV=(0,0,0)、(10,0,0)、(10,10,0)・・・(100、100、90)、(100、100、100)の中からテーブル作成者が選択するようにしてもよい。このように、色ベクトルにおける各値の間隔を10等、予め定めた値にすることで、テーブル記憶部2045に記憶させる容量を少なくすることができ、さらに演算量も削減することができる。 In this embodiment, an example in which HSV is used as a color vector has been described. When storing the combination of three colors as shown in FIG. 12 in the table storage unit 2045, HSV = (0,0,0), (1,0, 0), (1, 1, 0)... (100, 100, 99), (100, 100, 100) may be selected by the table creator. Alternatively, HSV = (0,0,0), (10,0,0), (10,10,0) (100, 100, 90), (100, 90, etc.) 100, 100, 100) may be selected by the table creator. In this way, by setting the interval of each value in the color vector to a predetermined value such as 10 or the like, the capacity to be stored in the table storage unit 2045 can be reduced, and the calculation amount can also be reduced.
(第4の実施形態)
 第3の実施形態では、使用者により選択された画像データのシーンを、画像データと関連付けて記憶媒体2200に記憶されている画像識別情報に基づき判別する例を説明した。本実施形態では、選択された画像データから、シーンを画像処理装置が判別して、判別した結果に基づきラベルを生成する例について説明する。
(Fourth embodiment)
In the third embodiment, the example in which the scene of the image data selected by the user is determined based on the image identification information stored in the storage medium 2200 in association with the image data has been described. In the present embodiment, an example will be described in which an image processing apparatus discriminates a scene from selected image data and generates a label based on the discrimination result.
 図21は、本実施形態に係る画像処理部2004aのブロック図である。
 図21に示すように、画像処理部2004aは、画像取得部2041a、画像識別情報取得部2042、色空間ベクトル生成部2043、主要色抽出部2044、テーブル記憶部2045、第1ラベル生成部2046a、第2ラベル生成部2047、ラベル出力部2048、特徴量抽出部2241、シーン判別部2242を備えている。なお、第3実施形態と同じ機能を有する機能部は、同じ符号を用いて説明は省略する。
FIG. 21 is a block diagram of the image processing unit 2004a according to the present embodiment.
As shown in FIG. 21, the image processing unit 2004a includes an image acquisition unit 2041a, an image identification information acquisition unit 2042, a color space vector generation unit 2043, a main color extraction unit 2044, a table storage unit 2045, a first label generation unit 2046a, A second label generation unit 2047, a label output unit 2048, a feature amount extraction unit 2241, and a scene determination unit 2242 are provided. Note that functional units having the same functions as those of the third embodiment are denoted by the same reference numerals, and description thereof is omitted.
 画像取得部2041aは、バス2015を介して、撮像部2002が撮像した画像データと、画像データと関連付けられて記憶されている画像識別情報とを記憶媒体2200から読み出す。画像取得部2041aは、取得した画像データを、色空間ベクトル生成部2043、特徴量抽出部2241に出力する。画像取得部2041aは、取得した画像識別情報を画像識別情報取得部2242に出力する。 The image acquisition unit 2041a reads the image data captured by the imaging unit 2002 and the image identification information stored in association with the image data from the storage medium 2200 via the bus 2015. The image acquisition unit 2041a outputs the acquired image data to the color space vector generation unit 2043 and the feature amount extraction unit 2241. The image acquisition unit 2041a outputs the acquired image identification information to the image identification information acquisition unit 2242.
 特徴量抽出部2241は、画像取得部2041aが出力する画像データから、公知の手法により特徴量を抽出する。公知の手法は、例えば、画像の2値化、平滑化、エッジ検出、輪郭検出などの手法を用いる。特徴量抽出部2241は、抽出した特徴量を示す情報をシーン判別部2242に出力する。 The feature amount extraction unit 2241 extracts feature amounts from the image data output by the image acquisition unit 2041a by a known method. Known methods use, for example, methods such as image binarization, smoothing, edge detection, and contour detection. The feature amount extraction unit 2241 outputs information indicating the extracted feature amount to the scene determination unit 2242.
 シーン判別部2242は、特徴量抽出部2241が出力する特徴量を示す情報に基づき、画像取得部2041aが取得した画像データのシーンを公知の手法を用いて判別する。なお、シーン判別に用いる公知の手法とは、例えば、特許文献2に記載の従来技術のように、シーン判別部2242が、画像データを予め定められている複数の領域に分割し、その領域毎の特徴量に基づき、画像データに人物が写っているのか、空が映っているのか等を判別する。そして、判別結果に基づき、シーン判別部2242は、画像データのシーンを判別する。
シーン判別部2242は、判別したシーンを示す情報を第1ラベル生成部2046aに出力する。
 なお、本実施形態において、シーン判別部2242は、特徴量抽出部2241とシーン判別部2242とにより構成するようにしてもよい。
The scene discrimination unit 2242 discriminates the scene of the image data acquired by the image acquisition unit 2041a using a known method based on the information indicating the feature amount output by the feature amount extraction unit 2241. The known method used for scene discrimination is, for example, as in the prior art described in Patent Document 2, the scene discrimination unit 2242 divides image data into a plurality of predetermined areas, and each area is divided. Based on the feature amount, it is determined whether a person is reflected in the image data or whether the sky is reflected. Based on the determination result, the scene determination unit 2242 determines the scene of the image data.
The scene determination unit 2242 outputs information indicating the determined scene to the first label generation unit 2046a.
In the present embodiment, the scene determination unit 2242 may be configured by a feature amount extraction unit 2241 and a scene determination unit 2242.
 第1ラベル生成部2046aは、シーン判別部2242が出力するシーンを示す情報と主要色抽出部2044が出力する主要色を示す情報とに関連付けられて記憶されている第1ラベルを、テーブル記憶部2045から読み出す。第1ラベル生成部2046aは、読み出した第1ラベルを示す情報と、主要色抽出部2044が出力する主要色を示す情報とを第2ラベル生成部2047に出力する。 The first label generation unit 2046a stores the first label stored in association with the information indicating the scene output from the scene determination unit 2242 and the information indicating the main color output from the main color extraction unit 2044. Read from 2045. The first label generation unit 2046a outputs the information indicating the read first label and the information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047.
 次に、撮像装置2100の画像処理部2004aが行うラベル生成処理について、図20を用いて説明する。撮像装置2100は、ステップS2001とステップS2002を第3実施形態と同様に行う。 Next, label generation processing performed by the image processing unit 2004a of the imaging device 2100 will be described with reference to FIG. The imaging device 2100 performs step S2001 and step S2002 in the same manner as in the third embodiment.
 (ステップS2003)次に、特徴量抽出部2241は、画像取得部2041aが出力する画像データから、公知の手法により特徴量を抽出し、抽出した特徴量を示す情報をシーン判別部2242に出力する。
 次に、シーン判別部2242は、特徴量抽出部2241が出力する特徴量を示す情報に基づき、画像取得部2041aが取得した画像データの撮影情報であるシーンを公知の手法を用いて抽出して取得し、取得したシーンを示す情報を第1ラベル生成部2046aに出力する。ステップS2003終了後、ステップS2004に進む。
(Step S2003) Next, the feature amount extraction unit 2241 extracts the feature amount from the image data output by the image acquisition unit 2041a by a known method, and outputs information indicating the extracted feature amount to the scene determination unit 2242. .
Next, the scene discriminating unit 2242 extracts a scene, which is shooting information of the image data acquired by the image acquisition unit 2041a, using a known method based on the information indicating the feature amount output by the feature amount extraction unit 2241. The information indicating the acquired scene is output to the first label generation unit 2046a. After step S2003 ends, the process proceeds to step S2004.
 画像処理部2004aは、ステップS2004とステップS2005を第3実施形態と同様に行う。ステップS2005終了後、ステップS2006に進む。 The image processing unit 2004a performs steps S2004 and S2005 in the same manner as in the third embodiment. After step S2005, the process proceeds to step S2006.
 (ステップS2006)次に、第1ラベル生成部2046aは、シーン判別部2242が出力するシーンを示す情報と主要色抽出部2044が出力する主要色を示す情報とに関連付けられて記憶されている第1ラベルを、テーブル記憶部2045から読み出す。次に、第1ラベル生成部2046aは、読み出した第1ラベルを示す情報と、主要色抽出部2044が出力する主要色を示す情報とを第2ラベル生成部2047に出力する。ステップS2006終了後、画像処理部2004aは、ステップS2007~S2009を第3実施形態と同様に行う。 (Step S2006) Next, the first label generation unit 2046a stores the information indicating the scene output by the scene determination unit 2242 and the information indicating the main color output by the main color extraction unit 2044 in association with each other. One label is read from the table storage unit 2045. Next, the first label generation unit 2046a outputs information indicating the read first label and information indicating the main color output by the main color extraction unit 2044 to the second label generation unit 2047. After step S2006 is completed, the image processing unit 2004a performs steps S2007 to S2009 in the same manner as in the third embodiment.
 以上のように、画像処理部2004aは、撮像された画像データを、予め定められている手法でシーン判別し、判別したシーンと、画像データから抽出された3つの主要色に基づき、第3実施形態と同様にラベルを生成するようにした。この結果、画像処理部2004aは、画像識別情報が画像データと関連付けて記憶媒体2200に記憶されていない場合であっても、画像データに最適なラベルを生成することができる。 As described above, the image processing unit 2004a discriminates scenes of captured image data using a predetermined method, and performs the third implementation based on the determined scenes and the three main colors extracted from the image data. The label is generated in the same way as the form. As a result, the image processing unit 2004a can generate an optimum label for the image data even when the image identification information is not stored in the storage medium 2200 in association with the image data.
 なお、本実施形態において、画像処理部2004aは、画像データから判別したシーンと、抽出した主要色とに基づき、ラベルを生成する例を説明したが、第3実施形態と同様に、撮影情報も用いてシーン判別するようにしてもよい。画像処理部2004aは、例えば、画像識別情報から撮像された日時を示す情報を抽出し、抽出された撮像日時と画像データから判別されたシーンに基づき、ラベルを生成するようにしてもよい。より具体的には、シーンが「風景」であり、撮像日時が「秋」の場合、シーン「風景」と「秋」と主要色と関連付けて記憶されている第1ラベルを読み出し、この読み出した2つの第1ラベルに基づきラベルを生成するようにしてもよい。
 あるいは、テーブル記憶部2045に、シーンを「秋の風景」として、主要色と第1ラベルを記憶させておくようにしてもよい。
In the present embodiment, the example in which the image processing unit 2004a generates a label based on the scene determined from the image data and the extracted main color has been described. However, as in the third embodiment, the shooting information is also generated. It may be used to determine the scene. For example, the image processing unit 2004a may extract information indicating the date and time of image capture from the image identification information, and generate a label based on the extracted image capture date and scene determined from the image data. More specifically, when the scene is “landscape” and the imaging date is “autumn”, the first label stored in association with the scenes “landscape”, “autumn”, and main colors is read out and read out. A label may be generated based on the two first labels.
Alternatively, the main color and the first label may be stored in the table storage unit 2045 with the scene as “autumn scenery”.
(第5の実施形態)
 第3実施形態と第4実施形態では、使用者により選択された画像データ全体から抽出した主要色に基づきラベルを生成する例を説明した。本実施形態では、選択された画像データからシーンを判別し、判別したシーンに基づき予め定められている画像データの領域において主要色を抽出し、抽出した主要色からラベルを生成する例について説明する。
(Fifth embodiment)
In the third embodiment and the fourth embodiment, the example in which the label is generated based on the main color extracted from the entire image data selected by the user has been described. In the present embodiment, an example will be described in which a scene is determined from selected image data, a main color is extracted in a predetermined image data area based on the determined scene, and a label is generated from the extracted main color. .
 図22は、本実施形態に係る実施形態に係る画像処理部2004bのブロック図である。
 図22に示すように、画像処理部2004bは、画像取得部2041b、画像識別情報取得部2042b、色空間ベクトル生成部2043b、主要色抽出部2044、テーブル記憶部2045、第1ラベル生成部2046、第2ラベル生成部2047、ラベル出力部2048、領域抽出部2341を備えている。なお、第3実施形態と同じ機能を有する機能部は、同じ符号を用いて説明は省略する。
FIG. 22 is a block diagram of the image processing unit 2004b according to the embodiment of the present embodiment.
As shown in FIG. 22, the image processing unit 2004b includes an image acquisition unit 2041b, an image identification information acquisition unit 2042b, a color space vector generation unit 2043b, a main color extraction unit 2044, a table storage unit 2045, a first label generation unit 2046, A second label generation unit 2047, a label output unit 2048, and an area extraction unit 2341 are provided. Note that functional units having the same functions as those of the third embodiment are denoted by the same reference numerals, and description thereof is omitted.
 画像取得部2041bは、バス2015を介して、撮像部2002が撮像した画像データと、画像データと関連付けられて記憶されている画像識別情報とを記憶媒体2200から読み出す。画像取得部2041bは、取得した画像データを、領域抽出部2341と色空間ベクトル生成部2043bとに出力する。画像取得部2041bは、取得した画像識別情報を画像識別情報取得部2042bに出力する。 The image acquisition unit 2041b reads the image data captured by the imaging unit 2002 and the image identification information stored in association with the image data from the storage medium 2200 via the bus 2015. The image acquisition unit 2041b outputs the acquired image data to the region extraction unit 2341 and the color space vector generation unit 2043b. The image acquisition unit 2041b outputs the acquired image identification information to the image identification information acquisition unit 2042b.
 画像識別情報取得部2042bは、画像取得部2041bが出力する画像識別情報から撮像された画像データに設定されている撮影情報を抽出し、抽出した撮影情報を第1ラベル生成部2046と領域抽出部2341とに出力する。 The image identification information acquisition unit 2042b extracts shooting information set in the imaged image data captured from the image identification information output by the image acquisition unit 2041b, and uses the extracted shooting information as a first label generation unit 2046 and a region extraction unit. 2341.
 領域抽出部2341は、画像識別情報取得部2042bが出力する撮影情報に基づき、画像識別情報取得部2042bが出力する画像データから、予め定められている手法で主要色を抽出する領域を抽出する。領域抽出部2341は、画像識別情報取得部2042bが出力する画像データから、抽出した主要色を抽出する領域の画像データを抽出し、抽出した領域の画像データを色空間ベクトル生成部2043bに出力する。
 なお、予め定められている主要色を抽出する領域を抽出する手法とは、例えば、シーン毎に画像全体から抽出する領域を予め設定しておくようにしてもよい。例えば、シーンが「風景」の場合、画像データの上から3分の2の領域、シーンが「ポートレート」の場合、画像データの中心部に予め定められている大きさの領域などである。
 あるいは、第4実施形態と組み合わせて、画像データから抽出した特徴量に基づき、特徴量が抽出された領域を、主要色を抽出する領域として抽出するようにしてもよい。この場合、画像データから抽出する領域は複数でもよい。例えば、撮像された画像データのシーンがポートレートであると判別された場合、図21のシーン判別部2242は、特徴量抽出等の手法を用いて顔検出を行う。そして、シーン判別部2242は、検出された顔の領域が複数ある場合、シーン判別部2242は、この検出された複数の領域から各々主要色を検出する。そして、第1ラベル生成部2046と第2ラベル生成部2047は、検出された主要色毎の複数のラベルを生成するようにしてもよい。あるいは、シーン判別部2242は、検出された全ての顔領域を含む領域を、主要色を抽出する領域として用いるように主要色抽出部2044に、判別結果を出力するようにしてもよい。
The region extraction unit 2341 extracts a region for extracting a main color from the image data output from the image identification information acquisition unit 2042b based on the shooting information output from the image identification information acquisition unit 2042b. The region extraction unit 2341 extracts image data of a region for extracting the extracted main color from the image data output by the image identification information acquisition unit 2042b, and outputs the image data of the extracted region to the color space vector generation unit 2043b. .
Note that, as a technique for extracting a predetermined region for extracting a main color, for example, a region to be extracted from the entire image may be set in advance for each scene. For example, when the scene is “landscape”, the area is two-thirds from the top of the image data. When the scene is “portrait”, the area has a predetermined size at the center of the image data.
Alternatively, in combination with the fourth embodiment, based on the feature amount extracted from the image data, the region from which the feature amount is extracted may be extracted as a region for extracting the main color. In this case, a plurality of areas may be extracted from the image data. For example, when it is determined that the scene of the captured image data is a portrait, the scene determination unit 2242 in FIG. 21 performs face detection using a technique such as feature amount extraction. When there are a plurality of detected face regions, the scene determination unit 2242 detects the main color from each of the detected regions. The first label generation unit 2046 and the second label generation unit 2047 may generate a plurality of labels for each detected main color. Or the scene discrimination | determination part 2242 may output a discrimination | determination result to the main color extraction part 2044 so that the area | region containing all the detected face areas may be used as an area | region which extracts a main color.
 図22に戻って、色空間ベクトル生成部2043bは、領域抽出部2341が出力する画像データを予め定められている色空間のベクトルに変換する。予め定められている色空間は、例えばHSVである。色空間ベクトル生成部2043bは、生成した色ベクトル毎に画像データの全画素を分類し、色ベクトル毎の頻度を検出し、色ベクトルの頻度分布を生成する。
 色空間ベクトル生成部2043bは、生成した色ベクトルの頻度分布を示す情報を主要色抽出部2044に出力する。
Returning to FIG. 22, the color space vector generation unit 2043b converts the image data output from the region extraction unit 2341 into a vector of a predetermined color space. The predetermined color space is, for example, HSV. The color space vector generation unit 2043b classifies all pixels of the image data for each generated color vector, detects the frequency for each color vector, and generates a color vector frequency distribution.
The color space vector generation unit 2043b outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044.
 次に、撮像装置2100の画像処理部2004bが行うラベル生成処理について、図23を用いて説明する。図23は、本実施形態に係る撮像装置2100が行うラベル生成のフローチャートである。撮像装置2100は、ステップS2001を第3実施形態と同様に行う。ステップS2001終了後、ステップS2101に進む。 Next, label generation processing performed by the image processing unit 2004b of the imaging device 2100 will be described with reference to FIG. FIG. 23 is a flowchart of label generation performed by the imaging apparatus 2100 according to the present embodiment. The imaging device 2100 performs step S2001 as in the third embodiment. After step S2001, the process proceeds to step S2101.
 (ステップS2101)次に、画像処理部2004bの画像取得部2041bは、バス2015を介して、撮像部2002が撮像した画像データと、画像データと関連付けられて記憶されている画像識別情報とを記憶媒体2200から読み出す。 
 次に、画像取得部2041bは、取得した画像データを、領域抽出部2341と色空間ベクトル生成部2043bに出力する。次に、画像取得部2041bは、取得した画像識別情報を画像識別情報取得部2042bに出力する。ステップS2101終了後、ステップS2003に進む。
(Step S2101) Next, the image acquisition unit 2041b of the image processing unit 2004b stores the image data captured by the imaging unit 2002 via the bus 2015 and the image identification information stored in association with the image data. Read from the medium 2200.
Next, the image acquisition unit 2041b outputs the acquired image data to the region extraction unit 2341 and the color space vector generation unit 2043b. Next, the image acquisition unit 2041b outputs the acquired image identification information to the image identification information acquisition unit 2042b. After step S2101, the process proceeds to step S2003.
 (ステップS2003)画像処理部2004bは、ステップS2003を第3実施形態と同様に行う。ステップS2003終了後、ステップS2102に進む。 (Step S2003) The image processing unit 2004b performs step S2003 in the same manner as in the third embodiment. After step S2003 is completed, the process proceeds to step S2102.
 (ステップS2102)次に、領域抽出部2341は、画像識別情報取得部2042bが出力する撮影情報に基づき、画像識別情報取得部2042bが出力する画像データから、予め定められている手法で主要色を抽出する領域を抽出する。
 次に、領域抽出部2341は、画像識別情報取得部2042bが出力する画像データから、抽出した主要色を抽出する領域の画像データを抽出し、抽出した領域の画像データを色空間ベクトル生成部2043bに出力する。ステップS2102終了後、ステップS2103に進む。
(Step S2102) Next, the area extraction unit 2341 selects main colors from image data output from the image identification information acquisition unit 2042b by a predetermined method based on the shooting information output from the image identification information acquisition unit 2042b. Extract the area to be extracted.
Next, the region extraction unit 2341 extracts image data of a region from which the extracted main color is extracted from the image data output from the image identification information acquisition unit 2042b, and the color space vector generation unit 2043b extracts the image data of the extracted region. Output to. After step S2102, the process proceeds to step S2103.
 (ステップS2103)次に、色空間ベクトル生成部2043bは、領域抽出部2341が出力する領域の画像データを予め定められている色空間のベクトルに変換する。次に、色空間ベクトル生成部2043bは、生成した色ベクトル毎に画像データの全画素を分類し、色ベクトル毎の頻度を検出し、色ベクトルの頻度分布を生成する。次に、色空間ベクトル生成部2043bは、生成した色ベクトルの頻度分布を示す情報を主要色抽出部2044に出力する。ステップS2103終了後、ステップS2005に進む。 (Step S2103) Next, the color space vector generation unit 2043b converts the image data of the region output from the region extraction unit 2341 into a vector of a predetermined color space. Next, the color space vector generation unit 2043b classifies all pixels of the image data for each generated color vector, detects the frequency for each color vector, and generates a color vector frequency distribution. Next, the color space vector generation unit 2043b outputs information indicating the frequency distribution of the generated color vector to the main color extraction unit 2044. After step S2103 ends, the process proceeds to step S2005.
 以下、画像処理部2004bは、ステップS2005~S2009を第3実施形態と同様に行う。 Hereinafter, the image processing unit 2004b performs steps S2005 to S2009 in the same manner as in the third embodiment.
 以上のように、画像処理部2004bは、撮像された画像データからシーン等の撮影情報に基づき、主要色を抽出する領域を抽出する。そして、画像処理部2004bは、主要色を抽出する領域の画像データから抽出された3つの主要色に基づき、第3実施形態と同様にラベルを生成するようにした。この結果、画像処理部2004bは、シーンに応じた領域の画像データから主要色を抽出し、抽出した領域の主要色に基づきラベルを生成するようにしたので、第3実施形態と第4実施形態と比べて、さらにシーンに適合する画像データに最適なラベルを生成することができる。 As described above, the image processing unit 2004b extracts a region for extracting a main color from captured image data based on shooting information such as a scene. Then, the image processing unit 2004b generates a label in the same manner as in the third embodiment, based on the three main colors extracted from the image data of the region from which the main color is extracted. As a result, the image processing unit 2004b extracts the main color from the image data of the area corresponding to the scene, and generates a label based on the extracted main color of the area. Therefore, the third and fourth embodiments. As compared with the above, it is possible to generate an optimum label for image data suitable for a scene.
(第6の実施形態)
 第3実施形態~第5実施形態では、使用者により選択された画像データから3つの色を主要色として選択する例を説明した。本実施形態では、選択された画像データから、3つ以上の色を選択する例について説明する。なお、画像処理部2004の構成は、第3実施形態(図10)と同様の場合について説明する。
(Sixth embodiment)
In the third to fifth embodiments, the example in which three colors are selected as the main colors from the image data selected by the user has been described. In the present embodiment, an example in which three or more colors are selected from selected image data will be described. Note that the configuration of the image processing unit 2004 will be described for the same case as in the third embodiment (FIG. 10).
 図24は、本実施形態に係る画像データから、複数の色ベクトルを抽出する一例を説明する図である。図24において、横軸は色ベクトル、縦軸は頻度を表している。
 図24において、主要色抽出部2044は、図16Bと同様に第1色の色ベクトルc2021、第2色の色ベクトルc2022、第3色の色ベクトルc2023を抽出したとして説明する。
 図24において、色ベクトルc2024、c2025、c2026の頻度が、予め定められている範囲内の場合、主要色抽出部2044は、第4の主要色として色ベクトルc2024、c2025、c2026を抽出する。この場合、テーブル記憶部2045には、図12で説明した第1色~第3色以外に第4色等まで含めたシーン毎のラベルを記憶させておく。
 そして、第4色が抽出された場合、主要色抽出部2044は、テーブル記憶部2045に記憶されている第1色~第4色の組み合わせの第1ラベルを読み出し、記憶されている第1ラベルを抽出する。第1色~第4色の組み合わせの第1ラベルが複数、記憶されていた場合、主要色抽出部2044は、例えば、一番先にテーブル記憶部2045から読み出した第1ラベルを選択するようにしてもよく、あるいは、ランダムに選択するようにしてもよい。
FIG. 24 is a diagram illustrating an example of extracting a plurality of color vectors from image data according to the present embodiment. In FIG. 24, the horizontal axis represents the color vector, and the vertical axis represents the frequency.
In FIG. 24, description will be made assuming that the main color extraction unit 2044 has extracted the first color vector c2021, the second color vector c2022, and the third color vector c2023 as in FIG. 16B.
In FIG. 24, when the frequency of the color vectors c2024, c2025, c2026 is within a predetermined range, the main color extraction unit 2044 extracts the color vectors c2024, c2025, c2026 as the fourth main color. In this case, the table storage unit 2045 stores labels for each scene including the fourth color in addition to the first to third colors described in FIG.
When the fourth color is extracted, the main color extraction unit 2044 reads the first label of the combination of the first color to the fourth color stored in the table storage unit 2045, and stores the stored first label. To extract. When a plurality of first labels of combinations of the first color to the fourth color are stored, for example, the main color extraction unit 2044 selects the first label read from the table storage unit 2045 first. Or you may make it select at random.
 また、主要色抽出部2044は、抽出した4つの色の中から、3つの色を主要色として選択するようにしてもよい。この場合、主要色抽出部2044は、抽出された4つの色の近似度を算出し、近似度の低い3つの色を、主要色をして算出するようにしてもよい。色の近似度は、例えば、図24において、仮に、色ベクトルc2022~c2025の4つの色ベクトルが、第1色~第4色として抽出されたとして説明する。主要色抽出部2044は、抽出した4つの色を、8ビットのカラー空間から、例えば7ビットカラー空間に減色する。減色した後、例えば、色ベクトルc2024とc2025とが同一の色と判別された場合、主要色抽出部2044は、色ベクトルc2024とc2025とを近似色であると判別する。そして、主要色抽出部2044は、第3の主要色として、色ベクトルc2024またはc2025のどちらか一方を選択する。この場合、図24の頻度分布において、主要色抽出部2044は、第1色の色ベクトルc2022と第2色の色ベクトルc2023と横軸方向で離れている距離が大きい方の色ベクトルを選択するようにしてもよく、ランダムに選択してもよい。
 また、7ビットのカラー空間に減色しても4つの色ベクトルが分離したままの場合、色空間ベクトル生成部2043は、4つの色ベクトルが3つの色ベクトルに統合されるまで減色を行う。
Further, the main color extraction unit 2044 may select three colors as main colors from the extracted four colors. In this case, the main color extraction unit 2044 may calculate the degree of approximation of the four extracted colors, and calculate the three colors having a low degree of approximation as the main color. For example, in FIG. 24, the degree of color approximation will be described assuming that four color vectors c2022 to c2025 are extracted as the first to fourth colors. The main color extraction unit 2044 reduces the four extracted colors from an 8-bit color space to, for example, a 7-bit color space. After the color reduction, for example, when the color vectors c2024 and c2025 are determined to be the same color, the main color extraction unit 2044 determines that the color vectors c2024 and c2025 are approximate colors. Then, the main color extracting unit 2044 selects one of the color vectors c2024 and c2025 as the third main color. In this case, in the frequency distribution of FIG. 24, the main color extraction unit 2044 selects a color vector having a larger distance away from the first color vector c2022 and the second color vector c2023 in the horizontal axis direction. You may make it like, You may select at random.
In addition, if the four color vectors remain separated even when the color is reduced to the 7-bit color space, the color space vector generation unit 2043 performs the color reduction until the four color vectors are integrated into the three color vectors.
 以上のように、撮影情報であるシーン毎に4つ以上の主要色と第1ラベルとがテーブル記憶部2045に予め記憶されているようにし、画像データから主要色を4色以上抽出して、抽出した主要色とシーンに基づいてラベルを生成するようにしたので、第3実施形態~第5実施形態と比較して、さらに画像データに最適なラベルを生成することができる。
 すなわち、本実施形態において画像処理部2004は、画像データを色空間に変換した色ベクトルの中から、頻度の多い4つの色を抽出し、抽出した4つの色に予め対応付けて記憶されている第1ラベルを抽出する。抽出した4つの主要色ベクトルに対して、撮影情報毎、例えばシーン毎、時刻や季節毎に第1ラベルを予め対応付けて記憶させてあるため、画像処理部2004は、画像データから抽出された主要色が同じであっても、シーン毎、時刻や季節毎に異なる第1ラベルを生成することができる。さらに、画像処理部2004は、4つの主要色の頻度を正規化して、最も頻度の多い第1色の割合に応じて、生成された第1ラベルに、第1ラベルを強調する第2ラベルを付加してラベルを生成する。この結果、画像処理部2004は、4つの主要色に基づき、第3実施形態~第5実施形態と比較して、さらに画像データに最適なラベルを生成することができる。
 また、画像処理部2004は、抽出した4つの主要色の中から、3つの主要色を減色等により抽出し、抽出した3つの主要色に対して、第3実施形態と同様にラベル生成処理を行う。この結果、画像処理部2004は、色ベクトルの頻度に差が少ないような画像データであっても、画像データに最適なラベルを生成することができる。
As described above, four or more main colors and first labels are stored in advance in the table storage unit 2045 for each scene as shooting information, and four or more main colors are extracted from the image data. Since the label is generated based on the extracted main color and the scene, it is possible to generate a label more optimal for the image data than in the third to fifth embodiments.
That is, in the present embodiment, the image processing unit 2004 extracts four frequently used colors from color vectors obtained by converting image data into a color space, and stores them in association with the four extracted colors in advance. Extract the first label. Since the first label is stored in advance in association with the four extracted main color vectors for each piece of shooting information, for example, for each scene, for each time or season, the image processing unit 2004 is extracted from the image data. Even if the main colors are the same, different first labels can be generated for each scene, time, and season. Further, the image processing unit 2004 normalizes the frequencies of the four main colors, and adds a second label for emphasizing the first label to the generated first label according to the ratio of the most frequent first color. Appends to generate a label. As a result, the image processing unit 2004 can generate an optimum label for image data based on the four main colors as compared with the third to fifth embodiments.
In addition, the image processing unit 2004 extracts three main colors from the extracted four main colors by subtractive color or the like, and performs label generation processing on the extracted three main colors as in the third embodiment. Do. As a result, the image processing unit 2004 can generate an optimum label for the image data even if the image data has a small frequency vector frequency difference.
 また、本実施形態では、画像データから、4つの主要色を抽出する例を説明したが、抽出する主要色は4色に限られず、それ以上であってもよい。この場合、抽出した主要色の色数に応じた第1ラベルをテーブル記憶部2045に記憶させておくようにしてもよい。また、例えば、主要色を5色、抽出する場合、上述したように主要色抽出部2044は、減色を行って近似色に統合して、抽出した複数の主要色の中から3つの主要色を再度、抽出するようにしてもよい。また例えば、主要色を6色、抽出する場合、主要色抽出部2044は、まず、頻度の多い順に第1色~第3色の第1グループと、残りの第4色~第6色との第2グループに分離する。なお、第4色は、第3色より画素数が少なく第5色より画素数が多く、第5色は、第4色より画素数が少ない。
 そして、第1ラベル生成部2046は、第1グループに対応する第ラベルと、第2グループに対応する第1ラベルを抽出する。そして、第1ラベル生成部2046は、このように抽出された2つの第1ラベルについて、第3実施形態と同様に第1色、または第4色の頻度に応じて修飾ラベルで第1ラベルを修飾することで修正して複数のラベルを生成するようにしてもよい。あるいは、第2ラベル生成部2047は、このように生成した複数のラベルを統合して1つのラベルを生成するようにしてもよい。具体的には、第1グループによるラベルが「とてもすがすがしい」、第2グループによるラベルが「少し子供っぽい」であった場合、第2ラベル生成部2047は、「とてもすがすがしく、少し子供っぽい」というラベルを生成するようにしてもよい。このような、2つのラベルを生成する場合、第2ラベル生成部2047は、第2ラベル生成部2047内に、2つのラベルのどちらを先に配置した方が、適切なラベルを生成できるかを確認するため、非図示の言語解析処理を行う処理機能部を備えるようにしてもよい。
In this embodiment, an example in which four main colors are extracted from image data has been described. However, the main colors to be extracted are not limited to four colors, and may be more than that. In this case, the first label corresponding to the number of extracted main colors may be stored in the table storage unit 2045. For example, when extracting five main colors, as described above, the main color extracting unit 2044 performs color reduction and integrates the approximate colors into three main colors from the extracted plurality of main colors. You may make it extract again. Further, for example, when extracting six main colors, the main color extracting unit 2044 first performs the first group of the first color to the third color and the remaining fourth color to the sixth color in descending order of frequency. Separate into a second group. The fourth color has fewer pixels than the third color and more pixels than the fifth color, and the fifth color has fewer pixels than the fourth color.
Then, the first label generation unit 2046 extracts a first label corresponding to the first group and a first label corresponding to the second group. And the 1st label production | generation part 2046 uses a 1st label with a modification label about the two 1st labels extracted in this way according to the frequency of the 1st color or the 4th color like 3rd Embodiment. It may be modified by modification to generate a plurality of labels. Alternatively, the second label generation unit 2047 may integrate a plurality of labels generated in this way to generate one label. Specifically, when the label by the first group is “very refreshing” and the label by the second group is “a little childish”, the second label generation unit 2047 “is very refreshing and a little childish”. May be generated. When generating such two labels, the second label generation unit 2047 determines which of the two labels is arranged first in the second label generation unit 2047 and can generate an appropriate label. For confirmation, a processing function unit that performs a language analysis process (not shown) may be provided.
 また、第3実施形態~第6実施形態では、1つの画像データに1つのラベルを生成する例を説明したが、生成するラベルは、2つ以上であってもよい。この場合、色空間ベクトル生成部2043(含む2043b)は、例えば、図17Aの画像データにおいて、上半分と下半分に分割し分割した領域毎に色ベクトルの頻度分布を生成する。主要色抽出部2044は、分割された領域毎の色ベクトルの頻度分布から、各々の主要色を、3色ずつ抽出する。そして、第1ラベル生成部2046は、領域毎のラベルをテーブル記憶部2045から抽出するようにしてもよい。そして、ラベル出力部2048は、このように生成された複数のラベルを画像データと関連付けて記憶媒体2200に記憶させるようにしてもよい。 In the third to sixth embodiments, an example in which one label is generated for one image data has been described. However, two or more labels may be generated. In this case, for example, the color space vector generation unit 2043 (including 2043b) generates a color vector frequency distribution for each divided region divided into an upper half and a lower half in the image data of FIG. 17A. The main color extraction unit 2044 extracts each main color by three colors from the frequency vector frequency distribution for each divided area. The first label generation unit 2046 may extract a label for each region from the table storage unit 2045. The label output unit 2048 may store the plurality of labels generated in this manner in the storage medium 2200 in association with the image data.
 なお、第3実施形態~第5実施形態では、シーン毎に3色の主要色と第1ラベルとを関連付けてテーブル記憶部2045に記憶させておく例を説明したが、例えば、シーン毎に単色と第1ラベルを関連付けてテーブル記憶部2045に記憶させておくようにしてもよい。この場合、第3実施形態で説明したように、テーブル記憶部2045には、シーン毎に3色の主要色と第1ラベルとを関連付けて記憶させ、さらに、シーン毎に単色と第1ラベルを関連付けて記憶させておくようにしてもよい。
 このような処理により、画像データがモノトーンで、主要色が1色しか抽出できないような画像データに対しても適切なラベルを生成することができる。この場合、例えば、画像処理部2004(2004a,2004b)は、第6実施形態のように4色を主要色として検出し、第1色~第3色の第1グループ、残りの第4色のみ単色としてラベルをテーブル記憶部2045から読み出すようにしてもよい。
 また、画像データの色調が単調であり、主要色が2色しか抽出できなかった場合、例えば、第1ラベル生成部2046は、抽出された2つの主要色(第1色と第2色)の各第1ラベルを読み出す。次に、第2ラベル生成部2047は、抽出された2つの主要色の頻度に基づき、2つの主要色を正規化し、第1色の割合に基づき第1色のラベルに対して修飾ラベルを生成し、生成した修飾ラベルで第1色の第1ラベルを修飾して修正することで、第1色の第2ラベルを生成するようにしてもよい。あるいは、第2ラベル生成部2047は、このように生成された第1色の第1ラベルと、第2色の第1ラベルの2つのラベルを生成するか、あるいは、第1色の第1ラベルと第2色の第1ラベルを統合して1つのラベルを生成するようにしてもよい。
In the third to fifth embodiments, the example in which the three main colors and the first label are associated with each other and stored in the table storage unit 2045 has been described. For example, a single color is used for each scene. And the first label may be associated with each other and stored in the table storage unit 2045. In this case, as described in the third embodiment, the table storage unit 2045 stores the three main colors and the first label in association with each scene, and further stores the single color and the first label for each scene. You may make it memorize | store in correlation.
By such processing, an appropriate label can be generated even for image data in which the image data is monotone and only one main color can be extracted. In this case, for example, the image processing unit 2004 (2004a, 2004b) detects four colors as main colors as in the sixth embodiment, only the first group of the first to third colors, and the remaining fourth colors. The label may be read from the table storage unit 2045 as a single color.
Further, when the color tone of the image data is monotonous and only two main colors can be extracted, for example, the first label generation unit 2046 has two extracted main colors (first color and second color). Read each first label. Next, the second label generation unit 2047 normalizes the two main colors based on the frequency of the extracted two main colors, and generates a modified label for the first color label based on the ratio of the first colors. Then, the second label of the first color may be generated by modifying and correcting the first label of the first color with the generated modified label. Alternatively, the second label generation unit 2047 generates two labels, the first label of the first color and the first label of the second color generated as described above, or the first label of the first color And the first label of the second color may be integrated to generate one label.
 また、第3実施形態~第6実施形態では、使用者により選択された画像データを記憶媒体2200から読み出す例を説明したが、ラベル生成処理に用いる画像データは、記憶媒体2200にロー(RAW)データとJPEG(Joint Photographic Experts Group)データが記録されている場合、RAWデータかJPEGデータのどちらを用いてもよい。また、記憶媒体2200に表示部2007への表示用の縮小されたサムネイル(thumbnail)画像データが記憶されている場合、このサムネイル画像データを用いてラベルを生成するようにしてもよい。また、サムネイル画像データが記憶媒体に記憶されていなくても、色空間ベクトル生成部2043(含む2043b)が、画像取得部2041(含む2041a、2041b)が出力する画像データの解像度を、予め定めた解像度に縮小した画像データを生成し、この縮小された画像データから色ベクトルの頻度や主要色を抽出するようにしてもよい。 In the third to sixth embodiments, the example in which the image data selected by the user is read from the storage medium 2200 has been described. However, the image data used for the label generation process is stored in the storage medium 2200 as a raw (RAW) signal. When data and JPEG (Joint Photographic Experts Group) data are recorded, either RAW data or JPEG data may be used. Further, when thumbnail image data reduced for display on the display unit 2007 is stored in the storage medium 2200, a label may be generated using the thumbnail image data. Even if the thumbnail image data is not stored in the storage medium, the color space vector generation unit 2043 (including 2043b) determines the resolution of the image data output from the image acquisition unit 2041 (including 2041a and 2041b) in advance. Image data reduced in resolution may be generated, and the frequency of color vectors and main colors may be extracted from the reduced image data.
 なお、実施形態の図10の画像処理部2004、図21の画像処理部2004a、または図22の画像処理部2004bの各部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより各部の処理を行ってもよい。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。 Note that a program for realizing the function of each unit of the image processing unit 2004 in FIG. 10, the image processing unit 2004a in FIG. 21, or the image processing unit 2004b in FIG. 22 is recorded on a computer-readable recording medium. The program recorded on the recording medium may be read into a computer system and executed to execute the processing of each unit. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
(第7の実施形態)
 本実施形態による撮像装置の機能ブロック図は、第2の実施形態に係る図8に示されるものと同様である。
 以下では、第2の実施形態とは異なる部分について詳しく説明する。
(Seventh embodiment)
The functional block diagram of the imaging apparatus according to the present embodiment is the same as that shown in FIG. 8 according to the second embodiment.
Hereinafter, parts different from those of the second embodiment will be described in detail.
 図25は、本実施形態による画像処理部3140(図8における画像処理部1140)の機能構成を示すブロック図である。
 画像処理部(画像処理装置)3140は、画像入力部3011と、テキスト入力部3012と、第1の位置入力部3013と、エッジ検出部3014と、顔検出部3015と、文字サイズ決定部3016と、コスト算出部3017と、領域決定部3018と、合成部3019とを含んで構成される。
FIG. 25 is a block diagram showing a functional configuration of an image processing unit 3140 (image processing unit 1140 in FIG. 8) according to the present embodiment.
An image processing unit (image processing apparatus) 3140 includes an image input unit 3011, a text input unit 3012, a first position input unit 3013, an edge detection unit 3014, a face detection unit 3015, and a character size determination unit 3016. The cost calculation unit 3017, the region determination unit 3018, and the synthesis unit 3019 are included.
 画像入力部3011は、静止画の画像データ又は動画の画像データを入力する。画像入力部3011は、入力された画像データをエッジ検出部3014及び文字サイズ決定部3016に出力する。なお、画像入力部3011は、例えば、ネットワーク又は記憶媒体を介して、画像データを入力してもよい。以下、画像入力部3011に入力された画像データが示す画像を入力画像とする。また、入力画像における四角形の画像フォーマットの幅方向をX軸方向とし、X軸方向に対し直交する方向(高さ方向)をY軸方向としてXY座標系を定める。 The image input unit 3011 inputs still image data or moving image data. The image input unit 3011 outputs the input image data to the edge detection unit 3014 and the character size determination unit 3016. Note that the image input unit 3011 may input image data via a network or a storage medium, for example. Hereinafter, an image indicated by the image data input to the image input unit 3011 is set as an input image. Also, an XY coordinate system is defined with the width direction of the rectangular image format in the input image as the X-axis direction and the direction (height direction) orthogonal to the X-axis direction as the Y-axis direction.
 テキスト入力部3012は、入力画像に対応するテキストデータを入力する。入力画像に対応するテキストデータとは、入力画像に重畳するテキストに関するデータであり、テキスト、初期文字サイズ、改行位置、行数及び列数等を含む。初期文字サイズは、テキストの文字の大きさの初期値であり、ユーザにより指定された文字の大きさである。テキスト入力部3012は、入力されたテキストデータを文字サイズ決定部3016に出力する。 The text input unit 3012 inputs text data corresponding to the input image. The text data corresponding to the input image is data relating to the text to be superimposed on the input image, and includes text, initial character size, line feed position, number of rows, number of columns, and the like. The initial character size is an initial value of the character size of the text, and is the character size designated by the user. The text input unit 3012 outputs the input text data to the character size determination unit 3016.
 第1の位置入力部3013は、入力画像における重要な位置(以下、重要位置(第1の位置)とする)の入力を受け付ける。例えば、第1の位置入力部3013は、入力画像を表示部1150に表示し、表示部1150に設置されたタッチパネルにおいてユーザから指定された位置を重要位置とする。或いは、第1の位置入力部3013は、直接重要位置の座標値(x,y)の入力を受け付けてもよい。第1の位置入力部3013は、重要位置の座標値(x,y)をコスト算出部3017に出力する。なお、第1の位置入力部3013は、ユーザから重要位置の入力がなかった場合には、予め設定された所定位置(例えば、入力画像の中央)を重要位置とする。 The first position input unit 3013 receives an input of an important position in the input image (hereinafter, referred to as an important position (first position)). For example, the first position input unit 3013 displays an input image on the display unit 1150 and sets a position designated by the user on the touch panel installed on the display unit 1150 as an important position. Alternatively, a first position input unit 3013 may receive an input of the direct coordinate values of key position (x 0, y 0). The first position input unit 3013 outputs the coordinate value (x 0 , y 0 ) of the important position to the cost calculation unit 3017. Note that the first position input unit 3013 sets a predetermined position (for example, the center of the input image) set in advance as the important position when the user does not input the important position.
 エッジ検出部3014は、例えば、Cannyアルゴリズムを用いて、画像入力部3011から入力された画像データにおけるエッジを検出する。そして、エッジ検出部3014は、画像データと、この画像データから検出したエッジの位置を示すデータとをコスト算出部3017に出力する。なお、本実施形態では、Cannyアルゴリズムを用いてエッジを検出しているが、例えば、微分フィルタを用いたエッジ検出方法や、2次元フーリエ変換した結果のうちの高周波成分に基づいてエッジを検出する方法等を用いてもよい。
 顔検出部3015は、パターンマッチング等により、画像入力部3011から入力された画像データにおける人物の顔を検出する。そして、顔検出部3015は、画像データと、この画像データから検出した人物の顔の位置を示すデータとをコスト算出部3017に出力する。
The edge detection unit 3014 detects an edge in the image data input from the image input unit 3011 using, for example, the Canny algorithm. Then, the edge detection unit 3014 outputs the image data and data indicating the position of the edge detected from the image data to the cost calculation unit 3017. In this embodiment, the edge is detected using the Canny algorithm. For example, the edge is detected based on an edge detection method using a differential filter or a high-frequency component in the result of two-dimensional Fourier transform. A method or the like may be used.
The face detection unit 3015 detects a human face in the image data input from the image input unit 3011 by pattern matching or the like. Then, the face detection unit 3015 outputs the image data and data indicating the position of the person's face detected from the image data to the cost calculation unit 3017.
 文字サイズ決定部3016は、画像入力部3011から入力された画像データの画像サイズ(幅及び高さ)と、テキスト入力部3012から入力されたテキストデータの行数及び列数とに基づいて、テキストデータの文字サイズを決定する。具体的には、文字サイズ決定部3016は、テキストデータにおける全てのテキストを画像データに合成できるように、次の式(5)を満たすfを文字サイズとする。 The character size determination unit 3016 determines the text based on the image size (width and height) of the image data input from the image input unit 3011 and the number of rows and columns of the text data input from the text input unit 3012. Determine the character size of the data. Specifically, the character size determination unit 3016 sets f satisfying the following expression (5) as the character size so that all texts in the text data can be combined with the image data.
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000003
 ただし、mはテキストデータの列数であり、lはテキストデータの行数である。また、L(≧0)は文字の大きさに対する行間の割合を示すパラメータである。また、wは画像データにおける画像領域の幅であり、hは画像データにおける画像領域の高さである。式(5)は、テキストの幅が画像データにおける画像領域の幅より小さく、かつ、テキストの高さが画像データにおける画像領域の高さより小さいことを表す。 However, m is the number of text data columns, and l is the number of text data rows. L (≧ 0) is a parameter indicating the ratio of line spacing to character size. Further, w is the width of the image area in the image data, and h is the height of the image area in the image data. Expression (5) represents that the width of the text is smaller than the width of the image area in the image data, and the height of the text is smaller than the height of the image area in the image data.
 例えば、文字サイズ決定部3016は、テキストデータに含まれる初期文字サイズが式(5)を満たさない場合には、式(5)を満たすまで文字サイズを徐々に小さくする。一方、文字サイズ決定部3016は、テキストデータに含まれる初期文字サイズが式(5)を満たす場合には、テキストデータに含まれる初期文字サイズをテキストデータの文字サイズとする。そして、文字サイズ決定部3016は、テキストデータと、そのテキストデータの文字サイズとを領域決定部3018に出力する。 For example, if the initial character size included in the text data does not satisfy Expression (5), the character size determination unit 3016 gradually decreases the character size until Expression (5) is satisfied. On the other hand, when the initial character size included in the text data satisfies Expression (5), the character size determining unit 3016 sets the initial character size included in the text data as the character size of the text data. Then, the character size determining unit 3016 outputs the text data and the character size of the text data to the region determining unit 3018.
 コスト算出部3017は、画像データにおけるエッジの位置と、人物の顔の位置と、重要位置とに基づいて、画像データにおける各座標位置(x,y)のコストを算出する。コストは、画像データにおける重要度を表す。例えば、コスト算出部3017は、エッジ検出部3014により検出されたエッジのある位置のコストが高くなるように各位置のコストを算出する。また、コスト算出部3017は、重要位置から近いほどコストを高くし、重要位置から遠いほどコストを低くする。また、コスト算出部3017は、人物の顔のある領域のコストを高くする。 The cost calculation unit 3017 calculates the cost of each coordinate position (x, y) in the image data based on the position of the edge in the image data, the position of the person's face, and the important position. The cost represents importance in the image data. For example, the cost calculation unit 3017 calculates the cost of each position so that the cost of the position where the edge is detected by the edge detection unit 3014 is high. The cost calculation unit 3017 increases the cost as it is closer to the important position, and lowers the cost as it is farther from the important position. In addition, the cost calculation unit 3017 increases the cost of the area having the human face.
 具体的には、まず、コスト算出部3017は、例えば、次の式(6)に示すガウス関数により、重要位置(x,y)に基づくコストを示すグローバルコスト画像c(x,y)を生成する。 Specifically, first, the cost calculation unit 3017 uses, for example, a global cost image c g (x, y) indicating the cost based on the important position (x 0 , y 0 ) using a Gaussian function expressed by the following equation (6). ) Is generated.
Figure JPOXMLDOC01-appb-M000004
Figure JPOXMLDOC01-appb-M000004
 ただし、xは重要位置のX座標値であり、yは重要位置のY座標値である。また、S(>0)は幅方向(X軸方向)におけるコストの広がり方を決めるパラメータであり、S(>0)は高さ方向(Y軸方向)におけるコストの広がり方を決めるパラメータである。パラメータS及びパラメータSは、例えば設定画面等によりユーザが設定可能である。パラメータS及びパラメータSを変更することより、グローバルコスト画像における分布の形を調整することができる。なお、本実施形態では、ガウス関数によりグローバルコスト画像を生成しているが、例えば、余弦関数((cos(πx)+1)/2、但し-1≦x≦1)や、原点x=0で最大値をとる三角形型(山型)の直線で表される関数や、ローレンツ型の関数(1/(ax+1)、aは定数)など、中心に近いほど値が大きくなる分布の関数を用いてグローバルコスト画像を生成してもよい。 However, x 0 is the X coordinate value of the critical position, y 0 is the Y-coordinate values of the critical position. S 1 (> 0) is a parameter that determines how the cost spreads in the width direction (X-axis direction), and S 2 (> 0) is a parameter that determines how the cost spreads in the height direction (Y-axis direction). It is. Parameter S 1 and parameter S 2 can be set by the user, for example, by setting screen or the like. Than to change the parameters S 1 and parameter S 2, it is possible to adjust the shape of the distribution in the global cost image. In this embodiment, a global cost image is generated by a Gaussian function. For example, a cosine function ((cos (πx) +1) / 2, where −1 ≦ x ≦ 1) or an origin x = 0. A function represented by a triangle (mountain) straight line that takes the maximum value, a Lorentz type function (1 / (ax 2 +1), where a is a constant), or the like of a distribution whose value increases as it is closer to the center. It may be used to generate a global cost image.
 次に、コスト算出部3017は、次の式(7)及び(8)により、人物の顔の位置に基づくコストを示す顔コスト画像c(x,y)を生成する。 Next, the cost calculation unit 3017 generates a face cost image c f (x, y) indicating the cost based on the position of the person's face by the following equations (7) and (8).
Figure JPOXMLDOC01-appb-M000005
Figure JPOXMLDOC01-appb-M000005
Figure JPOXMLDOC01-appb-M000006
Figure JPOXMLDOC01-appb-M000006
 ただし、(x(i),y(i))は検出したn個の顔のうちi(1≦i≦n)番目の顔の中心位置であり、s(i)はそのi番目の顔の大きさである。すなわち、コスト算出部3017は、人物の顔の領域における画素値を「1」とし、顔意外の領域における画素値を「0」とする顔コスト画像を生成する。 However, (x (i) , y (i) ) is the center position of the i (1 ≦ i ≦ n) -th face among the detected n faces, and s (i) is the i-th face It is a size. That is, the cost calculation unit 3017 generates a face cost image in which the pixel value in the human face region is “1” and the pixel value in the unexpected region is “0”.
 次に、コスト算出部3017は、次の式(9)により、エッジに基づくコストを示すエッジコスト画像c(x,y)を生成する。 Next, the cost calculation unit 3017 generates an edge cost image c e (x, y) indicating the cost based on the edge by the following equation (9).
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000007
 すなわち、コスト算出部3017は、エッジ部分の画素値を「1」とし、エッジ以外の領域の画素値を「0」とするエッジコスト画像を生成する。なお、エッジ部分は、エッジのある位置でもよいし、エッジのある位置とその周辺を含む領域であってもよい。 That is, the cost calculation unit 3017 generates an edge cost image in which the pixel value of the edge portion is “1” and the pixel value of the region other than the edge is “0”. Note that the edge portion may be a position where the edge is present, or may be a region including the position where the edge is present and its periphery.
 そして、コスト算出部3017は、次の式(10)により、グローバルコスト画像と、顔コスト画像と、エッジコスト画像とに基づく最終コスト画像c(x,y)を生成する。 Then, the cost calculation unit 3017 generates a final cost image c (x, y) based on the global cost image, the face cost image, and the edge cost image by the following equation (10).
Figure JPOXMLDOC01-appb-M000008
Figure JPOXMLDOC01-appb-M000008
 ただし、C(≧0)はグローバルコスト画像の重み付け係数のパラメータであり、C(≧0)は顔コスト画像の重み付け係数のパラメータであり、C(≧0)はエッジコスト画像の重み付け係数のパラメータである。パラメータC,パラメータC及びパラメータCの比は設定画面等によりユーザが設定変更可能である。また、式(10)に示す最終コスト画像c(x,y)は、0≦c(x,y)≦1となるよう正規化されている。コスト算出部3017は、画像データと、その画像データの最終コスト画像とを領域決定部3018に出力する。なお、パラメータC,パラメータC及びパラメータCは、1以下であってもよい。 However, C g (≧ 0) is a parameter of the weighting coefficient of the global cost image, C f (≧ 0) is a parameter of the weighting coefficient of the face cost image, and C e (≧ 0) is the weighting of the edge cost image. This is a coefficient parameter. The ratio of the parameter C g , the parameter C e and the parameter C f can be changed by the user on the setting screen or the like. Further, the final cost image c (x, y) shown in Expression (10) is normalized so that 0 ≦ c (x, y) ≦ 1. The cost calculation unit 3017 outputs the image data and the final cost image of the image data to the region determination unit 3018. The parameter C g , the parameter C e and the parameter C f may be 1 or less.
 なお、画像処理部3140は、入力画像に応じてパラメータC,パラメータC及びパラメータCの比を自動的に変更するようにしてもよい。例えば、入力画像が風景画像である場合には、パラメータCを他のパラメータより大きくする。また、入力画像がポートレート(人物画像)である場合には、パラメータCを他のパラメータより大きくする。また、入力画像がビル等の建物の多い建物画像である場合には、パラメータCを他のパラメータより大きくする。具体的には、コスト算出部3017は、顔検出部3015により人物の顔が検出された場合に、入力画像をポートレートと判定し、パラメータCを他のパラメータより大きくする。一方、コスト算出部3017は、顔検出部3015により人物の顔が検出されなかった場合には、入力画像を風景画像と判定し、パラメータCを他のパラメータより大きくする。また、コスト算出部3017は、エッジ検出部3014により検出されたエッジが所定値より大きい場合は、入力画像を建物画像であると判定し、パラメータCを他のパラメータより大きくする。
 或いは、画像処理部3140は、風景画像のモード、ポートレートのモード、及び建物画像のモードを有し、現在画像処理部3140に設定されているモードに応じてパラメータC,パラメータC及びパラメータCの比を変更してもよい。
Note that the image processing unit 3140 may automatically change the ratio of the parameter C g , the parameter C e, and the parameter C f according to the input image. For example, if the input image is a landscape image, the larger the parameter C g than other parameters. Further, when the input image is a portrait (person image) increases the parameter C f than other parameters. Further, when the input image is a large building images building or the like increases the parameter C e than other parameters. Specifically, the cost calculation unit 3017, when the face of a person is detected by the face detection unit 3015 determines the input image portrait and, to increase the parameter C f than other parameters. On the other hand, if the human face is not detected by the face detection unit 3015, the cost calculation unit 3017 determines that the input image is a landscape image and makes the parameter Cg larger than the other parameters. Also, the cost calculating unit 3017, if detected edge by the edge detection unit 3014 is greater than the predetermined value, determines the input image as a building image, to increase the parameter C e than other parameters.
Alternatively, the image processing unit 3140 has a landscape image mode, a portrait mode, and a building image mode, and the parameter C g , the parameter C e, and the parameter according to the mode currently set in the image processing unit 3140. The ratio of C f may be changed.
 また、コスト算出部3017は、画像データが動画である場合には、動画の画像データに含まれる複数のフレーム画像のコストの平均値を座標位置毎に算出する。具体的には、コスト算出部3017は、所定時間(例えば、3秒)間隔で動画のフレーム画像を取得し、取得したフレーム画像毎に最終コスト画像を生成する。そして、コスト算出部3017は、各フレーム画像の最終コスト画像を平均した平均最終コスト画像を生成する。平均最終コスト画像における各位置の画素値は、各最終コスト画像における各位置の画素値の平均値である。
 なお、本実施形態では複数のフレーム画像のコストの平均値を算出しているが、例えば、合計値を算出してもよい。
In addition, when the image data is a moving image, the cost calculation unit 3017 calculates an average value of costs of a plurality of frame images included in the moving image data for each coordinate position. Specifically, the cost calculation unit 3017 acquires a frame image of a moving image at a predetermined time (for example, 3 seconds) interval, and generates a final cost image for each acquired frame image. Then, the cost calculation unit 3017 generates an average final cost image obtained by averaging the final cost images of the respective frame images. The pixel value at each position in the average final cost image is an average value of the pixel values at each position in each final cost image.
In the present embodiment, the average value of costs of a plurality of frame images is calculated, but for example, a total value may be calculated.
 領域決定部3018は、コスト算出部3017により入力された最終コスト画像と、文字サイズ決定部3016により入力されたテキストデータの文字サイズとに基づいて、画像データにおけるテキストを合成する合成領域を決定する。具体的には、まず、領域決定部3018は、テキストデータの行数及び列数と文字サイズとに基づいて、テキストを表示する矩形領域であるテキスト矩形領域の幅wtextと高さhtextとを算出する。テキスト矩形領域は、合成領域に対応する領域である。続いて、領域決定部3018は、次の式(11)により、各座標位置(x,y)における、テキスト矩形領域内のコストの総和c text(x,y)を算出する。 The area determination unit 3018 determines a synthesis area in which text in the image data is combined based on the final cost image input by the cost calculation unit 3017 and the character size of the text data input by the character size determination unit 3016. . Specifically, first, the area determination unit 3018 determines the width w text and the height h text of a text rectangular area that is a rectangular area for displaying text, based on the number of rows and columns of text data and the character size. Is calculated. The text rectangular area is an area corresponding to the synthesis area. Subsequently, the region determination unit 3018 calculates the total cost c * text (x, y) in the text rectangular region at each coordinate position (x, y) by the following equation (11).
Figure JPOXMLDOC01-appb-M000009
Figure JPOXMLDOC01-appb-M000009
 そして、領域決定部3018は、テキスト矩形領域内のコストの総和c text(x,y)が最小となる座標位置(x,y)をテキストの合成位置とする。すなわち、領域決定部3018は、テキスト矩形領域内のコストの総和c text(x,y)が最小となる座標位置(x,y)を左上の頂点とするテキスト矩形領域をテキストの合成領域とする。領域決定部3018は、画像データと、テキストデータと、テキストの合成領域を示すデータとを合成部3019に出力する。なお、本実施形態では、領域決定部3018は、テキスト矩形領域内のコストの総和(合計値)に基づいて合成領域を決定しているが、例えば、テキスト矩形領域内のコストの平均値が最も小さい領域を合成領域としてもよい。或いは、領域決定部3018は、テキスト矩形領域の中心の重みを重くしたコストの重み付け平均値が最も小さい領域を合成領域としてもよい。 Then, the area determination unit 3018 sets the coordinate position (x, y) at which the total cost c * text (x, y) in the text rectangular area is minimum as the text synthesis position. In other words, the region determination unit 3018 sets the text rectangular region having the coordinate position (x, y) at which the total cost c * text (x, y) in the text rectangular region is minimum as the upper left vertex as the text synthesis region. To do. The area determination unit 3018 outputs image data, text data, and data indicating a text synthesis area to the synthesis unit 3019. In the present embodiment, the area determination unit 3018 determines the synthesis area based on the total cost (total value) in the text rectangular area. For example, the average cost in the text rectangular area is the highest. A small area may be used as a synthesis area. Alternatively, the region determination unit 3018 may set a region having the smallest cost weighted average value obtained by increasing the weight of the center of the text rectangular region as the composite region.
 合成部3019は、画像データと、テキストデータと、テキストの合成領域を示すデータとを入力とする。合成部3019は、画像データの合成領域にテキストデータのテキストを重畳して合成した合成画像の画像データを生成して出力する。 The composition unit 3019 receives image data, text data, and data indicating a text composition area. The synthesizing unit 3019 generates and outputs image data of a synthesized image obtained by superimposing the text of the text data on the image data synthesis area.
 図26A~26Fは、本実施形態による入力画像とコスト画像と合成画像との一例を示すイメージ図である。
 図26Aは、入力画像を示す。図26Bは、グローバルコスト画像を示す。図26Bに示す例では、入力画像の中心が重要位置である。図26Bに示すように、グローバルコスト画像の画素値は、中心に近いほど「1」に近く、中心から遠いほど「0」に近い。図26Cは、顔コスト画像を示す。図26Cに示すように、顔コスト画像の画素値は、人の顔の領域が「1」であり、人の顔以外の領域が「0」である。図26Dは、エッジコスト画像を示す。図26Dに示すように、エッジコスト画像の画素値は、エッジ部分が「1」であり、エッジ部分以外の領域が「0」である。
26A to 26F are image diagrams showing examples of the input image, the cost image, and the composite image according to the present embodiment.
FIG. 26A shows an input image. FIG. 26B shows a global cost image. In the example shown in FIG. 26B, the center of the input image is the important position. As shown in FIG. 26B, the pixel value of the global cost image is closer to “1” as it is closer to the center, and closer to “0” as it is farther from the center. FIG. 26C shows a face cost image. As shown in FIG. 26C, the pixel value of the face cost image is “1” in the area of the human face and “0” in the area other than the human face. FIG. 26D shows an edge cost image. As illustrated in FIG. 26D, the pixel value of the edge cost image is “1” in the edge portion and “0” in the region other than the edge portion.
 図26Eは、グローバルコスト画像と顔コスト画像とエッジコスト画像とを組み合わせた最終コスト画像を示す。図26Fは、入力画像にテキストを重畳して合成した合成画像を示す。図26Fに示すように、テキストデータのテキストは、最終コスト画像におけるコストの総和が小さい領域に重畳される。 FIG. 26E shows a final cost image obtained by combining a global cost image, a face cost image, and an edge cost image. FIG. 26F shows a synthesized image obtained by superimposing text on the input image. As shown in FIG. 26F, the text of the text data is superimposed on an area where the total cost in the final cost image is small.
 次に、図27を参照して、画像処理部3140による静止画の合成処理について説明する。
 図27は、本実施形態による静止画の合成処理の手順を示すフローチャートである。
 はじめに、ステップS3101において、画像入力部3011が、静止画の画像データ(以下、静止画データとする)の入力を受け付ける。
 次に、ステップS3102において、テキスト入力部3012が、入力された静止画データに対応するテキストデータの入力を受け付ける。
 次に、ステップS3103において、第1の位置入力部3013が、入力された静止画データにおける重要位置の入力を受け付ける。
Next, with reference to FIG. 27, the still image composition processing by the image processing unit 3140 will be described.
FIG. 27 is a flowchart illustrating a procedure of still image composition processing according to the present embodiment.
First, in step S3101, the image input unit 3011 accepts input of still image data (hereinafter referred to as still image data).
Next, in step S3102, the text input unit 3012 receives input of text data corresponding to the input still image data.
Next, in step S3103, the first position input unit 3013 receives input of an important position in the input still image data.
 続いて、ステップS3104において、文字サイズ決定部3016が、入力された静止画データのサイズと、入力されたテキストデータの行数及び列数とに基づいて、テキストデータの文字サイズを決定する。
 次に、ステップS3105において、顔検出部3015が、入力された静止画データにおける人物の顔の位置を検出する。
 次に、ステップS3106において、エッジ検出部3014が、入力された静止画データにおけるエッジの位置を検出する。
In step S3104, the character size determination unit 3016 determines the character size of the text data based on the size of the input still image data and the number of rows and columns of the input text data.
In step S3105, the face detection unit 3015 detects the position of the person's face in the input still image data.
Next, in step S3106, the edge detection unit 3014 detects the position of the edge in the input still image data.
 続いて、ステップS3107において、コスト算出部3017が、指定(入力)された重要位置に基づいてグローバルコスト画像を生成する。すなわち、コスト算出部3017は、重要位置に近いほどコストが高く、重要位置から遠いほどコストが低いグローバルコスト画像を生成する。
 次に、ステップS3108において、コスト算出部3017が、検出された人物の顔の位置に基づいて、顔コスト画像を生成する。すなわち、コスト算出部3017は、人物の顔の領域のコストが高く、人物の顔以外の領域のコストが低い顔コスト画像を生成する。
 次に、ステップS3109において、コスト算出部3017が、検出されたエッジの位置に基づいて、エッジコスト画像を生成する。すなわち、コスト算出部3017は、エッジ部分のコストが高く、エッジ以外の領域のコストが低いエッジコスト画像を生成する。
In step S3107, the cost calculation unit 3017 generates a global cost image based on the designated (input) important position. That is, the cost calculation unit 3017 generates a global cost image that has a higher cost as it is closer to the important position and a lower cost as it is farther from the important position.
In step S3108, the cost calculation unit 3017 generates a face cost image based on the detected face position of the person. That is, the cost calculation unit 3017 generates a face cost image in which the cost of the human face region is high and the cost of the region other than the human face is low.
In step S3109, the cost calculation unit 3017 generates an edge cost image based on the detected edge position. That is, the cost calculation unit 3017 generates an edge cost image in which the cost of the edge portion is high and the cost of the region other than the edge is low.
 続いて、ステップS3110において、コスト算出部3017は、生成されたグローバルコスト画像と、顔コスト画像と、エッジコスト画像とを組み合わせて、最終コスト画像を生成する。
 次に、ステップS3111において、領域決定部3018が、生成した最終コスト画像と、決定されたテキストデータの文字サイズとに基づいて、静止画データにおけるテキストの合成領域を決定する。
 最後に、ステップS3112において、合成部3019が、決定された合成領域にテキストデータのテキストを重畳して、静止画データとテキストデータとを合成する。
Subsequently, in step S3110, the cost calculation unit 3017 generates a final cost image by combining the generated global cost image, face cost image, and edge cost image.
In step S <b> 3111, the area determination unit 3018 determines a text synthesis area in the still image data based on the generated final cost image and the determined character size of the text data.
Finally, in step S3112, the synthesis unit 3019 superimposes the text data on the determined synthesis area to synthesize still image data and text data.
 次に、図28を参照して、画像処理部3140による動画の合成処理について説明する。図28は、本実施形態による動画の合成処理の手順を示すフローチャートである。
 はじめに、ステップS3201において、画像入力部3011が、動画の画像データ(以下、動画データとする)の入力を受け付ける。
 次に、ステップS3202において、テキスト入力部3012が、入力された動画データに対応するテキストデータの入力を受け付ける。
 次に、ステップS3203において、第1の位置入力部3013が、入力された動画データにおける重要位置の指定を受け付ける。
Next, with reference to FIG. 28, the moving image composition processing by the image processing unit 3140 will be described. FIG. 28 is a flowchart showing the procedure of the moving image composition process according to this embodiment.
First, in step S3201, the image input unit 3011 receives input of moving image data (hereinafter referred to as moving image data).
Next, in step S3202, the text input unit 3012 receives input of text data corresponding to the input moving image data.
Next, in step S3203, the first position input unit 3013 accepts designation of an important position in the input moving image data.
 続いて、ステップS3204において、文字サイズ決定部3016が、動画データのサイズと、テキストデータの行数及び列数とに基づいて、テキストデータの文字サイズを決定する。
 次に、ステップS3205において、コスト算出部3017が、動画データから最初のフレーム画像を取得する。
Subsequently, in step S3204, the character size determination unit 3016 determines the character size of the text data based on the size of the moving image data and the number of rows and columns of the text data.
In step S3205, the cost calculation unit 3017 acquires the first frame image from the moving image data.
 続いて、ステップS3206において、顔検出部3015が、取得したフレーム画像における人物の顔の位置を検出する。
 次に、ステップS3207において、エッジ検出部3014が、取得したフレーム画像におけるエッジの位置を検出する。
In step S3206, the face detection unit 3015 detects the position of the person's face in the acquired frame image.
Next, in step S3207, the edge detection unit 3014 detects the position of the edge in the acquired frame image.
 続いて、ステップS3208~ステップS3211において、コスト算出部3017は、図27のステップS3107~ステップS3110と同様の処理を行う。
 次に、ステップS3212において、コスト算出部3017は、現在のフレーム画像が動画像データにおける最後のフレーム画像であるか否かを判定する。
 現在のフレーム画像が最後のフレーム画像でない場合(ステップS3212:No)、ステップS3213において、コスト算出部3017は、現在のフレーム画像から所定時間t秒(例えば3秒)後のフレーム画像を動画像データから取得し、ステップS3206へ戻る。
Subsequently, in steps S3208 to S3211, the cost calculation unit 3017 performs the same processing as in steps S3107 to S3110 in FIG.
In step S3212, the cost calculation unit 3017 determines whether the current frame image is the last frame image in the moving image data.
If the current frame image is not the last frame image (step S3212: No), in step S3213, the cost calculation unit 3017 uses a frame image that is a predetermined time t seconds (eg, 3 seconds) from the current frame image as moving image data. And the process returns to step S3206.
 一方、現在のフレーム画像が動画像データにおける最後のフレームである場合(ステップS3212:Yes)、ステップS3214において、コスト算出部3017は、各フレーム画像の最終コスト画像を平均した平均最終コスト画像を生成する。平均最終コスト画像における各座標位置の画素値は、各フレーム画像の最終コスト画像における各座標位置の画素値の平均値である。 On the other hand, when the current frame image is the last frame in the moving image data (step S3212: Yes), in step S3214, the cost calculation unit 3017 generates an average final cost image by averaging the final cost images of the respective frame images. To do. The pixel value at each coordinate position in the average final cost image is the average value of the pixel values at each coordinate position in the final cost image of each frame image.
 次に、ステップS3215において、領域決定部3018が、生成された平均最終コスト画像と、決定されたテキストデータの文字サイズとに基づいて、動画データにおけるテキストの合成領域を決定する。
 最後に、ステップS3216において、合成部3019が、決定された合成領域にテキストデータのテキストを重畳して、動画データとテキストデータとを合成する。
Next, in step S3215, the region determination unit 3018 determines a text synthesis region in the moving image data based on the generated average final cost image and the determined character size of the text data.
Finally, in step S3216, the synthesizer 3019 synthesizes the moving image data and the text data by superimposing the text data on the determined synthesis area.
 なお、本実施形態では、平均最終コスト画像に基づいて動画データ全体における合成領域を決定しているが、動画データの所定時間毎に合成領域を決定してもよい。例えば、画像処理部3140は、最初のフレーム画像に基づく合成領域rを0秒からt-1秒までのフレーム画像の合成領域とし、t秒のフレーム画像に基づく合成領域rをt秒から2t-1秒までのフレーム画像の合成領域とし、以下同様に各フレーム画像の合成領域を決定する。これにより、動画データにおける被写体の動きに応じて、最適な位置にテキストを合成することができる。 In the present embodiment, the composite area in the entire moving image data is determined based on the average final cost image, but the composite area may be determined every predetermined time of the moving image data. For example, the image processing unit 3140 sets the synthesis area r 1 based on the first frame image as the synthesis area of the frame image from 0 seconds to t−1 seconds, and sets the synthesis area r 2 based on the frame image of t seconds from t seconds. The composite region of frame images up to 2t-1 seconds is determined, and the composite region of each frame image is determined in the same manner. As a result, the text can be synthesized at an optimal position in accordance with the movement of the subject in the moving image data.
 このように、本実施形態によれば、画像処理部3140は、画像データにおけるエッジに関するコストを示すエッジコスト画像に基づいて、テキストを合成する合成領域を決定する。このため、エッジの少ない領域(すなわち、複雑なテクスチャの存在しない領域)にテキストを合成することができる。これにより、テキスト表示に使われるフォントのアウトラインとテクスチャのエッジが重なるのを防ぐことができるため、閲覧者がテキストを読み易いように入力画像中にテキストを合成することができる。 As described above, according to the present embodiment, the image processing unit 3140 determines a synthesis area in which text is synthesized based on an edge cost image indicating a cost related to an edge in image data. Therefore, it is possible to synthesize text in a region with few edges (that is, a region where no complex texture exists). Thereby, since it is possible to prevent the outline of the font used for text display and the texture edge from overlapping, the text can be synthesized in the input image so that the viewer can easily read the text.
 また、テキストを表示する位置を固定している場合、入力画像の内容やテキストの分量によっては被写体や注目する人物、物体、背景等にテキストが重なり、入力画像本来の印象を悪くすることがある。本実施形態による画像処理部3140は、画像データにおける人物の顔に関するコストを示す顔コスト画像に基づいて、テキストを合成する合成領域を決定しているため、人物の顔以外の領域にテキストを合成することができる。また、画像処理部3140は、画像データにおける重要位置に関するコストを示すグローバルコスト画像に基づいて、テキストを合成する合成領域を決定しているため、重要位置から離れた領域にテキストを合成することができる。例えば、多くの画像では、中央部分に被写体があるため、中央部分を重要位置とすることにより、被写体以外の領域にテキストを合成することができる。また、本実施形態による画像処理部3140では、重要位置をユーザが指定可能なため、例えば入力画像Aでは中央部分を重要位置とし、入力画像Bでは端部分を重要位置とする等、入力画像毎に重要位置を変更することができる。 In addition, when the position where the text is displayed is fixed, depending on the content of the input image and the amount of the text, the text may overlap the subject, the person of interest, the object, the background, etc., and the original impression of the input image may be deteriorated. . The image processing unit 3140 according to the present embodiment determines a synthesis area for text synthesis based on a face cost image indicating a cost related to a person's face in the image data, and therefore synthesizes text in an area other than the person's face. can do. In addition, the image processing unit 3140 determines a synthesis area for synthesizing text based on a global cost image indicating a cost related to an important position in the image data. Therefore, the image processing unit 3140 can synthesize text in an area away from the important position. it can. For example, in many images, a subject is present in the central portion, and text can be synthesized in an area other than the subject by setting the central portion as an important position. Further, in the image processing unit 3140 according to the present embodiment, since the user can designate an important position, for example, in the input image A, the central portion is set as the important position, and in the input image B, the end portion is set as the important position. The important position can be changed.
 また、本実施形態によれば、画像処理部3140は、グローバルコスト画像と、顔コスト画像と、エッジコスト画像とを組み合わせた最終コスト画像に基づいて、テキストを合成する合成領域を決定しているため、総合的に最適な位置にテキストを合成することができる。 In addition, according to the present embodiment, the image processing unit 3140 determines a synthesis region in which text is synthesized based on a final cost image obtained by combining a global cost image, a face cost image, and an edge cost image. Therefore, it is possible to synthesize text at an optimal position comprehensively.
 ところで、文字サイズを固定している場合、入力画像の画像サイズによって画像データに対するテキストの相対的な大きさが極端に変化して閲覧者にとってふさわしくないテキスト表示となる場合がある。例えば、入力画像に対してテキストデータの文字サイズが相対的に大きい場合、入力画像内に全てのテキストが納まらず文章が読み取れないことがある。本実施形態によれば、画像処理部3140は、入力画像の画像サイズに応じてテキストデータの文字サイズを変更するため、テキスト全体を入力画像内に収めることができる。 By the way, when the character size is fixed, the relative size of the text with respect to the image data may change drastically depending on the image size of the input image, resulting in a text display unsuitable for the viewer. For example, when the character size of text data is relatively large with respect to the input image, all text may not fit in the input image and the sentence may not be read. According to the present embodiment, the image processing unit 3140 changes the character size of the text data in accordance with the image size of the input image, so that the entire text can be stored in the input image.
 また、本実施形態によれば、画像処理部3140は、動画の画像データにもテキストを合成することができる。これにより、例えば、動画を放送やインターネット等により配信して再生中に、ユーザから寄せられたコメントを動的に画像中に表示するサービス等に応用することができる。また、画像処理部3140は、複数のフレーム画像の平均最終コスト画像を用いて合成領域を決定しているため、動画像全体における被写体の動きを考慮した総合的に最適な領域にテキストを合成することができる。 Further, according to the present embodiment, the image processing unit 3140 can synthesize text with moving image data. Thereby, for example, it can be applied to a service or the like that dynamically displays a comment received from a user in an image while a moving image is distributed and reproduced by broadcasting or the Internet. In addition, since the image processing unit 3140 determines the synthesis region using the average final cost image of a plurality of frame images, the image processing unit 3140 synthesizes the text into a comprehensively optimal region considering the movement of the subject in the entire moving image. be able to.
(第8の実施形態)
 次に、この発明の第8の実施形態による画像処理部(画像処理装置)3140aについて説明する。
 図29は、本実施形態による画像処理部3140aの機能構成を示すブロック図である。本図において、図25に示す画像処理部3140と同一の部分には同一の符号を付し、その説明を省略する。画像処理部3140aは、図25に示す画像処理部3140の構成に加えて第2の位置入力部3021を備える。
 第2の位置入力部3021は、画像データにおいてテキストを合成する位置(以下、テキスト位置(第2の位置)とする)の入力を受け付ける。例えば、第2の位置入力部3021は、画像入力部3011に入力された画像データを表示部1150に表示し、表示部1150に設置されたタッチパネルにおいてユーザから指定された位置をテキスト位置とする。或いは、第2の位置入力部3021は、直接テキスト位置の座標値(x,y)の入力を受け付けてもよい。第2の位置入力部3021は、テキスト位置の座標値(x,y)をコスト算出部3017aに出力する。
(Eighth embodiment)
Next, an image processing unit (image processing apparatus) 3140a according to an eighth embodiment of the present invention will be described.
FIG. 29 is a block diagram illustrating a functional configuration of the image processing unit 3140a according to the present embodiment. In this figure, the same parts as those of the image processing unit 3140 shown in FIG. 25 are denoted by the same reference numerals, and the description thereof is omitted. The image processing unit 3140a includes a second position input unit 3021 in addition to the configuration of the image processing unit 3140 shown in FIG.
The second position input unit 3021 receives an input of a position (hereinafter referred to as a text position (second position)) where text is combined in the image data. For example, the second position input unit 3021 displays the image data input to the image input unit 3011 on the display unit 1150, and sets the position specified by the user on the touch panel installed on the display unit 1150 as the text position. Alternatively, the second position input unit 3021 may directly accept input of coordinate values (x 1 , y 1 ) of the text position. The second position input unit 3021 outputs the coordinate value (x 1 , y 1 ) of the text position to the cost calculation unit 3017a.
 コスト算出部3017aは、第2の位置入力部3021により入力されたテキスト位置(x,y)と、画像データにおけるエッジの位置と、人物の顔の位置と、重要位置とに基づいて、画像データにおける各座標位置(x,y)のコストを算出する。具体的には、コスト算出部3017aは、テキスト位置(x,y)に基づくコストを示すテキスト位置コスト画像と、グローバルコスト画像と、顔コスト画像と、エッジコスト画像とを組み合わせて最終コスト画像を生成する。グローバルコスト画像、顔コスト画像及びエッジコスト画像の生成方法は第7の実施形態と同様である。 The cost calculation unit 3017a, based on the text position (x 1 , y 1 ) input by the second position input unit 3021, the position of the edge in the image data, the position of the person's face, and the important position, The cost of each coordinate position (x, y) in the image data is calculated. Specifically, the cost calculation unit 3017a combines the text position cost image indicating the cost based on the text position (x 1 , y 1 ), the global cost image, the face cost image, and the edge cost image to obtain the final cost. Generate an image. The generation method of the global cost image, the face cost image, and the edge cost image is the same as that in the seventh embodiment.
 コスト算出部3017aは、次の式(12)により、テキスト位置コスト画像c(x,y)を生成する。 The cost calculation unit 3017a generates a text position cost image c t (x, y) by the following equation (12).
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000010
 ただし、S(>0)は幅方向(X軸方向)におけるコストの広がり方を決めるパラメータであり、S(>0)は高さ方向(Y軸方向)におけるコストの広がり方を決めるパラメータである。テキスト位置コスト画像は、テキスト位置(x,y)に近いほどコストが低く、テキスト位置から遠いほどコストが高い画像である。 However, S 3 (> 0) is a parameter that determines how the cost spreads in the width direction (X-axis direction), and S 4 (> 0) is a parameter that determines how the cost spreads in the height direction (Y-axis direction). It is. The text position cost image is an image that has a lower cost as it is closer to the text position (x 1 , y 1 ), and has a higher cost as it is farther from the text position.
 そして、コスト算出部3017aは、次の式(13)により、最終コスト画像c(x,y)を生成する。 Then, the cost calculation unit 3017a generates a final cost image c (x, y) by the following equation (13).
Figure JPOXMLDOC01-appb-M000011
Figure JPOXMLDOC01-appb-M000011
 ただし、C(≧0)はテキスト位置コスト画像の重み付け係数のパラメータである。
 式(13)は、式(10)の分母にCを加算し、分子にC(x,y)を加算した式である。なお、コスト算出部3017aは、第2の位置入力部3021によりテキスト位置が指定されなかった場合には、テキスト位置コスト画像を生成せずに上述した式(10)により最終コスト画像を生成する。または、コスト算出部3017aは、第2の位置入力部3021によりテキスト位置が指定されなかった場合には、パラメータC=0とする。
However, C t (≧ 0) is a parameter of the weighting coefficient of the text position cost image.
Expression (13) is an expression in which C t is added to the denominator of Expression (10) and C t ct (x, y) is added to the numerator. Note that, when the text position is not designated by the second position input unit 3021, the cost calculation unit 3017 a generates the final cost image according to the above equation (10) without generating the text position cost image. Alternatively, the cost calculation unit 3017a sets the parameter C t = 0 when the text position is not designated by the second position input unit 3021.
 また、コスト算出部3017aは、画像データが動画である場合には、動画の画像データに含まれる複数のフレーム画像のコストの平均値を座標位置毎に算出する。具体的には、コスト算出部3017aは、所定時間(例えば、3秒)間隔で動画のフレーム画像を取得し、取得したフレーム画像毎に最終コスト画像を生成する。そして、コスト算出部3017aは、各フレーム画像の最終コスト画像を平均した平均最終コスト画像を生成する。 Further, when the image data is a moving image, the cost calculation unit 3017a calculates an average value of the costs of a plurality of frame images included in the moving image data for each coordinate position. Specifically, the cost calculation unit 3017a acquires a frame image of a moving image at a predetermined time (for example, 3 seconds) interval, and generates a final cost image for each acquired frame image. Then, the cost calculation unit 3017a generates an average final cost image obtained by averaging the final cost images of the respective frame images.
 次に、図30を参照して、画像処理部3140aによる合成処理について説明する。図30は、本実施形態による合成処理の手順を示すフローチャートである。
 ステップS3301からS3303に示す処理は、上述したステップS3101からS3103に示す処理と同様である。
 ステップS3303に続いて、ステップS3304において、第2の位置入力部3021は、入力された画像データにおけるテキスト位置の指定を受け付ける。
 ステップS3305からS3307に示す処理は、上述したステップS3104からS3106に示す処理と同様である。
Next, with reference to FIG. 30, the composition processing by the image processing unit 3140a will be described. FIG. 30 is a flowchart showing the procedure of the composition processing according to this embodiment.
The processing shown in steps S3301 to S3303 is the same as the processing shown in steps S3101 to S3103 described above.
Subsequent to step S3303, in step S3304, the second position input unit 3021 accepts designation of a text position in the input image data.
The processing shown in steps S3305 to S3307 is the same as the processing shown in steps S3104 to S3106 described above.
 ステップS3307に続いて、ステップS3308において、コスト算出部3017aは、指定されたテキスト位置に基づいてテキスト位置コスト画像を生成する。
 ステップS3309からS3311に示す処理は、上述したステップS3107からS3109に示す処理と同様である。
Subsequent to step S3307, in step S3308, the cost calculation unit 3017a generates a text position cost image based on the designated text position.
The processing shown in steps S3309 to S3311 is the same as the processing shown in steps S3107 to S3109 described above.
 ステップS3311に続いて、ステップS3312において、コスト算出部3017aは、テキスト位置コスト画像と、グローバルコスト画像と、顔コスト画像と、エッジコスト画像とを組み合わせて、最終コスト画像を生成する。
 次に、ステップS3313において、領域決定部3018が、生成された最終コスト画像と、決定されたテキストデータの文字サイズとに基づいて、画像データにおけるテキストの合成領域を決定する。
 最後に、ステップS3314において、合成部3019が、決定した合成領域にテキストデータのテキストを重畳して、画像データとテキストデータとを合成する。
Subsequent to step S3311, in step S3312, the cost calculation unit 3017a generates a final cost image by combining the text position cost image, the global cost image, the face cost image, and the edge cost image.
Next, in step S3313, the area determination unit 3018 determines a text synthesis area in the image data based on the generated final cost image and the determined character size of the text data.
Finally, in step S3314, the synthesis unit 3019 superimposes the text data on the determined synthesis area, and synthesizes the image data and the text data.
 なお、本実施形態では、第2の位置入力部3021においてテキスト位置を指定しているが、例えば、テキストを合成したい領域を指定してもよい。この場合、コスト算出部3017aは、指定された領域の画素値を「0」とし、それ以外の領域の画素値を「1」とするテキスト位置コスト画像を生成する。すなわち、コスト算出部3017aは、指定された領域のコストを低くする。 In the present embodiment, the text position is specified in the second position input unit 3021. However, for example, an area in which text is to be synthesized may be specified. In this case, the cost calculation unit 3017a generates a text position cost image in which the pixel value of the designated area is “0” and the pixel value of the other area is “1”. That is, the cost calculation unit 3017a reduces the cost of the designated area.
 このように、本実施形態によれば、ユーザは、テキストを合成する位置を指定可能であり、画像処理部3140aは、指定されたテキスト位置のコストを低くして合成領域を決定する。これにより、第7の実施形態と同様の効果のみならず、更に、ユーザが指定した位置を優先的にテキストデータの合成領域として選択することができる。 As described above, according to the present embodiment, the user can designate the position where the text is to be synthesized, and the image processing unit 3140a determines the synthesis area by reducing the cost of the designated text position. Thereby, not only the same effect as in the seventh embodiment but also a position designated by the user can be preferentially selected as a text data synthesis region.
(第9の実施形態)
 次に、この発明の第9の実施形態による画像処理部(画像処理装置)3140bについて説明する。
 図31は、本実施形態による画像処理部3140bの機能構成を示すブロック図である。本図において、図25に示す画像処理部3140と同一の部分には同一の符号を付し、その説明を省略する。画像処理部3140bは、図25に示す画像処理部3140の構成に加えて第2の位置入力部3031を備える。
 第2の位置入力部3031は、X軸方向(幅方向)又はY軸方向(高さ方向)いずれかにおけるテキスト位置(第2の位置)の入力を受け付ける。テキスト位置とは、画像データにおいてテキストを合成する位置である。例えば、第2の位置入力部3031は、画像入力部3011に入力された画像データを表示部1150に表示し、表示部1150に設置されたタッチパネルにおいてユーザから指定された位置をテキスト位置とする。或いは、第2の位置入力部3031は、直接テキスト位置のX座標値x又はY座標値yの入力を受け付けてもよい。第2の位置入力部3031は、テキスト位置のX座標値x又はY座標値yを領域決定部3018bに出力する。
(Ninth embodiment)
Next, an image processing unit (image processing apparatus) 3140b according to a ninth embodiment of the present invention will be described.
FIG. 31 is a block diagram illustrating a functional configuration of the image processing unit 3140b according to the present embodiment. In this figure, the same parts as those of the image processing unit 3140 shown in FIG. 25 are denoted by the same reference numerals, and the description thereof is omitted. The image processing unit 3140b includes a second position input unit 3031 in addition to the configuration of the image processing unit 3140 shown in FIG.
The second position input unit 3031 accepts input of a text position (second position) in either the X-axis direction (width direction) or the Y-axis direction (height direction). The text position is a position where the text is synthesized in the image data. For example, the second position input unit 3031 displays the image data input to the image input unit 3011 on the display unit 1150, and sets the position specified by the user on the touch panel installed on the display unit 1150 as the text position. Alternatively, the second position input unit 3031 may directly accept the input of the X coordinate value x 2 or the Y coordinate value y 2 of the text position. The second position input unit 3031 outputs the X-coordinate value x 2 or Y-coordinate value y 2 of the text located in the region determination unit 3018B.
 領域決定部3018bは、第2の位置入力部3031により幅方向の位置xが指定された場合、上述した式(11)においてX座標値をxに固定させてc text(x,y)が最小となるY座標値yminを求める。そして、領域決定部3018bは、位置(x,ymin)を合成位置とする。 When the position x 2 in the width direction is designated by the second position input unit 3031, the region determination unit 3018 b fixes the X coordinate value to x 2 in the above-described formula (11) and sets c * text (x 2 , A Y coordinate value y min that minimizes y) is obtained. Then, the region determination unit 3018b sets the position (x 2 , y min ) as the synthesis position.
 また、領域決定部3018bは、第2の位置入力部3031により高さ方向の位置yが指定された場合、上述した式(11)においてY座標値をyに固定させてc text(x,y)が最小となるxminを求める。そして、領域決定部3018bは、位置(xmin,y)を合成位置とする。 In addition, when the position y 2 in the height direction is designated by the second position input unit 3031, the region determination unit 3018 b fixes the Y coordinate value to y 2 in the above-described equation (11), and c * text ( x min where x, y 2 ) is minimized is obtained. Then, the region determination unit 3018b sets the position (x min , y 2 ) as the synthesis position.
 次に、図32を参照して、画像処理部3140bによる合成処理について説明する。図32は、本実施形態による合成処理の手順を示すフローチャートである。
 ステップS3401からS3403までの処理は、上述したステップS3101からS3103までの処理と同様である。
 ステップS3403に続いて、ステップS3404において、第2の位置入力部3031は、テキスト位置のX座標値x又はY座標値yの入力を受け付ける。
 ステップS3405からS3411までの処理は、上述したステップS3104からS3110までの処理と同様である。
Next, with reference to FIG. 32, the composition processing by the image processing unit 3140b will be described. FIG. 32 is a flowchart showing the procedure of the synthesis process according to this embodiment.
The processing from step S3401 to S3403 is the same as the processing from step S3101 to S3103 described above.
Following step S3403, in step S3404, the second position input unit 3031 receives an X input of the coordinate values x 2 or Y-coordinate value y 2 text position.
The processing from step S3405 to S3411 is the same as the processing from step S3104 to S3110 described above.
 ステップS3411に続いて、ステップS3412において、領域決定部3018bが、指定されたテキスト位置のX座標値x又はY座標値yと、テキストデータの文字サイズと、最終コスト画像とに基づいて、画像データにおけるテキストの合成領域を決定する。
 最後に、ステップS3413において、合成部3019が、決定された合成領域にテキストデータのテキストを重畳して、画像データとテキストデータとを合成する。
Following step S3411, in step S3412, the area determining portion 3018b is the X coordinate value x 2 or Y-coordinate value y 2 in the specified text position, a character size of the text data, based on the final cost image, A text synthesis area in image data is determined.
Finally, in step S3413, the synthesis unit 3019 superimposes the text data on the determined synthesis area to synthesize the image data and the text data.
 このように、本実施形態によれば、テキストを合成する位置の幅方向又は高さ方向の座標を指定することができる。画像処理部3140bは、指定された幅方向又は高さ方向の位置のうち最終コスト画像基づく最適な領域を合成領域とする。これにより、ユーザの所望する領域であって、最適な領域(例えば、テキストの可読性の高い領域、人の顔のない領域、或いは、重要位置以外の領域)にテキストを重畳することができる。 As described above, according to the present embodiment, it is possible to specify the coordinate in the width direction or the height direction of the position where the text is synthesized. The image processing unit 3140b sets the optimum region based on the final cost image among the designated positions in the width direction or height direction as the synthesis region. As a result, the text can be superimposed on an optimum area (for example, an area with high text readability, an area without a human face, or an area other than the important position) which is an area desired by the user.
 また、図27,図28,図30又は図32に示す各ステップを実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、画像データとテキストデータとを合成する処理を行ってもよい。 Further, a program for realizing each step shown in FIG. 27, FIG. 28, FIG. 30 or FIG. 32 is recorded on a computer-readable recording medium, and the program recorded on this recording medium is read into a computer system. By executing the processing, the image data and the text data may be combined.
 また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。
 また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。
 さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium.
The program may be for realizing a part of the functions described above.
Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.
 また、上述した実施形態では、画像データにおける全ての領域を合成領域の候補としたが、画像データの余白を考慮し、余白以外の領域を合成領域の候補としてもよい。この場合、文字サイズ決定部3016は、以下の式(14)を満たすfを文字サイズとする。 In the above-described embodiment, all the regions in the image data are set as the synthesis region candidates. However, in consideration of the margin of the image data, a region other than the margin may be set as the synthesis region candidate. In this case, the character size determination unit 3016 sets f satisfying the following expression (14) as the character size.
Figure JPOXMLDOC01-appb-M000012
Figure JPOXMLDOC01-appb-M000012
 ただし、Mは幅方向の余白の大きさを示すパラメータであり、Mは高さ方向の余白の大きさを示すパラメータである。なお、パラメータMとパラメータMとは同じ値(M=M=M)でもよい。コスト算出部3017,3017aは、画像データにおいて余白を除く領域の最終コスト画像を生成する。また、領域決定部3018,3018bは、余白を除く領域(M<x<w-M,M<y<h-M)から合成領域を選択する。 However, M 1 is a parameter indicating the size of the width direction of the margin, M 2 is a parameter indicating the size of the height direction of the margin. The parameter M 1 and the parameter M 2 may be the same value (M 1 = M 2 = M). The cost calculation units 3017 and 3017a generate a final cost image of an area excluding the margin in the image data. Further, the region determination units 3018 and 3018b select a composite region from regions excluding margins (M 1 <x <w−M 1 , M 2 <y <h−M 2 ).
 また、本実施形態では、第1の位置入力部3013により重要位置を入力しているが、予め設定された所定位置(例えば、画像データの中央)を重要位置としてグローバルコスト画像を生成してもよい。例えば、画像データの中央を重要位置とする場合、コスト算出部3017,3017aは、次の式(15)によりグローバルコスト画像を生成する。 In the present embodiment, the important position is input by the first position input unit 3013. However, even if a global cost image is generated using a predetermined position (for example, the center of the image data) as the important position. Good. For example, when the center of the image data is an important position, the cost calculation units 3017 and 3017a generate a global cost image according to the following equation (15).
Figure JPOXMLDOC01-appb-M000013
Figure JPOXMLDOC01-appb-M000013
 ただし、S(>0)はコストの広がり方を決めるパラメータである。 However, S (> 0) is a parameter that determines how the cost spreads.
 また、重要位置が予め決っている場合、グローバルコスト画像は画像サイズによって決るため、画像サイズ毎に予めグローバルコスト画像を用意して記憶部1160に記憶しておいてもよい。コスト算出部3017,3017aは、入力画像の画像サイズに応じたグローバルコスト画像を記憶部1160から読み出して最終コスト画像を生成する。これにより、テキストデータを画像データに合成する処理毎にグローバルコスト画像を生成する必要がなくなるため、全体の処理時間が短縮される。 If the important position is determined in advance, the global cost image is determined by the image size. Therefore, a global cost image may be prepared in advance for each image size and stored in the storage unit 1160. The cost calculation units 3017 and 3017a read a global cost image corresponding to the image size of the input image from the storage unit 1160 and generate a final cost image. This eliminates the need to generate a global cost image for each process of combining text data with image data, thereby reducing the overall processing time.
 また、上述した実施形態では、人物の顔の領域に基づく顔コスト画像を生成しているが、任意の特徴量(例えば、物体や動物等)に基づくコスト画像を生成してもよい。この場合、コスト算出部3017,3017aは、特徴量の領域のコストが高い特徴量コスト画像を生成する。例えば、コスト算出部3017,3017aは、物体認識等により検出した特徴量の領域の画素値を「1」とし、その他の領域の画素値を「0」とする特徴量コスト画像を生成する。そして、コスト算出部3017は、特徴量コスト画像に基づいて最終コスト画像を生成する。 In the above-described embodiment, a face cost image based on a person's face region is generated. However, a cost image based on an arbitrary feature amount (for example, an object or an animal) may be generated. In this case, the cost calculation units 3017 and 3017a generate feature amount cost images in which the cost of the feature amount region is high. For example, the cost calculation units 3017 and 3017a generate a feature amount cost image in which the pixel value of the region of the feature amount detected by object recognition or the like is “1” and the pixel value of the other region is “0”. Then, the cost calculation unit 3017 generates a final cost image based on the feature amount cost image.
 また、領域決定部3018,3018bは、テキスト矩形領域内のコストの総和c text(x,y)を算出する前に、次の式(16)により、予め全ての座標位置(x,y)に対して微分画像を生成しておいてもよい。 Further, the area determination units 3018 and 3018b calculate all the coordinate positions (x, y) in advance by the following equation (16) before calculating the total cost c * text (x, y) in the text rectangular area. Alternatively, a differential image may be generated.
Figure JPOXMLDOC01-appb-M000014
Figure JPOXMLDOC01-appb-M000014
 この場合、領域決定部3018,3018bは、テキスト矩形領域内のコストの総和c text(x,y)を次の式(17)により算出する。 In this case, the area determination units 3018 and 3018b calculate the total cost c * text (x, y) in the text rectangular area by the following equation (17).
Figure JPOXMLDOC01-appb-M000015
Figure JPOXMLDOC01-appb-M000015
 図33は、テキスト矩形領域内のコストの総和の算出方法を示すイメージ図である。
 本図に示すように、式(17)を用いると、4回の演算でテキスト矩形領域内のコストの総和c text(x,y)を算出することができる。これにより、上述した式(11)によりテキスト矩形領域内のコストの総和c text(x,y)を算出する場合と比べて処理時間を短縮することができる。
FIG. 33 is an image diagram showing a method of calculating the total cost in the text rectangular area.
As shown in this figure, when the equation (17) is used, the total cost c * text (x, y) in the text rectangular area can be calculated by four operations. As a result, the processing time can be shortened compared to the case where the total cost c * text (x, y) in the text rectangular area is calculated by the above-described equation (11).
(第10の実施形態)
 本実施形態による撮像装置の機能ブロック図は、第2の実施形態に係る図8に示されるものと同様である。
 以下では、第2の実施形態とは異なる部分について詳しく説明する。
 図34は、本発明の第10の実施形態に係る画像処理部(画像処理装置)4140(図8における画像処理部1140)の機能構成を示すブロック図である。
 図34に示すように、本実施形態に係る画像処理部4140は、画像入力部4011と、テキスト設定部4012と、テキスト合成領域設定部4013と、フォント設定部4014と、合成画像生成部4015と、記憶部4016と、を含んで構成される。
 フォント設定部4014は、フォントカラー設定部4021を含んで構成される。
(Tenth embodiment)
The functional block diagram of the imaging apparatus according to the present embodiment is the same as that shown in FIG. 8 according to the second embodiment.
Hereinafter, parts different from those of the second embodiment will be described in detail.
FIG. 34 is a block diagram showing a functional configuration of an image processing unit (image processing apparatus) 4140 (the image processing unit 1140 in FIG. 8) according to the tenth embodiment of the present invention.
As shown in FIG. 34, the image processing unit 4140 according to this embodiment includes an image input unit 4011, a text setting unit 4012, a text composition region setting unit 4013, a font setting unit 4014, and a composite image generation unit 4015. And a storage unit 4016.
The font setting unit 4014 includes a font color setting unit 4021.
 画像入力部4011は、静止画や動画やスルー画の画像データを入力する。画像入力部4011は、入力した画像データをテキスト設定部4012に出力する。
 ここで、画像入力部4011は、例えば、A/D変換部1120から出力される画像データや、バッファメモリ部1130に記憶された画像データや、記憶媒体1200に記憶された画像データを入力する。
 なお、他の例として、画像入力部4011が、ネットワーク(図示せず)を介して画像データを入力する構成が用いられてもよい。
The image input unit 4011 inputs image data of a still image, a moving image, or a through image. The image input unit 4011 outputs the input image data to the text setting unit 4012.
Here, the image input unit 4011 inputs, for example, image data output from the A / D conversion unit 1120, image data stored in the buffer memory unit 1130, or image data stored in the storage medium 1200.
As another example, a configuration in which the image input unit 4011 inputs image data via a network (not shown) may be used.
 テキスト設定部4012は、画像入力部4011から画像データを入力し、この画像データに重畳(合成)するテキストのデータを設定する。テキスト設定部4012は、この画像データと、設定したテキストのデータをテキスト合成領域設定部4013に出力する。
 なお、このテキストのデータには、例えば、テキストを構成する文字のサイズの情報などが含まれてもよい。
A text setting unit 4012 receives image data from the image input unit 4011 and sets text data to be superimposed (synthesized) on the image data. The text setting unit 4012 outputs the image data and the set text data to the text composition area setting unit 4013.
The text data may include, for example, information on the size of characters constituting the text.
 ここで、画像データに対して、この画像データに重畳するテキストのデータを設定する手法としては、任意の手法が用いられてもよい。
 一例として、予め固定的に定められたテキストのデータを記憶部4016に記憶しておき、テキスト設定部4012がそのテキストのデータを記憶部4016から読み出して設定してもよい。
 他の例として、ユーザが操作部1180を操作して指定したテキストのデータをテキスト設定部4012が検出して設定してもよい。
Here, any method may be used as a method of setting text data to be superimposed on the image data.
As an example, text data fixedly determined in advance may be stored in the storage unit 4016, and the text setting unit 4012 may read the text data from the storage unit 4016 and set it.
As another example, the text setting unit 4012 may detect and set text data designated by the user by operating the operation unit 1180.
 また、他の例として、画像データに基づいてテキストのデータを決定する規則を記憶部4016に記憶しておき、テキスト設定部4012がその規則を記憶部4016から読み出して、その規則に従って、画像データからテキストのデータを決定して設定してもよい。この規則としては、例えば、画像データが有する所定の特徴あるいは所定の特徴量などとテキストのデータとの対応関係を定める規則を用いることができ、この場合、テキスト設定部4012は、画像データについて所定の特徴あるいは所定の特徴量などを検出し、前記した規則(前記した対応関係)に従って、この検出結果に対応するテキストのデータを決定する。 As another example, a rule for determining text data based on image data is stored in the storage unit 4016, and the text setting unit 4012 reads the rule from the storage unit 4016, and the image data is read according to the rule. Text data may be determined and set. As this rule, for example, a rule that defines the correspondence between a predetermined feature or a predetermined feature amount of image data and text data can be used. In this case, the text setting unit 4012 sets a predetermined feature for the image data. Or a predetermined feature amount is detected, and text data corresponding to the detection result is determined according to the above-described rule (the above-described correspondence).
 テキスト合成領域設定部4013は、テキスト設定部4012から画像データと、設定されたテキストのデータを入力し、この画像データにこのテキストのデータを合成する領域(テキスト合成領域)を設定する。テキスト合成領域設定部4013は、この画像データと、設定されたテキストのデータと、設定したテキスト合成領域を特定する情報をフォント設定部4014に出力する。 The text composition area setting unit 4013 receives the image data and the set text data from the text setting section 4012, and sets an area (text composition area) for synthesizing the text data with the image data. The text composition area setting unit 4013 outputs the image data, the set text data, and information for specifying the set text composition area to the font setting unit 4014.
 ここで、画像データに対して、テキストのデータを合成する領域(テキスト合成領域)を設定する手法としては、任意の手法が用いられてもよい。
 一例として、予め固定的に定められたテキスト合成領域を記憶部4016に記憶しておき、テキスト合成領域設定部4013がそのテキスト合成領域を記憶部4016から読み出して設定してもよい。
 他の例として、ユーザが操作部1180を操作して指定したテキスト合成領域をテキスト合成領域設定部4013が検出して設定してもよい。
Here, any method may be used as a method of setting a region (text combining region) in which text data is combined with image data.
As an example, a fixed text synthesis area may be stored in the storage unit 4016, and the text synthesis area setting unit 4013 may read the text synthesis area from the storage unit 4016 and set it.
As another example, the text composition region setting unit 4013 may detect and set a text composition region designated by the user operating the operation unit 1180.
 また、他の例として、画像データに基づいてテキスト合成領域を決定する規則を記憶部4016に記憶しておき、テキスト合成領域設定部4013がその規則を記憶部4016から読み出して、その規則に従って、画像データからテキスト合成領域を決定して設定してもよい。この規則としては、例えば、画像中で相対的に重要な被写体が写っている重要領域以外の非重要領域にテキストを重畳させるようにテキスト合成領域を決定する規則を用いることができる。具体例として、人物が写っている領域を重要領域に分類し、画像の中央を含まない非重要領域中にテキストを重畳させるような構成を用いることができる。また、他の様々な規則が用いられてもよい。 As another example, a rule for determining a text composition area based on image data is stored in the storage unit 4016, and the text composition area setting unit 4013 reads the rule from the storage unit 4016, and according to the rule, The text synthesis area may be determined and set from the image data. As this rule, for example, a rule for determining a text synthesis area so that text is superimposed on a non-important area other than an important area where a relatively important subject is captured in an image can be used. As a specific example, it is possible to use a configuration in which an area in which a person is captured is classified as an important area, and text is superimposed on a non-important area that does not include the center of the image. Various other rules may also be used.
 また、本実施形態では、テキスト合成領域設定部4013は、例えば、設定されたテキストの全体がテキスト合成領域に収まらないほどに、予め設定されたテキストの文字のサイズが大きいときには、設定されたテキストの全体がテキスト合成領域に収まるように、テキストの文字のサイズを小さくする変更を行う。 In the present embodiment, the text composition area setting unit 4013, for example, sets the set text when the size of the preset text is large enough that the set text does not fit in the text composition area. The size of the text is changed to be small so that the whole of the text fits in the text composition area.
 ここで、テキスト合成領域としては、様々な形状の領域が用いられてもよく、例えば、長方形や正方形といった矩形の枠で囲われた内部の領域を用いることができる。他の例として、テキスト合成領域として、一部または全部が曲線から構成される枠で囲われた内部の領域が用いられてもよい。 Here, various shapes of regions may be used as the text composition region, and for example, an internal region surrounded by a rectangular frame such as a rectangle or a square can be used. As another example, an internal area surrounded by a frame partially or entirely made of a curve may be used as the text synthesis area.
 フォント設定部4014は、テキスト合成領域設定部4013から画像データと、設定されたテキストのデータと、設定されたテキスト合成領域を特定する情報を入力し、これらの1つ以上に基づいて、このテキストのデータのフォント(少なくともフォントカラーを含む)を設定する。フォント設定部4014は、この画像データと、設定されたテキストのデータと、設定されたテキスト合成領域を特定する情報と、設定したフォントを特定する情報を合成画像生成部4015に出力する。 The font setting unit 4014 inputs image data, set text data, and information for specifying the set text composition region from the text composition region setting unit 4013, and based on one or more of these, this text Set the data font (including at least the font color). The font setting unit 4014 outputs this image data, set text data, information for specifying the set text composition area, and information for specifying the set font to the composite image generation unit 4015.
 ここで、本実施形態では、フォント設定部4014は、主に、フォントカラー設定部4021により、テキストのデータのフォントカラーを設定する。本実施形態では、フォントカラーは、フォントの一つとして、フォントに含まれるものである。
 このため、本実施形態では、フォントカラー以外のフォントについては、任意であってもよく、例えば、予め固定的に設定されてもよい。
Here, in the present embodiment, the font setting unit 4014 mainly sets the font color of the text data by the font color setting unit 4021. In the present embodiment, the font color is included in the font as one of the fonts.
For this reason, in this embodiment, fonts other than the font color may be arbitrary, for example, may be fixedly set in advance.
 フォントカラー設定部4021は、テキスト合成領域設定部4013からフォント設定部4014に入力された画像データとテキスト合成領域に基づいて、テキスト合成領域設定部4013からフォント設定部4014に入力されたテキストのデータのフォントカラーを設定する。
 なお、フォントカラー設定部4021によりフォントカラーを設定する際に、例えば、テキスト合成領域設定部4013からフォント設定部4014に入力されたテキストのデータも考慮されてもよい。
The font color setting unit 4021 is text data input from the text composition region setting unit 4013 to the font setting unit 4014 based on the image data and text composition region input from the text composition region setting unit 4013 to the font setting unit 4014. Set the font color.
Note that when setting the font color by the font color setting unit 4021, for example, text data input from the text composition region setting unit 4013 to the font setting unit 4014 may be considered.
 合成画像生成部4015は、フォント設定部4014から画像データと、設定されたテキストのデータと、設定されたテキスト合成領域を特定する情報と、設定されたフォントを特定する情報を入力し、この画像データのこのテキスト合成領域にこのフォント(少なくともフォントカラーを含む)でこのテキストのデータを合成した画像のデータ(合成画像のデータ)を生成する。 The composite image generation unit 4015 inputs image data, set text data, information for specifying the set text composition area, and information for specifying the set font from the font setting unit 4014, Image data (composite image data) obtained by synthesizing the text data with the font (including at least the font color) is generated in the text synthesis area of the data.
 そして、合成画像生成部4015は、生成した合成画像のデータを、例えば、表示部1150や、バッファメモリ部1130や、(通信部1170を介して)記憶媒体1200の1つ以上に出力する。
 なお、他の例として、合成画像生成部4015が、生成した合成画像のデータをネットワーク(図示せず)に出力する構成が用いられてもよい。
Then, the composite image generation unit 4015 outputs the generated composite image data to, for example, one or more of the storage unit 1200 (via the communication unit 1170), the display unit 1150, the buffer memory unit 1130, and the like.
As another example, a configuration in which the composite image generation unit 4015 outputs data of the generated composite image to a network (not shown) may be used.
 記憶部4016は、各種の情報を記憶する。例えば、本実施形態では、記憶部4016は、テキスト設定部4012により参照される情報や、テキスト合成領域設定部4013により参照される情報や、フォント設定部4014(フォントカラー設定部4021を含む)により参照される情報を記憶する。 The storage unit 4016 stores various types of information. For example, in the present embodiment, the storage unit 4016 includes information that is referred to by the text setting unit 4012, information that is referred to by the text composition region setting unit 4013, and a font setting unit 4014 (including the font color setting unit 4021). Store referenced information.
 次に、フォント設定部4014において行われる処理について詳しく説明する。
 本実施形態では、フォントとして、フォントカラーのみを設定し、他のフォントについては任意でよいため、フォントカラー設定部4021により行われるフォントカラーの設定処理について説明する。
Next, processing performed in the font setting unit 4014 will be described in detail.
In the present embodiment, only the font color is set as the font, and any other font may be set. Therefore, the font color setting process performed by the font color setting unit 4021 will be described.
 まず、色の表現方法の一つである日本色研配色体系(PCCS表色系:Practical Color Coordinate System 表色系)について簡単に説明する。
 PCCS表色系は、人間の感性に基づいて色相、明度、彩度を定めている表色系である。
 また、PCCS表色系では、明度と彩度から決められるトーン(色調)という概念があり、色をトーンと色相の2つのパラメータで表すことができる。
First, the Nippon Color Research Coloring System (PCCS color system: Practical Color Coordinate System Color System), which is one of the color expression methods, will be briefly described.
The PCCS color system is a color system in which hue, brightness, and saturation are determined based on human sensitivity.
In the PCCS color system, there is a concept of a tone (tone) determined from lightness and saturation, and a color can be expressed by two parameters of tone and hue.
 このように、PCCS表色系では、色を色の三属性(色相、明度、彩度)で表すほかに、トーンの概念も定義して色をトーンと色相で表すこともできる。
 トーンは、有彩色に対して12種類が定められており、無彩色に対して5種類が定められている。
 色相は、トーンによって、24種類あるいは12種類が定められている。
As described above, in the PCCS color system, in addition to expressing the color by the three attributes of the color (hue, lightness, and saturation), the concept of tone can also be defined to express the color by tone and hue.
There are 12 types of tones for chromatic colors and 5 types for achromatic colors.
Twenty-four or twelve hues are determined depending on the tone.
 図41は、PCCS表色系の色相環の一例をグレースケールで示す図である。
 図42は、PCCS表色系のトーンの一例をグレースケールで示す図である。おおまかであるが、トーンの横軸は彩度に対応しており、トーンの縦軸は明度に対応している。
 なお、図41及び図42をカラーで示したものが、例えば、DICカラーデザイン株式会社のウェブページで公開されている。
FIG. 41 is a diagram illustrating an example of a hue circle of the PCCS color system in gray scale.
FIG. 42 is a diagram illustrating an example of a PCCS color system tone in gray scale. As a rule, the horizontal axis of the tone corresponds to the saturation, and the vertical axis of the tone corresponds to the lightness.
41 and 42 shown in color are published on, for example, the web page of DIC Color Design Co., Ltd.
 ここで、図41に示す色相環の例では、暖色系1~8、中性色系9~12、寒色系13~19、中性色系20~24というように、24種類の色相が定義されている。 In the example of the hue circle shown in FIG. 41, 24 types of hues are defined such as warm color systems 1 to 8, neutral color systems 9 to 12, cold color systems 13 to 19, and neutral color systems 20 to 24. Has been.
 また、図42に示すトーン(PCCSトーンマップ)の例では、トーンが、有彩色に対して12種類が定められており、無彩色に対して5種類が定められている。また、この例では、有彩色のトーンごとに、12種類の色相が定義されている。 In the example of the tone (PCCS tone map) shown in FIG. 42, 12 types of tones are defined for chromatic colors and 5 types are defined for achromatic colors. In this example, 12 types of hues are defined for each chromatic color tone.
 図43は、12種類の有彩色のトーンを示す図である。
 この例では、トーンの名前と、トーンの記号との対応を示す。
 具体的には、図43に示すように、12種類の有彩色のトーンとしては、ビビッドトーン(vivid tone:記号v)、ストロングトーン(strong tone:記号s)、ブライトトーン(bright tone:記号b)、ライトトーン(light tone:記号lt)、ペールトーン(pale tone:記号p)、ソフトトーン(soft tone:記号sf)、ライトグレイッシュトーン(light grayish tone:記号ltg)、ダルトーン(dull tone:記号d)、グレイッシュトーン(grayish tone:記号g)、ディープトーン(deep tone:記号dp)、ダークトーン(dark tone:記号dk)、ダークグレイッシュトーン(dark grayish tone:記号dkg)がある。
FIG. 43 is a diagram illustrating twelve chromatic color tones.
In this example, the correspondence between tone names and tone symbols is shown.
Specifically, as shown in FIG. 43, twelve chromatic tones include vivid tone (symbol v), strong tone (symbol s), and bright tone (bright tone: symbol b). ), Light tone (symbol lt), pale tone (symbol p), soft tone (soft tone: sf), light grayish tone (symbol ltg), dull tone (symbol) d), gray tone tone (symbol g), deep tone (symbol dp), dark tone (symbol dk), dark gray tone tone (dark gray tone) Symbol dkg) there is.
 図44は、5種類の無彩色のトーンを示す図である。
 この例では、トーンの名前と、トーンの記号と、PCCSの番号と、R(赤)の値と、G(緑)の値と、B(青)の値との対応を示す。
 具体的には、図44に示すように、5種類の無彩色のトーンとして、ホワイトトーン(white tone:記号W)、ライトグレイトーン(light gray tone:記号ltGy)、ミディアムグレイトーン(medium gray tone:記号mGy)、ダークグレイトーン(dark gray tone:記号dkGy)、ブラックトーン(black tone:記号Bk)がある。
FIG. 44 is a diagram showing five types of achromatic tones.
In this example, the correspondence between the tone name, tone symbol, PCCS number, R (red) value, G (green) value, and B (blue) value is shown.
Specifically, as shown in FIG. 44, as the five types of achromatic tones, white tone (white tone: symbol W), light gray tone (symbol ltGy), medium gray tone (medium gray tone) : Symbol mGy), dark gray tone (symbol dkGy), and black tone (symbol Bk).
 なお、無彩色のトーンにおけるPCCS表色系の番号とRGB値との対応は、ウェブページ“http://www.wsj21.net/ghp/ghp0c_03.html”の色表に従ったものである。 Note that the correspondence between the PCCS color system number and the RGB value in the achromatic color tone is in accordance with the color table of the web page “http://www.wsj21.net/ghp/ghp0c — 03.html”.
 続いて、フォントカラー設定部4021により行われる処理について説明する。
 フォントカラー設定部4021は、PCCS表色系に基づいて、テキスト合成領域設定部4013からフォント設定部4014に入力された画像データとテキスト合成領域に基づいて、テキスト合成領域設定部4013からフォント設定部4014に入力されたテキストのデータのフォントカラーを設定する。
Next, processing performed by the font color setting unit 4021 will be described.
The font color setting unit 4021 is based on the PCCS color system, based on the image data and the text composition region input from the text composition region setting unit 4013 to the font setting unit 4014, and based on the text composition region setting unit 4013. In 4014, the font color of the text data input is set.
 ここで、本実施形態では、画像中にテキストを表示するときのフォントカラーを設定する際には、テキスト合成領域設定部4013により画像中に表示するテキストの位置(テキスト合成領域)の最適化などが行われており、画像中にテキストを表示するときのこの画像中における位置(テキスト合成領域)が定められている。 Here, in this embodiment, when setting the font color for displaying text in the image, the text composition area setting unit 4013 optimizes the position of the text displayed in the image (text composition area). The position in the image (text synthesis area) when the text is displayed in the image is determined.
 フォントカラー設定部4021は、まず、テキスト合成領域設定部4013からフォント設定部4014に入力された画像データとテキスト合成領域に基づいて、この画像データにおけるこのテキスト合成領域の平均色(画像中においてテキストを表示する画像領域の平均色)を算出する。 The font color setting unit 4021 first determines the average color of the text composition area in the image data (text in the image based on the image data and the text composition area input from the text composition area setting unit 4013 to the font setting unit 4014). The average color of the image area in which is displayed.
 具体的には、フォントカラー設定部4021は、テキスト合成領域設定部4013からフォント設定部4014に入力された画像データとテキスト合成領域に基づいて、この画像データにおけるこのテキスト合成領域の内部の画素(ピクセル)について、Rごとの平均値と、Gごとの平均値と、Bごとの平均値を算出し、これらR、G、Bの平均値の組み合わせをRGBの平均色として求める。そして、フォントカラー設定部4021は、記憶部4016に記憶されたRGB系からPCCS表色系への変換表の情報4031に基づいて、求めたRGBの平均色をPCCS表色系のトーンと色相へ変換し、これにより得られるPCCS表色系のトーンと色相をPCCS表色系の平均色とする。 Specifically, the font color setting unit 4021 is based on the image data input to the font setting unit 4014 from the text composition region setting unit 4013 and the text composition region, and the pixels inside the text composition region in this image data ( For the pixel), an average value for each R, an average value for each G, and an average value for each B are calculated, and a combination of these R, G, and B average values is obtained as an RGB average color. The font color setting unit 4021 then converts the obtained average RGB color to the tone and hue of the PCCS color system based on the conversion table information 4031 from the RGB system to the PCCS color system stored in the storage unit 4016. The tone and hue of the PCCS color system obtained by conversion are used as the average color of the PCCS color system.
 ここで、画像データにおけるテキスト合成領域の内部の画素の各々にはR、G、Bのそれぞれの値(例えば、0~255の値)があり、このテキスト合成領域の内部の画素の全てについて、Rごと、Gごと、Bごとに値を加算して、それぞれの加算結果を全ての画素の数で割った結果がRごと、Gごと、Bごとの平均値となり、これらR、G、Bの平均値の組み合わせをRGBの平均色とする。 Here, each of the pixels inside the text composition area in the image data has respective values of R, G, and B (for example, values of 0 to 255). The value is added for each R, G, and B, and the result of dividing each addition result by the number of all pixels is the average value for each R, G, and B. A combination of average values is an RGB average color.
 また、RGBの平均色をPCCS表色系のトーンと色相へ変換する際に参照される、RGB系からPCCS表色系への変換表の情報4031により特定される変換表は、RGBの平均色と、PCCS表色系のトーンと色相との対応を規定する。
 このような変換表としては、様々な変換内容のものが用いられてもよく、通常、RGBの取り得る値の方がPCCS表色系の取り得る値よりも多いため、RGBの値とPCCS表色系の値との対応は多対1の対応となる。この場合、幾つかの異なるRGBの値が、その代表となる同一のPCCS表色系の値へ変換される。
The conversion table specified by the conversion table information 4031 from the RGB system to the PCCS color system, which is referred to when converting the RGB average color to the tone and hue of the PCCS color system, is an RGB average color. And the correspondence between the tone and hue of the PCCS color system.
As such a conversion table, those having various conversion contents may be used. Usually, since RGB can take more values than the PCCS color system, RGB values and PCCS tables can be used. The correspondence with the values of the color system is a many-to-one correspondence. In this case, several different RGB values are converted into the same PCCS color system value as the representative value.
 なお、本実施形態では、変換表に基づいて、RGBの平均色をPCCS表色系のトーンと色相へ変換するが、他の例として、RGBの平均色をPCCS表色系のトーンと色相へ変換する内容を規定する変換式の情報を記憶部4016に記憶しておいて、フォントカラー設定部4021が、この変換式の情報を記憶部4016から読み出して、その変換式の算出を行うことで、RGBの平均色をPCCS表色系のトーンと色相へ変換する構成が用いられてもよい。 In the present embodiment, the average RGB color is converted into the PCCS color system tone and hue based on the conversion table. However, as another example, the RGB average color is converted into the PCCS color system tone and hue. The storage unit 4016 stores conversion formula information that defines the content to be converted, and the font color setting unit 4021 reads the conversion formula information from the storage unit 4016 and calculates the conversion formula. Alternatively, a configuration may be used in which average RGB colors are converted into PCCS color system tones and hues.
 フォントカラー設定部4021は、次に、求めたPCCS表色系の平均色であるPCCS表色系のトーンと色相に基づいて、テキスト合成領域設定部4013からフォント設定部4014に入力されたテキストのデータのフォントカラー(色)を設定する。
 具体的には、フォントカラー設定部4021は、求めたPCCS表色系の平均色であるPCCS表色系のトーンと色相に対して、その色相はそのままとして、記憶部4016に記憶されたトーン変換表の情報4032に基づいて、そのトーンのみを変えることで、テキスト合成領域設定部4013からフォント設定部4014に入力されたテキストのデータのフォントカラー(色)を設定する。
 このように設定されたフォントカラーを特定する情報は、フォント設定部4014により、フォントを特定する情報に含められて、合成画像生成部4015に出力される。
Next, the font color setting unit 4021 determines the text input from the text composition region setting unit 4013 to the font setting unit 4014 based on the PCCS color system tone and hue, which are the average colors of the PCCS color system. Set the font color of the data.
Specifically, the font color setting unit 4021 performs tone conversion stored in the storage unit 4016 while maintaining the hue as it is for the tone and hue of the PCCS color system, which is the average color of the obtained PCCS color system. Based on the table information 4032, only the tone is changed to set the font color (color) of the text data input from the text composition region setting unit 4013 to the font setting unit 4014.
The information specifying the font color set in this way is included in the information specifying the font by the font setting unit 4014 and output to the composite image generating unit 4015.
 ここで、フォントカラー設定部4021により求めたPCCS表色系の平均色であるPCCS表色系のトーン(tone)と色相(hue)をそれぞれt、hとおくと、フォントカラー設定部21により設定するフォントカラーのトーンtと色相hは、式()により表される。 Here, when the tone (tone) and hue (hue) of the PCCS color system, which is the average color of the PCCS color system calculated by the font color setting unit 4021, are set to t and h, respectively, the font color setting unit 21 sets them. The tone t * and the hue h * of the font color to be expressed are expressed by the formula ().
 t={tとは異なるトーン}
 h=h          ・・・(18)
t * = {tone different from t}
h * = h (18)
 本実施形態では、画像入力部4011により入力して与えられる画像の色がn階調でn種類であるのに対し、フォントカラーはPCCS表色系で定められたN種類(通常は、N<n)であるため、この時点である程度の色の差が出ていてある程度のフォントのアウトラインが得られていることになる。
 なお、一般のデジタル画像で用いられているn=256階調であれば、画像の色は256=16777216種類となる。
 また、一例として、1つのトーンにつき多めに見積もって24種類の色相があるとすると、フォントカラーはN=12×24+5=293種類となる。
In the present embodiment, the image color input and given by the image input unit 4011 has n gradations and n 3 types of colors, whereas the font colors are N types (usually N colors) defined by the PCCS color system. Since <n 3 ), there is a certain color difference at this point, and a certain font outline is obtained.
Note that if n = 256 gradations used in a general digital image, the color of the image is 256 3 = 16777216.
Further, as an example, if there are 24 types of hues estimated to be large per tone, the font color is N = 12 × 24 + 5 = 293 types.
 このように、本実施形態では、画像データにおいてテキストのデータを配置するテキスト合成領域の平均色に対して、PCCS表色系の色相はそのままでトーンを変えたフォントカラーをこのテキストのデータに適用することで、例えば、この画像データとこのテキストのデータを合成した画像を表示する場合に、画像の印象を変えずにテキストが読み易いような(コントラストのある)フォントカラーを設定することができる。 As described above, in this embodiment, the font color in which the tone of the PCCS color system is changed is applied to the text data with respect to the average color of the text composition area in which the text data is arranged in the image data. Thus, for example, when displaying an image obtained by combining the image data and the text data, it is possible to set a font color (with contrast) that makes the text easy to read without changing the impression of the image. .
 ここで、フォントカラー設定部4021により行われる、PCCS表色系のトーンを変える処理について説明する。
 図35は、PCCS表色系におけるトーンによる対照の調和の関係を示す図である。
 なお、図35の内容は、例えば、DICカラーデザイン株式会社のウェブページで公開されている。
Here, processing for changing the tone of the PCCS color system performed by the font color setting unit 4021 will be described.
FIG. 35 is a diagram showing the relationship of the harmony of the contrast by the tone in the PCCS color system.
Note that the contents of FIG. 35 are disclosed, for example, on the web page of DIC Color Design Co., Ltd.
 本実施形態では、変換前のトーンと変換後のトーンとの対応を規定するトーン変換表の情報4032が記憶部4016に記憶される。
 このトーン変換表の内容(変換前のトーンと変換後のトーンとの対応)としては、様々なものが設定されて用いられてもよく、一例として、予め、図35に示されるPCCS表色系におけるトーンによる対照の調和の関係を考慮して設定される。
In this embodiment, information 4032 of the tone conversion table that defines the correspondence between the tone before conversion and the tone after conversion is stored in the storage unit 4016.
Various contents may be set and used as the contents of the tone conversion table (correspondence between the tone before conversion and the tone after conversion). As an example, the PCCS color system shown in FIG. Is set in consideration of the relationship of the harmony of the contrast by tone.
 具体的には、例えば、暗めのトーンに対しては、ホワイトまたはライトグレイのトーンを割り当てる。
 また、明るめのトーンに対しては、例えば図35に示される対照の調和の関係がある他のトーンを割り当てる。あるいは、有彩色で、対照の調和の関係があるものを割り当てることもできる。
Specifically, for example, a white tone or a light gray tone is assigned to a dark tone.
For the bright tone, for example, another tone having a harmonious relationship of contrast shown in FIG. 35 is assigned. Alternatively, a chromatic color having a harmonious relationship with a contrast can be assigned.
 また、対照の調和の関係に基づいて、変換前のトーンに対応する変換後のトーンの候補が2つ以上ある場合には、これらの候補の中で、例えば、有彩色である方を採用し、さらに、鮮やかな方のトーン(例えば、最も鮮やかなトーン)を採用する。
 例えば、図35に示される対照の調和の関係では、左下へ行くほど暗く、右へ行くほど鮮やかである。鮮やかなトーンを採用する具体例としては、dpに近い方(dp自体でもよい)を採用する。
If there are two or more tone candidates after conversion corresponding to the tone before conversion based on the harmony relationship of the contrast, among these candidates, for example, the chromatic one is adopted. Furthermore, the brighter tone (for example, the most vivid tone) is adopted.
For example, in the relationship of the harmony of the contrast shown in FIG. 35, the darker the color goes to the lower left and the brighter the color goes to the right. As a specific example of adopting a vivid tone, the one closer to dp (dp itself may be used) is adopted.
 次に、本実施形態における処理の手順を説明する。
 図36を参照して、本実施形態に係る画像処理部4140において行われる処理の手順を説明する。
 図36は、本実施形態に係る画像処理部4140において行われる処理の手順を示すフローチャートである。
Next, a processing procedure in the present embodiment will be described.
With reference to FIG. 36, a procedure of processing performed in the image processing unit 4140 according to the present embodiment will be described.
FIG. 36 is a flowchart illustrating a procedure of processing performed in the image processing unit 4140 according to the present embodiment.
 はじめに、ステップS4001において、画像入力部4011が、画像データを入力する。
 次に、ステップS4002において、テキスト設定部4012が、テキストのデータを設定する。
 次に、ステップS4003において、テキスト合成領域設定部4013が、前記画像データに前記テキストのデータを合成する場合におけるテキスト合成領域を設定する。
 次に、ステップS4004において、フォント設定部4014が、前記画像データ中に設定された前記テキスト合成領域に前記テキストのデータを合成する場合における、フォントカラーを含むフォントを設定する。
 次に、ステップS4005において、合成画像生成部4015が、設定されたフォントを前記テキストのデータに適用して、前記画像データ中に設定された前記テキスト合成領域に前記テキストのデータを合成し、これにより、合成画像のデータを生成する。
 最後に、ステップS4006において、合成画像生成部4015が、生成した合成画像のデータをバス1300を介して例えば他の構成部へ出力する。
First, in step S4001, the image input unit 4011 inputs image data.
In step S4002, the text setting unit 4012 sets text data.
In step S4003, the text composition area setting unit 4013 sets a text composition area when the text data is synthesized with the image data.
In step S4004, the font setting unit 4014 sets a font including a font color when the text data is combined with the text composition area set in the image data.
In step S4005, the composite image generation unit 4015 applies the set font to the text data to synthesize the text data in the text composition area set in the image data. Thus, the data of the composite image is generated.
Finally, in step S4006, the composite image generation unit 4015 outputs the generated composite image data to, for example, another component unit via the bus 1300.
 図37を参照して、本実施形態に係るフォント設定部4014において行われる処理の手順を説明する。
 図37は、本実施形態に係るフォント設定部4014において行われる処理の手順を示すフローチャートである。
 この処理の手順は、図36に示されるステップS4004の処理の詳細となる。
With reference to FIG. 37, a procedure of processing performed in the font setting unit 4014 according to the present embodiment will be described.
FIG. 37 is a flowchart showing a procedure of processing performed in the font setting unit 4014 according to this embodiment.
The procedure of this process is the details of the process of step S4004 shown in FIG.
 はじめに、ステップS4011において、フォント設定部4014におけるフォントカラー設定部4021が、本処理の対象となる画像データ、テキストのデータ及びテキスト合成領域について、このテキストのデータを表示するためにこの画像データ中に設定されたこのテキスト合成領域(テキストを表示する画像領域)の平均色をRGBで求める。
 次に、ステップS4012において、フォント設定部4014におけるフォントカラー設定部4021が、求めたRGBの平均色から、それに対応するPCCS表色系のトーンと色相を求める。
First, in step S4011, the font color setting unit 4021 in the font setting unit 4014 includes the image data, text data, and text composition area to be processed in this image data to display the text data. The average color of the set text composition area (image area for displaying text) is determined in RGB.
Next, in step S4012, the font color setting unit 4021 in the font setting unit 4014 obtains the corresponding PCCS color system tone and hue from the obtained average RGB color.
 次に、ステップS4013において、フォント設定部4014におけるフォントカラー設定部4021が、求めたトーンを他のトーンへ変更する。
 次に、ステップS4014において、フォント設定部4014におけるフォントカラー設定部4021が、変更後のトーン(前記他のトーン)と求めた色相そのままとの組み合わせで定められるPCCS表色系の色をフォントカラーとして設定する。
 最後に、ステップS4015において、フォント設定部4014が、フォントカラー設定部4021により設定されたフォントカラーを含むフォントを前記テキストのデータに対して設定する。
In step S4013, the font color setting unit 4021 in the font setting unit 4014 changes the obtained tone to another tone.
Next, in step S4014, the font color setting unit 4021 in the font setting unit 4014 uses the color of the PCCS color system determined by the combination of the changed tone (the other tone) and the obtained hue as it is as the font color. Set.
Finally, in step S4015, the font setting unit 4014 sets a font including the font color set by the font color setting unit 4021 for the text data.
 図38および図39を参照して、画像処理の具体例を示す。
 図38は、画像データ4901の一例をイメージで示す図である。
 図38に示す画像データ4901が、画像処理部4140の画像入力部4011により入力された場合を示す。
A specific example of image processing will be described with reference to FIGS. 38 and 39.
FIG. 38 is a diagram illustrating an example of the image data 4901.
38 shows a case where the image data 4901 shown in FIG. 38 is input by the image input unit 4011 of the image processing unit 4140.
 図39は、この場合における、合成画像のデータ4911の一例をイメージで示す図である。
 図39に示す合成画像のデータ4911が、合成画像生成部4015から出力されることで、画像処理部4140から出力される。
FIG. 39 is a diagram showing an example of the composite image data 4911 in this case.
The composite image data 4911 illustrated in FIG. 39 is output from the composite image generation unit 4015 and is output from the image processing unit 4140.
 ここで、図39に示す合成画像のデータ4911では、図38に示す画像データ4901と同じ画像において、さらに、テキスト合成領域設定部4013により設定されたテキスト合成領域4921に、テキスト設定部4012により設定されたテキストのデータ4922(図39の例では、「みんなと平日の昼に過ごした思い出 (2010/10/06)」という文字のデータ)を、フォント設定部4014により設定されたフォント(少なくともフォントカラーを含む)で表示するように、この画像データ4901とこのテキストのデータ4922が合成されている。 Here, in the composite image data 4911 shown in FIG. 39, the text setting unit 4012 further sets the text composition region 4921 set by the text composition region setting unit 4013 in the same image as the image data 4901 shown in FIG. Text data 4922 (in the example of FIG. 39, the character data “Memories spent on weekdays with everyone (2010/10/06)”) are set in the font set by the font setting unit 4014 (at least the font The image data 4901 and the text data 4922 are combined so that the image data 4901 is displayed.
 なお、図39では、テキスト合成領域4921を視覚的に理解し易くするために、合成画像のデータ4911中にテキスト合成領域4921を図示したが、本実施形態では、実際の表示においては、テキスト合成領域4921(図39の例では、矩形の枠)は表示されず、テキストのデータ4922のみが元の画像データ4901に合成されて表示される。 In FIG. 39, the text synthesis area 4921 is shown in the synthesized image data 4911 for easy understanding of the text synthesis area 4921. However, in the present embodiment, in the actual display, text synthesis is performed. An area 4921 (in the example of FIG. 39, a rectangular frame) is not displayed, and only text data 4922 is combined with the original image data 4901 and displayed.
 以上のように、本実施形態に係る画像処理部4140によれば、画像中にテキストを表示する画像領域(テキスト合成領域)の色情報を用いて、そのテキストのフォントカラーを設定する。具体的には、本実施形態に係る画像処理部4140では、前記テキスト合成領域に基づく色情報に対して、PCCS表色系において色相を変えずにトーンのみを変更したフォントカラーを設定することで、例えば、テキストを表示することによって元の画像の印象を変えないようにすることができる。 As described above, according to the image processing unit 4140 according to this embodiment, the font color of the text is set using the color information of the image area (text synthesis area) in which the text is displayed in the image. Specifically, the image processing unit 4140 according to the present embodiment sets a font color in which only the tone is changed without changing the hue in the PCCS color system, for the color information based on the text synthesis area. For example, the impression of the original image can be prevented from changing by displaying text.
 したがって、本実施形態に係る画像処理部4140によれば、静止画や動画などのテジタル画像中にテキストを表示する際に、閲覧者が読み易いように、画像中にテキストを表示する画像領域(テキスト合成領域)の色情報を考慮して、最適なフォントカラーを求めることができる。 Therefore, according to the image processing unit 4140 according to the present embodiment, when displaying text in a digital image such as a still image or a moving image, an image region (in which the text is displayed in the image so that the viewer can easily read it) The optimum font color can be obtained in consideration of the color information in the text synthesis area.
 ここで、本実施形態では、静止画である1枚の画像フレームあるいは動画を構成する1枚の画像フレーム(例えば、複数枚の画像フレームを代表するものとして選択した1枚の画像フレーム)の画像データについて、この画像データに重畳(合成)するテキストのデータや、この画像データにこのテキストのデータを合成するテキスト合成領域や、この画像データに合成するこのテキストのデータのフォントカラーを含むフォントを設定する場合を示したが、他の例として、動画を構成する2枚以上の画像フレームの画像データについて、これらの設定を行うこともできる。この場合、一例として、動画を構成する連続した2枚以上の画像フレームまたは間欠的な2枚以上の画像フレームについて、フレーム内で対応する各画素の値(例えば、RGBの値)を平均し、その平均結果からなる1枚の画像フレームの画像データ(平均化した画像データ)について、本実施形態と同様な処理を行うことができる。 Here, in the present embodiment, an image of one image frame that is a still image or one image frame that constitutes a moving image (for example, one image frame selected to represent a plurality of image frames). For data, the text data to be superimposed (synthesized) on this image data, the text composition area to synthesize this text data on this image data, and the font containing the font color of this text data to be synthesized on this image data Although the case of setting is shown, as another example, these settings can be performed for image data of two or more image frames constituting a moving image. In this case, as an example, for two or more continuous image frames or two or more intermittent image frames constituting a moving image, the values of the corresponding pixels in the frame (for example, RGB values) are averaged, The same processing as in the present embodiment can be performed on image data (averaged image data) of one image frame formed from the average result.
 また、他の構成例として、フォントカラー設定部4021は、画像データにおいてテキストを配置する領域(テキスト配置領域)の色相値と前記テキストのデータの色相値との比を、前記画像データの前記テキスト配置領域のトーン値と前記テキストのデータのトーン値との比よりも、1に近い値とする、構成を用いることもできる。
 ここで、テキスト配置領域は、テキスト合成領域に対応する。
 一態様として、画像データ、及び、テキストデータを取得する取得部(図34の例では、画像入力部4011及びテキスト設定部4012)と、前記画像データにおける前記テキストデータが配置されるテキスト配置領域を決定する領域決定部(図34の例では、テキスト合成領域設定部4013)と、テキストデータに所定の色を設定する色設定部(図34の例では、フォント設定部4014のフォントカラー設定部4021)と、前記テキスト配置領域に前記所定の色の前記テキストデータを配置した画像を生成する画像生成部(図34の例では、合成画像生成部4015)とを含み、前記画像データの前記テキスト配置領域の色相値と、の前記テキストデータの色相値との比は、前記画像データの前記テキスト配置領域のトーン値と、の前記テキストデータのトーン値との比よりも1に近いことを特徴とする画像処理装置(図34の例では、画像処理部4140)を構成することができる。
 また、一態様として、上記に記載の画像処理装置(図34の例では、画像処理部4140)において、前記色設定部(図34の例では、フォント設定部4014のフォントカラー設定部4021)は、前記テキスト配置領域のRGBの平均色からPCCS表色系のトーン値および色相値を求め、前記PCCS表色系の色相を変化させずに、前記PCCS表色系のトーン値のみを変更することを特徴とする画像処理装置を構成することができる。
 なお、画像データにおいてテキストを配置する領域(テキスト配置領域)の色相値と前記テキストのデータの色相値との比を、前記画像データの前記テキスト配置領域のトーン値と前記テキストのデータのトーン値との比よりも、1に近い値とする場合におけるそれぞれの比の値としては、様々な値が用いられてもよい。
 このような構成においても、本実施形態と同様な効果を得ることが可能である。
As another configuration example, the font color setting unit 4021 determines the ratio of the hue value of a region (text placement region) in which text is placed in the image data and the hue value of the text data to the text data of the image data. A configuration in which the value is closer to 1 than the ratio between the tone value of the arrangement area and the tone value of the text data can also be used.
Here, the text arrangement area corresponds to the text composition area.
As an aspect, an acquisition unit (image input unit 4011 and text setting unit 4012 in the example of FIG. 34) that acquires image data and text data, and a text arrangement area in which the text data in the image data is arranged. A region determining unit to be determined (in the example of FIG. 34, a text composition region setting unit 4013) and a color setting unit (in the example of FIG. 34, a font color setting unit 4021 of the font setting unit 4014) for setting a predetermined color. ) And an image generation unit (a composite image generation unit 4015 in the example of FIG. 34) that generates an image in which the text data of the predetermined color is arranged in the text arrangement region, and the text arrangement of the image data The ratio of the hue value of the area to the hue value of the text data is the tone value of the text arrangement area of the image data, (In the example of FIG. 34, the image processing unit 4140) The image processing apparatus, characterized in that close to 1 than the ratio between the tone value of the text data can be configured.
Further, as one aspect, in the image processing apparatus described above (the image processing unit 4140 in the example of FIG. 34), the color setting unit (the font color setting unit 4021 of the font setting unit 4014 in the example of FIG. 34) is The tone value and hue value of the PCCS color system are obtained from the average RGB color in the text arrangement area, and only the tone value of the PCCS color system is changed without changing the hue of the PCCS color system. An image processing apparatus characterized by the above can be configured.
It should be noted that the ratio between the hue value of the text layout area (text layout area) and the hue value of the text data in the image data is the tone value of the text layout area of the image data and the tone value of the text data. Various values may be used as the value of each ratio when the value is closer to 1 than the ratio of.
Even in such a configuration, it is possible to obtain the same effect as in the present embodiment.
(第11の実施形態)
 本実施形態に係る撮像装置の機能ブロック図は、第2の実施形態に係る図8に示されるものと同様である。
 また、本実施形態に係る画像処理部の機能構成を示すブロック図は、第10の実施形態に係る図34に示されるものと同様である。
 以下では、第2及び第10の実施形態とは異なる部分について詳しく説明する。
 なお、本実施形態の説明では、図8、図34、図36および図37で使用した各構成部の符号と同一の符号を使用する。
(Eleventh embodiment)
The functional block diagram of the imaging apparatus according to the present embodiment is the same as that shown in FIG. 8 according to the second embodiment.
The block diagram showing the functional configuration of the image processing unit according to the present embodiment is the same as that shown in FIG. 34 according to the tenth embodiment.
Hereinafter, portions different from the second and tenth embodiments will be described in detail.
In the description of the present embodiment, the same reference numerals as those used in FIGS. 8, 34, 36, and 37 are used.
 本実施形態では、フォント設定部4014は、テキスト合成領域設定部4013から画像データと、設定されたテキストのデータと、設定されたテキスト合成領域を特定する情報を入力し、このテキストのデータのフォントを設定する場合に、フォントカラー設定部4021によりフォントカラーを設定するとともに、記憶部4016に記憶されたアウトライン情報4033に基づいて、このテキストのデータのフォントの一つとして、所定のアウトラインを設定する。 In the present embodiment, the font setting unit 4014 receives image data, set text data, and information for specifying the set text composition region from the text composition region setting unit 4013, and the text data font. Is set by the font color setting unit 4021, and a predetermined outline is set as one of the fonts of the text data based on the outline information 4033 stored in the storage unit 4016. .
 ここで、所定のアウトラインとしては、例えば、影、あるいは、ふちどり、などを用いることができる。
 一例として、所定のアウトラインの種類(例えば、影、ふちどり、など)は、予め固定的に設定される。
 他の例として、所定のアウトラインとして2種類以上のものを切り替えて使用することが可能な場合には、例えば、ユーザが操作部1180を操作することでこの操作部1180がこのユーザから受け付けた切り替えの指示に従って、フォント設定部4014が、使用するアウトラインの種類を切り替える構成を用いることができる。
Here, as the predetermined outline, for example, a shadow or a trimming can be used.
As an example, a predetermined outline type (for example, shadow, trimming, etc.) is fixedly set in advance.
As another example, when two or more types of predetermined outlines can be switched and used, for example, when the user operates the operating unit 1180, the switching received by the operating unit 1180 from the user The font setting unit 4014 can switch the type of outline to be used in accordance with the instruction.
 また、所定のアウトラインの色としては、例えば、黒、または、フォントカラーのトーンよりも暗いトーンの色を用いることができる。
 一例として、所定のアウトラインの色は、予め固定的に設定される。
 他の例として、所定のアウトラインの色として2種類以上の色を切り替えて使用することが可能な場合には、例えば、ユーザが操作部1180を操作することでこの操作部1180がこのユーザから受け付けた切り替えの指示に従って、フォント設定部4014が、使用するアウトラインの色を切り替える構成を用いることができる。
Further, as the color of the predetermined outline, for example, black or a tone color darker than the font color tone can be used.
As an example, the color of the predetermined outline is fixedly set in advance.
As another example, when two or more colors can be switched and used as a predetermined outline color, for example, when the user operates the operation unit 1180, the operation unit 1180 receives the color from the user. In accordance with the switching instruction, the font setting unit 4014 can switch the outline color to be used.
 なお、記憶部4016に記憶されるアウトライン情報4033としては、フォント設定部4014がテキストに対するアウトラインを設定する際に参照する情報が用いられ、例えば、使用することが可能な1種類以上のアウトラインの種類や色を特定する情報などが用いられる。 As the outline information 4033 stored in the storage unit 4016, information referred to when the font setting unit 4014 sets an outline for text is used. For example, one or more types of outlines that can be used Or information specifying the color is used.
 図40は、合成画像のデータ4931の一例をイメージで示す図である。
 図40に示す合成画像のデータ4931では、テキストのデータ4941以外の部分の画像から構成される元の画像データ(図示せず)と同じ画像において、さらに、テキスト合成領域設定部4013により設定されたテキスト合成領域(図示せず)に、テキスト設定部4012により設定されたテキストのデータ4941(図40の例では、「いいね!」という文字のデータ)を、フォント設定部4014により設定されたフォント(少なくともフォントカラーおよびアウトラインを含む)で表示するように、この画像データとこのテキストのデータ4941が合成されている。
 ここで、図40の例では、アウトラインとして影を用いた場合を示す。
FIG. 40 is a diagram illustrating an example of the composite image data 4931.
In the composite image data 4931 shown in FIG. 40, the same image as the original image data (not shown) composed of images other than the text data 4941 is set by the text composition region setting unit 4013. In a text composition area (not shown), text data 4941 (in the example of FIG. 40, character data “Like”) set by the text setting unit 4012 is used as the font set by the font setting unit 4014. This image data and this text data 4941 are synthesized so as to be displayed (including at least font color and outline).
Here, the example of FIG. 40 shows a case where a shadow is used as an outline.
 なお、本実施形態では、図36に示されるステップS4004の処理における図37に示されるステップS4015の処理において、フォント設定部4014は、フォントカラー設定部4021により設定されたフォントカラーを含むフォントをテキストのデータに対して設定するに際して、所定のアウトラインのフォントを設定する。 In the present embodiment, in the process of step S4015 shown in FIG. 37 in the process of step S4004 shown in FIG. 36, the font setting unit 4014 uses a font including the font color set by the font color setting unit 4021 as text. When setting for this data, a predetermined outline font is set.
 以上のように、本実施形態に係る画像処理部4140によれば、画像中にテキストを表示する画像領域(テキスト合成領域)の色情報を用いて、このテキストのフォントカラーを設定するとともに、フォントとしてアウトラインを設定する。 As described above, according to the image processing unit 4140 according to the present embodiment, the font color of the text is set using the color information of the image area (text synthesis area) in which the text is displayed in the image, and the font. Set the outline as.
 したがって、本実施形態に係る画像処理部4140によれば、第10実施形態と同様な効果を得ることができるとともに、テキストに対して、設定したフォントカラーにさらに、影などのアウトラインを付けてフォントのアウトラインを強調させることにより、色のコントラストを高めることができる。このようなアウトラインの付与は、例えば、テキストに設定されたフォントカラーの色が白色である場合に特に有効である。 Therefore, according to the image processing unit 4140 according to the present embodiment, it is possible to obtain the same effects as those of the tenth embodiment, and to add fonts with outlines such as shadows to the set font color for text. By enhancing the outline, the color contrast can be increased. Such an outline is particularly effective when the font color set for the text is white, for example.
 (第12の実施形態)
 本実施形態に係る撮像装置の機能ブロック図は、第2の実施形態に係る図8に示されるものと同様である。
 また、本実施形態に係る画像処理部の機能構成を示すブロック図は、第10の実施形態に係る図34に示されるものと同様である。
 以下では、第2及び第10の実施形態とは異なる部分について詳しく説明する。
 なお、本実施形態の説明では、図8、図34および図37で使用した各構成部の符号と同一の符号を使用する。
(Twelfth embodiment)
The functional block diagram of the imaging apparatus according to the present embodiment is the same as that shown in FIG. 8 according to the second embodiment.
The block diagram showing the functional configuration of the image processing unit according to the present embodiment is the same as that shown in FIG. 34 according to the tenth embodiment.
Hereinafter, portions different from the second and tenth embodiments will be described in detail.
In the description of this embodiment, the same reference numerals as those used in FIGS. 8, 34, and 37 are used.
 本実施形態では、フォント設定部4014は、テキスト合成領域設定部4013から画像データと、設定されたテキストのデータと、設定されたテキスト合成領域を特定する情報を入力し、フォントカラー設定部4021によりこのテキストのデータのフォントカラーを設定する場合に、記憶部4016に記憶された色変化判定条件の情報4034に基づいて、このテキストを表示するこのテキスト合成領域において色の変化が所定値以上であるか否かを判定し、このテキスト合成領域において色の変化が所定値以上であると判定したときには、このテキスト合成領域の中で2種類以上のフォントカラーを設定する。
 なお、フォントカラー設定部4021は、このテキスト合成領域において色の変化が所定値未満であると判定したときには、第10実施形態と同様に、このテキスト合成領域の全体に対して1種類のフォントカラーを設定する。
In the present embodiment, the font setting unit 4014 receives image data, set text data, and information specifying the set text composition region from the text composition region setting unit 4013, and the font color setting unit 4021 When the font color of the text data is set, based on the color change determination condition information 4034 stored in the storage unit 4016, the color change is greater than or equal to a predetermined value in the text composition area where the text is displayed. If it is determined that the color change is greater than or equal to a predetermined value in the text composition area, two or more font colors are set in the text composition area.
When the font color setting unit 4021 determines that the color change is less than a predetermined value in the text composition area, one type of font color is used for the entire text composition area as in the tenth embodiment. Set.
 具体的には、フォントカラー設定部4021は、テキストを表示するテキスト合成領域を複数の領域(本実施形態で、分割領域と言う)に分割し、各々の分割領域ごとに、RGBの平均色を求める処理(図37に示すステップS4011と同様な処理)を実行する。
 そして、フォントカラー設定部4021は、これら複数の分割領域のRGBの平均色の値について、所定値以上の差があるか否かを判定し、所定値以上の差があると判定したときには、このテキスト合成領域において色の変化が所定値以上であると判定する。一方、フォントカラー設定部4021は、これら複数の分割領域のRGBの平均色の値について、所定値以上の差がないと判定したときには、このテキスト合成領域において色の変化が所定値未満であると判定する。
Specifically, the font color setting unit 4021 divides a text composition area for displaying text into a plurality of areas (referred to as divided areas in the present embodiment), and sets an average RGB color for each divided area. The required processing (same processing as step S4011 shown in FIG. 37) is executed.
The font color setting unit 4021 determines whether or not there is a difference greater than or equal to a predetermined value with respect to the average color values of RGB in the plurality of divided areas. It is determined that the color change is greater than or equal to a predetermined value in the text composition area. On the other hand, when the font color setting unit 4021 determines that there is no difference greater than or equal to a predetermined value with respect to the average color value of RGB in the plurality of divided areas, the color change in the text composition area is less than the predetermined value. judge.
 ここで、複数の分割領域のRGBの平均色の値について所定値以上の差があるか否かを判定する手法としては、様々な手法が用いられてもよい。
 一例として、複数の分割領域のうちで任意の2つの分割領域のRGBの平均色の値の差が所定値以上となった場合には複数の分割領域のRGBの平均色の値に所定値以上の差があると判定する手法を用いることができる。
 他の例として、複数の分割領域のうちでRGBの平均色の値が最低となる分割領域と最大となる分割領域との2つの分割領域のRGBの平均色の値の差が所定値以上となった場合には複数の分割領域のRGBの平均色の値に所定値以上の差があると判定する手法を用いることができる。
 また、他の例として、複数の分割領域の全てに関してRGBの平均色の値の分散の値を求めて、この分散の値が所定値以上となった場合には複数の分割領域のRGBの平均色の値に所定値以上の差があると判定する手法を用いることができる。
Here, various methods may be used as a method for determining whether or not there is a difference of a predetermined value or more with respect to the average color values of RGB in a plurality of divided regions.
As an example, when the difference between the average color values of RGB in any two divided areas out of a plurality of divided areas is equal to or greater than a predetermined value, the average color value of RGB in the plurality of divided areas is equal to or greater than a predetermined value It is possible to use a method for determining that there is a difference.
As another example, among the plurality of divided areas, the difference between the RGB average color values of the two divided areas of the divided area having the lowest RGB average color value and the largest divided area is not less than a predetermined value. In such a case, it is possible to use a method for determining that there is a difference of a predetermined value or more in the average color values of RGB in a plurality of divided regions.
As another example, a dispersion value of RGB average color values is obtained for all of a plurality of divided areas, and when this dispersion value is equal to or greater than a predetermined value, an average of RGB values of the plurality of divided areas is obtained. A method of determining that there is a difference of a predetermined value or more in the color value can be used.
 これらの場合に、RGBの平均色の値を比較するときには、一例として、R、G、Bのうちのいずれか1つのみについて比較することができる。他の例として、R、G、Bのうちの2つまたは3つを組み合わせて1つの値にしたものについて比較することができる。
また、他の例として、R、G、Bのうちの2つ以上について別個に比較することができる。
 ここで、R、G、Bのうちの2つ以上について別個に比較する場合には、例えば、比較したうちのいずれか1つ(R、G、Bのうちのいずれか)について所定値以上の差があるときには全体として所定値以上の差があると判定する手法を用いることができ、あるいは、比較した全てについて所定値以上の差があるときに(だけ)全体として所定値以上の差異があると判定する手法を用いることができる。
In these cases, when comparing the average color values of RGB, as an example, only one of R, G, and B can be compared. As another example, two or three of R, G, and B can be combined into a single value for comparison.
As another example, two or more of R, G, and B can be compared separately.
Here, when comparing two or more of R, G, and B separately, for example, one of the comparisons (any of R, G, and B) is greater than or equal to a predetermined value. When there is a difference, a method of determining that there is a difference of a predetermined value or more as a whole can be used, or when there is a difference of a predetermined value or more for all the comparisons (only), there is a difference of a predetermined value or more as a whole. Can be used.
 また、テキストを表示するテキスト合成領域を複数の領域(分割領域)に分割する手法としては、様々な手法が用いられてもよい。
 一例として、テキスト合成領域に表示するテキストに含まれる文字について、一文字ごとの区切りの領域を分割領域とする手法を用いることができる。この場合、一文字ごとに例えばその周囲を含む矩形の領域が予め設定されており、テキストに含まれる全ての文字の領域の組み合わせによってテキスト合成領域の全体が構成される。なお、一文字ごとの矩形の領域は、例えば、文字のサイズごとに異なっていてもよい。
 他の例として、予め設定された分割数または予め設定された大きさ(例えば、水平方向の長さ、垂直方向の長さ、あるいは矩形などのブロックの大きさ)でテキスト合成領域を区切った領域を分割領域とする手法を用いることができる。
Various methods may be used as a method of dividing a text composition region for displaying text into a plurality of regions (divided regions).
As an example, for a character included in text displayed in a text synthesis area, a technique in which a delimiter area for each character is used as a divided area can be used. In this case, for example, a rectangular area including the periphery of each character is set in advance, and the entire text synthesis area is configured by a combination of all character areas included in the text. In addition, the rectangular area | region for every character may differ for every size of a character, for example.
As another example, an area obtained by dividing a text composition area by a predetermined number of divisions or a predetermined size (for example, a horizontal length, a vertical length, or a block size such as a rectangle). Can be used as a divided region.
 なお、本実施形態では、複数の分割領域のRGBの平均色の値に基づいて、これら複数の分割領域からなるテキスト合成領域において色の変化が所定値以上であるか否かを判定するが、他の例として、複数の分割領域のPCCS表色系の値(例えば、PCCS表色系のトーンおよび色相を特定する値)に基づいて、テキスト合成領域において色の変化が所定値以上であるか否かを判定する構成が用いられてもよい。 In the present embodiment, based on the average color values of RGB in a plurality of divided areas, it is determined whether or not the color change is greater than or equal to a predetermined value in the text synthesis area composed of the plurality of divided areas. As another example, based on the PCCS color system values of a plurality of divided areas (for example, values specifying the tone and hue of the PCCS color system), whether the color change is greater than or equal to a predetermined value in the text composition area A configuration for determining whether or not may be used.
 フォントカラー設定部4021は、テキストのデータのフォントカラーを設定する場合に、このテキストを表示するテキスト合成領域において色の変化が所定値以上であると判定したときには、各々の分割領域ごとに、第10実施形態と同様に、RGBの平均色を求める処理(図37に示すステップS4011と同様な処理)、PCCS表色系のトーンと色相を求める処理(図37に示すステップS4012と同様な処理)、トーンを変更する処理(図37に示すステップS4013と同様な処理)、フォントカラーを設定する処理(図37に示すステップS4014と同様な処理)を実行して、各々の分割領域ごとにフォントカラーを設定する。
 なお、例えば、RGBの平均色を求める処理(図37に示すステップS4011と同様な処理)などが既に実行済みであれば、再度実行されなくてもよい。
When setting the font color of the text data, the font color setting unit 4021 determines that the color change in the text composition area for displaying the text is greater than or equal to a predetermined value, for each divided area. As in the tenth embodiment, processing for obtaining the average color of RGB (processing similar to step S4011 shown in FIG. 37), processing for obtaining the tone and hue of the PCCS color system (processing similar to step S4012 shown in FIG. 37). , Processing for changing the tone (processing similar to step S4013 shown in FIG. 37), processing for setting the font color (processing similar to step S4014 shown in FIG. 37), and executing font color for each divided area Set.
For example, if the process for obtaining the average RGB color (the same process as step S4011 shown in FIG. 37) has already been performed, the process may not be performed again.
 本実施形態では、このように複数の分割領域の各々に対して設定されたフォントカラーの全体を、テキストのデータに対して設定されたフォントカラーとする。
 ここで、複数の分割領域の各々についてフォントカラーを設定する場合に、これら複数の分割領域の中でRGBの平均色の差が所定値未満である2つ以上の分割領域があるときには、例えば、これら2つ以上の分割領域については、いずれか1つの分割領域のみについてフォントカラーを求めて、そのフォントカラーと同じものをこれら2つ以上の分割領域の全てに設定してもよい。
In this embodiment, the entire font color set for each of the plurality of divided areas is set as the font color set for the text data.
Here, when the font color is set for each of the plurality of divided areas, when there are two or more divided areas in which the average color difference of RGB is less than a predetermined value among the plurality of divided areas, for example, For these two or more divided areas, the font color may be obtained for only one of the divided areas, and the same font color may be set for all of the two or more divided areas.
 また、さらなる構成例として、フォントカラー設定部4021は、複数の分割領域の各々についてフォントカラーを設定した後に、テキスト合成領域の全体のフォントカラーが一定方向のグラデーションになるように、設定内容に関して、PCCS表色系のトーンと色相の調整を実行することもできる。 Further, as a further configuration example, the font color setting unit 4021 sets the font color for each of the plurality of divided areas, and then regarding the setting contents so that the entire font color of the text composition area becomes a gradation in a certain direction. It is also possible to adjust the tone and hue of the PCCS color system.
 なお、記憶部4016に記憶される色変化判定条件の情報4034としては、フォントカラー設定部21がテキストを表示するテキスト合成領域において色の変化が所定値以上であるか否かを判定する際に参照する情報が用いられ、例えば、テキスト合成領域を複数の分割領域に分割する手法を特定する情報や、複数の分割領域の平均色の値に所定値以上の差があるか否かを判定する手法を特定する情報や、各種の判定に使用される所定値(閾値)を特定する情報などが用いられる。 The color change determination condition information 4034 stored in the storage unit 4016 is used when the font color setting unit 21 determines whether or not the color change is greater than or equal to a predetermined value in the text composition area where the text is displayed. Information to be referenced is used, for example, information specifying a method for dividing a text synthesis area into a plurality of divided areas, and determining whether there is a difference of a predetermined value or more in an average color value of the plurality of divided areas Information for specifying a method, information for specifying a predetermined value (threshold value) used for various determinations, and the like are used.
 以上のように、本実施形態に係る画像処理部4140によれば、テキストを表示する画像領域(テキスト合成領域)で色の大きな変化がある場合には、それに応じて、この画像領域において2種類以上のフォントカラーを設定する。
 また、本実施形態に係る画像処理部4140によれば、構成例として、テキスト全体のフォントカラーが一定方向のグラデーションになるように、PCCS表色系のトーンや色相を調整する。
As described above, according to the image processing unit 4140 according to the present embodiment, when there is a large change in color in an image area (text synthesis area) for displaying text, two types of the image area are displayed accordingly. Set the above font color.
Further, according to the image processing unit 4140 according to the present embodiment, as a configuration example, the tone and hue of the PCCS color system are adjusted so that the font color of the entire text becomes a gradation in a certain direction.
 したがって、本実施形態に係る画像処理部4140によれば、テキストを表示する画像領域(テキスト合成領域)で色の大きな変化がある場合においても、テキストの可読性を向上させることができる。例えば、テキストを表示する画像領域(テキスト合成領域)で色の大きな変化がある場合に、その画像領域の単一な平均色からフォントカラーを求めると、テキストの一部分のコントラストが得られず、テキストの可読性が低下することがあるが、本実施形態に係る画像処理部4140によれば、このような課題を解消することができる。 Therefore, according to the image processing unit 4140 according to the present embodiment, the readability of the text can be improved even when there is a large color change in the image area (text synthesis area) where the text is displayed. For example, if there is a large change in color in an image area (text synthesis area) that displays text, if the font color is calculated from a single average color in that image area, the contrast of a part of the text cannot be obtained, and the text However, according to the image processing unit 4140 according to the present embodiment, such a problem can be solved.
 なお、本実施形態においても、さらに、第11の実施形態と同様に、フォント設定部4014により所定のアウトラインのフォントを設定する構成とすることもできる。 It should be noted that, in the present embodiment, as in the eleventh embodiment, a font with a predetermined outline may be set by the font setting unit 4014.
 ここで、図36および図37に示す各ステップなどのように、以上の実施形態で行われる処理の手順(処理のステップ)を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、処理を行ってもよい。 Here, like each step shown in FIG. 36 and FIG. 37, a program for realizing the processing procedure (processing step) performed in the above embodiment is recorded on a computer-readable recording medium, Processing may be performed by causing a computer system to read and execute a program recorded on the recording medium.
 また、上記プログラムは、このプログラムを記録装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムに既に記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。 Further, the program may be transmitted from a computer system storing the program in a recording device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.
(その他の実施形態)
 図45は、画像上に配置される文章を決定するために用いられる撮像画像の特徴量を抽出するプロセスの一例を模式的に示す図である。図45の例において、画像処理装置の判定部は、撮像画像のシーンを人物画像又は風景画像に分類する。次に、画像処理装置は、そのシーンに応じて、撮像画像の特徴量を抽出する。特徴量は、人物画像の場合には、顔の数(被写体の人数)及び平均色(配色パターン)とすることができ、風景画像の場合には、平均色(配色パターン)とすることができる。これらの特徴量を基に、人物画像用テンプレート又は風景画像用テンプレートに挿入される単語(形容詞等)が決定される。
(Other embodiments)
FIG. 45 is a diagram schematically illustrating an example of a process for extracting a feature amount of a captured image used for determining a sentence to be arranged on an image. In the example of FIG. 45, the determination unit of the image processing device classifies the scene of the captured image into a person image or a landscape image. Next, the image processing apparatus extracts a feature amount of the captured image according to the scene. The feature amount can be the number of faces (number of subjects) and the average color (color arrangement pattern) in the case of a person image, and can be the average color (color arrangement pattern) in the case of a landscape image. . Based on these feature quantities, words (adjectives and the like) to be inserted into the person image template or the landscape image template are determined.
 ここで、図45の例では、配色パターンは、撮像画像を構成する代表的な複数の色の組み合わせで構成されている。したがって、配色パターンは、撮像画像の平均的な色(平均色)を表すことができる。一例において、配色パターンとして、「第1色」、「第2色」、「第3色」を規定し、これら3種類の色の組み合わせ、すなわち3種類の平均的な色に基づいて、人物画像用、又は風景画像用の文章テンプレートに挿入される単語(形容詞)を決定することができる。 Here, in the example of FIG. 45, the color arrangement pattern is composed of a combination of a plurality of representative colors that constitute the captured image. Therefore, the color arrangement pattern can represent the average color (average color) of the captured image. In one example, “first color”, “second color”, and “third color” are defined as a color arrangement pattern, and based on a combination of these three colors, that is, based on three average colors, a person image Or a word (adjective) to be inserted into a text template for a landscape image.
 図45の例において、撮像画像のシーンは2種類(人物画像及び風景画像)に分類される。他の例において、撮像画像のシーンは、3種類以上(3、4、5、6、7、8、9、又は10種類以上)に分類することができる。 45, the scene of the captured image is classified into two types (a person image and a landscape image). In another example, the scene of the captured image can be classified into three or more types (3, 4, 5, 6, 7, 8, 9, or 10 types or more).
 図46は、画像上に配置される文章を決定するために用いられる撮像画像の特徴量を抽出するプロセスの別の一例を模式的に示す図である。図46の例において、撮像画像のシーンを3種類以上に分類することができる。 FIG. 46 is a diagram schematically illustrating another example of the process of extracting the feature amount of the captured image used for determining the text arranged on the image. In the example of FIG. 46, the scene of the captured image can be classified into three or more types.
 図46の例において、画像処理装置の判定部は、撮像画像が人物画像(第1モード画像)、遠景画像(第2モード画像)、又はその他の画像(第3モード画像)いずれであるかを判定する。まず、判定部は、図45の例と同様に、撮像画像が人物画像であるか、人物画像とは異なる画像であるかを判定する。 In the example of FIG. 46, the determination unit of the image processing apparatus determines whether the captured image is a person image (first mode image), a distant view image (second mode image), or another image (third mode image). judge. First, as in the example of FIG. 45, the determination unit determines whether the captured image is a person image or an image different from the person image.
 次に、撮像画像が人物画像とは異なる画像である場合、判定部は、撮像画像が遠景画像(第2モード画像)又はその他の画像(第3モード画像)のうちいずれであるか、を判定する。この判定は、例えば、撮像画像に付与された画像識別情報の一部を用いて行うことができる。 Next, when the captured image is an image different from the human image, the determination unit determines whether the captured image is a distant view image (second mode image) or another image (third mode image). To do. This determination can be performed using, for example, a part of the image identification information given to the captured image.
 具体的には、撮像画像が遠景画像かどうかを判定するために、画像識別情報の一部である焦点距離を用いることができる。判定部は、焦点距離が、あらかじめ設定された基準距離以上である場合、撮像画像を遠景画像と判定し、焦点距離が基準距離未満である場合、撮像画像をその他の画像と判定する。以上により、撮像画像が、人物画像(第1モード画像)、遠景画像(第2モード画像)、又はその他の画像(第3モード画像)の3種類にシーン分類される。なお、遠景画像(第2モード画像)の例は、海や山などの風景画像等を含み、その他の画像(第3モード画像)の例は、花及びペット等を含む。 Specifically, in order to determine whether the captured image is a distant view image, the focal length that is a part of the image identification information can be used. The determination unit determines that the captured image is a distant view image when the focal distance is greater than or equal to a preset reference distance, and determines the captured image as another image when the focal distance is less than the reference distance. As described above, the captured image is classified into three types of scenes: a person image (first mode image), a distant view image (second mode image), or another image (third mode image). Note that examples of distant view images (second mode images) include landscape images such as the sea and mountains, and examples of other images (third mode images) include flowers and pets.
 図46の例においても、撮像画像のシーンが分類された後、画像処理装置は、そのシーンに応じて、撮像画像の特徴量を抽出する。 46, after the scene of the captured image is classified, the image processing apparatus extracts the feature amount of the captured image according to the scene.
 図46の例において、撮像画像が人物画像(第1シーン画像)の場合、画像上に配置される文章を決定するために用いられる撮像画像の特徴量として、顔の数(被写体の人数)及び/又は笑顔レベルを用いることができる。すなわち、撮像画像が人物画像の場合、顔の数(被写体の人数)の判定結果に加え、又は代えて笑顔レベルの判定結果に基づいて、人物画像用テンプレートに挿入される単語を決定することができる。以下、笑顔レベルの判定方法の一例について、図47を用いて説明する。 In the example of FIG. 46, when the captured image is a human image (first scene image), the number of faces (number of subjects) and the feature amount of the captured image used to determine the text arranged on the image A smile level can be used. That is, when the captured image is a human image, a word to be inserted into the human image template may be determined based on the determination result of the smile level in addition to or instead of the determination result of the number of faces (number of subjects). it can. Hereinafter, an example of a smile level determination method will be described with reference to FIG.
 図47の例において、画像処理装置の判定部は、人物画像に対して、顔認識などの方法により顔領域を検出する(ステップS5001)。一例において、口角部分の上り具合を数値化することにより、人物画像の笑顔度が算出される。なお、笑顔度の算出には例えば、顔認識にかかる公知の様々な技術を用いることができる。 In the example of FIG. 47, the determination unit of the image processing apparatus detects a face area from a person image by a method such as face recognition (step S5001). In one example, the degree of smile of a person image is calculated by digitizing the degree of ascending of the mouth corner. For example, various known techniques for face recognition can be used for calculating the smile level.
 次に、判定部は、あらかじめ設定された第1の笑顔閾値αと、笑顔度を比較する(ステップS5002)。笑顔度がα以上と判定された場合、判定部は、この人物画像の笑顔レベルは、「笑顔:大」であると判定する。 Next, the determination unit compares the smile level with a preset first smile threshold value α (step S5002). When it is determined that the smile level is greater than or equal to α, the determination unit determines that the smile level of the person image is “smile: large”.
 一方、笑顔度がα未満と判定された場合、判定部は、あらかじめ設定された第2の笑顔閾値βと笑顔度を比較する(ステップS5003)。笑顔度がβ以上と判定された場合、判定部は、この人物画像の笑顔レベルは、「笑顔:中」であると判定する。さらに、笑顔度がβ未満と判定された場合、判定部は、この人物画像の笑顔レベルは、「笑顔:小」であると判定する。 On the other hand, when it is determined that the smile level is less than α, the determination unit compares the smile level with a second smile threshold value β set in advance (step S5003). When it is determined that the smile level is β or more, the determination unit determines that the smile level of this person image is “smile: medium”. Furthermore, when it is determined that the smile level is less than β, the determination unit determines that the smile level of the person image is “smile: small”.
 人物画像の笑顔レベルの判定結果に基づき、人物画像用テンプレートに挿入される単語が決定される。ここで、「笑顔:大」の笑顔レベルに対応する単語の例としては、「喜びいっぱいの」、「とてもいい」等が挙げられる。「笑顔:中」の笑顔レベルに対応する単語の例としては、「嬉しそうな」、「いい穏やかな」等が挙げられる。「笑顔:小」の笑顔レベルに対応する単語の例としては、「真剣そうな」、「クールな」等が挙げられる。 The word to be inserted into the person image template is determined based on the determination result of the smile level of the person image. Here, examples of the word corresponding to the smile level of “smile: large” include “full of joy” and “very good”. Examples of words that correspond to the smile level of “smile: medium” include “joyful” and “good calm”. Examples of words corresponding to the smile level of “smile: small” include “seriously seems” and “cool”.
 なお、上記では、人物画像用テンプレートに挿入される単語が、連体形である場合について説明したが、これに限ることはなく、例えば終止形であってもよい。この場合、「笑顔:大」の笑顔レベルに対応する単語の例としては、「笑顔が素敵」、「すごくいい笑顔だね」等が挙げられる。「笑顔:中」の笑顔レベルに対応する単語の例としては、「にこやかだね」、「いい表情」等が挙げられる。「笑顔:小」の笑顔レベルに対応する単語の例としては、「真剣そうです」、「真面目そうです」等が挙げられる。 In the above description, the case where the word to be inserted into the person image template is a continuous form has been described. However, the present invention is not limited to this, and may be an end form, for example. In this case, examples of words corresponding to the smile level of “smile: large” include “smile is nice”, “it is a very good smile”, and the like. Examples of words corresponding to the smile level of “smile: medium” include “smiley” and “good expression”. Examples of words corresponding to a smile level of “smile: small” include “looks serious” and “looks serious”.
 図48Aは、画像処理装置の動作結果を示す出力画像の一例であり、この出力画像は、図45の例に基づいて決定された文章を有する。図48Aの例において、撮像画像は人物画像であると判定され、特徴量としては被写体の人数、及び配色パターン(平均色)が抽出されている。また、配色パターンに応じて、人物画像用テンプレートに挿入される単語が、「重厚な」と決定されている。その結果、図48Aに示す出力結果が得られている。すなわち、図48Aの例では、撮像画像の平均色に基づいて、「重厚な」の単語(形容詞、連体形)が決定されている。 FIG. 48A is an example of an output image showing the operation result of the image processing apparatus, and this output image has a sentence determined based on the example of FIG. In the example of FIG. 48A, the captured image is determined to be a person image, and the number of subjects and the color arrangement pattern (average color) are extracted as the feature amount. Further, the word inserted into the person image template is determined as “heavy” according to the color arrangement pattern. As a result, the output result shown in FIG. 48A is obtained. That is, in the example of FIG. 48A, the word “heavy” (adjective, combined form) is determined based on the average color of the captured image.
 図48Bは、画像処理装置の動作結果を示す出力画像の別一例であり、この出力画像は、図46の例に基づいて決定された文章を有する。図48Bの例において、撮像画像は人物画像であると判定され、特徴量としては被写体の人数、及び笑顔レベルが抽出されている。また、笑顔レベルに応じて、人物画像用テンプレートに挿入される単語が、「いい表情」と決定されている。その結果、図48Bに示す出力結果が得られている。すなわち、図48Bの例では、撮像画像における人物の笑顔レベルに基づいて、「いい表情」の単語(終止形)が決定されている。図48Bの出力結果のように、人物画像に対して笑顔レベルを用いた単語出力を用いることで、画像から受ける印象に比較的近い文字情報を添付することができる。 FIG. 48B is another example of an output image showing the operation result of the image processing apparatus, and this output image has a sentence determined based on the example of FIG. In the example of FIG. 48B, the captured image is determined to be a person image, and the number of subjects and the smile level are extracted as the feature amount. Further, according to the smile level, the word inserted into the person image template is determined as “good expression”. As a result, the output result shown in FIG. 48B is obtained. That is, in the example of FIG. 48B, the word (end form) of “good expression” is determined based on the smile level of the person in the captured image. As in the output result of FIG. 48B, by using the word output using the smile level for the person image, it is possible to attach character information that is relatively close to the impression received from the image.
 図46に戻り、撮像画像が風景画像(第2シーン画像)又はその他の画像(第3シーン画像)の場合、画像上に配置される文章を決定するために用いられる撮像画像の特徴量として、平均色に代えて、代表色を用いることができる。代表色としては、配色パターンにおける「第1色」、すなわち撮像画像において最も頻度の多い色を用いることができる。あるいは、代表色は、以下に説明するように、クラスタリングを用いて決定することができる。 Returning to FIG. 46, when the captured image is a landscape image (second scene image) or another image (third scene image), as a feature amount of the captured image used to determine the text arranged on the image, A representative color can be used instead of the average color. As the representative color, the “first color” in the color arrangement pattern, that is, the most frequently used color in the captured image can be used. Alternatively, the representative color can be determined using clustering as described below.
 図49は、撮像装置に含まれる画像処理部の内部構成を表す概略ブロック図である。図49の例において、画像処理装置の画像処理部5040は、画像データ入力部5042と、解析部5044と、文章作成部5052と、文章付加部5054とを有する。画像処理部5040は、撮像部等で生成された画像データについて、各種の解析処理を行うことにより、画像データの内容に関する各種の情報を取得し、画像データの内容と整合性の高いテキストを作成し、画像データにテキストを付加することができる。 FIG. 49 is a schematic block diagram showing an internal configuration of an image processing unit included in the imaging apparatus. In the example of FIG. 49, the image processing unit 5040 of the image processing apparatus includes an image data input unit 5042, an analysis unit 5044, a text creation unit 5052, and a text addition unit 5054. The image processing unit 5040 performs various types of analysis processing on the image data generated by the imaging unit or the like, thereby acquiring various types of information regarding the content of the image data, and creating text that is highly consistent with the content of the image data. Then, text can be added to the image data.
 解析部5044は、色情報抽出部5046、領域抽出部5048、クラスタリング部5050を有しており、画像データに対して解析処理を行う。色情報抽出部5046は、画像データから、画像データに含まれる各画素の色情報に関する第1情報を抽出する。典型的には、第1情報は、画像データに含まれる全ての画素のHSV値を、集計したものである。ただし、第1情報は、類似性が関連づけられた(例えば所定の色空間に関連付けされた)所定の色について、この所定の色が画像中に表れる頻度(画素単位での頻度、面積割合等)を示す情報であればよく、色の解像度や、色空間の種類は限定されない。 The analysis unit 5044 includes a color information extraction unit 5046, a region extraction unit 5048, and a clustering unit 5050, and performs analysis processing on the image data. The color information extraction unit 5046 extracts first information regarding color information of each pixel included in the image data from the image data. Typically, the first information is a total of the HSV values of all the pixels included in the image data. However, the first information is the frequency at which the predetermined color appears in the image (frequency in pixel units, area ratio, etc.) for a predetermined color associated with similarity (for example, associated with a predetermined color space). The color resolution and the type of color space are not limited.
 例えば、第1情報は、HSV空間ベクトル(HSV値)やRGB値で表されるそれぞれの色について、それぞれの色の画素が、画像データに幾つずつ含まれるか、を表す情報であっても良い。ただし、第1情報における色解像度は、演算処理の負担等を考慮して適宜変更すれば良く、また、色空間の種類もHSVやRGBに限られず、CMY、CMYK等であっても良い。 For example, the first information may be information indicating how many pixels of each color are included in the image data for each color represented by an HSV space vector (HSV value) or RGB value. . However, the color resolution in the first information may be changed as appropriate in consideration of the burden of calculation processing, and the type of color space is not limited to HSV or RGB, and may be CMY, CMYK, or the like.
 図50は、解析部5044において行われる代表色の決定の流れを表すフローチャートである。図50のステップS5101では、画像処理装置が、具体的な画像データ5060(撮像画像、図51参照)の代表色の算出を開始する。 FIG. 50 is a flowchart showing the flow of representative color determination performed in the analysis unit 5044. In step S5101, the image processing apparatus starts calculating the representative color of specific image data 5060 (captured image, see FIG. 51).
 ステップS5102では、画像処理装置の画像データ入力部5042が、画像データを解析部5044に出力する。次に、解析部5044の色情報抽出部5046は、画像データに含まれる各画素の色情報に関する第1情報5062を算出する(図51参照)。 In step S5102, the image data input unit 5042 of the image processing apparatus outputs the image data to the analysis unit 5044. Next, the color information extraction unit 5046 of the analysis unit 5044 calculates first information 5062 regarding the color information of each pixel included in the image data (see FIG. 51).
 図51は、ステップS5102において色情報抽出部5046が実施する第1情報5062の算出処理を表す概念図である。色情報抽出部5046は、画像データ5060に含まれる色情報を、各色毎(例えば256階調の各階調毎)に集計し、第1情報5062を得る。図51の下図に示すヒストグラムは、色情報抽出部5046によって算出された第1情報5062のイメージを表している。図51のヒストグラムの横軸は色であり、縦軸は、画像データ5060中に、所定の色の画素がいくつ含まれるかを表している。 FIG. 51 is a conceptual diagram showing a calculation process of the first information 5062 performed by the color information extraction unit 5046 in step S5102. The color information extraction unit 5046 aggregates the color information included in the image data 5060 for each color (for example, for each gradation of 256 gradations) to obtain first information 5062. 51 represents an image of the first information 5062 calculated by the color information extraction unit 5046. The horizontal axis of the histogram in FIG. 51 is color, and the vertical axis represents how many pixels of a predetermined color are included in the image data 5060.
 図50のステップS5103では、解析部5044の領域抽出部5048が、画像データ5060における主要領域を抽出する。例えば、領域抽出部5048は、図51に示す画像データ5060の中からピントが合っている領域を抽出し、画像データ5060の中央部分を主要領域であると認定する(図52における主要領域5064参照)。 50, the region extraction unit 5048 of the analysis unit 5044 extracts the main region in the image data 5060. For example, the area extraction unit 5048 extracts a focused area from the image data 5060 shown in FIG. 51, and recognizes the central portion of the image data 5060 as the main area (see the main area 5064 in FIG. 52). ).
 図50のステップS5104では、解析部5044の領域抽出部5048が、ステップS5105で実施されるクラスタリングの対象領域を決定する。例えば、領域抽出部5048は、図52の上部に示すように、ステップS5103において画像データ5060の一部を主要領域5064であると認識し、主要領域5064を抽出した場合、クラスタリングの対象を、主要領域5064に対応する第1情報5062(主要第1情報5066)とする。図52の下図に示すヒストグラムは、主要第1情報5066のイメージを表している。 50, in step S5104, the region extraction unit 5048 of the analysis unit 5044 determines a target region for clustering performed in step S5105. For example, as shown in the upper part of FIG. 52, the area extraction unit 5048 recognizes that part of the image data 5060 is the main area 5064 in step S5103 and extracts the main area 5064, the clustering target is set as the main area 5064. The first information 5062 (main first information 5066) corresponding to the area 5064 is used. The histogram shown in the lower part of FIG. 52 represents an image of the main first information 5066.
 一方、領域抽出部5048が、ステップS5103において画像データ5060における主要領域5064を抽出しなかった場合、領域抽出部5048は、図51に示すように、画像データ5060の全領域に対応する第1情報5062を、クラスタリングの対象に決定する。なお、クラスタリングの対象領域が異なることを除き、主要領域5064が抽出された場合と抽出されなかった場合とで、その後の処理に違いはないため、以下では、主要領域が抽出された場合を例に説明を行う。 On the other hand, if the region extraction unit 5048 has not extracted the main region 5064 in the image data 5060 in step S5103, the region extraction unit 5048 displays the first information corresponding to the entire region of the image data 5060 as shown in FIG. 5062 is determined as a clustering target. Note that there is no difference in the subsequent processing between the case where the main region 5064 is extracted and the case where it is not extracted, except that the target region for clustering is different. I will explain.
 図50のステップS5105では、解析部5044のクラスタリング部5050が、ステップS5104で決定された領域の第1情報5062である主要第1情報5066に対して、クラスタリングを実施する。図53は、図52に示す主要領域5064の主要第1情報5066について、クラスタリング部5050が実施したクラスタリングの結果を表す概念図である。 50, in step S5105, the clustering unit 5050 of the analysis unit 5044 performs clustering on the main first information 5066 that is the first information 5062 of the region determined in step S5104. FIG. 53 is a conceptual diagram showing the result of clustering performed by the clustering unit 5050 on the primary first information 5066 in the primary region 5064 shown in FIG.
 クラスタリング部5050は、例えば、256階調の主要第1情報5066(図52参照)を、k-means法によって複数のクラスタに分類する。なお、クラスタリングは、k-means法(k平均法)に限定されない。他の例において、最短距離法等の他の方法を用いることができる。 For example, the clustering unit 5050 classifies the main information 5066 having 256 gradations (see FIG. 52) into a plurality of clusters by the k-means method. Note that the clustering is not limited to the k-means method (k average method). In other examples, other methods such as the shortest distance method can be used.
 図53の上部は、各画素がどのクラスタに分類されたかを表しており、図53の下部に示すヒストグラムは、各クラスタに属する画素の数を示したものである。クラスタリング部5050によるクラスタリングによって、256階調の主要第1情報5066(図52)は、256より少ない(図53に示す例では3つの)クラスタに分類されている。クラスタリングの結果は、各クラスタの大きさに関する情報と、各クラスタの色(クラスタの色空間上の位置)に関する情報とを含むことができる。 The upper part of FIG. 53 shows which cluster each pixel is classified, and the histogram shown at the lower part of FIG. 53 shows the number of pixels belonging to each cluster. By the clustering by the clustering unit 5050, the 256 first main information 5066 (FIG. 52) is classified into less than 256 clusters (three in the example shown in FIG. 53). The result of clustering can include information about the size of each cluster and information about the color of each cluster (the position of the cluster in the color space).
 ステップS5106は、解析部5044のクラスタリング部5050が、クラスタリングの結果に基づき、画像データ5060の代表色を決定する。一例において、クラスタリング部5050は、図53に示すようなクラスタリング結果を得た場合、算出された複数のクラスタのうち最も多くの画素を含む最大クラスタ5074に属する色を、画像データ5060の代表色とする。 In step S5106, the clustering unit 5050 of the analysis unit 5044 determines a representative color of the image data 5060 based on the clustering result. In one example, when the clustering unit 5050 obtains a clustering result as shown in FIG. 53, the color belonging to the maximum cluster 5074 including the most pixels among the plurality of calculated clusters is set as the representative color of the image data 5060. To do.
 代表色の算出が終了すると、文章作成部5052は、代表色に関する情報を用いてテキストを作成し、画像データ5060に付与する。 When the calculation of the representative color is completed, the text creation unit 5052 creates a text using information on the representative color and assigns the text to the image data 5060.
 文章作成部5052は、例えば風景画像用の文章テンプレートを読み出し、文章テンプレートの{日時}に、画像データ5060の生成日時に対応する単語(例えば「2012/03/10」)を適用する。この場合、解析部5044は、画像データ5060の生成日時に関する情報を記憶媒体等から検索し、文章作成部5052に出力することができる。 The text creation unit 5052 reads a text template for a landscape image, for example, and applies a word (for example, “2012/03/10”) corresponding to the generation date and time of the image data 5060 to {date / time} of the text template. In this case, the analysis unit 5044 can retrieve information related to the generation date and time of the image data 5060 from the storage medium and output the information to the text creation unit 5052.
 また、文章作成部5052は、文章テンプレートの{形容詞}に、画像データ5060の代表色に対応する単語を適用する。文章作成部5052は、記憶部5028から対応情報を読み出して、文章テンプレートに適用する。一例において、記憶部5028には、シーン毎に色と単語とが関連付けられたテーブルが保存されている。文章作成部5052は、そのテーブルから読み出した単語を用いて文章(例えば「とてもきれいなものを見つけた」)を作成することができる。 Also, the sentence creation unit 5052 applies the word corresponding to the representative color of the image data 5060 to the {adjective} of the sentence template. The sentence creation unit 5052 reads the correspondence information from the storage unit 5028 and applies it to the sentence template. In one example, the storage unit 5028 stores a table in which colors and words are associated with each scene. The sentence creation unit 5052 can create a sentence (for example, “I found a very beautiful thing”) using words read from the table.
 図54は、上述した一連の処理によってテキストを付与された画像データ5080を表示したものである。 FIG. 54 shows image data 5080 to which text is given by the series of processes described above.
 図55は、シーンが遠景画像の場合に、上述と同様の一連の処理によってテキストを付与された画像データの例を示したものである。この場合、シーンが遠景画像に分類され、かつ代表色は青と判定されている。例えば、シーン毎に色と単語とが関連付けられたテーブルにおいて、代表色の「青」に対して単語「爽やかな」等が対応付けられている。 FIG. 55 shows an example of image data to which text is given by a series of processes similar to the above when the scene is a distant view image. In this case, the scene is classified as a distant view image, and the representative color is determined to be blue. For example, in a table in which colors and words are associated with each scene, the word “fresh” is associated with the representative color “blue”.
 図56は、色と単語との対応情報を有するテーブルの一例を示す図である。図56のテーブルにおいて、人物画像(第1シーン画像)、遠景画像(第2シーン画像)、及びその他の画像(第3シーン画像)、のシーンごとに、色と単語とが関連付けられている。一例において、画像データの代表色が「青」であり、シーンがその他の画像(第3シーン画像)であるとき、文章作成部5052は、テーブルの対応情報から、代表色に対応する単語(例えば「上品な」)を選択し、文章テンプレートの{形容詞}に適用する。 FIG. 56 is a diagram showing an example of a table having correspondence information between colors and words. In the table of FIG. 56, a color and a word are associated with each scene of a person image (first scene image), a distant view image (second scene image), and another image (third scene image). In one example, when the representative color of the image data is “blue” and the scene is another image (third scene image), the sentence creation unit 5052 uses a word corresponding to the representative color (for example, from the correspondence information in the table). “Classy”) and select {adjective} in the sentence template.
 色と単語との対応テーブルは、例えば、PCCS表色系、CICC表色系、又はNCS表色系などのカラーチャートに基づき設定することができる。 The color-word correspondence table can be set based on a color chart such as a PCCS color system, CICC color system, or NCS color system.
 図57は、CCIC表示系のカラーチャートを用いた、遠景画像(第2シーン画像)用の対応テーブルの一例を示す。図58は、CCIC表示系のカラーチャートを用いた、その他の画像(第3シーン画像)用の対応テーブルの一例を示す。 FIG. 57 shows an example of a correspondence table for a distant view image (second scene image) using a color chart of the CCIC display system. FIG. 58 shows an example of a correspondence table for other images (third scene images) using a CCIC display color chart.
 図57において、横軸は、代表色の色相に、縦軸は代表色のトーンに対応している。単語の決定に図57のテーブルを用いることにより、代表色の色相の情報だけでなく、代表色のトーンの情報も併せて単語を決定し、人間が生じる感性に比較的近いテキストを付与することが可能となる。以下、図57のテーブルを用いた、遠景画像(第2シーン画像)の場合の具体的なテキストの設定例を説明する。なお、その他の画像(第3シーン画像)の場合、図58のテーブルを用いて同様に設定することができる。 57, the horizontal axis corresponds to the hue of the representative color, and the vertical axis corresponds to the tone of the representative color. By using the table shown in FIG. 57 to determine the word, not only the information on the hue of the representative color but also the information on the tone of the representative color is used to determine the word, and give a text that is relatively close to the sensibility that humans generate. Is possible. Hereinafter, a specific text setting example in the case of a distant view image (second scene image) using the table of FIG. 57 will be described. In the case of other images (third scene images), the same setting can be made using the table of FIG.
 図57において、代表色が領域A5001と判定された場合、その代表色の呼称(赤、橙、黄、青など)がそのままテキスト中の単語に適用される。例えば、代表色の色相が「赤(R)」、トーンが「ビビッド・トーン(V)」の場合、その色を表す形容詞「真っ赤な」等が選択される。 In FIG. 57, when the representative color is determined to be the area A5001, the name of the representative color (red, orange, yellow, blue, etc.) is applied to the word in the text as it is. For example, if the hue of the representative color is “red (R)” and the tone is “Vivid Tone (V)”, the adjective “crimson” representing the color is selected.
 また、代表色が領域A5002、A5003、A5004又はA5005の色と判定された場合、その色から連想する形容詞が、テキスト中の単語に適用される。例えば、代表色が領域A5003の色(緑)と判定された場合、緑から連想する形容詞である「心地良い」、「さわやかな」等が適用される。 Also, when the representative color is determined to be the color of the area A5002, A5003, A5004 or A5005, the adjective associated with the color is applied to the word in the text. For example, when the representative color is determined to be the color (green) of the area A5003, the adjectives associated with green, such as “comfortable” and “fresh”, are applied.
 なお、代表色が領域A5001~A5005の色と判定され、且つそのトーンがビビッド・トーン(V)、ストロング・トーン(S)、ブライト・トーン(B)、又はペール・トーン(LT)の場合には、形容詞の前に程度を表す副詞(例:とても、かなり等)が適用される。 When the representative color is determined to be the color of the region A5001 to A5005 and the tone is a vivid tone (V), strong tone (S), bright tone (B), or pale tone (LT) Applies adverbs that indicate the degree before the adjectives (eg, very, pretty, etc.).
 代表色が領域A5006、すなわち「ホワイト・トーン(白)」と判定された場合、白から連想される単語である「清らかな」、「澄んだ」等が選択される。また、代表色が領域A5007、すなわちグレー系の色(ライト・グレイ・トーン:ltGY、ミディアム・グレイ・トーン:mGY、又はダーク・グレイ・トーン:dkGY)と判定された場合、無難な形容詞である「きれいな」、「すてきな」等が選択される。白、又はグレー系の色、すなわち無彩色が代表色となる画像においては、さまざまな色が画像全体に含まれる場合が多い。したがって、色とは関連性の少ない単語を用いることで、的外れな意味のテキストが付与されるのを防止し、画像から受けるイメージに比較的近いテキストを付与することができる。 When it is determined that the representative color is the area A5006, that is, “white tone (white)”, words that are associated with white, such as “clean” and “clear”, are selected. If the representative color is determined to be the area A5007, that is, a gray-based color (light gray tone: ltGY, medium gray tone: mGY, or dark gray tone: dkGY), it is a safe adjective. “Clean”, “nice”, etc. are selected. In an image in which a white or gray color, that is, an achromatic color is a representative color, various colors are often included in the entire image. Therefore, by using words that are less related to color, it is possible to prevent text with inappropriate meanings from being added, and to add text that is relatively close to the image received from the image.
 また、代表色が領域A5001~A5007のいずれの領域にも属さない場合、すなわち代表色が低トーン(ダーク・グレイッシュ・トーン)、又は黒(ブラック・トーン)である場合、所定の意味を有する文字(単語、又は文章)をテキストとして選択することができる。所定の意味を有する文字は、例えば、「ここはどこ」、「あっ」等を含む。これらの単語や文章は、「つぶやき辞書」として画像処理装置の記憶部に保存しておくことができる。 In addition, when the representative color does not belong to any of the areas A5001 to A5007, that is, when the representative color is a low tone (dark grayish tone) or black (black tone), characters having a predetermined meaning (Word or sentence) can be selected as text. Characters having a predetermined meaning include, for example, “where is here”, “a”, and the like. These words and sentences can be stored in the storage unit of the image processing apparatus as a “tweet dictionary”.
 すなわち、代表色が低トーン、又は黒と判定されたとき、画像全体の色相の判定が困難なことがあるが、このような場合においても上記のように色とは関連性の少ない文字を用いることで、的外れな意味のテキストが付与されるのを防止し、画像から受けるイメージに近いテキストを付与することができる。 In other words, when the representative color is determined to be low tone or black, it may be difficult to determine the hue of the entire image. Even in such a case, characters having less relation to the color are used as described above. Thus, it is possible to prevent a text having an inappropriate meaning from being added, and to add a text close to an image received from an image.
 また、上記の例では、シーンと代表色に応じて文章と単語が一義的に決定される場合について説明したが、これに限らず、文章と単語の選択において、時々、例外処理を行うこともできる。例えば、複数回に1回(例えば10回に1回)は、上記の「つぶやき辞書」からテキストを抽出してもよい。これにより、テキストの表示内容が必ずしもパターン化されることがないので、ユーザが表示内容に飽きるのを防止することができる。 In the above example, the case where the sentence and the word are uniquely determined according to the scene and the representative color has been described. However, the present invention is not limited to this, and exception processing is sometimes performed in the selection of the sentence and the word. it can. For example, the text may be extracted from the “tweet dictionary” once every plural times (for example, once every 10 times). As a result, the display content of the text is not necessarily patterned, so that the user can be prevented from getting bored with the display content.
 なお、上記の例において、文章付加部は、文章作成部によって生成されたテキストを画像の上部、又は下部に配置する場合について説明したが、これに限らず、例えばテキストを画像の外(枠外)に配置することもできる。 In the above example, the case where the sentence adding unit arranges the text generated by the sentence creating unit at the upper part or the lower part of the image has been described. However, the present invention is not limited to this. It can also be arranged.
 また、上記の例において、テキストの位置が画像内で固定されている場合について説明したが、これに限らず、例えば画像処理装置の表示部において、テキストを流れるように表示させることができる。これにより、入力画像がテキストにより影響を受けにくい、又はテキストの視認性が向上される。 In the above example, the case where the position of the text is fixed in the image has been described. However, the present invention is not limited to this. For example, the text can be displayed so as to flow on the display unit of the image processing apparatus. Thereby, the input image is not easily affected by the text, or the text visibility is improved.
 なお、上記の例において、テキストが画像に必ず貼り付けられる場合について説明したが、これに限らず、例えば人物画像の場合には、テキストは貼り付けず、遠景画像又はその他の画像の場合にはテキストを貼り付けるようにしてもよい。 In the above example, the case where the text is always pasted on the image has been described. However, the present invention is not limited to this. For example, in the case of a person image, the text is not pasted. You may make it paste a text.
 また、上記の例において、文章付加部は、文章作成部によって生成されたテキストの表示方法(フォント、色、表示位置など)を所定の方法で決定する場合について説明したが、これに限らず、テキストの表示方法は、多種多様に決定することができる。以下、これらの方法について、いくつかの例を示す。 In the above example, the sentence adding unit has described the case where the display method (font, color, display position, etc.) of the text generated by the sentence creating unit is determined by a predetermined method. A variety of text display methods can be determined. Hereinafter, some examples of these methods will be described.
 一例においては、ユーザが画像処理装置の操作部を介して、テキストの表示方法(フォント、色、表示位置)を修正することができる。或いは、ユーザは、テキストの内容(単語)を変更、又は削除することができる。また、ユーザは、テキスト全体を表示させないように設定する、すなわちテキストの表示/非表示を選択することができる。 In one example, the user can correct the text display method (font, color, display position) via the operation unit of the image processing apparatus. Alternatively, the user can change or delete the contents (words) of the text. In addition, the user can select not to display the entire text, that is, display / non-display of the text.
 また、一例においては、入力画像のシーンに応じてテキストの大きさを変更することができる。例えば、入力画像のシーンが人物画像の場合、テキストを小さくし、入力画像のシーンが遠景画像又はその他の画像の場合、テキストを大きくすることができる。 In one example, the size of the text can be changed according to the scene of the input image. For example, when the scene of the input image is a person image, the text can be reduced, and when the scene of the input image is a distant view image or other images, the text can be increased.
 また、一例においては、テキストを強調表示して画像データに合成することもできる。例えば、入力画像が人物画像の場合、人物に吹き出しを付与し、その吹き出し中にテキストを配置することができる。 In one example, text can be highlighted and combined with image data. For example, when the input image is a person image, a balloon can be given to the person and text can be placed in the balloon.
 また、一例においては、テキストの表示色は、入力画像の代表色を基準として設定することできる。具体的には、入力画像の代表色と色相は同じであり、且つトーンが異なる色を、テキストの表示色として用いることができる。これにより、テキストが過度に主張されることなく、入力画像とほどよく調和したテキストを付与することができる。 In one example, the display color of the text can be set based on the representative color of the input image. Specifically, a color having the same hue as the representative color of the input image and a different tone can be used as a text display color. As a result, it is possible to give a text that is in harmony with the input image without excessively claiming the text.
 また、特に、入力画像の代表色が白の場合、テキストの表示色の決定において、例外処理を行ってもよい。ここで、例外処理では例えば、テキストの色を白とし、そのテキストの周辺部を黒に設定することができる。 In particular, when the representative color of the input image is white, exception processing may be performed in determining the text display color. Here, in the exception processing, for example, the text color can be set to white and the peripheral portion of the text can be set to black.
 以上、図面を参照して本発明の実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、本発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。
 例えば、上述した実施形態では、撮像装置1100が画像処理部(画像処理装置)3140、3140a、3140b、4140を備えているが、例えば、パーソナルコンピュータ、タブレットPC(Personal Computer)、デジタルカメラや携帯電話機等の端末装置が、画像処理装置である画像処理部3140、3140a、3140b、4140を備えてもよい。
As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. Is possible.
For example, in the above-described embodiment, the imaging device 1100 includes the image processing units (image processing devices) 3140, 3140a, 3140b, and 4140. For example, a personal computer, a tablet PC (Personal Computer), a digital camera, and a mobile phone And the like may include image processing units 3140, 3140a, 3140b, and 4140, which are image processing apparatuses.
 1001・・・画像処理装置、1010・・・画像入力部、1020・・・判定部、1030・・・文章作成部、1040・・・文章付加部、1090・・・記憶部、1100・・・撮像装置、1110・・・撮像部、1111・・・光学系、1119・・・撮像素子、1120・・・AD変換部、1130・・・バッファメモリ部、1140・・・画像処理部、1150・・・表示部、1160・・・記憶部、1170・・・通信部、1180・・・操作部、1190・・・CPU、1200・・・記憶媒体、1300・・・バス。 DESCRIPTION OF SYMBOLS 1001 ... Image processing apparatus, 1010 ... Image input part, 1020 ... Determination part, 1030 ... Text preparation part, 1040 ... Text addition part, 1090 ... Storage part, 1100 ... Imaging device, 1110 ... Imaging unit, 1111 ... Optical system, 1119 ... Image sensor, 1120 ... AD conversion unit, 1130 ... Buffer memory unit, 1140 ... Image processing unit, 1150 .. Display unit, 1160... Storage unit, 1170... Communication unit, 1180... Operation unit, 1190... CPU, 1200.
 2100・・・撮像装置、2001・・・撮像システム、2002・・・撮像部、2003・・・カメラ制御部、2004、2004a、2004b・・・画像処理部、2005・・・記憶部、2006・・・バッファメモリ部、2007・・・表示部、2011・・・操作部、2012・・・通信部、2013・・・電源部、2015・・・バス、2021・・・レンズ部、2022・・・撮像素子、2023・・・AD変換部、2041、2041b・・・画像取得部、2042、2042b・・・画像識別情報取得部、2043、2043b・・・色空間ベクトル生成部、2044・・・主要色抽出部、2045・・・テーブル記憶部、2046、2046a・・・第1ラベル生成部、2047・・・第2ラベル生成部、2048・・・ラベル出力部、2241・・・特徴量抽出部、2242・・・シーン判別部。 2100 ... Imaging device, 2001 ... Imaging system, 2002 ... Imaging unit, 2003 ... Camera control unit, 2004, 2004a, 2004b ... Image processing unit, 2005 ... Storage unit, 2006 ... Buffer memory section 2007 ... Display section 2011 ... Operation section 2012 ... Communication section 2013 ... Power supply section 2015 ... Bus 2021 ... Lens section 2022 Image sensor, 2023 ... AD converter, 2041, 2041b ... image acquisition unit, 2042, 2042b ... image identification information acquisition unit, 2043, 2043b ... color space vector generation unit, 2044 ... Main color extraction unit, 2045, table storage unit, 2046, 2046a, first label generation unit, 2047, second label generation unit, 2048 Label output unit, 2241 ... feature amount extracting unit, 2242 ... scene discrimination unit.
 3011・・・画像入力部、3012・・・テキスト入力部、3013・・・第1の位置入力部、3014・・・エッジ検出部、3015・・・顔検出部、3016・・・文字サイズ決定部、3017,3017a・・・コスト算出部、3018,3018b・・・領域決定部、3019・・・合成部、3021,3031・・・第2の位置入力部、3140,3140a,3140b・・・画像処理部。 3011 ... Image input unit, 3012 ... Text input unit, 3013 ... First position input unit, 3014 ... Edge detection unit, 3015 ... Face detection unit, 3016 ... Character size determination Part, 3017, 3017a ... cost calculation part, 3018, 3018b ... area determination part, 3019 ... synthesis part, 3021, 3031 ... second position input part, 3140, 3140a, 3140b ... Image processing unit.
 4011・・・画像入力部、4012・・・テキスト設定部、4013・・・テキスト合成領域設定部、4014・・・フォント設定部、4015・・・合成画像生成部、4016・・・記憶部、4021・・・フォントカラー設定部、4031・・・RGB系からPCCS表色系への変換表の情報、4032・・・トーン変換表の情報、4033・・・アウトライン情報、4034・・・色変化判定条件の情報、4140・・・画像処理部。 4011 ... Image input unit, 4012 ... Text setting unit, 4013 ... Text composition area setting unit, 4014 ... Font setting unit, 4015 ... Composite image generation unit, 4016 ... Storage unit, 4021 ... Font color setting unit, 4031 ... Conversion table information from RGB system to PCCS color system, 4032 ... Tone conversion table information, 4033 ... Outline information, 4034 ... Color change Information on determination conditions, 4140... Image processing unit.

Claims (48)

  1.  撮像画像を入力する画像入力部と、
     所定の空欄部に単語を挿入して文章を完成させる文章テンプレートとして、人物が被写体である人物画像に対する文章の作成に用いられる人物画像用テンプレートと、風景が被写体である風景画像に対する文章の作成に用いられる風景画像用テンプレートとを記憶する記憶部と、
     前記撮像画像が、前記人物画像であるか前記風景画像であるかを判定する判定部と、
     前記撮像画像に対する前記判定部による判定結果に応じて、前記人物画像用テンプレート又は前記風景画像用テンプレートの何れかの前記文章テンプレートを前記記憶部から読み出し、読み出した前記文章テンプレートの前記空欄部に前記撮像画像の特徴量又は撮像条件に応じた単語を挿入して前記撮像画像に対する文章を作成する文章作成部と
    を備えることを特徴とする画像処理装置。
    An image input unit for inputting a captured image;
    As a sentence template for completing a sentence by inserting a word into a predetermined blank space, a person image template used for creating a sentence for a person image with a person as a subject and a sentence for a landscape image with a landscape as a subject A storage unit for storing a landscape image template to be used;
    A determination unit that determines whether the captured image is the person image or the landscape image;
    According to a determination result by the determination unit for the captured image, the sentence template of either the person image template or the landscape image template is read from the storage unit, and the blank part of the read sentence template is stored in the blank part. An image processing apparatus comprising: a sentence creating unit that creates a sentence for the captured image by inserting a word corresponding to a feature amount or an imaging condition of the captured image.
  2.  請求項1に記載の画像処理装置において、
     前記記憶部は、
     被写体として撮像された人物の視点による文章に前記空欄部を設定した前記文章テンプレートを前記人物画像用テンプレートとして記憶し、
     被写体を撮像した撮像者の視点による文章に前記空欄部を設定した前記文章テンプレートを前記風景画像用テンプレートとして記憶することを特徴とする画像処理装置。
    The image processing apparatus according to claim 1.
    The storage unit
    Storing the sentence template in which the blank portion is set in a sentence from the viewpoint of a person imaged as a subject as the person image template;
    An image processing apparatus, wherein the sentence template in which the blank portion is set in a sentence from a viewpoint of a photographer who has photographed a subject is stored as the landscape image template.
  3.  請求項1又は請求項2に記載の画像処理装置において、
     前記判定部は、
     前記人物画像において、更に、前記特徴量として被写体の人数を判定し、
     前記文章作成部は、
     前記人物画像に対し、被写体の人数に応じた単語を前記空欄部に挿入して文章を作成することを特徴とする画像処理装置。
    The image processing apparatus according to claim 1 or 2,
    The determination unit
    In the person image, the number of subjects is further determined as the feature amount,
    The sentence creation unit
    An image processing apparatus, wherein a sentence is created by inserting a word corresponding to the number of subjects in the blank portion with respect to the person image.
  4.  請求項3に記載の画像処理装置において、
     前記判定部は、
     前記撮像画像内に複数の顔領域を認識した場合において、
     前記撮像画像の大きさに対する最大の顔領域の大きさの割合が第1の閾値以上であり、前記第1の閾値以上の値である第2閾値未満であって、かつ、複数の顔領域の割合の標準偏差若しくは分散又は複数の顔領域の大きさの標準偏差若しくは分散が第3の閾値未満であるとき、
     又は、前記最大の顔領域の大きさの割合が前記第2閾値以上であるときは、
     前記撮像画像は前記人物画像であると判定するとともに、前記第1の閾値以上の割合である顔領域の数に基づいて被写体の人数を判定することを特徴とする画像処理装置。
    The image processing apparatus according to claim 3.
    The determination unit
    In the case where a plurality of face areas are recognized in the captured image,
    The ratio of the size of the maximum face area to the size of the captured image is greater than or equal to a first threshold, less than a second threshold that is greater than or equal to the first threshold, and a plurality of face areas When the standard deviation or variance of the ratio or the standard deviation or variance of the sizes of the plurality of face regions is less than the third threshold,
    Or, when the ratio of the size of the maximum face area is equal to or greater than the second threshold value,
    An image processing apparatus, wherein the captured image is determined to be the person image, and the number of subjects is determined based on the number of face areas having a ratio equal to or greater than the first threshold.
  5.  請求項1から請求項4の何れか1項に記載の画像処理装置において、
     前記文章作成部は、
     前記撮像画像の特徴量に応じた単語として、前記撮像画像の配色パターンに応じた形容詞を前記空欄部に挿入して文章を作成することを特徴とする画像処理装置。
    The image processing apparatus according to any one of claims 1 to 4,
    The sentence creation unit
    An image processing apparatus, wherein a sentence is created by inserting an adjective corresponding to a color arrangement pattern of the captured image into the blank portion as a word corresponding to a feature amount of the captured image.
  6.  請求項5に記載の画像処理装置において、
     前記文章作成部は、
     前記撮像画像が前記人物画像であるか前記風景画像であるかに応じて決定する前記撮像画像上の所定領域の配色パターンに応じた形容詞を前記空欄部に挿入して文章を作成することを特徴とする画像処理装置。
    The image processing apparatus according to claim 5.
    The sentence creation unit
    A sentence is created by inserting an adjective in accordance with a color arrangement pattern of a predetermined area on the captured image determined according to whether the captured image is the person image or the landscape image into the blank section. An image processing apparatus.
  7.  撮像画像が入力される画像入力部と、
     前記撮像画像の特徴量、及び、前記撮像画像の撮像条件の少なくとも一方に対応するテキストを決定する決定部と、
     前記撮像画像が第1種別の画像であるか、前記第1種別とは異なる第2種別の画像であるかを判定する判定部と、
     前記第1種別に用いられる文章の構文である第1構文と、前記第2種別に用いられる文章の構文である第2構文とを記憶する記憶部と、
     前記撮像画像が前記第1種別の画像であると前記判定部により判定されたとき、前記決定部が決定した前記テキストを用いて前記第1構文の文章を作成し、前記撮像画像が前記第2種別の画像であると前記判定部により判定されたとき、前記決定部が決定した前記テキストを用いて前記第2構文の文章を作成する文章作成部と
    を含むことを特徴とする画像処理装置。
    An image input unit for inputting a captured image;
    A determination unit that determines text corresponding to at least one of the feature amount of the captured image and the imaging condition of the captured image;
    A determination unit that determines whether the captured image is a first type image or a second type image different from the first type;
    A storage unit for storing a first syntax that is a syntax of a sentence used for the first type and a second syntax that is a syntax of a sentence used for the second type;
    When the determination unit determines that the captured image is the first type image, the sentence having the first syntax is created using the text determined by the determination unit, and the captured image is the second image. An image processing apparatus, comprising: a sentence creation unit that creates a sentence of the second syntax using the text determined by the determination unit when the determination unit determines that the image is a type image.
  8.  請求項7に記載された画像処理装置であって、
     前記第1種別は、ポートレートであり、前記第2種別は、風景であることを特徴とする画像処理装置。
    An image processing apparatus according to claim 7,
    The image processing apparatus according to claim 1, wherein the first type is a portrait, and the second type is a landscape.
  9.  被写体を撮像して撮像画像を生成する撮像部と、
     所定の空欄部に単語を挿入して文章を完成させる文章テンプレートとして、人物が被写体である人物画像に対する文章の作成に用いられる人物画像用テンプレートと、風景が被写体である風景画像に対する文章の作成に用いられる風景画像用テンプレートとを記憶する記憶部と、
     前記撮像画像が、前記人物画像であるか前記風景画像であるかを判定する判定部と、
     前記撮像画像に対する前記判定部による判定結果に応じて、前記人物画像用テンプレート又は前記風景画像用テンプレートの何れかの前記文章テンプレートを前記記憶部から読み出し、読み出した前記文章テンプレートの前記空欄部に前記撮像画像の特徴量又は撮像条件に応じた単語を挿入して前記撮像画像に対する文章を作成する文章作成部と
    を備えることを特徴とする撮像装置。
    An imaging unit that images a subject and generates a captured image;
    As a sentence template for completing a sentence by inserting a word into a predetermined blank space, a person image template used for creating a sentence for a person image with a person as a subject and a sentence for a landscape image with a landscape as a subject A storage unit for storing a landscape image template to be used;
    A determination unit that determines whether the captured image is the person image or the landscape image;
    According to a determination result by the determination unit for the captured image, the sentence template of either the person image template or the landscape image template is read from the storage unit, and the blank part of the read sentence template is stored in the blank part. An imaging apparatus comprising: a sentence creating unit that creates a sentence for the captured image by inserting a word corresponding to a feature amount or an imaging condition of the captured image.
  10.  所定の空欄部に単語を挿入して文章を完成させる文章テンプレートとして、人物が被写体である人物画像に対する文章の作成に用いられる人物画像用テンプレートと、風景が被写体である風景画像に対する文章の作成に用いられる風景画像用テンプレートとを記憶する記憶部を備える画像処理装置のコンピュータに、
     撮像画像を入力する画像入力ステップと、
     前記撮像画像が、前記人物画像であるか前記風景画像であるかを判定する判定ステップと、
     前記撮像画像に対する前記判定ステップによる判定結果に応じて、前記人物画像用テンプレート又は前記風景画像用テンプレートの何れかの前記文章テンプレートを前記記憶部から読み出し、読み出した前記文章テンプレートの前記空欄部に前記撮像画像の特徴量又は撮像条件に応じた単語を挿入して前記撮像画像に対する文章を作成する文章作成ステップと
    を実行させることを特徴とするプログラム。
    As a sentence template for completing a sentence by inserting a word into a predetermined blank space, a person image template used for creating a sentence for a person image with a person as a subject and a sentence for a landscape image with a landscape as a subject In a computer of an image processing apparatus provided with a storage unit for storing a landscape image template to be used,
    An image input step for inputting a captured image;
    A determination step of determining whether the captured image is the person image or the landscape image;
    According to the determination result of the determination step for the captured image, the sentence template of either the person image template or the landscape image template is read from the storage unit, and the blank section of the read sentence template is stored in the blank section. A program for executing a sentence creation step of creating a sentence for the captured image by inserting a word corresponding to a feature amount or an imaging condition of the captured image.
  11.  撮像画像から所定の意味を有する文字を決定する決定部と、
     前記撮像画像が人物画像であるか、前記人物画像とは異なる画像であるかを判定する判定部と、
     前記人物画像に用いられる文章の構文である第1構文と、前記人物画像とは異なる画像に用いられる文章の構文である第2構文とを記憶する記憶部と、
     前記撮像画像が前記人物画像であると前記判定部により判定されたとき、前記所定の意味を有する文字を用いて前記第1構文の文章を出力し、前記撮像画像が前記人物画像とは異なる画像であると前記判定部により判定されたとき、前記所定の意味を有する文字を用いて前記第2構文の文章を出力する出力部とを有することを特徴とする画像処理装置。
    A determining unit that determines a character having a predetermined meaning from the captured image;
    A determination unit that determines whether the captured image is a person image or an image different from the person image;
    A storage unit that stores a first syntax that is a syntax of a sentence used for the person image and a second syntax that is a syntax of a sentence used for an image different from the person image;
    When the determination unit determines that the captured image is the person image, the first syntax sentence is output using the characters having the predetermined meaning, and the captured image is different from the person image. And an output unit that outputs the sentence of the second syntax using the character having the predetermined meaning when it is determined by the determination unit.
  12.  撮像された画像データを取得する画像取得部と、
     前記取得された画像データからシーンを判別するシーン判別部と、
     前記取得された画像データから色情報の頻度分布に基づき主要色を抽出する主要色抽出部と、
     シーン毎に色情報と第1ラベルとが関連付けられて予め記憶されている記憶部と、
     前記記憶部から、前記抽出された主要色と前記判別されたシーンとに関連付けて予め記憶されている前記第1ラベルを読み出し、前記読み出した第1ラベルを前記取得された画像データのラベルとして生成する第1ラベル生成部と、
     を備えることを特徴とする画像処理装置。
    An image acquisition unit for acquiring captured image data;
    A scene discriminating unit for discriminating a scene from the acquired image data;
    A main color extraction unit for extracting a main color from the acquired image data based on a frequency distribution of color information;
    A storage unit in which color information and a first label are associated and stored in advance for each scene;
    Reading the first label stored in advance in association with the extracted main color and the determined scene from the storage unit, and generating the read first label as a label of the acquired image data A first label generator that
    An image processing apparatus comprising:
  13.  前記抽出された主要色の頻度に基づき前記主要色の割合を正規化し、前記正規化した主要色の割合に基づき、前記第1ラベルを修正することで第2ラベルを生成する第2ラベル生成部
     を備えることを特徴とする請求項12に記載の画像処理装置。
    A second label generating unit that normalizes a ratio of the main color based on the frequency of the extracted main color and generates a second label by correcting the first label based on the normalized ratio of the main color. The image processing apparatus according to claim 12, further comprising:
  14.  前記記憶部には、
     前記判別されたシーン毎に複数の色情報の組み合わせ情報とラベルとが関連付けられている
     ことを特徴とする請求項12または請求項13に記載の画像処理装置。
    In the storage unit,
    The image processing apparatus according to claim 12 or 13, wherein a combination information of a plurality of pieces of color information and a label are associated with each determined scene.
  15.  前記シーン判別部は、
     前記取得された画像データから画像識別情報を取得し、前記取得した画像識別情報から前記シーンを示す情報を抽出し、前記抽出したシーンを示す情報に基づき前記画像データの前記シーンを判別する
     ことを特徴とする請求項12から請求項14のいずれか1項に記載の画像処理装置。
    The scene discrimination unit
    Acquiring image identification information from the acquired image data, extracting information indicating the scene from the acquired image identification information, and determining the scene of the image data based on the information indicating the extracted scene. The image processing apparatus according to claim 12, wherein the image processing apparatus is characterized.
  16.  前記シーン判別部は、
     前記取得された画像データから特徴量を抽出し、前記抽出した特徴量に基づき、前記画像データの前記シーンを判別する
     ことを特徴とする請求項15に記載の画像処理装置。
    The scene discrimination unit
    The image processing apparatus according to claim 15, wherein a feature amount is extracted from the acquired image data, and the scene of the image data is determined based on the extracted feature amount.
  17.  前記判別されたシーンに基づき、前記主要色を抽出する領域を前記取得された画像データから抽出する領域抽出部
     を備え、
     前記主要色抽出部は、
     前記主要色を抽出する領域の画像データから前記主要色を抽出する
     ことを特徴とする請求項12から請求項15のいずれか1項に記載の画像処理装置。
    An area extracting unit for extracting an area for extracting the main color from the acquired image data based on the determined scene;
    The main color extraction unit includes:
    The image processing apparatus according to any one of claims 12 to 15, wherein the main color is extracted from image data of an area from which the main color is extracted.
  18.  前記第1ラベルおよび前記第1ラベルを修正することで生成された第2ラベル、あるいは、前記第1ラベルまたは前記第2ラベルに基づく情報を、前記取得された画像データと関連付けて前記記憶部に記憶させる
     ことを特徴とする請求項13から請求項17のいずれか1項に記載の画像処理装置。
    The first label and the second label generated by correcting the first label, or information based on the first label or the second label is associated with the acquired image data in the storage unit. The image processing apparatus according to claim 13, wherein the image processing apparatus is stored.
  19.  請求項12から請求項18のいずれか1項に記載の画像処理装置を備えることを特徴とする撮像装置。 An imaging apparatus comprising the image processing apparatus according to any one of claims 12 to 18.
  20.  撮像部を有する画像処理装置の画像処理をコンピュータに実行させるためのプログラムであり、
     撮像した画像データを取得する画像取得手順と、
     前記取得された画像データからシーンを判別するシーン判別手順と、
     前記取得された画像データから色情報の頻度分布に基づき主要色を抽出する主要色抽出手順と、
     前記抽出された主要色と、シーン毎に色情報と第1ラベルとが関連付けられて予め記憶されている記憶部から前記第1ラベルを読み出し、前記読み出した第1ラベルを前記取得された画像データのラベルとして生成する第1ラベル生成手順と、
     をコンピュータに実行させるためのプログラム。
    A program for causing a computer to execute image processing of an image processing apparatus having an imaging unit,
    An image acquisition procedure for acquiring captured image data;
    A scene determination procedure for determining a scene from the acquired image data;
    A main color extraction procedure for extracting a main color from the acquired image data based on a frequency distribution of color information;
    The extracted primary color, color information and first label for each scene are associated with each other, the first label is read from a storage unit that is stored in advance, and the read first label is used as the acquired image data. A first label generation procedure for generating as a label of
    A program that causes a computer to execute.
  21.  人物撮影シーンであるか否かを判別するシーン判別部と、
     前記シーン判別部により人物撮影シーンではないと判別されたとき、前記画像データから色情報を抽出する色抽出部と、
     色情報と所定の意味を有する文字とが関連付けられて予め記憶されている記憶部と、
     前記シーン判別部により人物撮影シーンではないと判別されたとき、前記色抽出部に抽出された前記色情報に対応する前記所定の意味を有する文字を前記記憶部から読み出す読み出し部とを備えることを特徴とする画像処理装置。
    A scene discriminating unit for discriminating whether or not it is a person-photographed scene;
    A color extraction unit that extracts color information from the image data when the scene determination unit determines that the scene is not a person-captured scene;
    A storage unit in which color information and characters having a predetermined meaning are associated and stored in advance;
    A reading unit that reads out, from the storage unit, characters having the predetermined meaning corresponding to the color information extracted by the color extraction unit when the scene determination unit determines that the scene is not a person-captured scene. A featured image processing apparatus.
  22.  画像データ、及び、テキストデータを取得する取得部と、
     前記取得部が取得した前記画像データのエッジを検出する検出部と、
     前記検出部により検出されたエッジに基づいて、前記画像データにおける前記テキストデータが配置される領域を決定する領域決定部と、
     前記領域決定部により決定された領域に前記テキストデータを配置した画像を生成する画像生成部と、
     を含むことを特徴とする画像処理装置。
    An acquisition unit for acquiring image data and text data;
    A detection unit for detecting an edge of the image data acquired by the acquisition unit;
    An area determination unit that determines an area in which the text data is arranged in the image data based on the edge detected by the detection unit;
    An image generation unit that generates an image in which the text data is arranged in an area determined by the area determination unit;
    An image processing apparatus comprising:
  23.  請求項22に記載された画像処理装置であって、
     前記領域決定部は、前記画像データにおいてエッジの少ない領域を前記テキストデータが配置される領域として決定する
     ことを特徴とする画像処理装置。
    An image processing apparatus according to claim 22, wherein
    The area determination unit determines an area with few edges in the image data as an area where the text data is arranged.
  24.  画像データを入力する画像入力部と、
     前記画像入力部により入力された画像データにおけるエッジを検出するエッジ検出部と、
     テキストデータを入力するテキスト入力部と、
     前記エッジ検出部により検出されたエッジに基づいて、前記画像データにおける前記テキストデータの合成領域を決定する領域決定部と、
     前記領域決定部により決定された合成領域に前記テキストデータを合成する合成部と、
     を備えることを特徴とする画像処理装置。
    An image input unit for inputting image data;
    An edge detection unit for detecting edges in the image data input by the image input unit;
    A text input section for inputting text data;
    An area determination unit that determines a synthesis area of the text data in the image data based on the edge detected by the edge detection unit;
    A synthesizing unit that synthesizes the text data with the synthesis region determined by the region determining unit;
    An image processing apparatus comprising:
  25.  請求項24に記載の画像処理装置において、
     前記領域決定部は、前記画像データにおいてエッジの少ない領域を前記合成領域として決定する
     ことを特徴とする画像処理装置。
    The image processing apparatus according to claim 24, wherein
    The area determination unit determines an area with few edges in the image data as the synthesis area.
  26.  請求項24又は25に記載の画像処理装置において、
     前記画像データの各位置における重要度を表すコストを、前記エッジ検出部により検出されたエッジのある位置のコストが高くなるように算出するコスト算出部を備え、
     前記領域決定部は、前記コスト算出部により算出されたコストに基づいて、前記合成領域に対応するコストが小さい領域を前記合成領域として決定する
     ことを特徴とする画像処理装置。
    The image processing apparatus according to claim 24 or 25,
    A cost calculation unit that calculates the cost representing the importance at each position of the image data so that the cost of the position where the edge is detected by the edge detection unit is high;
    The image processing apparatus according to claim 1, wherein the region determination unit determines a region having a low cost corresponding to the synthesis region as the synthesis region based on the cost calculated by the cost calculation unit.
  27.  請求項26に記載の画像処理装置において、
     前記画像データにおける第1の位置を入力する第1の位置入力部を備え、
     前記コスト算出部は、前記第1の位置入力部により入力された前記第1の位置から近い位置ほどコストを高くし、前記第1の位置から遠い位置ほどコストを低くする
     ことを特徴とする画像処理装置。
    The image processing apparatus according to claim 26, wherein
    A first position input unit for inputting a first position in the image data;
    The cost calculating unit increases the cost as the position is closer to the first position input by the first position input unit, and lowers the cost as the position is farther from the first position. Processing equipment.
  28.  請求項26又は27に記載の画像処理装置において、
     前記画像データから人物の顔を検出する顔検出部を備え、
     前記コスト算出部は、前記顔検出部により検出された顔のある領域のコストを高くする
     ことを特徴とする画像処理装置。
    The image processing apparatus according to claim 26 or 27,
    A face detection unit for detecting a human face from the image data;
    The cost calculation unit increases the cost of a region with a face detected by the face detection unit.
  29.  請求項26から28のうちいずれか1項に記載の画像処理装置において、
     前記テキストデータを合成する第2の位置を入力する第2の位置入力部を備え、
     前記コスト算出部は、前記第2の位置入力部により入力された前記第2の位置のコストを低くする
     ことを特徴とする画像処理装置。
    The image processing apparatus according to any one of claims 26 to 28,
    A second position input unit for inputting a second position for combining the text data;
    The cost calculation unit reduces the cost of the second position input by the second position input unit.
  30.  請求項24から29のうちいずれか1項に記載の画像処理装置において、
     前記画像データの画像領域内に前記テキストデータのテキストの全てを含めて合成できるように、前記テキストデータの文字の大きさを決定する文字サイズ決定部を備える
     ことを特徴とする画像処理装置。
    The image processing device according to any one of claims 24 to 29,
    An image processing apparatus, comprising: a character size determining unit that determines a character size of the text data so that all of the text of the text data can be combined in an image area of the image data.
  31.  請求項24から30のうちいずれか1項に記載の画像処理装置において、
     前記画像入力部は、動画の画像データを入力し、
     前記領域決定部は、前記動画の画像データに含まれる複数のフレーム画像に基づいて前記テキストデータの前記合成領域を決定する
     ことを特徴とする画像処理装置。
    The image processing apparatus according to any one of claims 24 to 30, wherein
    The image input unit inputs image data of a moving image,
    The area determination unit determines the synthesis area of the text data based on a plurality of frame images included in the image data of the moving image.
  32.  画像データを入力するステップと、
     テキストデータを入力するステップと、
     前記入力された画像データにおけるエッジを検出するステップと、
     前記検出したエッジに基づいて、前記画像データにおける前記テキストデータの合成領域を決定するステップと、
     前記決定した合成領域に前記テキストデータを合成するステップと、
     をコンピュータに実行させるためのプログラム。
    Inputting image data;
    Entering text data; and
    Detecting an edge in the input image data;
    Determining a synthesis area of the text data in the image data based on the detected edge;
    Combining the text data with the determined combining region;
    A program that causes a computer to execute.
  33.  画像処理装置が、画像データを入力するステップと、
     前記画像処理装置が、テキストデータを入力するステップと、
     前記画像処理装置が、前記入力された画像データにおけるエッジを検出するステップと、
     前記画像処理装置が、前記検出したエッジに基づいて、前記画像データにおける前記テキストデータの合成領域を決定するステップと、
     前記画像処理装置が、前記決定した合成領域に前記テキストデータを合成するステップと、
     を有することを特徴とする画像処理方法。
    An image processing apparatus for inputting image data;
    The image processing apparatus inputting text data;
    The image processing device detecting an edge in the input image data;
    The image processing device determining a synthesis area of the text data in the image data based on the detected edge;
    The image processing device combining the text data with the determined combining region;
    An image processing method comprising:
  34.  請求項24から31のうちいずれか1項に記載の画像処理装置
     を備えることを特徴とする撮像装置。
    An image pickup apparatus comprising the image processing apparatus according to any one of claims 24 to 31.
  35.  画像データのエッジを検出する検出部と、
     前記検出部により検出された前記エッジの位置に基づいて、前記画像データにおける文字が配置される配置領域を決定する領域決定部と、
     前記領域決定部により決定された前記配置領域に前記文字を配置した画像を生成する画像生成部と、
     を含むことを特徴とする画像処理装置。
    A detection unit for detecting an edge of image data;
    An area determination unit that determines an arrangement area in which characters in the image data are arranged based on the position of the edge detected by the detection unit;
    An image generation unit that generates an image in which the characters are arranged in the arrangement region determined by the region determination unit;
    An image processing apparatus comprising:
  36.  画像データを入力する画像入力部と、
     テキストのデータを設定するテキスト設定部と、
     前記画像入力部により入力された画像データにおいて前記テキスト設定部により設定されたテキストのデータを合成する領域であるテキスト合成領域を設定するテキスト合成領域設定部と、
     前記画像入力部により入力された画像データおよび前記テキスト合成領域設定部により設定されたテキスト合成領域に基づくPCCS表色系のトーンおよび色相に対して、色相はそのままにしてトーンを変更したフォントカラーを設定するフォントカラー設定部を含み、少なくともフォントカラーを含むフォントを設定するフォント設定部と、
     前記画像入力部により入力された画像データにおいて前記テキスト合成領域設定部により設定されたテキスト合成領域に前記フォント設定部により設定された少なくともフォントカラーを含むフォントを用いて前記テキスト設定部により設定されたテキストのデータを合成した画像のデータである合成画像のデータを生成する合成画像生成部と、
     を備えることを特徴とする画像処理装置。
    An image input unit for inputting image data;
    A text setting section for setting text data;
    A text composition area setting section for setting a text composition area, which is an area for synthesizing text data set by the text setting section in the image data input by the image input section;
    For the tone and hue of the PCCS color system based on the image data input by the image input unit and the text composition region set by the text composition region setting unit, a font color in which the tone is changed without changing the hue is used. Including a font color setting section to be set, and a font setting section for setting a font including at least the font color;
    Set by the text setting unit using a font including at least a font color set by the font setting unit in the text synthesis region set by the text synthesis region setting unit in the image data input by the image input unit. A composite image generation unit that generates composite image data, which is image data obtained by combining text data;
    An image processing apparatus comprising:
  37.  請求項36に記載の画像処理装置において、
     前記フォントカラー設定部は、前記画像入力部により入力された画像データにおいて前記テキスト合成領域設定部により設定されたテキスト合成領域のRGBの平均色を求め、求めたRGBの平均色からPCCS表色系のトーンおよび色相を求め、求めたPCCS表色系のトーンおよび色相のうちのトーンのみを変更したフォントカラーを設定する、
     ことを特徴とする画像処理装置。
    The image processing apparatus according to claim 36, wherein
    The font color setting unit obtains an RGB average color of the text composition region set by the text composition region setting unit in the image data input by the image input unit, and a PCCS color system from the obtained RGB average color Obtaining a tone and hue of the PCCS color system, and setting a font color in which only the tone and hue of the obtained PCCS color system are changed,
    An image processing apparatus.
  38.  請求項36または請求項37に記載の画像処理装置において、
     前記フォントカラー設定部は、PCCS表色系において、暗めのトーンについてはホワイトトーンまたはライトグレイトーンへ変更する、
     ことを特徴とする画像処理装置。
    The image processing apparatus according to claim 36 or claim 37.
    In the PCCS color system, the font color setting unit changes a dark tone to a white tone or a light gray tone.
    An image processing apparatus.
  39.  請求項36から請求項38のうちのいずれか1項に記載の画像処理装置において、
     前記フォントカラー設定部は、PCCS表色系において、明るめのトーンについては有彩色で対照の調和の関係がある他のトーンへ変更する、
     ことを特徴とする画像処理装置。
    The image processing apparatus according to any one of claims 36 to 38,
    In the PCCS color system, the font color setting unit changes the bright tone to another tone that is chromatic and has a harmonious relationship with the contrast.
    An image processing apparatus.
  40.  請求項39に記載の画像処理装置において、
     前記フォントカラー設定部は、PCCS表色系において、明るめのトーンであって有彩色で対照の調和の関係がある他のトーンが複数あるものについては、これら複数の他のトーンの中で最も鮮やかなトーンへ変更する、
     ことを特徴とする画像処理装置。
    40. The image processing apparatus according to claim 39, wherein
    In the PCCS color system, the font color setting unit is the brightest tone and has the most vivid color among these other tones when there are a plurality of other tones that are chromatic and have a harmony of contrast. Change to a different tone,
    An image processing apparatus.
  41.  請求項36から請求項40のうちのいずれか1項に記載の画像処理装置において、
     前記フォント設定部は、前記フォントカラー設定部によりフォントカラーを設定するとともに、アウトラインのフォントを設定する、
     ことを特徴とする画像処理装置。
    In the image processing device according to any one of claims 36 to 40,
    The font setting unit sets the font color by the font color setting unit and sets the outline font.
    An image processing apparatus.
  42.  請求項36から請求項41のうちのいずれか1項に記載の画像処理装置において、
     前記フォントカラー設定部は、前記画像入力部により入力された画像データにおいて前記テキスト合成領域設定部により設定されたテキスト合成領域における色の変化が所定値以上であるか否かを判定し、前記テキスト合成領域における色の変化が所定値以上であると判定したときには、前記テキスト合成領域の中で2種類以上のフォントカラーを設定する、
     ことを特徴とする画像処理装置。
    In the image processing device according to any one of claims 36 to 41,
    The font color setting unit determines whether the color change in the text composition region set by the text composition region setting unit in the image data input by the image input unit is a predetermined value or more, and the text When it is determined that the color change in the synthesis area is a predetermined value or more, two or more font colors are set in the text synthesis area.
    An image processing apparatus.
  43.  画像データを入力するステップと、
     テキストのデータを設定するステップと、
     前記入力された画像データにおいて前記設定されたテキストのデータを合成する領域であるテキスト合成領域を設定するステップと、
     前記入力された画像データおよび前記設定されたテキスト合成領域に基づくPCCS表色系のトーンおよび色相に対して、色相はそのままにしてトーンを変更したフォントカラーを設定し、少なくともフォントカラーを含むフォントを設定するステップと、
     前記入力された画像データにおいて前記設定されたテキスト合成領域に前記設定された少なくともフォントカラーを含むフォントを用いて前記設定されたテキストのデータを合成した画像のデータである合成画像のデータを生成するステップと、
     をコンピュータに実行させるためのプログラム。
    Inputting image data;
    Setting text data; and
    Setting a text synthesis area which is an area for synthesizing the set text data in the input image data;
    For the tone and hue of the PCCS color system based on the input image data and the set text composition area, a font color in which the tone is changed is set with the hue unchanged, and a font including at least the font color is set. Steps to set,
    In the input image data, composite image data is generated which is image data obtained by combining the set text data using the font including at least the set font color in the set text composition area. Steps,
    A program that causes a computer to execute.
  44.  画像処理装置が、画像データを入力するステップと、
     前記画像処理装置が、テキストのデータを設定するステップと、
     前記画像処理装置が、前記入力された画像データにおいて前記設定されたテキストのデータを合成する領域であるテキスト合成領域を設定するステップと、
     前記画像処理装置が、前記入力された画像データおよび前記設定されたテキスト合成領域に基づくPCCS表色系のトーンおよび色相に対して、色相はそのままにしてトーンを変更したフォントカラーを設定し、少なくともフォントカラーを含むフォントを設定するステップと、
     前記画像処理装置が、前記入力された画像データにおいて前記設定されたテキスト合成領域に前記設定された少なくともフォントカラーを含むフォントを用いて前記設定されたテキストのデータを合成した画像のデータである合成画像のデータを生成するステップと、
     を有することを特徴とする画像処理方法。
    An image processing apparatus for inputting image data;
    The image processing apparatus sets text data;
    The image processing device setting a text synthesis area, which is an area for synthesizing the set text data in the input image data;
    The image processing apparatus sets a font color in which a tone is changed while leaving the hue unchanged, for the tone and hue of the PCCS color system based on the input image data and the set text composition area, and at least Setting the font including the font color;
    The image processing apparatus combines image data obtained by combining the set text data using a font including at least the set font color in the set text composition area in the input image data. Generating image data; and
    An image processing method comprising:
  45.  請求項36から請求項42のうちのいずれか1項に記載の画像処理装置を備える、
     ことを特徴とする撮像装置。
    The image processing apparatus according to any one of claims 36 to 42 is provided.
    An imaging apparatus characterized by that.
  46.  画像データ、及び、テキストデータを取得する取得部と、
     前記画像データにおける前記テキストデータが配置されるテキスト配置領域を決定する領域決定部と、
     テキストデータに所定の色を設定する色設定部と、
     前記テキスト配置領域に前記所定の色の前記テキストデータを配置した画像を生成する画像生成部とを含み、
     前記画像データの前記テキスト配置領域の色相値と、の前記テキストデータの色相値との比は、前記画像データの前記テキスト配置領域のトーン値と、の前記テキストデータのトーン値との比よりも1に近いことを特徴とする画像処理装置。
    An acquisition unit for acquiring image data and text data;
    An area determination unit for determining a text arrangement area in which the text data is arranged in the image data;
    A color setting unit for setting a predetermined color in the text data;
    An image generation unit that generates an image in which the text data of the predetermined color is arranged in the text arrangement area;
    The ratio between the hue value of the text arrangement area of the image data and the hue value of the text data is greater than the ratio of the tone value of the text arrangement area of the image data to the tone value of the text data. An image processing apparatus characterized by being close to 1.
  47.  請求項46に記載の画像処理装置において、
     前記色設定部は、前記テキスト配置領域のRGBの平均色からPCCS表色系のトーン値および色相値を求め、前記PCCS表色系の色相を変化させずに、前記PCCS表色系のトーン値のみを変更することを特徴とする画像処理装置。
    The image processing apparatus according to claim 46,
    The color setting unit obtains a tone value and a hue value of a PCCS color system from an average color of RGB in the text arrangement area, and the tone value of the PCCS color system without changing the hue of the PCCS color system An image processing apparatus characterized in that only the change is made.
  48. 画像データにおける文字が配置される配置領域を決定する決定部と、
     文字に所定色を設定する色設定部と、
     前記配置領域に前記文字を配置した画像を生成する画像生成部とを含み、
     前記色設定部は、前記配置領域の色相値と前記文字の色相値との比が、前記配置領域のトーン値と前記文字のトーン値との比よりも1に近くなるように前記所定色を設定することを特徴とする画像処理装置。
    A determination unit that determines an arrangement area in which characters in image data are arranged;
    A color setting section for setting a predetermined color for the character;
    An image generation unit that generates an image in which the characters are arranged in the arrangement region,
    The color setting unit sets the predetermined color so that a ratio between a hue value of the arrangement area and a hue value of the character is closer to 1 than a ratio of a tone value of the arrangement area and the tone value of the character. An image processing apparatus characterized by setting.
PCT/JP2012/074230 2011-09-21 2012-09-21 Image processing device, program, image processing method, and imaging device WO2013042768A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201280039636.6A CN103718172A (en) 2011-09-21 2012-09-21 Image processing device, program, image processing method, and imaging device
US14/239,445 US20140198234A1 (en) 2011-09-21 2012-09-21 Image processing apparatus, program, image processing method, and imaging apparatus

Applications Claiming Priority (16)

Application Number Priority Date Filing Date Title
JP2011-206024 2011-09-21
JP2011206024 2011-09-21
JP2011266143 2011-12-05
JP2011-266143 2011-12-05
JP2011266805 2011-12-06
JP2011-266805 2011-12-06
JP2011267882 2011-12-07
JP2011-267882 2011-12-07
JP2012206299A JP2013141200A (en) 2011-12-07 2012-09-19 Image processor, program, image processing method, and imaging apparatus
JP2012-206296 2012-09-19
JP2012206297A JP2013080464A (en) 2011-09-21 2012-09-19 Image processing device, imaging device, and program
JP2012-206299 2012-09-19
JP2012-206298 2012-09-19
JP2012206298A JP2013141199A (en) 2011-12-06 2012-09-19 Image processing apparatus, program, image processing method, and imaging device
JP2012-206297 2012-09-19
JP2012206296A JP2013140559A (en) 2011-12-05 2012-09-19 Image processing device, imaging device and program

Publications (1)

Publication Number Publication Date
WO2013042768A1 true WO2013042768A1 (en) 2013-03-28

Family

ID=47914528

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/074230 WO2013042768A1 (en) 2011-09-21 2012-09-21 Image processing device, program, image processing method, and imaging device

Country Status (1)

Country Link
WO (1) WO2013042768A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006350552A (en) * 2005-06-14 2006-12-28 Canon Inc Image data search device
JP2007183821A (en) * 2006-01-06 2007-07-19 Seiko Epson Corp Setting of sentence related to image
JP2008165303A (en) * 2006-12-27 2008-07-17 Fujifilm Corp Content registration device, content registration method and content registration program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006350552A (en) * 2005-06-14 2006-12-28 Canon Inc Image data search device
JP2007183821A (en) * 2006-01-06 2007-07-19 Seiko Epson Corp Setting of sentence related to image
JP2008165303A (en) * 2006-12-27 2008-07-17 Fujifilm Corp Content registration device, content registration method and content registration program

Similar Documents

Publication Publication Date Title
US20140198234A1 (en) Image processing apparatus, program, image processing method, and imaging apparatus
JP4762827B2 (en) Electronic album generation apparatus, electronic album generation method, and program thereof
JP5686673B2 (en) Image processing apparatus, image processing method, and program
KR100658998B1 (en) Image processing apparatus, image processing method and computer readable medium which records program thereof
JP4588642B2 (en) Album creating apparatus, album creating method, and program
JP4704253B2 (en) Album creating apparatus, album creating method, and program
CN107808136A (en) Image processing method, device, readable storage medium storing program for executing and computer equipment
KR100762382B1 (en) Method, apparatus and recording medium for image processing
SE1150505A1 (en) Method and apparatus for taking pictures
JP2006279929A (en) Album creating apparatus, album creating method and program
JP2006331393A (en) Album creating apparatus, album creating method and program
JP2006295890A (en) Album creating apparatus, album creating method and program
JP2006293986A (en) Album generating apparatus, album generation method and program
JP2005086516A (en) Imaging device, printer, image processor and program
JP2010072934A (en) Album creation device and album creation method
JP2007096379A (en) Imaging apparatus, image recording and retrieving apparatus and program
CN108093174A (en) Patterning process, device and the photographing device of photographing device
CN105580050A (en) Providing control points in images
JP4279083B2 (en) Image processing method and apparatus, and image processing program
JP2008217479A (en) Image arrangement method and device
CN114466133B (en) Photographing method and device
JP2008140107A (en) Image processor, image processing method, control program, and recording medium
WO2013042768A1 (en) Image processing device, program, image processing method, and imaging device
JP2013141200A (en) Image processor, program, image processing method, and imaging apparatus
JP2013080464A (en) Image processing device, imaging device, and program

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14239445

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12834195

Country of ref document: EP

Kind code of ref document: A1