JP2005189051A - Size measurement device and program - Google Patents

Size measurement device and program Download PDF

Info

Publication number
JP2005189051A
JP2005189051A JP2003429587A JP2003429587A JP2005189051A JP 2005189051 A JP2005189051 A JP 2005189051A JP 2003429587 A JP2003429587 A JP 2003429587A JP 2003429587 A JP2003429587 A JP 2003429587A JP 2005189051 A JP2005189051 A JP 2005189051A
Authority
JP
Japan
Prior art keywords
size
measurement
captured image
image
actual size
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2003429587A
Other languages
Japanese (ja)
Inventor
Katsumi Konnai
勝美 近内
Kenichi Hibino
健一 日比野
Hideo Suzuki
秀夫 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2003429587A priority Critical patent/JP2005189051A/en
Publication of JP2005189051A publication Critical patent/JP2005189051A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Indication In Cameras, And Counting Of Exposures (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To measure the actual size of a measurement object without using a distance sensor by analyzing taken photographic images while considering anteroposterior relation (perspective relation) between the object to be a size measurement object and the object to be a reference object to be compared with the measurement object. <P>SOLUTION: In the status that the object in the monitor images taken by a camera imaging section 7 is designated as the object to be measured, and a plurality of other objects existing in the monitor images are designated as reference objects, a CPU 1 measures the perspective distances between the measurement object and a plurality of reference objects in the anteroposterior direction respectively and also measures the real size of the plurality of designated reference objects respectively, and further calculates the image size of the measurement object and each of the reference object by analyzing the monitor images. The real size of the measurement object is calculated based on each calculated size, each perspective distance, and the real size of the reference objects. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

この発明は、撮影画像の中に含まれている被写体の実サイズを測定するサイズ測定装置およびプログラムに関する。   The present invention relates to a size measuring apparatus and program for measuring the actual size of a subject included in a captured image.

従来、カメラ撮影によって被写体のサイズを測定する技術としては、例えば、カメラに備えられている距離センサによって計測されたレンズ位置から被写体までの距離と、ディスプレイ上に表示されている被写体の任意部分と、レンズの撮影画角に基づいて被写体の実際寸法を測定するようにしたデジタルカメラが知られている(特許文献1参照)。また、水中カメラの焦点距離と、水中カメラに一体化されている送受波器によって捕らえられた魚までの距離に基づいて魚影の実際の大きさを表示画面上で求めるようにした魚種判別装置が知られている(特許文献2参照)。
特開平11−344311号公報 特開平5−312947号公報
Conventionally, as a technique for measuring the size of a subject by camera shooting, for example, the distance from the lens position measured by a distance sensor provided in the camera to the subject, and an arbitrary part of the subject displayed on the display, A digital camera is known in which an actual dimension of a subject is measured based on a shooting angle of view of a lens (see Patent Document 1). In addition, the fish species discrimination is based on the display screen to determine the actual size of the fish shadow based on the focal length of the underwater camera and the distance to the fish captured by the transducer integrated in the underwater camera. An apparatus is known (see Patent Document 2).
Japanese Patent Application Laid-Open No. 11-344311 Japanese Patent Laid-Open No. 5-31947

しかしながら、上述した被写体の実際寸法を測定するデジタルカメラや魚影の実際の大きさを測定する魚種判別装置にあっては、比較的高精度の測定結果を得ることができるが、距離センサあるいは送受波器を設けて、カメラ位置から被写体までの距離を計測することを前提とすると共に、サイズ測定の対象となる被写体に焦点を合わせた状態で撮影することを前提とするものであり、被写体のサイズを測定する毎に、被写体に焦点を合わせながら被写体毎に1枚ずつ撮影する必要があった。  However, in the above-described digital camera for measuring the actual size of the subject and the fish type discriminating apparatus for measuring the actual size of the fish shadow, a relatively high accuracy measurement result can be obtained. It is assumed that a transmitter / receiver is provided to measure the distance from the camera position to the subject, and that the subject is subject to size measurement and that the subject is in focus. Each time the size of the subject was measured, it was necessary to take one picture for each subject while focusing on the subject.

第1の発明の課題は、距離センサを使用しなくても、サイズ測定の対象となる被写体とこの測定対象と比較される基準対象の被写体との前後関係(遠近関係)を考慮しながら撮影画像を解析することによって測定対象の実サイズを測定できるようにすることである。
第2の発明の課題は、距離センサを使用しなくても、撮影画像内の被写体である測定対象と基準対象とを比較しながら撮影画像を解析することによって測定対象の実サイズを測定可能であると共に、測定対象と基準対象とが前後関係にあるか否かに応じて測定対象の実サイズを適切に測定できるようにすることである。
An object of the first invention is to take a photographed image while taking into consideration the front-to-back relationship (perspective relationship) between a subject to be size-measured and a reference subject to be compared with the subject to be measured without using a distance sensor. Is to enable measurement of the actual size of the measurement object.
The subject of the second invention is that the actual size of the measurement object can be measured by analyzing the photographed image while comparing the measurement object, which is the subject in the photographed image, with the reference object, without using a distance sensor. In addition, the actual size of the measurement object can be appropriately measured depending on whether or not the measurement object and the reference object are in a context.

請求項1記載の発明(第1の発明)は、撮影画像の中に含まれている被写体の実サイズを測定するサイズ測定装置であって、撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この撮影画像内に存在する複数の他の被写体を前記測定対象と比較される基準対象として指定する指定手段と、撮影画像内において前記指定された測定対象と複数の基準対象との間における前後方向の遠近距離をそれぞれ計測する計測手段と、前記指定された複数の基準対象毎にその実サイズを取得する取得手段と、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出すると共に、この各算出サイズと各遠近距離と各基準対象の実サイズに基づいて測定対象の実サイズを算出する算出手段とを具備したことを特徴とする
更に、コンピュータに対して、上述した請求項1記載の発明に示した主要機能を実現させるためのプログラムを提供する(請求項11記載の発明)。
The invention according to claim 1 (first invention) is a size measuring device for measuring the actual size of a subject included in a photographed image, wherein the subject in the photographed image is a target for size measurement. In addition to designating as a target, designation means for designating a plurality of other subjects existing in the captured image as reference targets to be compared with the measurement target, the designated measurement target and a plurality of reference targets in the captured image Measuring means for measuring the distance in the front-rear direction between, and acquisition means for acquiring the actual size for each of the plurality of designated reference objects, and for each measurement object and reference object by analyzing the captured image And calculating means for calculating the image size and calculating the actual size of the measurement object based on the calculated sizes, the perspective distances, and the actual sizes of the reference objects. Furthermore, the computer provides a program for implementing the key features shown in the invention of claim 1, wherein the above (invention of claim 11, wherein) the.

なお、請求項1記載の発明は次のようなものであってもよい。
前記指定手段は、撮影画像を解析することによってその中心部分に位置している画像部分を測定対象として指定する(請求項2記載の発明)。
The invention described in claim 1 may be as follows.
The designating unit designates an image portion located in the center portion by analyzing a captured image as an object to be measured (the invention according to claim 2).

前記指定手段は、撮影画像内に含まれている各被写体のうち、予め記憶管理されている複数種の基準対象の何れかに特徴的に一致する複数の被写体を検索することによって、少なくとも2つの基準対象を指定する(請求項3記載の発明)。
この場合、前記指定手段は、撮影画像が展開されている平面座標系においてその縦方向の位置が相違して遠近の関係にある2つの基準対象を指定する(請求項4記載の発明)。また、前記指定手段は、遠近関係にある2つの基準対象を指定する際に、同一の基準対象あるいは略同一サイズを持った基準対象をそれぞれ指定する(請求項5記載の発明)。
The specifying means searches for a plurality of subjects characteristically matching any of a plurality of types of reference targets stored and managed in advance among the subjects included in the photographed image, thereby at least two A reference object is designated (the invention according to claim 3).
In this case, the designation means designates two reference objects having different longitudinal positions in the plane coordinate system where the photographed image is developed and having a perspective relationship (the invention according to claim 4). The designation means designates the same reference object or a reference object having substantially the same size when designating two reference objects having a perspective relationship (the invention according to claim 5).

前記計測手段は、測定対象と複数の基準対象との間における前後方向の遠近距離を計測する際に、撮影画像が展開されている平面座標系においてその縦方向の垂直成分を遠近距離として計測する(請求項6記載の発明)。この場合、前記計測手段は、遠近関係にある2つの基準対象のうち、その一方の基準対象と測定対象との間の遠近距離および他方の基準対象と測定対象との間の遠近距離を計測するか、一方の基準対象と測定対象との間の遠近距離および各基準対象間の遠近距離を計測する(請求項7記載の発明)。   The measuring means measures the vertical component in the vertical direction as a perspective distance in a plane coordinate system in which a photographed image is developed when measuring the perspective distance in the front-rear direction between the measurement target and the plurality of reference targets. (Invention of Claim 6). In this case, the measurement unit measures the perspective distance between one reference object and the measurement object and the distance between the other reference object and the measurement object, out of the two reference objects in perspective relation. Alternatively, the perspective distance between one reference object and the measurement object and the distance between each reference object are measured (the invention according to claim 7).

予め複数種の基準対象に対応してその実サイズが記憶管理されている状態において、前記取得手段は、前記指定された基準対象に対応する実サイズを読み出し取得する(請求項8記載の発明)。   In a state where the actual size is stored and managed in advance corresponding to a plurality of types of reference objects, the acquisition unit reads and acquires the actual size corresponding to the designated reference object (the invention according to claim 8).

撮影画像を解析することによって前記指定された測定対象と複数の基準対象との前後関係を判別する判別手段を設け、この判別手段によって判別された前後関係に対応する計算式に従って前記算出手段は、測定対象の実サイズを算出する(請求項9記載の発明)。   Distinguishing means for discriminating the context between the designated measurement object and a plurality of reference objects by analyzing a captured image is provided, and the calculating means according to a calculation formula corresponding to the context determined by the discrimination means, The actual size of the measurement object is calculated (the invention according to claim 9).

測定対象が含まれている撮影画像が表示されている状態において、この撮影画像内に当測定対象に対応付けてその実サイズを表示する(請求項10記載の発明)。   In a state in which a captured image including the measurement target is displayed, the actual size is displayed in association with the measurement target in the captured image (the invention according to claim 10).

請求項12記載の発明(第2の発明)は、撮影画像の中に含まれている被写体の実サイズを測定するサイズ測定装置であって、撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この測定対象と比較される基準対象を指定する指定手段と、撮影画像を解析することによって前記指定された測定対象と基準対象とが撮影画像内において前後関係にあるかを判別する判別手段と、この判別手段によって前後関係がないことが判別された場合には、基準対象の実サイズを取得すると共に、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと基準対象の実サイズに基づいて当該測定対象の実サイズを算出する第1の算出手段と、前記判別手段によって前後関係があることが判別された場合には、撮影画像内において前記指定された測定対象と基準対象との間における前後方向の遠近距離をそれぞれ計測し、基準対象毎にその実サイズを取得し、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと各遠近距離と基準対象の実サイズに基づいて測定対象の実サイズを算出する第2の算出手段とを具備したことを特徴とする
更に、コンピュータに対して、上述した請求項12記載の発明に示した主要機能を実現させるためのプログラムを提供する(請求項15記載の発明)。
The invention according to claim 12 (second invention) is a size measuring apparatus for measuring the actual size of a subject included in a photographed image, wherein the subject in the photographed image is a target for size measurement. In addition to designating as an object, designation means for designating a reference object to be compared with the measurement object, and whether the designated measurement object and the reference object are in a context in the captured image by analyzing the captured image When it is determined by the determining means and the determining means that there is no context, the actual size of the reference object is obtained and the captured image is analyzed to obtain the image size for each measurement object and reference object. The first calculating means for calculating the actual size of the measurement object based on the respective calculated sizes and the actual size of the reference object, and the determination means determine that there is a context. When separated, measure the distance in the front-rear direction between the specified measurement object and the reference object in the captured image, acquire the actual size for each reference object, and analyze the captured image The second calculation means for calculating the image size for each measurement object and reference object, and calculating the actual size of the measurement object based on each calculated size, each perspective distance, and the actual size of the reference object. Furthermore, a program for realizing the main functions shown in the invention described in claim 12 is provided to the computer (the invention described in claim 15).

なお、請求項12記載の発明は次のようなものであってもよい。
前記指定手段は、撮影画像内に含まれている各被写体のうち、予め記憶管理されている複数種の基準対象の何れかに特徴的に一致する被写体の画像部分を基準対象として指定する(請求項13記載の発明)。
The invention described in claim 12 may be as follows.
The designation unit designates, as a reference target, an image portion of a subject that characteristically matches any of a plurality of types of reference targets stored and managed in advance among the subjects included in the captured image (claims). Item 13).

撮影画像を解析することによって前記指定された測定対象と基準対象との前後関係を判別し、この前後関係に対応する計算式に従って前記算出手段は、測定対象の実サイズを算出する(請求項14記載の発明)   By analyzing the captured image, the front-to-back relationship between the designated measurement target and the reference target is determined, and the calculation means calculates the actual size of the measurement target according to a calculation formula corresponding to the front-rear relationship. Described invention)

請求項1記載の発明によれば、撮影画像内の被写体をサイズ測定の対象となる測定対象として指定されていると共に、この撮影画像内に存在する複数の他の被写体を測定対象と比較される基準対象として指定されている状態において、撮影画像内において測定対象と複数の基準対象との間における前後方向の遠近距離をそれぞれ計測すると共に、指定された複数の基準対象毎にその実サイズを取得し、更に、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと各遠近距離と各基準対象の実サイズに基づいて測定対象の実サイズを算出するようにしたから、距離センサを使用しなくても、サイズ測定の対象となる被写体とこの測定対象と比較される基準対象の被写体との前後関係(遠近関係)を考慮しながら撮影画像を解析することによって測定対象の実サイズを測定することができる。
この場合、撮影時に限らず、画像の再生時でもサイズ測定を行うことができるので、必要に応じて何時でも自由にサイズ測定が可能となる。従って、このサイズ測定装置をデジタルカメラに組み込む場合に限らず、パーソナルコンピュータ等の画像データ処理装置に組み込むことも可能となるなど、その活用範囲を広げ、各種用途に使用可能となる。なお、撮影画像内において複数の測定対象が指定された場合には、各測定対象毎にその実サイズを測定することができる。
According to the first aspect of the present invention, the subject in the captured image is designated as a measurement target to be size-measured, and a plurality of other subjects existing in the captured image are compared with the measurement target. In the state designated as the reference object, the distance in the front-rear direction between the measurement object and the plurality of reference objects is measured in the captured image, and the actual size is acquired for each of the designated plurality of reference objects. Further, by analyzing the captured image, the image size is calculated for each measurement object and reference object, and the actual size of the measurement object is calculated based on each calculated size, each perspective distance, and the actual size of each reference object. Therefore, without using a distance sensor, the anteroposterior relationship (perspective relationship) between the subject whose size is to be measured and the reference subject to be compared with this subject. It can be measured actual size of the measuring object by analyzing the photographed image while considering.
In this case, the size measurement can be performed not only at the time of shooting but also at the time of reproducing the image, so that the size measurement can be freely performed at any time as necessary. Therefore, the size measuring device is not limited to being incorporated into a digital camera, but can be incorporated into an image data processing device such as a personal computer. In addition, when a plurality of measurement objects are specified in the captured image, the actual size can be measured for each measurement object.

請求項2記載の発明によれば、上述した請求項1記載の発明と同様の効果を有する他、撮影画像を解析することによってその中心部分に位置している画像部分を測定対象として指定するようにしたから、画像解析によって測定対象の自動指定が可能となり、特別な指定操作が不要となると共に、測定対象を確実に指定することが可能となる。   According to the invention described in claim 2, in addition to having the same effect as that of the invention described in claim 1, the image portion located in the central portion is designated as the measurement object by analyzing the photographed image. Therefore, the measurement target can be automatically specified by image analysis, a special specification operation becomes unnecessary, and the measurement target can be specified reliably.

請求項3記載の発明によれば、上述した請求項1記載の発明と同様の効果を有する他、撮影画像内に含まれている各被写体のうち、予め記憶管理されている複数種の基準対象の何れかに特徴的に一致する複数の被写体を検索することによって少なくとも2つの基準対象を指定するようにしたから、撮影画像の解析で複数の基準対象の自動指定が可能となり、特別な操作が不要となると共に、基準対象を確実に指定することが可能となる。
この場合、撮影画像が展開されている平面座標系においてその縦方向の位置が相違して遠近の関係にある2つの基準対象を指定したり(請求項4記載の発明)、遠近関係にある2つの基準対象を指定する際に、同一の基準対象あるいは略同一サイズを持った基準対象をそれぞれ指定するようにしたから(請求項5記載の発明)、測定対象の実サイズを簡単に算出することが可能となる。
According to the invention described in claim 3, in addition to having the same effect as that of the invention described in claim 1 above, among the subjects included in the photographed image, a plurality of types of reference objects stored and managed in advance Since at least two reference objects are specified by searching for a plurality of subjects that characteristically match any one of the above, it is possible to automatically specify a plurality of reference objects by analyzing a captured image, and special operations can be performed. It becomes unnecessary, and it becomes possible to specify a reference object reliably.
In this case, in the planar coordinate system in which the photographed image is developed, two reference objects having different longitudinal positions are specified (invention of claim 4), or 2 in perspective relation. When specifying one reference object, the same reference object or the reference object having substantially the same size is specified (the invention according to claim 5), so that the actual size of the measurement object can be easily calculated. Is possible.

また、測定対象と複数の基準対象との間における前後方向の遠近距離を計測する際に、撮影画像が展開されている平面座標系においてその縦方向の垂直成分を遠近距離として計測したり(請求項6記載の発明)、遠近関係にある2つの基準対象のうち、その一方の基準対象と測定対象との間の遠近距離および他方の基準対象と測定対象との間の遠近距離を計測するか、一方の基準対象と測定対象との間の遠近距離および各基準対象間の遠近距離を計測するようにしたから(請求項7記載の発明)、測定対象の実サイズを簡単に算出することが可能となる。   Also, when measuring the perspective distance in the front-rear direction between the measurement object and the plurality of reference objects, the vertical component in the vertical direction is measured as the perspective distance in the plane coordinate system where the photographed image is developed. (Invention of Item 6), whether the distance between one of the two reference objects and the measurement object and the distance between the other reference object and the measurement object are measured. Since the distance between one reference object and the measurement object and the distance between each reference object are measured (the invention according to claim 7), the actual size of the measurement object can be easily calculated. It becomes possible.

請求項8記載の発明によれば、上述した請求項1記載の発明と同様の効果を有する他、予め複数種の基準対象に対応してその実サイズが記憶管理されている状態において、前記取得手段は、前記指定された基準対象に対応する実サイズを読み出し取得するようにしたから、基準対象の実サイズの自動取得が可能となり、特別な操作が不要となる。   According to the invention described in claim 8, in addition to having the same effect as that of the invention described in claim 1 described above, in the state where the actual size is stored and managed in advance corresponding to a plurality of types of reference objects, the acquisition means Since the actual size corresponding to the designated reference object is read out and acquired, the actual size of the reference object can be automatically acquired, and no special operation is required.

請求項9記載の発明によれば、上述した請求項1記載の発明と同様の効果を有する他、撮影画像を解析することによって測定対象と複数の基準対象との前後関係を判別すると共に、判別された前後関係に対応する計算式に従って測定対象の実サイズを算出するようにしたから、測定対象の実サイズを簡単に算出することができる。   According to the ninth aspect of the invention, in addition to having the same effect as that of the first aspect of the invention described above, the front-rear relationship between the measurement object and the plurality of reference objects is determined by analyzing the captured image, and the determination is made. Since the actual size of the measurement object is calculated according to the calculation formula corresponding to the determined context, the actual size of the measurement object can be easily calculated.

請求項10記載の発明によれば、上述した請求項1記載の発明と同様の効果を有する他、測定対象が含まれている撮影画像が表示されている状態において、この撮影画像内に当測定対象に対応付けてその実サイズを表示するようにしたから、撮影画像内でサイズ確認を行いながらその測定対象を見ることができると共に、測定対象とその実サイズとの対応関係が明瞭となる。  According to the invention described in claim 10, in addition to having the same effect as that of the invention described in claim 1 described above, in the state where the captured image including the measurement object is displayed, the measurement is performed in the captured image. Since the actual size is displayed in association with the object, the measurement object can be viewed while checking the size in the captured image, and the correspondence between the measurement object and the actual size becomes clear.

請求項12記載の発明によれば、撮影画像内において測定対象が指定されていると共に、基準対象が指定されている状態において、撮影画像を解析することによって測定対象と基準対象とが撮影画像内において前後関係にあるかを判別し、前後関係がない場合には、測定対象、基準対象の画像サイズと基準対象の実サイズに基づいて当該測定対象の実サイズを算出し、前後関係がある場合には、撮影画像内において測定対象と基準対象との間における前後方向の遠近距離をそれぞれ計測し、測定対象、基準対象の画像サイズと各遠近距離と基準対象の実サイズに基づいて測定対象の実サイズを算出するようにしたから、距離センサを使用しなくても、撮影画像内の被写体である測定対象と基準対象とを比較しながら撮影画像を解析することによって測定対象の実サイズを測定可能であると共に、測定対象と基準対象とが前後関係にあるか否かに応じて測定対象の実サイズを適切に測定することができる。更に、撮影時に限らず、画像の再生時でもサイズ測定を行うことができるので、必要に応じて何時でも自由にサイズ測定が可能となる。なお、撮影画像内において複数の測定対象が指定された場合には、各測定対象毎にその実サイズを測定することができる。   According to the twelfth aspect of the present invention, in the state where the measurement target is specified in the captured image and the reference target is specified, the measurement target and the reference target are included in the captured image by analyzing the captured image. If there is no context, the actual size of the measurement target is calculated based on the image size of the measurement target and the reference target and the actual size of the reference target. In the captured image, the distance in the front-rear direction between the measurement object and the reference object is measured, and the measurement object, the image size of the reference object, each perspective distance, and the actual size of the reference object are measured. Since the actual size is calculated, the captured image can be analyzed while comparing the measurement target and the reference target in the captured image without using a distance sensor. Together can measure the actual size of the measuring object I, the measured object and the reference object can be properly measured actual size of the measuring object according to whether the context. Furthermore, since size measurement can be performed not only at the time of shooting but also at the time of image reproduction, size measurement can be freely performed at any time as necessary. In addition, when a plurality of measurement objects are specified in the captured image, the actual size can be measured for each measurement object.

請求項13記載の発明によれば、上述した請求項12記載の発明と同様の効果を有する他、撮影画像内に含まれている各被写体のうち、予め記憶管理されている複数種の基準対象の何れかに特徴的に一致する被写体の画像部分を基準対象として指定するようにしたから、撮影画像を解析することによって基準対象の自動指定が可能となり、特別な指定操作が不要となると共に、基準対象を確実に指定することが可能となる。   According to the thirteenth aspect, in addition to the same effects as the above-described twelfth aspect, a plurality of types of reference objects that are stored and managed in advance among the subjects included in the photographed image. Since the image portion of the subject that characteristically matches any of the above is designated as the reference object, it is possible to automatically specify the reference object by analyzing the captured image, and no special designation operation is required. It becomes possible to specify the reference object with certainty.

請求項14記載の発明によれば、上述した請求項12記載の発明と同様の効果を有する他、撮影画像を解析することによって測定対象と基準対象との前後関係を判別し、この前後関係に対応する計算式に従って測定対象の実サイズを算出するようにしたから、測定対象の実サイズを簡単に算出することができる。   According to the invention described in claim 14, in addition to having the same effect as that of the invention described in claim 12, the context of the measurement object and the reference object is determined by analyzing the photographed image, and this context Since the actual size of the measurement object is calculated according to the corresponding calculation formula, the actual size of the measurement object can be easily calculated.

以下、図1〜図14を参照して本発明の実施例を説明する。
図1は、この実施例におけるデジタルカメラの基本的構成要素を示したブロック図である。
このデジタルカメラは、撮影画像(モニタ画像)内に含まれている被写体の実サイズを測定可能なもので、被写体を実撮影する前に被写体サイズの測定が指示された際、モニタ撮影したデジタル画像を解析することによってその実サイズを測定してモニタ画面に表示するサイズ測定機能を有している。この場合、距離センサを使用しなくても、撮影画像内の被写体である測定対象と基準対象とを比較しながら撮影画像を解析することによって測定対象の実サイズを測定するようにしている。
なお、この実施例の特徴部分を詳述する前に、この実施例のハードウェア上の構成について以下、説明しておく。
Embodiments of the present invention will be described below with reference to FIGS.
FIG. 1 is a block diagram showing basic components of a digital camera in this embodiment.
This digital camera is capable of measuring the actual size of the subject included in the captured image (monitor image), and when the measurement of the subject size is instructed before the subject is actually captured, the digital image captured on the monitor It has a size measurement function that measures the actual size by analyzing and displays it on the monitor screen. In this case, even if a distance sensor is not used, the actual size of the measurement target is measured by analyzing the captured image while comparing the measurement target that is the subject in the captured image with the reference target.
Before detailed description of the features of this embodiment, the hardware configuration of this embodiment will be described below.

CPU1は、記憶部2内のオペレーティングシステムや各種アプリケーションソフトに従ってこのデジタルカメラの全体動作を制御する中央演算処理装置である。記憶部2は、ハードディスク等の固定的なメモリであり、プログラム記憶領域とデータ記憶領域とを有している。この記憶部2内のプログラム記憶領域には、後述する図8および図11に示す動作手順に従って本実施例を実現する為のアプリケーションプログラムが格納され、また、データ記憶領域には、後述する図5に示すデータ(基準対象テーブル)が格納されている。このプログラムやデータは、必要に応じてワークメモリ3にロードされたり、このワークメモリ3内のデータが記憶部2にセーブされる。なお、記録媒体4は、DVD等の着脱自在なメモリであり、記憶部2やワークメモリ3との間においてプログラムや画像データ等の受け渡しを行う。   The CPU 1 is a central processing unit that controls the overall operation of the digital camera in accordance with the operating system and various application software in the storage unit 2. The storage unit 2 is a fixed memory such as a hard disk, and has a program storage area and a data storage area. The program storage area in the storage unit 2 stores an application program for realizing the present embodiment in accordance with the operation procedure shown in FIGS. 8 and 11 described later, and the data storage area stores FIG. 5 described later. (Reference target table) is stored. The program and data are loaded into the work memory 3 as necessary, and the data in the work memory 3 is saved in the storage unit 2. The recording medium 4 is a removable memory such as a DVD, and exchanges programs, image data, and the like with the storage unit 2 and the work memory 3.

一方、CPU1には、その入出力周辺デバイスである操作部5、表示部6、カメラ撮影部7、画像メモリ8がバスラインを介して接続されており、入出力プログラムに従ってCPU1は、これらの入出力デバイスの動作制御を行う。操作部5は、シャッターボタン、撮影モード/再生モードに切り換えるモードボタン、サイズ測定の開始を指示するサイズ測定ボタン等の各種のファンクションボタンを有し、その操作信号はCPU1へ与えられる。表示部6は、例えば、タッチパネル付きの液晶表示部であり、モニタ画面/ファインダ画面/画像再生画面として使用される。カメラ撮影部7は、撮影レンズ、ミラー等のレンズ・ミラーブロック、CCDイメージセンサ等の撮像素子、その駆動系等を備え、撮影毎に、撮影画像を画像メモリ8へ順次転送するもので、CPU1は、撮影方向(レンズの指向方向)やズーム機構を調整制御したり、オートフォーカス時の駆動制御、シャッター駆動制御、シャッター速度、露出、ホワイトバランス等を制御したり、撮影画像の取り込みを行う。   On the other hand, an operation unit 5, a display unit 6, a camera photographing unit 7, and an image memory 8 which are input / output peripheral devices are connected to the CPU 1 via a bus line, and the CPU 1 inputs these according to an input / output program. Controls the operation of the output device. The operation unit 5 has various function buttons such as a shutter button, a mode button for switching to a shooting mode / playback mode, and a size measurement button for instructing start of size measurement, and the operation signal is given to the CPU 1. The display unit 6 is, for example, a liquid crystal display unit with a touch panel, and is used as a monitor screen / finder screen / image reproduction screen. The camera photographing unit 7 includes a photographing lens, a lens / mirror block such as a mirror, an image sensor such as a CCD image sensor, a driving system thereof, and the like, and sequentially transfers the photographed image to the image memory 8 for each photographing. Adjusts and controls the shooting direction (the direction of the lens) and the zoom mechanism, controls driving during autofocus, shutter drive control, shutter speed, exposure, white balance, etc., and captures captured images.

CPU1は、撮影モード時においてサイズ測定ボタンが操作された際に、サイズ測定機能を起動させることによってモニタ画像内に含まれている被写体の実サイズを測定表示するようにしている。
ここで、図2に示すように、モニタ画像内の各被写体のうち、被写体Xをサイズ測定の対象となる測定対象とし、他の1つの被写体Aをこの測定対象Xと比較される基準対象とすると、CPU1は、このモニタ画像を解析することによって測定対象Xおよび基準対象Aを自動指定するようにしている。この場合、CPU1は、モニタ画像の中心部分に位置している被写体を測定対象Xとして自動指定し、測定対象Xに対して略横並びの状態にある被写体を基準対象Aとして自動指定する。従って、測定対象Xと基準対象Aとは、遠近の関係(前後関係)にはなく、それぞれ略横並びの状態、つまり、撮影位置(レンズ位置)から測定対象までの距離と、撮影位置から基準対象までの距離が略同一の状態にある。
The CPU 1 measures and displays the actual size of the subject included in the monitor image by activating the size measurement function when the size measurement button is operated in the shooting mode.
Here, as shown in FIG. 2, among the subjects in the monitor image, the subject X is a measurement target to be size measured, and the other one subject A is a reference target to be compared with the measurement target X. Then, the CPU 1 automatically designates the measurement target X and the reference target A by analyzing the monitor image. In this case, the CPU 1 automatically designates the subject positioned at the center portion of the monitor image as the measurement target X, and automatically designates the subject that is in a state of being substantially side by side with respect to the measurement target X as the reference target A. Therefore, the measurement target X and the reference target A are not in a perspective relationship (front-rear relationship), but are substantially in a side-by-side relationship, that is, the distance from the shooting position (lens position) to the measurement target, and the reference position to the reference target. The distance to is substantially the same.

この場合、CPU1は、基準対象Aの実際の大きさを示す実サイズ(例えば、縦寸法)J1を取得した後、測定対象X、基準対象A毎にその画像サイズ(例えば、縦寸法)G1、G0を算出し、この測定対象X、基準対象Aの算出サイズG1、G0と基準対象の実サイズJ1に基づいて測定対象Xの実サイズJ0を算出するようにしている。これによって算出された測定対象Xの実サイズJ0は、モニタ画面内において測定対象Xに対応付けて付加表示される。   In this case, after acquiring the actual size (for example, vertical dimension) J1 indicating the actual size of the reference object A, the CPU 1 measures the measurement object X and the image size (for example, vertical dimension) G1 for each reference object A, G0 is calculated, and the actual size J0 of the measurement object X is calculated based on the measurement object X, the calculated sizes G1 and G0 of the reference object A, and the actual size J1 of the reference object. The actual size J0 of the measurement target X calculated in this way is additionally displayed in association with the measurement target X in the monitor screen.

図3は、モニタ画像内の各被写体が略横並び状態にはない場合において、測定対象Xに対して遠近の関係(前後関係)にある他の2つの被写体A、Bが基準対象として自動指定することを示している。すなわち、モニタ画像内の各被写体のうち、測定対象Xに対して他の被写体が略横並びの状態にはない場合に、CPU1は、上述の場合と同様に、モニタ画像の中心部分に位置している被写体を測定対象Xとして自動指定するが、その際、測定対象Xに対して遠近の関係(前後関係)にある他の2つの被写体A、Bを基準対象として自動指定するようにしている。言い換えれば、モニタ画像が展開されている平面座標系においてその縦方向の位置が異なる遠近関係の2つの基準対象A、Bを自動指定するようにしているが、その際、2つの同一の基準対象(位置が異なる同一種類の被写体)がモニタ画像に含まれていることを条件に基準対象の指定を行うようにしている。   FIG. 3 shows that when the subjects in the monitor image are not substantially in a side-by-side state, the other two subjects A and B that are in a perspective relationship (front-rear relationship) with respect to the measurement target X are automatically designated as reference targets. It is shown that. That is, among the subjects in the monitor image, when the other subject is not in a substantially horizontal state with respect to the measurement target X, the CPU 1 is positioned at the central portion of the monitor image as in the above case. A subject to be measured is automatically designated as a measurement target X. At this time, the other two subjects A and B that are in a perspective relationship (front-rear relationship) with respect to the measurement target X are automatically designated as reference targets. In other words, in the planar coordinate system in which the monitor image is developed, two reference objects A and B having different perspective positions are automatically specified, but at this time, two identical reference objects are used. The reference target is designated on the condition that (the same type of subjects having different positions) are included in the monitor image.

この場合、CPU1は、撮影画像を解析することによって測定対象Xと各基準対象A、Bとの位置関係(前後関係)を判別し、この前後関係に対応する計算式に従って測定対象Xの実サイズを算出するようにしている。
図4〜図6は、測定対象Xと各基準対象A、Bとの位置関係(前後関係)を示すと共に、この前後関係に応じて予め用意されている計算式に従って測定対象Xの実サイズが算出されることを示している。ここで、図4は、測定対象Xが基準対象A、Bの真中に位置している場合を示し、第1計算式に従って測定対象Xの実サイズが算出される。図5は、測定対象Xが基準対象A、Bよりも後方に位置している場合を示し、第2計算式に従って測定対象Xの実サイズが算出される。図6は、測定対象Xが基準対象A、Bよりも手前に位置している場合を示し、第3計算式に従って測定対象Xの実サイズが算出される。
なお、この実施例においては、測定対象Xと各基準対象A、Bとの前後関係に応じてCPU1は、対応する第1〜第3計算式を選択するようにしているが、第1計算式(基本式)のみを記憶管理しておき、この基本式を変形することによって第2計算式、第3計算式を得るようにしてもよい。
In this case, the CPU 1 discriminates the positional relationship (front-rear relationship) between the measurement target X and each of the reference objects A and B by analyzing the captured image, and the actual size of the measurement target X according to the calculation formula corresponding to this front-rear relationship. Is calculated.
4 to 6 show the positional relationship (front-rear relationship) between the measurement target X and the reference targets A and B, and the actual size of the measurement target X is determined according to a calculation formula prepared in advance according to the front-rear relationship. It is calculated. Here, FIG. 4 shows a case where the measurement object X is located in the middle of the reference objects A and B, and the actual size of the measurement object X is calculated according to the first calculation formula. FIG. 5 shows a case where the measurement object X is located behind the reference objects A and B, and the actual size of the measurement object X is calculated according to the second calculation formula. FIG. 6 shows a case where the measurement object X is positioned in front of the reference objects A and B, and the actual size of the measurement object X is calculated according to the third calculation formula.
In this embodiment, the CPU 1 selects the corresponding first to third calculation formulas according to the context of the measurement target X and the reference targets A and B, but the first calculation formula Only the (basic formula) may be stored and managed, and the second and third calculation formulas may be obtained by modifying the basic formula.

図4〜図6内の各計算式において、上述したように、「J1」は基準対象Aの実サイズ、「G1」は基準対象Aの画像サイズ、「G0」は測定対象Xの画像サイズ、「J0」は測定対象Xの実サイズを示している。更に、「J2」は基準対象Bの実サイズ、「G2」は基準対象Bの画像サイズを示している。
「h1」および「h2」は、測定対象Xと各基準対象A、Bとの間における前後方向の遠近距離を示したもので、CPU1は、モニタ画像が展開されている平面座標系においてその縦方向の垂直成分を遠近距離「h1」、「h2」として計測するようにしている。この場合、遠近距離「h1」は、基準対象Aの下端部を基点として基準対象Aから測定対象Xの下端部までの垂直成分の距離を示し、また、遠近距離「h2」は、基準対象Bの下端部を基点として基準対象Bから測定対象Xの下端部までの垂直成分の距離を示している。
In each calculation formula in FIGS. 4 to 6, as described above, “J1” is the actual size of the reference object A, “G1” is the image size of the reference object A, “G0” is the image size of the measurement object X, “J0” indicates the actual size of the measurement target X. Further, “J2” indicates the actual size of the reference object B, and “G2” indicates the image size of the reference object B.
“H1” and “h2” indicate distances in the front-rear direction between the measurement object X and the reference objects A and B, and the CPU 1 displays the vertical distance in the plane coordinate system where the monitor image is developed. The vertical component of the direction is measured as the perspective distances “h1” and “h2”. In this case, the perspective distance “h1” indicates the distance of the vertical component from the reference target A to the lower end of the measurement target X with the lower end of the reference target A as the base point, and the perspective distance “h2” indicates the reference target B The distance of the vertical component from the reference object B to the lower end part of the measurement object X is shown with the lower end of the reference point as the base point.

図7は、基準対象テーブル11の内容を示した図である。
この基準対象テーブル11は、予め任意に登録された基準対象毎にその実サイズデータを記憶管理する構成となっている。「基準対象」は、上述したようにサイズ測定時において測定対象と比較される基準対象の画像であり、実際のサイズが分かっている被写体を予め任意に撮影登録したもので、例えば、特定人物、道路標識、郵便ポスト、消火栓、建物やその窓枠などの撮影画像である。この場合、CPU1は、撮影画像を解析することによってその中に含まれている基準対象を自動特定する際に、この基準対象テーブル11に登録されている複数種の「基準対象」の何れかに特徴的に一致する被写体の画像部分を基準対象として特定するようにしている。その際、2つの同一の基準対象(例えば、位置が異なる郵便ポスト)がモニタ画像に含まれていることを条件に基準対象の指定を行う。
FIG. 7 is a diagram showing the contents of the reference target table 11.
The reference object table 11 is configured to store and manage the actual size data for each reference object arbitrarily registered in advance. As described above, the “reference object” is an image of the reference object to be compared with the measurement object at the time of size measurement, and is obtained by arbitrarily photographing and registering a subject whose actual size is known. It is a photographed image of a road sign, a post box, a fire hydrant, a building and its window frame. In this case, when the CPU 1 automatically identifies the reference object included in the captured image by analyzing the captured image, the CPU 1 selects one of a plurality of “reference objects” registered in the reference object table 11. An image portion of a subject that matches characteristically is specified as a reference target. At that time, the reference object is designated on the condition that two identical reference objects (for example, postboxes having different positions) are included in the monitor image.

「実サイズデータ」は、その「縦寸法」、「横寸法」、奥行き寸法」に対応する方向別の実サイズに分けられており、CPU1は、この方向別の実サイズの中から予め任意に選択指定されている方向の実サイズを読み出すようにしている。つまり、「縦寸法」、「横寸法」、奥行き寸法」のうち、どの方向の実サイズを読み出すかは、予め任意に選択指定可能となっており、CPU1は、この指定内容を参照することによって該当する方向の実サイズを読み出すようにしている。なお、基準対象の種類によっては、その「縦寸法」、「横寸法」、奥行き寸法」の何れか1つを登録するようにしてもよい。   The “actual size data” is divided into actual sizes for each direction corresponding to the “vertical dimension”, “horizontal dimension”, and depth dimension ”, and the CPU 1 arbitrarily selects from the actual sizes for each direction in advance. The actual size in the selected direction is read out. In other words, the direction in which the actual size is read out among “vertical dimension”, “horizontal dimension”, and depth dimension ”can be arbitrarily selected and designated in advance, and the CPU 1 refers to this designation content. The actual size in the corresponding direction is read out. Depending on the type of the reference object, any one of “vertical dimension”, “horizontal dimension”, and depth dimension ”may be registered.

次に、この実施例におけるデジタルカメラの動作概念を図8〜図11に示すフローチャートを参照して説明する。ここで、これらのフローチャートに記述されている各機能は、読み取り可能なプログラムコードの形態で格納されており、このプログラムコードにしたがった動作が逐次実行される。また、伝送媒体を介して伝送されてきた上述のプログラムコードに従った動作を逐次実行することもできる。すなわち、記録媒体の他に、伝送媒体を介して外部供給されたプログラム/データを利用してこの実施例特有の動作を実行することもできる。   Next, the operation concept of the digital camera in this embodiment will be described with reference to the flowcharts shown in FIGS. Here, each function described in these flowcharts is stored in the form of a readable program code, and operations according to the program code are sequentially executed. In addition, the operation according to the above-described program code transmitted via the transmission medium can be sequentially executed. In other words, in addition to the recording medium, the program / data supplied externally via the transmission medium can be used to execute the operation specific to this embodiment.

図8は、デジタルカメラの全体動作の概要を示したフローチャートであり、電源投入に応じて実行開始される。
先ず、CPU1は、撮影モードにセットされている状態において(ステップA1)、モニタ画像を逐次取り込んで(ステップA2)、モニタ画面に動画として表示させる(ステップA3)。この状態において、ボタン操作の有無をチェックし(ステップA4)、何れのボタンも操作されなければ(ステップA4でNO)、モニタ画像の取り込みに戻るが(ステップA2)、いま、シャッターボタンが操作された際には(ステップA5)、その時の撮影画像を画像ファイルとして記録保存した後(ステップA6)、モニタ画像の取り込みに戻る(ステップA2)。
FIG. 8 is a flowchart showing an outline of the overall operation of the digital camera, which starts executing in response to power-on.
First, in a state where the photographing mode is set (step A1), the CPU 1 sequentially captures monitor images (step A2) and displays them as moving images on the monitor screen (step A3). In this state, the presence / absence of button operation is checked (step A4). If no button is operated (NO in step A4), the monitor image capturing is resumed (step A2), but now the shutter button is operated. When this happens (step A5), the captured image at that time is recorded and saved as an image file (step A6), and then the process returns to capturing the monitor image (step A2).

一方、撮影モードから再生モードに切り換えられた際には(ステップA7)、ユーザ指示に従って記録画像を順方向/逆方向へ選択指定しながら順次再生表示させる再生処理を行う(ステップA8)。その後、再生モードから撮影モードに切り換えられた際には(ステップA9)、モニタ画像を取り込む処理に戻る(ステップA2)。ここで、撮影モードにおいて、サイズ測定ボタンが操作された際には(ステップA10)、モニタ画像内に含まれている測定対象の実サイズを測定するサイズ測定処理に移る(ステップA11)。  On the other hand, when the shooting mode is switched to the playback mode (step A7), a playback process is performed in which the recorded images are played back and displayed sequentially while selecting and specifying the recorded images in the forward / reverse directions according to the user instruction (step A8). Thereafter, when the playback mode is switched to the shooting mode (step A9), the process returns to the process of capturing the monitor image (step A2). Here, when the size measurement button is operated in the photographing mode (step A10), the process proceeds to a size measurement process for measuring the actual size of the measurement target included in the monitor image (step A11).

図9〜図11は、撮影モード時にサイズ測定ボタンの操作に応じて実行されるサイズ測定処理を詳述したフローチャートである。
先ず、CPU1は、測定対象の撮影に関する注意事項(測定対象を中央に写してシャッター操作を行う旨のメッセージ)を表示する測定開始画面(図12参照)を表示させた後(ステップB1)、モニタ画像を取得してモニタ表示させる(ステップB2)。この状態において、シャッターボタンの有無をチェックし(ステップB3)、シャッター操作がなければ、ステップB2に戻るが、シャッター操作された際には、現在のモニタ画像を固定表示すると共に(ステップB4)、この固定モニタ画像内でその中心部分に位置している被写体画像を測定対象として特定する(ステップB5)。
9 to 11 are flowcharts detailing the size measurement processing executed in response to the operation of the size measurement button in the shooting mode.
First, the CPU 1 displays a measurement start screen (see FIG. 12) that displays precautions regarding photographing of the measurement target (a message that the measurement target is centered and the shutter operation is performed) (step B1), and then the monitor. An image is acquired and displayed on a monitor (step B2). In this state, the presence or absence of the shutter button is checked (step B3), and if there is no shutter operation, the process returns to step B2, but when the shutter operation is performed, the current monitor image is fixedly displayed (step B4), The subject image located at the center of the fixed monitor image is specified as the measurement target (step B5).

そして、この測定対象に対して略横並びの状態にある他の被写体の画像部分を抽出し、この抽出画像に基づいて基準対象テーブル11を検索し(ステップB6)、何れかの基準対象に特徴的に一致するかをチェックする(ステップB7)。ここで、測定対象に対して略横並びの状態にある被写体が何れかの基準対象と一致する場合には(ステップB7でYES)、図10の第1測定処理に移るが、測定対象に対して略横並びの状態にある被写体が存在しない場合あるいは略横並びの被写体が存在していても基準対象テーブル11に登録されていない場合には(ステップB7でNO)、次のステップB8に移る。  Then, an image portion of another subject that is substantially in a line with the measurement target is extracted, and the reference target table 11 is searched based on the extracted image (step B6). (Step B7). Here, when the subject in a state of being substantially side-by-side with respect to the measurement target matches any reference target (YES in Step B7), the process proceeds to the first measurement process of FIG. If there is no subject in a substantially side-by-side state, or if there is a substantially side-by-side subject but it is not registered in the reference target table 11 (NO in step B7), the process proceeds to the next step B8.

このステップB8では、モニタ画像内において測定対象に対し前後(遠近)関係にある複数(2つ)の被写体の画像部分を抽出し、各抽出画像に基づいて基準対象テーブル11を検索し、抽出画像の各々が何れかの基準対象に特徴的に一致するかをチェックする(ステップB9)。この場合、前後(遠近)関係にある2つの同一の被写体(例えば、郵便ポスト)がモニタ画像に含まれていることを条件に2つの郵便ポストを基準対象として検索指定する。ここで、該当する基準対象が検索された場合には(ステップB9でYES)、図11の第2測定処理に移るが、測定対象に対して前後関係にある同一の2つの被写体が存在しない場合あるいは前後関係の被写体が存在していても各被写体が基準対象テーブル11に登録されていない場合には(ステップB9でNO)、測定不可メッセージを表示すると共に(ステップB10)、モニタ画像の固定表示を解除した後に通常の状態に戻る(ステップB11)。  In this step B8, image portions of a plurality of (two) subjects having a front-rear (perspective) relationship with respect to the measurement target in the monitor image are extracted, the reference target table 11 is searched based on each extracted image, and the extracted image It is checked whether each of these is characteristically matched to any reference object (step B9). In this case, two postboxes are searched and specified as a reference object on condition that two identical subjects (for example, postboxes) having a front-rear (perspective) relationship are included in the monitor image. Here, when the corresponding reference object is searched (YES in step B9), the process proceeds to the second measurement process of FIG. 11, but there are no two identical subjects in the context of the measurement object. Alternatively, if each subject is not registered in the reference object table 11 (NO in step B9) even though there are contextual subjects, a measurement impossible message is displayed (step B10), and the monitor image is fixedly displayed. After canceling, the normal state is restored (step B11).

図10の第1測定処理が開始されると、CPU1は、上述のステップB6で検索した基準対象の実サイズJ1を基準対象テーブル11から読み出し取得する(ステップB12)。そして、モニタ画像を解析することによって基準対象の画像サイズ「G1」を計測すると共に(ステップB13)、測定対象の画像サイズ「G0」を計測する(ステップB14)。なお、この画像サイズ「G0」、「G1」は、CCD等のイメージセンサ上のサイズであり、その有効領域全体の横/縦の寸法と、その全体の横/縦ドットサイズに基づいて縦方向における1ドット当たりの寸法(縦ピッチ)/横方向における1ドット当たり寸法(横ピッチ)を求め、このドットピッチに基づいてサイズ情報に換算された値である。  When the first measurement process of FIG. 10 is started, the CPU 1 reads and acquires the actual size J1 of the reference object searched in step B6 described above from the reference object table 11 (step B12). Then, by analyzing the monitor image, the reference target image size “G1” is measured (step B13), and the measurement target image size “G0” is measured (step B14). The image sizes “G0” and “G1” are sizes on an image sensor such as a CCD, and the vertical direction based on the horizontal / vertical dimensions of the entire effective area and the horizontal / vertical dot size of the entire effective area. The size per dot in (vertical pitch) / the size per dot in the horizontal direction (horizontal pitch) is obtained and converted into size information based on this dot pitch.

これによって基準対象の実サイズJ1および画像サイズG1と、測定対象の画像サイズG0が全て揃ったらこれらの値をパラメータとして測定対象の実サイズJ0を求める算出処理を行う(ステップB15)。この場合、測定対象の実サイズは、次の式に従って算出される。
測定対象の実サイズ「J0」=G0/G1*J1
As a result, when all of the actual size J1 and image size G1 of the reference object and the image size G0 of the measurement object are obtained, a calculation process for obtaining the actual size J0 of the measurement object is performed using these values as parameters (step B15). In this case, the actual size of the measurement target is calculated according to the following formula.
Actual size of measurement object “J0” = G0 / G1 * J1

このようにして算出された測定対象の実サイズは、画像サイズの比率に基準対象の実サイズを乗算した値となるが、この場合、測定対象と基準対象とが略横並び状態にあることを前提としている。言い換えれば、撮影位置から測定対象(建物)までの距離と、基準対象(人物)までの距離が略同一であることを前提としたものであり、その算出値はおおよそのサイズとなる。そして、モニタ画像内の測定対象を囲む枠を生成して枠表示を行うと共に、その実サイズを枠表示の近傍に付加表示する(ステップB16)。図13は、第1の測定処理によって得られた実サイズが付加表示されている状態のモニタ画面を示した図で、郵便ポストを基準対象として測定対象(樹木)の縦寸法(3m40cm)が算出表示された場合を示している。その後、操作待ち状態となり(ステップB17)、リターンキーが操作された場合には、モニタ画像の固定表示を解除した後、通常の状態に戻る(ステップB18)。   The actual size of the measurement target calculated in this way is a value obtained by multiplying the ratio of the image size by the actual size of the reference target. In this case, it is assumed that the measurement target and the reference target are substantially in a side-by-side state. It is said. In other words, it is assumed that the distance from the shooting position to the measurement target (building) and the distance to the reference target (person) are substantially the same, and the calculated value is an approximate size. Then, a frame surrounding the measurement object in the monitor image is generated and displayed, and the actual size is additionally displayed in the vicinity of the frame display (step B16). FIG. 13 is a view showing a monitor screen in which the actual size obtained by the first measurement process is additionally displayed, and the vertical dimension (3 m40 cm) of the measurement target (tree) is calculated using the post box as a reference target. The case where it is displayed is shown. Thereafter, the operation wait state is entered (step B17), and when the return key is operated, the fixed display of the monitor image is released and then the normal state is restored (step B18).

図11の第2測定処理が開始されると、CPU1は、上述のステップB8で検索した2つの基準対象を指定した後(ステップB19)、その何れか一方を第1の基準対象(図4〜図6で示した基準対象A)として、その実サイズ「J1」を基準対象テーブル11から読み出し取得すると共に(ステップB20)、モニタ画像上において第1基準対象の画像サイ「G1」を計測する(ステップB21)。同様に、他方の基準対象を第2の基準対象(図4〜図6で示した基準対象B)として、その実サイズ「J2」を基準対象テーブル11から読み出し取得すると共に(ステップB22)、モニタ画像上において第2基準対象の画像サイ「G2」を計測する(ステップB23)。更に、モニタ画像上において測定対象の画像サイ「G0」を計測する(ステップB24)。なお、この画像サイズ「G0」、「G1」、「G2」は、CCD等のイメージセンサ上のサイズであり、その有効領域全体の横/縦の寸法と、その全体の横/縦ドットサイズに基づいて縦方向における1ドット当たりの寸法(縦ピッチ)/横方向における1ドット当たり寸法(横ピッチ)を求め、このドットピッチに基づいてサイズ情報に換算された値である。   When the second measurement process in FIG. 11 is started, the CPU 1 designates the two reference objects searched in step B8 described above (step B19), and then designates one of them as the first reference object (FIG. 4 to FIG. 4). As the reference object A) shown in FIG. 6, the actual size “J1” is read from the reference object table 11 (step B20), and the image size “G1” of the first reference object is measured on the monitor image (step B20). B21). Similarly, the other reference object is set as the second reference object (reference object B shown in FIGS. 4 to 6), and the actual size “J2” is read out from the reference object table 11 (step B22), and the monitor image is displayed. Above, the image size “G2” of the second reference object is measured (step B23). Further, the measurement target image size “G0” is measured on the monitor image (step B24). The image sizes “G0”, “G1”, and “G2” are sizes on an image sensor such as a CCD, and the horizontal / vertical dimensions of the entire effective area and the horizontal / vertical dot sizes of the entire effective area. Based on this, the size per dot in the vertical direction (vertical pitch) / the size per dot in the horizontal direction (horizontal pitch) is obtained, and is a value converted into size information based on this dot pitch.

次に、モニタ画像内において第1基準対象から測定対象までの垂直成分の距離を計測する(ステップB25)。この場合、図4〜図6に示すように基準対象Aの下端部から測定対象Xの下端部までの距離h1を計測する。更に、モニタ画像内において第2基準対象から測定対象までの垂直成分の距離を計測する(ステップB26)。この場合、図4〜図6に示すように基準対象Bの下端部から測定対象Xの下端部までの距離h2を計測する。
これによって各基準対象A、Bの実サイズJ1、J2とその画像サイズG1、G2、測定対象Xの画像サイズG0、基準対象Aから測定対象Xまでの距離h1、基準対象Bから測定対象Xまでの距離h2が全て揃った段階で、これらの値をパラメータとして測定対象Xの実サイズJ0を求める算出処理を行う。
Next, the distance of the vertical component from the first reference object to the measurement object is measured in the monitor image (step B25). In this case, as shown in FIGS. 4 to 6, the distance h <b> 1 from the lower end of the reference object A to the lower end of the measurement object X is measured. Further, the distance of the vertical component from the second reference object to the measurement object in the monitor image is measured (step B26). In this case, the distance h2 from the lower end of the reference object B to the lower end of the measurement object X is measured as shown in FIGS.
Thus, the actual sizes J1 and J2 of the reference objects A and B and their image sizes G1 and G2, the image size G0 of the measurement object X, the distance h1 from the reference object A to the measurement object X, and from the reference object B to the measurement object X When all the distances h2 are complete, a calculation process for obtaining the actual size J0 of the measurement target X is performed using these values as parameters.

この場合、CPU1は、モニタ画像を解析することによって測定対象と各基準対象との位置関係(前後関係)を判別する(ステップB27)。いま、図4に示すように測定対象が各基準対象の真中に位置している場合には(ステップB28でYES)、図4に示した第1計算式(基本式)を選択して(ステップB29)、測定対象Xの実サイズJ0を求める(ステップB33)。
J0=G0*(h2/(h1+h2)*J1/G1+h1/(h1+h2)*J2/G2)
In this case, the CPU 1 determines the positional relationship (front-rear relationship) between the measurement target and each reference target by analyzing the monitor image (step B27). Now, as shown in FIG. 4, when the measurement target is located in the middle of each reference target (YES in step B28), the first calculation formula (basic formula) shown in FIG. 4 is selected (step B29) and the actual size J0 of the measuring object X is obtained (step B33).
J0 = G0 * (h2 / (h1 + h2) * J1 / G1 + h1 / (h1 + h2) * J2 / G2)

また、図5に示すように測定対象が各基準対象よりも後方に位置している場合には(ステップB30でYES)、図5に示した第2計算式を選択して(ステップB31)、測定対象Xの実サイズJ0を求める(ステップB33)。なお、この第2計算式は、上述の第1計算式を基本式として変形したものである。
J0=G0*(J1/G1*h2/(h2−h1)−J2/G2*h1/(h2−h1))
また、図6に示すように測定対象が各基準対象よりも前方に位置している場合には(ステップB30でNO)、図6に示した第3計算式を選択して(ステップB32)、測定対象Xの実サイズJ0を求める(ステップB33)。なお、この第3計算式は、上述の第1計算式を基本式として変形したものである。
J0=G0*(J2/G2*h1/(h1−h2)−J1/G1*h2/(h1−h2))
Also, as shown in FIG. 5, when the measurement object is located behind each reference object (YES in step B30), the second calculation formula shown in FIG. 5 is selected (step B31), The actual size J0 of the measurement object X is obtained (step B33). This second calculation formula is a modification of the first calculation formula described above as a basic formula.
J0 = G0 * (J1 / G1 * h2 / (h2-h1) -J2 / G2 * h1 / (h2-h1))
Also, as shown in FIG. 6, when the measurement object is located in front of each reference object (NO in step B30), the third calculation formula shown in FIG. 6 is selected (step B32), The actual size J0 of the measurement object X is obtained (step B33). This third calculation formula is a modification of the first calculation formula described above as a basic formula.
J0 = G0 * (J2 / G2 * h1 / (h1-h2) −J1 / G1 * h2 / (h1-h2))

このようにして測定対象の実サイズ(おおよその値)が算出されると、図10のステップB16に戻り、モニタ画像内の測定対象を囲む枠を生成して枠表示を行うと共に、その実サイズを枠表示の近傍に付加表示する。図14は、第2測定処理によって得られた実サイズが付加表示されている状態のモニタ画面を示した図である。この場合、距離的に離れている郵便ポストを基準対象として、その真中に位置している測定対象(樹木)の縦寸法(3m40cm)が上述した第1計算式に従って算出されて表示された状態を示している。この状態において、リターンキーの操作に応答し(ステップB17)、モニタ画像の固定表示を解除した後に通常の状態に戻る(ステップB18)。  When the actual size (approximate value) of the measurement target is calculated in this way, the process returns to step B16 in FIG. 10, and a frame surrounding the measurement target in the monitor image is generated and displayed, and the actual size is set. Additional display in the vicinity of the frame display. FIG. 14 is a diagram showing a monitor screen in a state where the actual size obtained by the second measurement process is additionally displayed. In this case, with a post box that is far away as a reference object, the vertical dimension (3 m40 cm) of the measurement object (tree) located in the middle is calculated and displayed according to the first calculation formula described above. Show. In this state, in response to the operation of the return key (step B17), the monitor image is released from the fixed display and then returned to the normal state (step B18).

以上のように、この実施例においては、カメラ撮影部7によって撮影されたモニタ画像内の被写体が測定対象として指定されていると共に、このモニタ画像内に存在する複数の他の被写体が基準対象として指定されている状態において、CPU1は、モニタ画像内において測定対象と複数の基準対象との間における前後方向の遠近距離をそれぞれ計測すると共に、指定された複数の基準対象毎にその実サイズを取得し、更に、モニタ画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと各遠近距離と各基準対象の実サイズに基づいて測定対象の実サイズを算出するようにしたから、距離センサを使用しなくても、サイズ測定の対象となる被写体とこの測定対象と比較される基準対象の被写体との前後関係(遠近関係)を考慮しながら撮影画像を解析することによって測定対象の実サイズを測定することができる。  As described above, in this embodiment, the subject in the monitor image photographed by the camera photographing unit 7 is designated as the measurement target, and a plurality of other subjects existing in the monitor image are used as the reference subject. In the designated state, the CPU 1 measures the distance in the front-rear direction between the measurement object and the plurality of reference objects in the monitor image, and acquires the actual size for each of the plurality of designated reference objects. Further, by analyzing the monitor image, the image size is calculated for each measurement object and reference object, and the actual size of the measurement object is calculated based on each calculated size, each perspective distance, and the actual size of each reference object. As a result, without using a distance sensor, the subject to be measured and the reference subject to be compared with this subject It can be measured actual size of the measuring object by analyzing the photographed image while considering the post-relationship (distance relation).

この場合、CPU1は、モニタ画像を解析することによってその中心部分に位置している画像部分を測定対象として指定するようにしたから、画像解析によって測定対象の自動指定が可能となり、特別な操作が不要となると共に、測定対象を確実に指定することが可能となる。また、モニタ画像内に含まれている各被写体のうち、基準対象テーブル11に登録されている複数種の基準対象の何れかに特徴的に一致する複数の被写体を検索することによって少なくとも2つの基準対象を指定するようにしたから、モニタ画像の解析で複数の基準対象の自動指定が可能となり、特別な操作が不要となると共に、基準対象を確実に指定することが可能となる。この場合、基準対象テーブル11には、基準対象に対応してその実サイズが記憶管理されているので、基準対象の実サイズの自動取得が可能となり、特別な操作が不要となる。   In this case, since the CPU 1 analyzes the monitor image and designates the image portion located in the central portion as the measurement target, the measurement target can be automatically designated by the image analysis, and a special operation is performed. It becomes unnecessary, and it becomes possible to specify the measurement target with certainty. Further, among the subjects included in the monitor image, by searching for a plurality of subjects characteristically matching any of a plurality of types of reference targets registered in the reference target table 11, at least two criteria are obtained. Since the target is specified, it is possible to automatically specify a plurality of reference objects by analyzing the monitor image, so that no special operation is required and the reference object can be specified reliably. In this case, since the actual size is stored and managed in the reference object table 11 corresponding to the reference object, the actual size of the reference object can be automatically acquired, and no special operation is required.

この際、モニタ画像が展開されている平面座標系においてその縦方向の位置が相違して遠近の関係にある2つの基準対象を指定したり、また、遠近関係にある2つの基準対象を指定する際に、同一の基準対象をそれぞれ指定するようにしたから、測定対象の実サイズを簡単に算出することが可能となる。更に、測定対象と複数の基準対象との間における前後方向の遠近距離を計測する際に、モニタ画像が展開されている平面座標系においてその縦方向の垂直成分を遠近距離として計測したり、遠近関係にある2つの基準対象のうち、その一方の基準対象と測定対象との間の遠近距離および他方の基準対象と測定対象との間の遠近距離を計測するようにしたから、測定対象の実サイズを簡単に算出することが可能となる。   At this time, in the planar coordinate system in which the monitor image is developed, two reference objects having different vertical positions and having a perspective relation are designated, or two reference objects having a perspective relation are designated. At this time, since the same reference object is designated, the actual size of the measurement object can be easily calculated. Furthermore, when measuring the perspective distance in the front-rear direction between the measurement target and a plurality of reference targets, the vertical component in the vertical direction is measured as the perspective distance in the plane coordinate system where the monitor image is developed, Of the two reference objects in a relationship, the distance between one reference object and the measurement object and the distance between the other reference object and the measurement object are measured. The size can be easily calculated.

また、CPU1は、モニタ画像を解析することによって測定対象と複数の基準対象との前後関係を判別すると共に、判別された前後関係に対応する計算式に従って測定対象の実サイズを算出するようにしたから、測定対象の実サイズを簡単に算出することができる。この場合、測定対象が含まれているモニタ画像が表示されている状態において、このモニタ画像内に当測定対象に対応付けてその実サイズを表示するようにしたから、モニタ画像内でサイズ確認を行いながらその測定対象を見ることができると共に、測定対象とその実サイズとの対応関係が明瞭となる。   Further, the CPU 1 determines the front-rear relationship between the measurement target and the plurality of reference targets by analyzing the monitor image, and calculates the actual size of the measurement target according to the calculation formula corresponding to the determined front-rear relationship. Thus, the actual size of the measurement object can be easily calculated. In this case, in the state where the monitor image including the measurement target is displayed, the actual size is displayed in association with the measurement target in the monitor image, so the size is confirmed in the monitor image. While being able to see the measurement object, the correspondence between the measurement object and its actual size becomes clear.

一方、モニタ画像内において測定対象が指定されていると共に、基準対象が指定されている状態において、CPU1は、モニタ画像を解析することによって測定対象と基準対象とがモニタ画像内において前後関係にあるかを判別し、前後関係がない場合には、第1測定処理を実行し、測定対象、基準対象の画像サイズと基準対象の実サイズに基づいて当該測定対象の実サイズを算出し、また、前後関係がある場合には、第1測定処理を実行し、測定対象と基準対象との間における前後方向の遠近距離をそれぞれ計測し、測定対象、基準対象の画像サイズと遠近距離と基準対象の実サイズに基づいて測定対象の実サイズを算出するようにしたから、距離センサを使用しなくても、測定対象と基準対象とを比較しながらモニタ画像を解析することによって測定対象の実サイズを測定可能であると共に、測定対象と基準対象とが前後関係にあるか否かに応じて測定対象の実サイズを適切に測定することができる。   On the other hand, in a state where the measurement target is specified in the monitor image and the reference target is specified, the CPU 1 analyzes the monitor image so that the measurement target and the reference target are in the context of the monitor image. If there is no context, the first measurement process is performed, and the actual size of the measurement target is calculated based on the measurement target, the image size of the reference target, and the actual size of the reference target. If there is a anteroposterior relationship, the first measurement process is executed to measure the perspective distance in the front-rear direction between the measurement object and the reference object, respectively, and the measurement object, reference object image size, perspective distance, and reference object Since the actual size of the measurement target is calculated based on the actual size, the monitor image can be analyzed while comparing the measurement target with the reference target without using a distance sensor. Thus with can measure the actual size of the measuring object, the measured object and the reference object can be properly measured actual size of the measuring object according to whether the context.

なお、上述した実施例においては、遠近関係にある2つの基準対象を指定する際に、同一の基準対象(距離がことなる郵便ポスト)を検索指定するようにしたが、略同一サイズを持った基準対象をそれぞれ指定するようにしてもよい。
また、上述した実施例においては、基準対象Aの下端部を基点として基準対象Aから測定対象Xの下端部までの垂直成分の距離「h1」と、基準対象Bの下端部を基点として基準対象Bから測定対象Xの下端部までの垂直成分の距離「h2」を計測するようにしたが、例えば、一方の基準対象と測定対象との間の距離と各基準対象間の距離を計測するようにしてもよい。
In the above-described embodiment, when two reference objects having a perspective relationship are designated, the same reference object (postbox having a different distance) is designated for retrieval. However, they have substantially the same size. Each reference object may be designated.
In the embodiment described above, the distance “h1” of the vertical component from the reference target A to the lower end of the measurement target X with the lower end of the reference target A as the base point, and the reference target with the lower end of the reference target B as the base point The distance “h2” of the vertical component from B to the lower end of the measurement target X is measured. For example, the distance between one reference object and the measurement object and the distance between each reference object are measured. It may be.

なお、上述した実施例においては、モニタ画像を解析することによって測定対象、基準対象を自動特定するようにしたが、モニタ画面上において撮影者が、測定対象、基準対象を任意に指定するようにしてもよい。この場合、タッチパネル付きのモニタ画面上で任意の位置がタッチ指定(ポイント指定)された際に、その指定ポイントでの画像の連続性などを考慮して測定対象あるいは基準対象を特定するようにしてもよい。また、任意の測定対象あるいは基準対象をタッチ指定する際に、その輪郭に沿ってタッチ指定するようにすれば、測定対象あるいは基準対象を容易に特定することが可能となる。  In the above-described embodiment, the measurement target and the reference target are automatically specified by analyzing the monitor image. However, the photographer arbitrarily designates the measurement target and the reference target on the monitor screen. May be. In this case, when an arbitrary position is touched (point specified) on a monitor screen with a touch panel, the measurement target or reference target is specified in consideration of the continuity of the image at the specified point. Also good. In addition, when a touch designation is made on an arbitrary measurement target or reference object, if the touch designation is made along the contour, the measurement target or reference object can be easily specified.

また、上述した実施例においては、測定対象と基準対象とが同一平面上にある場合を想定したが、測定対象と基準対象との高さが異なる場合であっても、測定対象の実サイズを測定することができる。この場合、上述した実施例においては、モニタ画像内において測定対象および基準対象の大きさを特定するようにしたから、測定対象と基準対象との高さが異なっていても測定対象の実サイズを測定することが可能となる。  In the above-described embodiment, it is assumed that the measurement target and the reference target are on the same plane. However, even if the measurement target and the reference target are different in height, the actual size of the measurement target is set. Can be measured. In this case, in the above-described embodiment, the sizes of the measurement object and the reference object are specified in the monitor image. Therefore, even if the heights of the measurement object and the reference object are different, the actual size of the measurement object is set. It becomes possible to measure.

また、シャッター操作に応答して撮影画像を記録保存する際に、測定対象の実サイズを併せて記録保存するようにすれば、画像再生時にその撮影画像に対応付けられている測定対象の実サイズを読み出して表示することができる。更に、撮影画像毎にその測定対象の実サイズを付加して記録媒体に保存しておき、この記録媒体をパーソナルコンピュータ等の画像データ処理装置に投入して画像再生を行うようにすれば、撮影画像毎にその測定対象の実サイズを表示することができる。  In addition, when recording and saving a captured image in response to a shutter operation, if the actual size of the measurement target is also recorded and saved, the actual size of the measurement target associated with the captured image at the time of image playback Can be read and displayed. Further, the actual size of the measurement object is added to each captured image and stored in a recording medium, and this recording medium is inserted into an image data processing apparatus such as a personal computer to perform image reproduction. The actual size of the measurement object can be displayed for each image.

上述した実施例においては、基準対象テーブル11に複数種の基準対象の画像データを任意に登録するようにしたが、例えば、道路標識、郵便ポスト、消火栓などのように、そのサイズが固定しているものにあっては、それを撮影した撮影画像自体を登録せず、この比較基準の特徴的な情報(例えば、郵便ポストであれば、立方体、縦横比、全体が赤色)を登録するようにしてもよい。また、基準対象テーブル11の内容は、製品購入時に設定登録されているものであってもよく、必要に応じてユーザが任意の基準対象とその実サイズを追加登録するようにしてもよい。  In the embodiment described above, image data of a plurality of types of reference objects are arbitrarily registered in the reference object table 11, but the size is fixed, for example, a road sign, a post box, a fire hydrant or the like. If it is, the characteristic image of this comparison standard (for example, if it is a postbox, the cube, the aspect ratio, the whole is red) should be registered. May be. The contents of the reference object table 11 may be set and registered at the time of product purchase, and the user may additionally register an arbitrary reference object and its actual size as necessary.

また、上述した実施例においては、デジタルカメラに適用した場合を示したが、パーソナルコンピュータ等の画像データ処理装置あるいはカメラ付き携帯電話や携帯情報機器などに組み込むようにしてもよく、各種用途にも使用可能である。例えば、建築現場、土木現場などで撮影を行った後、会社で画像再生を行いながら現場の状況を確認する際に、各撮影画像に基づいてその各部位の実サイズを測定表示するようにしてもよい。
その他、サイズ測定装置は、スタンドアロンタイプに限らず、その各構成要素が2以上の筐体に物理的に分離され、通信回線やケーブル等の有線伝送路あるいは電波、マイクロウエーブ、赤外線等の無線伝送路を介してデータを送受信する分散型のシステムであってもよい。
In the above-described embodiments, the case where the present invention is applied to a digital camera is shown. However, it may be incorporated in an image data processing apparatus such as a personal computer, a camera-equipped mobile phone or a portable information device, and for various applications. It can be used. For example, after shooting at a construction site, civil engineering site, etc., when checking the status of the site while reproducing images at the company, the actual size of each part is measured and displayed based on each captured image Also good.
In addition, the size measuring device is not limited to a stand-alone type, but each component is physically separated into two or more cases, and wired transmission paths such as communication lines and cables, or wireless transmission such as radio waves, microwaves, and infrared rays. It may be a distributed system that transmits and receives data via a path.

一方、コンピュータに対して、上述した各手段を実行させるためのプログラムコードをそれぞれ記録した記録媒体(例えば、CD−ROM、フレキシブルディスク、RAMカード等)を提供するようにしてもよい。すなわち、コンピュータが読み取り可能なプログラムコードを有する記録媒体であって、撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この撮影画像内に存在する複数の他の被写体を前記測定対象と比較される基準対象として指定する機能と、撮影画像内において前記指定された測定対象と複数の基準対象との間における前後方向の遠近距離をそれぞれ計測する機能と、前記指定された複数の基準対象毎にその実サイズを取得する機能と、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出すると共に、この各算出サイズと各遠近距離と各基準対象の実サイズに基づいて測定対象の実サイズを算出する機能とを実現させるためのプログラムを記録したコンピュータが読み取り可能な記録媒体を提供するようにしてもよい。   On the other hand, a recording medium (for example, a CD-ROM, a flexible disk, a RAM card, etc.) on which program codes for executing the above-described units are recorded may be provided to the computer. That is, a recording medium having a computer-readable program code, in addition to designating a subject in a captured image as a measurement target for size measurement, and a plurality of other subjects existing in the captured image A function for designating a reference object to be compared with a measurement object, a function for measuring the distance in the front-rear direction between the designated measurement object and a plurality of reference objects in a captured image, and the plurality of designated A function to acquire the actual size for each reference object, and to calculate the image size for each measurement object and reference object by analyzing the captured image, and to calculate each calculated size, each perspective distance, and the actual size of each reference object And a computer-readable recording that stores a program for realizing the function of calculating the actual size of the measurement object based on It may be provided a medium.

また、コンピュータが読み取り可能なプログラムコードを有する記録媒体であって、撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この測定対象と比較される基準対象を指定する機能と、撮影画像を解析することによって前記指定された測定対象と基準対象とが撮影画像内において前後関係にあるかを判別する機能と、前後関係がないことが判別された場合には、基準対象の実サイズを取得すると共に、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと基準対象の実サイズに基づいて当該測定対象の実サイズを算出する機能と、前後関係があることが判別された場合には、撮影画像内において前記指定された測定対象と基準対象との間における前後方向の遠近距離をそれぞれ計測し、基準対象毎にその実サイズを取得し、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと遠近距離と基準対象の実サイズに基づいて測定対象の実サイズを算出する機能とを実現させるためのプログラムを記録したコンピュータが読み取り可能な記録媒体を提供するようにしてもよい。   A recording medium having a computer-readable program code, and a function for designating a reference object to be compared with a measurement object in addition to designating a subject in a captured image as a measurement object to be subjected to size measurement; A function for determining whether the specified measurement object and the reference object are in the context in the captured image by analyzing the captured image, and if it is determined that there is no context, the reference object Obtain the actual size and calculate the image size for each measurement object and reference object by analyzing the captured image, and calculate the actual size of the measurement object based on each calculated size and the actual size of the reference object If it is determined that there is a front-rear relationship with the function, the distance in the front-rear direction between the specified measurement target and the reference target in the captured image is determined. Each distance is measured, the actual size is obtained for each reference object, and the captured image is analyzed to calculate the image size for each measurement object and reference object. Each calculated size, perspective distance, and actual size of the reference object A computer-readable recording medium that records a program for realizing the function of calculating the actual size of the measurement object based on the above may be provided.

デジタルカメラの基本的構成要素を示したブロック図。The block diagram which showed the basic component of the digital camera. モニタ画像上において、測定対象Xと基準対象Aとが遠近の関係(前後関係)にはなく、それぞれ略横並びの状態にある場合を例示した図。The figure which illustrated the case where the measuring object X and the reference | standard object A are not in the perspective relationship (front-rear relationship) on the monitor image, but are in respectively the state where it is substantially side by side. モニタ画像上において、測定対象Xと2つの基準対象A、Bとが遠近の関係(前後関係)にある場合を例示した図。The figure which illustrated the case where the measuring object X and the two reference objects A and B are in a perspective relationship (front-rear relationship) on the monitor image. 測定対象Xが基準対象A、Bの真中に位置している場合に、第1の計算式に従って測定対象Xの実サイズが算出されることを示した図。The figure which showed that the real size of the measuring object X was calculated according to the 1st calculation formula, when the measuring object X is located in the middle of the reference objects A and B. 測定対象Xが基準対象A、Bよりも後方に位置している場合に、第2の計算式に従って測定対象Xの実サイズが算出されることを示した図The figure which showed that the actual size of the measuring object X was calculated according to the 2nd calculation formula, when the measuring object X is located back rather than the reference | standard objects A and B 測定対象Xが基準対象A、Bよりも手前に位置している場合に、第3の計算式に従って測定対象Xの実サイズが算出されることを示した図。The figure which showed that the actual size of the measuring object X was calculated according to the 3rd calculation formula, when the measuring object X is located in front of the reference objects A and B. 基準対象テーブル11の内容を示した図。The figure which showed the content of the reference | standard object table 11. FIG. 電源投入に応じて実行開始されるデジタルカメラの全体動作の概要を示したフローチャート。The flowchart which showed the outline | summary of the whole operation | movement of the digital camera started execution according to power activation. 撮影モード時にサイズ測定ボタンの操作に応じて実行されるサイズ測定処理を詳述したフローチャート。The flowchart which detailed the size measurement process performed according to operation of a size measurement button at the time of imaging | photography mode. 図9のサイズ測定処理において実行される第1の測定処理を示したフローチャート。The flowchart which showed the 1st measurement process performed in the size measurement process of FIG. 図9のサイズ測定処理において実行される第2の測定処理を示したフローチャート。The flowchart which showed the 2nd measurement process performed in the size measurement process of FIG. 測定開始画面を示した図。The figure which showed the measurement start screen. 第1測定処理の実行後においてその測定結果の表示画面を示した図。The figure which showed the display screen of the measurement result after execution of a 1st measurement process. 第2測定処理の実行後においてその測定結果の表示画面を示した図。The figure which showed the display screen of the measurement result after execution of a 2nd measurement process.

符号の説明Explanation of symbols

1 CPU
2 記憶部
4 記録媒体
5 操作部
6 表示部
7 カメラ撮影部
8 画像メモリ
11 基準対象テーブル
X 測定対象
A、B 基準対象
1 CPU
2 storage unit 4 recording medium 5 operation unit 6 display unit 7 camera photographing unit 8 image memory 11 reference object table X measurement object A, B reference object

Claims (15)

撮影画像の中に含まれている被写体の実サイズを測定するサイズ測定装置であって、
撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この撮影画像内に存在する複数の他の被写体を前記測定対象と比較される基準対象として指定する指定手段と、
撮影画像内において前記指定された測定対象と複数の基準対象との間における前後方向の遠近距離をそれぞれ計測する計測手段と、
前記指定された複数の基準対象毎にその実サイズを取得する取得手段と、
撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出すると共に、この各算出サイズと各遠近距離と各基準対象の実サイズに基づいて測定対象の実サイズを算出する算出手段と、
を具備したことを特徴とするサイズ測定装置。
A size measuring device for measuring the actual size of a subject included in a captured image,
In addition to designating a subject in the captured image as a measurement target to be size-measured, a designation means for designating a plurality of other subjects present in the captured image as reference targets to be compared with the measurement target;
Measuring means for measuring the distance in the front-rear direction between the specified measurement object and a plurality of reference objects in the captured image;
Obtaining means for obtaining the actual size for each of the plurality of designated reference objects;
Calculation means for calculating the image size for each measurement object and reference object by analyzing the captured image, and calculating the actual size of the measurement object based on each calculated size, each perspective distance, and the actual size of each reference object When,
A size measuring device comprising:
前記指定手段は、撮影画像を解析することによってその中心部分に位置している画像部分を測定対象として指定する、
ようにしたことを特徴とする請求項1記載のサイズ測定装置。
The designation means designates an image portion located in the center portion by analyzing a captured image as a measurement target.
2. The size measuring apparatus according to claim 1, wherein the size measuring apparatus is configured as described above.
前記指定手段は、撮影画像内に含まれている各被写体のうち、予め記憶管理されている複数種の基準対象の何れかに特徴的に一致する複数の被写体を検索することによって、少なくとも2つの基準対象を指定する、
ようにしたことを特徴とする請求項1記載のサイズ測定装置。
The specifying means searches for a plurality of subjects characteristically matching any of a plurality of types of reference targets stored and managed in advance among the subjects included in the photographed image, thereby at least two Specify the reference target,
2. The size measuring apparatus according to claim 1, wherein the size measuring apparatus is configured as described above.
前記指定手段は、撮影画像が展開されている平面座標系においてその縦方向の位置が相違して遠近の関係にある2つの基準対象を指定する、
ようにしたことを特徴とする請求項3記載のサイズ測定装置。
The designation means designates two reference objects having different longitudinal positions in a plane coordinate system in which a photographed image is developed and having a perspective relationship,
4. The size measuring apparatus according to claim 3, wherein the size measuring apparatus is configured as described above.
前記指定手段は、遠近関係にある2つの基準対象を指定する際に、同一の基準対象あるいは略同一サイズを持った基準対象をそれぞれ指定する、
ようにしたことを特徴とする請求項3記載のサイズ測定装置。
The designation means designates the same reference object or a reference object having substantially the same size when designating two reference objects in perspective relation,
4. The size measuring apparatus according to claim 3, wherein the size measuring apparatus is configured as described above.
前記計測手段は、測定対象と複数の基準対象との間における前後方向の遠近距離を計測する際に、撮影画像が展開されている平面座標系においてその縦方向の垂直成分を遠近距離として計測する、
ようにしたことを特徴とする請求項1記載のサイズ測定装置。
The measuring means measures the vertical component in the vertical direction as a perspective distance in a plane coordinate system in which a photographed image is developed when measuring the perspective distance in the front-rear direction between the measurement target and the plurality of reference targets. ,
The size measuring device according to claim 1, which is configured as described above.
前記計測手段は、遠近関係にある2つの基準対象のうち、その一方の基準対象と測定対象との間の遠近距離および他方の基準対象と測定対象との間の遠近距離を計測するか、一方の基準対象と測定対象との間の遠近距離および各基準対象間の遠近距離を計測する、
ようにしたことを特徴とする請求項6記載のサイズ測定装置。
The measuring means measures a perspective distance between one reference object and the measurement object and a perspective distance between the other reference object and the measurement object, or one of the two reference objects in a perspective relationship, Measure the perspective distance between the reference object and the measurement object and the distance between each reference object.
The size measuring device according to claim 6, which is configured as described above.
予め複数種の基準対象に対応してその実サイズが記憶管理されている状態において、前記取得手段は、前記指定された基準対象に対応する実サイズを読み出し取得する、
ようにしたことを特徴とする請求項1記載のサイズ測定装置。
In a state where the actual size is stored and managed in advance corresponding to a plurality of types of reference objects, the acquisition unit reads and acquires the actual size corresponding to the designated reference object.
2. The size measuring apparatus according to claim 1, wherein the size measuring apparatus is configured as described above.
撮影画像を解析することによって前記指定された測定対象と複数の基準対象との前後関係を判別する判別手段を設け、
この判別手段によって判別された前後関係に対応する計算式に従って前記算出手段は、測定対象の実サイズを算出する、
ようにしたことを特徴とする請求項1記載のサイズ測定装置。
Providing a discriminating means for discriminating the anteroposterior relationship between the designated measurement object and a plurality of reference objects by analyzing the captured image
The calculation means calculates the actual size of the measurement object according to the calculation formula corresponding to the context determined by the determination means,
2. The size measuring apparatus according to claim 1, wherein the size measuring apparatus is configured as described above.
測定対象が含まれている撮影画像が表示されている状態において、この撮影画像内に当測定対象に対応付けてその実サイズを表示する、
ようにしたことを特徴とする請求項1記載のサイズ測定装置。
In a state where a captured image including the measurement target is displayed, the actual size is displayed in association with the measurement target in the captured image.
2. The size measuring apparatus according to claim 1, wherein the size measuring apparatus is configured as described above.
コンピュータに対して、
撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この撮影画像内に存在する複数の他の被写体を前記測定対象と比較される基準対象として指定する機能と、
撮影画像内において前記指定された測定対象と複数の基準対象との間における前後方向の遠近距離をそれぞれ計測する機能と、
前記指定された複数の基準対象毎にその実サイズを取得する機能と、
撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出すると共に、この各算出サイズと各遠近距離と各基準対象の実サイズに基づいて測定対象の実サイズを算出する機能と、
を実現させるためのプログラム。
Against the computer,
In addition to designating a subject in a captured image as a measurement target to be size measured, a function of designating a plurality of other subjects present in the captured image as reference targets to be compared with the measurement target,
A function of measuring the perspective distance in the front-rear direction between the specified measurement object and a plurality of reference objects in the captured image;
A function of acquiring the actual size for each of the plurality of designated reference objects;
A function of calculating the image size for each measurement target and reference target by analyzing the captured image, and calculating the actual size of the measurement target based on each calculated size, each perspective distance, and the actual size of each reference target; ,
A program to realize
撮影画像の中に含まれている被写体の実サイズを測定するサイズ測定装置であって、
撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この測定対象と比較される基準対象を指定する指定手段と、
撮影画像を解析することによって前記指定された測定対象と基準対象とが撮影画像内において前後関係にあるかを判別する判別手段と、
この判別手段によって前後関係がないことが判別された場合には、基準対象の実サイズを取得すると共に、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと基準対象の実サイズに基づいて当該測定対象の実サイズを算出する第1の算出手段と、
前記判別手段によって前後関係があることが判別された場合には、撮影画像内において前記指定された測定対象と基準対象との間における前後方向の遠近距離をそれぞれ計測し、基準対象毎にその実サイズを取得し、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと各遠近距離と基準対象の実サイズに基づいて測定対象の実サイズを算出する第2の算出手段と、
を具備したことを特徴とするサイズ測定装置。
A size measuring device for measuring the actual size of a subject included in a captured image,
In addition to specifying the subject in the captured image as a measurement target to be size measurement, a designation means for specifying a reference target to be compared with this measurement target,
Discriminating means for discriminating whether the specified measurement object and the reference object are in a context in the captured image by analyzing the captured image;
When it is determined by this determination means that there is no context, the actual size of the reference object is acquired, and the image size is calculated for each measurement object and reference object by analyzing the captured image. A first calculating means for calculating the actual size of the measurement object based on the calculated size and the actual size of the reference object;
When it is determined by the determination means that there is a front-rear relationship, the distance in the front-rear direction between the specified measurement object and the reference object in the captured image is measured, and the actual size of each reference object is measured. The image size is calculated for each measurement object and reference object by analyzing the captured image, and the actual size of the measurement object is calculated based on each calculated size, each perspective distance, and the actual size of the reference object. A second calculating means;
A size measuring device comprising:
前記指定手段は、撮影画像内に含まれている各被写体のうち、予め記憶管理されている複数種の基準対象の何れかに特徴的に一致する被写体の画像部分を基準対象として指定する、
ようにしたことを特徴とする請求項10記載のサイズ測定装置。
The designation means designates, as a reference target, an image portion of a subject that characteristically matches any of a plurality of types of reference targets stored and managed in advance among the subjects included in the captured image.
The size measuring apparatus according to claim 10, which is configured as described above.
撮影画像を解析することによって前記指定された測定対象と基準対象との前後関係を判別し、この前後関係に対応する計算式に従って前記算出手段は、測定対象の実サイズを算出する、
ようにしたことを特徴とする請求項10記載のサイズ測定装置。
Analyzing the captured image to determine the front-to-back relationship between the specified measurement object and the reference object, and the calculation means calculates the actual size of the measurement object according to a calculation formula corresponding to the front-rear relationship,
The size measuring apparatus according to claim 10, which is configured as described above.
コンピュータに対して、
撮影画像内の被写体をサイズ測定の対象となる測定対象として指定する他、この測定対象と比較される基準対象を指定する機能と、
撮影画像を解析することによって前記指定された測定対象と基準対象とが撮影画像内において前後関係にあるかを判別する機能と、
前後関係がないことが判別された場合には、基準対象の実サイズを取得すると共に、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと基準対象の実サイズに基づいて当該測定対象の実サイズを算出する機能と、
前後関係があることが判別された場合には、撮影画像内において前記指定された測定対象と基準対象との間における前後方向の遠近距離をそれぞれ計測し、基準対象毎にその実サイズを取得し、撮影画像を解析することによって測定対象、基準対象毎にその画像サイズを算出し、この各算出サイズと各遠近距離と基準対象の実サイズに基づいて測定対象の実サイズを算出する機能と、
を実現させるためのプログラム。
Against the computer,
In addition to specifying the subject in the captured image as the measurement target for size measurement, the function to specify the reference target to be compared with this measurement target,
A function of determining whether the designated measurement object and the reference object are in a context in the captured image by analyzing the captured image;
When it is determined that there is no context, the actual size of the reference object is acquired, and the image size is calculated for each measurement object and reference object by analyzing the captured image. A function for calculating the actual size of the measurement target based on the actual size of the target;
When it is determined that there is a front-rear relationship, the distance in the front-rear direction between the specified measurement object and the reference object in the captured image is measured, and the actual size is obtained for each reference object. A function for calculating the image size for each measurement object and reference object by analyzing the captured image, and calculating the actual size of the measurement object based on each calculated size, each perspective distance and the actual size of the reference object,
A program to realize
JP2003429587A 2003-12-25 2003-12-25 Size measurement device and program Pending JP2005189051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003429587A JP2005189051A (en) 2003-12-25 2003-12-25 Size measurement device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003429587A JP2005189051A (en) 2003-12-25 2003-12-25 Size measurement device and program

Publications (1)

Publication Number Publication Date
JP2005189051A true JP2005189051A (en) 2005-07-14

Family

ID=34788198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003429587A Pending JP2005189051A (en) 2003-12-25 2003-12-25 Size measurement device and program

Country Status (1)

Country Link
JP (1) JP2005189051A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008224484A (en) * 2007-03-14 2008-09-25 Casio Comput Co Ltd Imaging device, dimension measurement method, dimension measurement program
JP2008286638A (en) * 2007-05-17 2008-11-27 Sogo Keibi Hosho Co Ltd Height estimation device and method
JP2009025252A (en) * 2007-07-23 2009-02-05 Taisei Corp Tail clearance automatic measuring system and tail clearance automatic measuring method
EP2175413A1 (en) * 2008-10-10 2010-04-14 HAMBERGER INDUSTRIEWERKE GmbH Method and device for allocating a WC seat fitting
JP2012064105A (en) * 2010-09-17 2012-03-29 Nec Biglobe Ltd System, method and program for providing summary
WO2012121217A1 (en) * 2011-03-07 2012-09-13 ブラザー工業株式会社 Label-making processing program and label-making processing method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008224484A (en) * 2007-03-14 2008-09-25 Casio Comput Co Ltd Imaging device, dimension measurement method, dimension measurement program
JP2008286638A (en) * 2007-05-17 2008-11-27 Sogo Keibi Hosho Co Ltd Height estimation device and method
JP2009025252A (en) * 2007-07-23 2009-02-05 Taisei Corp Tail clearance automatic measuring system and tail clearance automatic measuring method
EP2175413A1 (en) * 2008-10-10 2010-04-14 HAMBERGER INDUSTRIEWERKE GmbH Method and device for allocating a WC seat fitting
JP2012064105A (en) * 2010-09-17 2012-03-29 Nec Biglobe Ltd System, method and program for providing summary
WO2012121217A1 (en) * 2011-03-07 2012-09-13 ブラザー工業株式会社 Label-making processing program and label-making processing method

Similar Documents

Publication Publication Date Title
JP5164327B2 (en) Imaging apparatus and program
CN101505374B (en) Apparatus and method for image processing
JP4989516B2 (en) Display control device, imaging device, display control method, program, and storage medium
JP5562154B2 (en) Imaging apparatus, photographing assistance system, photographing assistance method, image data analysis method, and program
JP2005189087A (en) Distance measurement equipment and program
US20070263904A1 (en) Subject tracking device, subject tracking method, subject tracking program product and optical device
JP2011176386A (en) Imaging apparatus, image display device and image display program
JP5131367B2 (en) Imaging apparatus and program
JP2014017665A (en) Display control unit, control method for display control unit, program, and recording medium
JP5007631B2 (en) Electronic camera
JP2005189051A (en) Size measurement device and program
JP4466065B2 (en) Camera photographing apparatus and program
JP2005181034A (en) Size measurement device and program
JP2018007082A (en) Image reproduction device, control method therefor, and program
JP2007259002A (en) Image reproducing apparatus, its control method, and its control program
JP4534539B2 (en) Camera apparatus and program
JP2005164514A (en) Size measuring device and program
JP2005181035A (en) Size measurement device and program
JP2019153874A (en) Information recording device, image recording device, operation auxiliary device, operation auxiliary system, information recording method, image recording method, and operation auxiliary method
JP3837882B2 (en) Captured image management apparatus and program recording medium thereof
JP2005164513A (en) Size measuring instrument and program
JP2005164512A (en) Size measuring instrument and program
JP2005189052A (en) Camera photographing equipment and program
JP4159271B2 (en) Digital camera
JP4355853B2 (en) Image photographing apparatus and program

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20060209

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060404