Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6568772B2 - Image processing apparatus, image processing system, operation method of image processing apparatus, and control program - Google Patents
[go: Go Back, main page]

JP6568772B2 - Image processing apparatus, image processing system, operation method of image processing apparatus, and control program - Google Patents

Image processing apparatus, image processing system, operation method of image processing apparatus, and control program Download PDF

Info

Publication number
JP6568772B2
JP6568772B2 JP2015219138A JP2015219138A JP6568772B2 JP 6568772 B2 JP6568772 B2 JP 6568772B2 JP 2015219138 A JP2015219138 A JP 2015219138A JP 2015219138 A JP2015219138 A JP 2015219138A JP 6568772 B2 JP6568772 B2 JP 6568772B2
Authority
JP
Japan
Prior art keywords
ellipse
graphic
image
image processing
processing apparatus
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.)
Expired - Fee Related
Application number
JP2015219138A
Other languages
Japanese (ja)
Other versions
JP2017091127A (en
Inventor
健太 西行
健太 西行
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.)
MegaChips Corp
Original Assignee
MegaChips Corp
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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP2015219138A priority Critical patent/JP6568772B2/en
Publication of JP2017091127A publication Critical patent/JP2017091127A/en
Application granted granted Critical
Publication of JP6568772B2 publication Critical patent/JP6568772B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、画像処理に関する。   The present invention relates to image processing.

特許文献1〜6に記載されているように、従来から様々な画像処理装置が提案されている。   As described in Patent Documents 1 to 6, various image processing apparatuses have been conventionally proposed.

特開2004−56488号公報JP 2004-56488 A 特開2015−53011号公報Japanese Patent Laying-Open No. 2015-53011 特開2015−70359号公報Japanese Patent Laying-Open No. 2015-70359 特許第3423861号公報Japanese Patent No. 3423861 特許第3423886号公報Japanese Patent No. 3423886 特許第3569163号公報Japanese Patent No. 3569163

さて、画像処理装置では、その処理負荷の低減が望まれている。   In the image processing apparatus, it is desired to reduce the processing load.

そこで、本発明は上述の点に鑑みて成されたものであり、画像処理装置の処理負荷を低減することが可能な技術を提供することを目的とする。   Therefore, the present invention has been made in view of the above points, and an object thereof is to provide a technique capable of reducing the processing load of an image processing apparatus.

画像処理装置の一態様は、互いに異なる時刻での対象物が写る複数枚の入力画像のそれぞれについて、当該入力画像に写る当該対象物に対して図形を当てはめる当てはめ処理を行う第1処理部と、前記当てはめ処理の結果に基づいて、前記入力画像上での前記図形の位置を追跡することによって、前記入力画像での前記対象物の位置を追跡する追跡処理を行う第2処理部とを備え、前記第1処理部は、前記入力画像に写る前記対象物に対して図形を当てはめる第3処理部と、前記第3処理部において、一つの前記対象物に対して複数の図形が当てはめられた場合には、当該複数の図形を統合して得られる一つの新たな図形を、当該複数の図形の代わりに採用する第4処理部とを有するAn aspect of the image processing apparatus includes: a first processing unit that performs a fitting process for applying a figure to each of the plurality of input images in which the objects are captured at different times; A second processing unit that performs a tracking process for tracking the position of the object in the input image by tracking the position of the graphic on the input image based on the result of the fitting process ; The first processing unit applies a figure to the object shown in the input image, and the third processing unit applies a plurality of figures to one object. Includes a fourth processing unit that employs one new figure obtained by integrating the plurality of figures in place of the plurality of figures .

また、画像処理装置の一態様では、前記追跡処理の結果に基づいて、前記入力画像に写る前記対象物の数を求める第処理部がさらに設けられている。 In one aspect of the image processing apparatus, a fifth processing unit is further provided for determining the number of the objects appearing in the input image based on the result of the tracking process.

また、画像処理装置の一態様では、前記第2処理部は、前記図形に関する図形情報を生成し、前記第2処理部は、前記当てはめ処理の結果に基づいて、前記図形情報を更新する更新処理を行う。   In one aspect of the image processing apparatus, the second processing unit generates graphic information related to the graphic, and the second processing unit updates the graphic information based on a result of the fitting process. I do.

また、画像処理装置の一態様では、前記図形情報は、前記図形の状態を示す状態情報と、前記図形を特定するための図形特定情報とを含む。   In one aspect of the image processing apparatus, the graphic information includes state information indicating a state of the graphic and graphic specifying information for specifying the graphic.

また、画像処理装置の一態様では、前記第2処理部は、第1時刻での前記対象物が写る第1入力画像についての前記当てはめ処理において得られた各第1図形について、当該第1時刻よりも後の第2時刻での前記対象物が写る第2入力画像についての前記当てはめ処理において得られた、当該第1図形に対応する対応第2図形を特定する対応特定処理を行い、前記第2処理部は、前記対応特定処理の結果に基づいて前記更新処理を行う。   Further, in one aspect of the image processing apparatus, the second processing unit performs the first time for each first graphic obtained in the fitting process for the first input image in which the object is captured at the first time. A correspondence specifying process for specifying a corresponding second graphic corresponding to the first graphic obtained in the fitting process for the second input image in which the object is captured at a second time later than the second time; The two processing units perform the update process based on the result of the correspondence specifying process.

また、画像処理装置の一態様では、前記第2処理部は、前記第1図形に対応する前記対応第2図形を特定する際には、前記第2入力画像についての前記当てはめ処理において得られた第2図形のうち、前記第1図形に最も位置が近い第2図形であって、前記第1図形との第1距離が第1しきい値以下あるいは未満の第2図形である近傍第2図形を、前記対応第2図形として特定する。   In one aspect of the image processing device, the second processing unit is obtained in the fitting process for the second input image when specifying the corresponding second graphic corresponding to the first graphic. Among the second graphics, the second graphics that are closest to the first graphics, and are second graphics whose first distance from the first graphics is equal to or less than a first threshold value. Is specified as the corresponding second graphic.

また、画像処理装置の一態様では、前記第2処理部は、前記対応特定処理において、前記第1及び第2入力画像についての前記当てはめ処理の結果に基づいて、前記第1入力画像についての前記当てはめ処理において得られた複数の第1図形が当てはめられた複数の対象物に対して、前記第2入力画像についての前記当てはめ処理において一つの第2図形が当てはめられたか否かを判定する。   Further, in one aspect of the image processing device, the second processing unit is configured to determine the first input image based on a result of the fitting process for the first and second input images in the correspondence specifying process. It is determined whether or not one second graphic is applied in the fitting process for the second input image with respect to a plurality of objects to which the plurality of first graphics obtained in the fitting process is applied.

また、画像処理装置の一態様では、前記第2処理部は、前記第1図形に対応する前記対応第2図形を特定する際には、前記第2入力画像についての前記当てはめ処理において得られた第2図形のうち、前記第1図形に最も位置が近い第2図形であって、前記第1図形との第1距離が第1しきい値以下あるいは未満の第2図形である近傍第2図形を、前記対応第2図形として特定し、前記第2処理部は、前記近傍第2図形が前記対応第2図形として特定されなかった前記第1図形である未特定第1図形が存在する場合には、当該未特定第1図形との第2距離が第2しきい値以下あるいは未満である前記対応第2図形が存在するとき、当該対応第2図形に対応する前記第1図形が当てはめられた前記対象物だけではなく、当該未特定第1図形が当てはめられた前記対象物に対しても、当該対応第2図形が当てはめられたと判定する。   In one aspect of the image processing device, the second processing unit is obtained in the fitting process for the second input image when specifying the corresponding second graphic corresponding to the first graphic. Among the second graphics, the second graphics that are closest to the first graphics, and are second graphics whose first distance from the first graphics is equal to or less than a first threshold value. Is specified as the corresponding second graphic, and the second processing unit determines that there is an unspecified first graphic that is the first graphic in which the neighboring second graphic is not specified as the corresponding second graphic. When the second distance to the unspecified first graphic is less than or less than the second threshold value, the first graphic corresponding to the corresponding second graphic is applied. Not only the object but also the unspecified first figure Even for the object to be fitted, it is determined that the corresponding second figure is fitted.

また、画像処理装置の一態様では、前記第2処理部は、前記第1図形に対応する前記対応第2図形を特定する際には、前記第2入力画像についての前記当てはめ処理において得られた第2図形のうち、前記第1図形に最も位置が近い第2図形であって、前記第1図形との第1距離が第1しきい値以下あるいは未満の第2図形である近傍第2図形を、前記対応第2図形として特定し、前記第2処理部は、前記近傍第2図形が前記対応第2図形として特定されなかった前記第1図形である未特定第1図形が存在する場合には、当該未特定第1図形の少なくとも一部の領域を内包する前記対応第2図形が存在するとき、当該対応第2図形に対応する前記第1図形が当てはめられた前記対象物だけではなく、当該未特定第1図形が当てはめられた前記対象物に対しても、当該対応第2図形が当てはめられたと判定する。   In one aspect of the image processing device, the second processing unit is obtained in the fitting process for the second input image when specifying the corresponding second graphic corresponding to the first graphic. Among the second graphics, the second graphics that are closest to the first graphics, and are second graphics whose first distance from the first graphics is equal to or less than a first threshold value. Is specified as the corresponding second graphic, and the second processing unit determines that there is an unspecified first graphic that is the first graphic in which the neighboring second graphic is not specified as the corresponding second graphic. Is not only the object to which the first graphic corresponding to the corresponding second graphic is applied, when there is the corresponding second graphic including at least a part of the region of the unspecified first graphic, The above-mentioned unidentified first figure is applied Even for elephants it was determined that the corresponding second figure is fitted.

また、画像処理装置の一態様では、前記第2処理部は、前記近傍第2図形が前記対応第2図形として特定されなかった前記第1図形である未特定第1図形が存在する場合には、当該未特定第1図形との第2距離が第2しきい値以下あるいは未満であって、当該未特定第1図形の少なくとも一部の領域を内包する前記対応第2図形が存在するとき、当該対応第2図形に対応する前記第1図形が当てはめられた前記対象物だけではなく、当該未特定第1図形が当てはめられた前記対象物に対しても、当該対応第2図形が当てはめられたと判定する。   In one aspect of the image processing apparatus, the second processing unit may be configured to include an unspecified first graphic that is the first graphic in which the neighboring second graphic is not specified as the corresponding second graphic. When the second distance to the unspecified first graphic is less than or less than a second threshold value and there is the corresponding second graphic including at least a part of the region of the unspecified first graphic, The corresponding second graphic is applied not only to the object to which the first graphic corresponding to the corresponding second graphic is applied, but also to the object to which the unspecified first graphic is applied. judge.

また、画像処理装置の一態様では、前記入力画像は、前記対象物を撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、前記第2処理部は、前記第1図形の位置が、前記第1入力画像における、前記カメラの位置に対応する対応位置から離れるほど、当該第1図形に対応する前記対応第2図形を特定する際に使用される前記第1しきい値を小さく設定する。   In one aspect of the image processing device, the input image is an image obtained by image processing of a captured image captured by a camera that captures the object, and the second processing unit includes: As the position of the first graphic moves away from the corresponding position corresponding to the position of the camera in the first input image, the first graphic used for identifying the corresponding second graphic corresponding to the first graphic is used. 1 Set a small threshold value.

また、画像処理装置の一態様では、前記第2処理部は、前記未特定第1図形の位置が、前記第1入力画像上において、前記カメラの位置に対応する対応位置から離れるほど、前記第2しきい値を小さく設定する。   Further, in one aspect of the image processing device, the second processing unit causes the first processing unit to move away from a corresponding position corresponding to the position of the camera on the first input image. 2 Set the threshold value small.

また、画像処理装置の一態様では、前記第2処理部は、前記対応特定処理において、前記第1及び第2入力画像についての前記当てはめ処理の結果に基づいて、前記第1入力画像についての前記当てはめ処理において得られた一つの第1図形が当てはめられた複数の対象物に対して、前記第2入力画像についての前記当てはめ処理において複数の第2図形が当てはめられた否かを判定する。   Further, in one aspect of the image processing device, the second processing unit is configured to determine the first input image based on a result of the fitting process for the first and second input images in the correspondence specifying process. It is determined whether or not a plurality of second graphics are applied in the fitting process for the second input image with respect to a plurality of objects to which one first graphic obtained in the fitting process is applied.

また、画像処理装置の一態様では、前記第2処理部は、前記一つの第1図形の大きさから、当該一つの第1図形に最も位置が近い、前記第2入力画像についての前記当てはめ処理において得られた第2図形の大きさを差し引いて得られる差分値が第3しきい値よりも大きいあるいは当該第3しきい値以上であって、かつ、当該一つの第1図形において、前記第2入力画像についての前記当てはめ処理において得られた複数の第2図形のそれぞれの少なくとも一部の領域が内包される場合には、前記一つの第1図形に対応する複数の対象物に対して、当該複数の第2図形が当てはめられたと判定する。   In one aspect of the image processing apparatus, the second processing unit may perform the fitting process on the second input image that is closest in position to the first graphic from the size of the first graphic. The difference value obtained by subtracting the size of the second graphic obtained in step is larger than the third threshold value or greater than or equal to the third threshold value. In the case where at least a part of each of the plurality of second graphics obtained in the fitting process for the two-input image is included, for a plurality of objects corresponding to the one first graphics, It is determined that the plurality of second graphics are applied.

また、画像処理装置の一態様では、前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、前記第2処理部は、前記一つの第1図形の位置が、前記第1入力画像上において、前記撮影画像に写る人の撮影俯角が前記撮影画像で最大となる位置に対応する対応位置から離れるほど、前記第3しきい値を大きく設定する。   In one aspect of the image processing apparatus, the input image is an image obtained by performing image processing on a captured image captured by a camera that captures an overhead view of the object, and the second processing unit includes: As the position of the one first figure moves away from the corresponding position corresponding to the position where the photographing depression angle of the person appearing in the photographed image becomes the maximum in the photographed image on the first input image, the third image is displayed. Increase the threshold value.

また、画像処理装置の一態様では、前記第2処理部は、前記一つの第1図形の位置が、前記対応位置から第1所定範囲内に存在する場合には、前記一つの第1図形の位置が前記対応位置から離れるほど前記第3しきい値を大きく設定し、前記一つの第1図形の位置が前記第1所定範囲外に存在する場合には、前記一つの第1図形の位置が前記対応位置から離れるほど前記第3しきい値を小さく設定する。   Further, in one aspect of the image processing apparatus, the second processing unit, when the position of the one first graphic is within a first predetermined range from the corresponding position, The third threshold value is set to be larger as the position is farther from the corresponding position, and when the position of the first graphic is outside the first predetermined range, the position of the first graphic is The third threshold value is set smaller as the distance from the corresponding position increases.

また、画像処理装置の一態様では、前記第2処理部は、前記対応特定処理において、前記入力画像に写らなくなった前記対象物に当てはめられた前記図形である第3図形に対応する、前記第2入力画像についての前記当てはめ処理において得られた第2図形を特定し、その特定結果に基づいて、当該第3図形についての前記図形情報を更新し、前記第2処理部は、前記入力画像に写らなくなった前記対象物に当てはめられた前記第3図形についての前記図形情報を、前記対象物が前記入力画像に写らなくなってから所定時間経過した後に消去する。   Further, in one aspect of the image processing device, the second processing unit corresponds to the third graphic that is the graphic applied to the object that is no longer included in the input image in the correspondence specifying process. The second graphic obtained in the fitting process for the two input images is identified, and the graphic information for the third graphic is updated based on the identification result, and the second processing unit adds the second graphic to the input image. The graphic information about the third graphic applied to the object that is no longer captured is erased after a predetermined time has elapsed since the object is not captured in the input image.

また、画像処理装置の一態様では、前記第処理部は、前記第処理部で得られた2つの図形の間の第3距離が第4しきい値以下あるいは未満であり、かつ当該2つの図形を統合して得られる一つの新たな図形の大ききが第5しきい値以下あるいは未満の場合、当該2つの図形が一つの前記対象物に対して当てはめられたと判断して、当該新たな図形を当該2つの図形の代わりに採用する。 In one aspect of the image processing apparatus, the fourth processing unit has a third distance between two figures obtained by the third processing unit that is less than or less than a fourth threshold value, and the 2 If the size of one new figure obtained by integrating two figures is less than or less than the fifth threshold value, it is determined that the two figures have been applied to one object, and the new figure A simple figure is used instead of the two figures.

また、画像処理装置の一態様では、前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、前記第処理部は、前記第処理部で得られた2つの図形が、前記入力画像上において、前記撮影画像に写る人の撮影俯角が前記撮影画像で最大となる位置に対応する対応位置から延びる1本の第1直線上に位置し、かつ当該2つの図形の間の前記第3距離が前記第4しきい値以下あるいは未満であり、かつ当該2つの図形を統合して得られる一つの新たな図形の大ききが前記第5しきい値以下あるいは未満の場合、当該2つの図形が一つの前記対象物に対して当てはめられたと判断して、当該新たな図形を当該2つの図形の代わりに採用する。 In one aspect of the image processing device, the input image is an image obtained by performing image processing on a captured image captured by a camera that captures an overhead view of the object, and the fourth processing unit includes: The two figures obtained by the third processing unit are one second extending from the corresponding position corresponding to the position where the shooting depression angle of the person appearing in the captured image is maximum in the captured image on the input image. The size of one new figure which is located on one straight line and the third distance between the two figures is less than or less than the fourth threshold and is obtained by integrating the two figures If the threshold is less than or less than the fifth threshold value, it is determined that the two figures are applied to the one object, and the new figure is adopted instead of the two figures.

また、画像処理装置の一態様では、前記図形は楕円であって、前記第処理部は、前記第処理部で得られた2つの楕円のうちの一方の楕円の中心から、当該2つの楕円のうちの他方の楕円の中心までを結ぶ第2直線が当該一方の楕円と交わる第1交点と、当該第2直線が当該他方の楕円と交わる第2交点との間の距離を、前記第3距離とする。 Further, in one aspect of the image processing apparatus, the figure is an ellipse, and the fourth processing unit is configured to determine the two ellipses from the center of one of the two ellipses obtained by the third processing unit. The distance between the first intersection point where the second straight line connecting to the center of the other ellipse of the ellipse intersects the one ellipse and the second intersection point where the second straight line intersects the other ellipse 3 distances.

また、画像処理装置の一態様では、前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、前記第処理部は、2つの図形の間の前記第3距離と比較される前記第4しきい値を、当該2つの図形を統合して得られる新たな図形の位置が、前記撮影画像において撮影俯角が最大となる位置に対応する入力画像での対応位置から離れるほど大きく設定する。 In one aspect of the image processing device, the input image is an image obtained by performing image processing on a captured image captured by a camera that captures an overhead view of the object, and the fourth processing unit includes: The position of the new figure obtained by integrating the two figures with the fourth threshold value compared with the third distance between the two figures has the largest shooting depression angle in the photographed image. The larger the distance from the corresponding position in the input image corresponding to the position, the larger the setting.

また、画像処理装置の一態様では、前記第処理部は、2つの図形を統合して得られる新たな図形の位置が前記対応位置から第2所定範囲内に存在する場合には、当該2つの図形の間の前記第3距離と比較される前記第4しきい値を、当該新たな図形の位置が前記対応位置から離れるほど大きく設定し、2つの図形を統合して得られる新たな図形の位置が前記第2所定範囲外に存在する場合には、当該2つの図形の間の前記第3距離と比較される前記第4しきい値を、当該新たな図形の位置が前記対応位置から離れるほど小さく設定する。 Further, according to one aspect of the image processing device, the fourth processing unit is configured to perform the processing when the position of a new figure obtained by integrating two figures is within the second predetermined range from the corresponding position. A new figure obtained by integrating the two figures by setting the fourth threshold value to be compared with the third distance between the two figures so that the position of the new figure is farther from the corresponding position. Is located outside the second predetermined range, the fourth threshold value to be compared with the third distance between the two figures is set to the position of the new figure from the corresponding position. Set smaller as you move away.

また、画像処理装置の一態様では、前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、前記第処理部は、2つの図形を統合して得られる新たな図形の大ききと比較される前記第5しきい値を、当該新たな図形の位置が、前記撮影画像において撮影俯角が最大となる位置に対応する入力画像での対応位置から離れるほど大きく設定する。 In one aspect of the image processing device, the input image is an image obtained by performing image processing on a captured image captured by a camera that captures an overhead view of the object, and the fourth processing unit includes: The fifth threshold value to be compared with the size of a new figure obtained by integrating two figures corresponds to the position where the new figure has the maximum shooting depression angle in the photographed image. The larger the distance from the corresponding position in the input image, the larger the setting.

また、画像処理装置の一態様では、前記第処理部は、2つの図形を統合して得られる新たな図形の位置が前記対応位置から第2所定範囲内に存在する場合には、当該新たな図形の大きさと比較される前記第5しきい値を、当該新たな図形の位置が前記対応位置から離れるほど大きく設定し、2つの図形を統合して得られる新たな図形の位置が前記第2所定範囲外に存在する場合には、当該新たな図形の大きさと比較される前記第5しきい値を、当該新たな図形の位置が前記対応位置から離れるほど小さく設定する。 Further, in one aspect of the image processing device, the fourth processing unit, when the position of a new figure obtained by integrating two figures is within the second predetermined range from the corresponding position, The fifth threshold value to be compared with the size of a new figure is set to increase as the position of the new figure moves away from the corresponding position, and the position of the new figure obtained by integrating two figures is the first value. 2 If it is outside the predetermined range, the fifth threshold value to be compared with the size of the new figure is set to be smaller as the position of the new figure is farther from the corresponding position.

また、画像処理装置の一態様では、前記第処理部は、2つの図形を統合して得られる一つの新たな図形の位置と前記対応位置との差が第6しきい値以下あるいは未満の場合には、当該2つの図形が前記第1直線上に位置するか否かにかかわらず、当該2つの図形の間の前記第3距離が前記第4しきい値以下あるいは未満であり、かつ当該新たな図形の大ききが前記第5しきい値以下あるいは未満のとき、当該2つの図形が一つの前記対象物に対して当てはめられたと判断して、当該新たな図形を当該2つの図形の代わりに採用する。 Moreover, in one aspect of the image processing apparatus, the fourth processing unit has a difference between the position of one new figure obtained by integrating two figures and the corresponding position being less than or less than a sixth threshold value. The third distance between the two figures is less than or less than the fourth threshold value, regardless of whether the two figures are located on the first straight line, and When the size of the new figure is less than or less than the fifth threshold value, it is determined that the two figures have been applied to the one object, and the new figure is substituted for the two figures. To adopt.

また、画像処理装置の一態様では、前記対象物を撮影するカメラで撮影された撮影画像に対して画像処理を行って前記入力画像を生成する第6処理部がさらに設けられている。   In one aspect of the image processing apparatus, a sixth processing unit that performs image processing on a captured image captured by a camera that captures the object and generates the input image is further provided.

また、画像処理システムの一態様は、上記の画像処理装置と、前記画像処理装置の前記第6処理部が前記画像処理を行う前記撮影画像を撮影するカメラとを備える。   An aspect of the image processing system includes the above-described image processing apparatus and a camera that captures the captured image on which the sixth processing unit of the image processing apparatus performs the image processing.

また、画像処理装置の動作方法は、互いに異なる時刻での対象物が写る複数枚の入力画像のそれぞれについて、当該入力画像に写る当該対象物に対して図形を当てはめる当てはめ処理を行う第1工程と、前記当てはめ処理の結果に基づいて、前記入力画像での前記図形の位置を追跡することによって、前記入力画像での前記対象物の位置を追跡する追跡処理を行う第2工程とを備え、前記第1工程において、一つの前記対象物に対して複数の図形が当てはめられた場合には、当該複数の図形を統合して得られる一つの新たな図形を、当該複数の図形の代わりに採用するThe operation method of the image processing apparatus includes a first step of performing a fitting process for applying a figure to each of the plurality of input images in which the objects are captured at different times, with respect to the object in the input images. , based on a result of the fitting process, by tracking the position of the graphic in the input image, and a second step of performing tracking processing for tracking a position of the object in the input image, the In the first step, when a plurality of figures are applied to one object, one new figure obtained by integrating the plurality of figures is employed instead of the plurality of figures. .

また、画像処理装置を制御するための制御プログラムは、前記画像処理装置に、互いに異なる時刻での対象物が写る複数枚の入力画像のそれぞれについて、当該入力画像に写る当該対象物に対して図形を当てはめる当てはめ処理を行う第1工程と、前記当てはめ処理の結果に基づいて、前記入力画像での前記図形の位置を追跡することによって、前記入力画像での前記対象物の位置を追跡する追跡処理を行う第2工程とを実行させ、前記第1工程において、一つの前記対象物に対して複数の図形が当てはめられた場合には、当該複数の図形を統合して得られる一つの新たな図形を、当該複数の図形の代わりに採用する処理を実行させるためのものである。

Further, a control program for controlling the image processing apparatus is configured such that, for each of a plurality of input images in which objects at different times are captured, the image processing apparatus is configured to display a graphic for the object captured in the input image. And a tracking process for tracking the position of the object in the input image by tracking the position of the figure in the input image based on the result of the fitting process. And when a plurality of figures are applied to one object in the first step, one new figure obtained by integrating the plurality of figures and those of the order to execute the process employed in place of the plurality of figures.

画像処理装置の処理負荷を低減することができる。   The processing load on the image processing apparatus can be reduced.

画像処理システムの構成を示す図である。It is a figure which shows the structure of an image processing system. カメラの設置例を示す図である。It is a figure which shows the example of installation of a camera. 撮像画像の一例を示す図である。It is a figure which shows an example of a captured image. 画像処理装置の構成を示す図である。It is a figure which shows the structure of an image processing apparatus. 画像処理装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of an image processing apparatus. 画像処理部の構成を示す図である。It is a figure which shows the structure of an image process part. 入力画像の一例を示す図である。It is a figure which shows an example of an input image. 当てはめ処理部の構成を示す図である。It is a figure which shows the structure of a fitting process part. 当てはめ処理を示すフローチャートである。It is a flowchart which shows a fitting process. 入力画像に写る人に対して楕円が当てはめられた様子を示す図である。It is a figure which shows a mode that the ellipse was applied with respect to the person reflected in an input image. 入力画像に写る人に対して当てはめた楕円を撮像画像に重ねた様子を示す図である。It is a figure which shows a mode that the ellipse fitted with respect to the person reflected in the input image was superimposed on the captured image. 入力画像に写る人に対して当てはめた楕円を撮像画像に重ねた様子を示す図である。It is a figure which shows a mode that the ellipse fitted with respect to the person reflected in the input image was superimposed on the captured image. 撮影画像の一例を示す図である。It is a figure which shows an example of a picked-up image. 楕円統合処理を示すフローチャートである。It is a flowchart which shows an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 楕円統合処理を説明するための図である。It is a figure for demonstrating an ellipse integration process. 追跡処理の構成を示す図である。It is a figure which shows the structure of a tracking process. 追跡情報の一例を示す図である。It is a figure which shows an example of tracking information. 追跡処理を示すフローチャートである。It is a flowchart which shows a tracking process. 第1楕円が複数の第2楕円に分離する様子の一例を示す図である。It is a figure which shows an example of a mode that a 1st ellipse isolate | separates into a some 2nd ellipse. 第1楕円が複数の第2楕円に分離する様子の一例を示す図である。It is a figure which shows an example of a mode that a 1st ellipse isolate | separates into a some 2nd ellipse. 分離判定処理を説明するための図である。It is a figure for demonstrating a separation determination process. 分離判定処理を説明するための図である。It is a figure for demonstrating a separation determination process. 1次更新処理を説明するための図である。It is a figure for demonstrating a primary update process. 1次更新処理を説明するための図である。It is a figure for demonstrating a primary update process. 1次更新処理を説明するための図である。It is a figure for demonstrating a primary update process. 2次特定処理を示すフローチャートである。It is a flowchart which shows a secondary specific process. 複数の第1楕円が当てはめられた複数の人に対して1つの第2楕円が当てはめられる様子の一例を示す図である。It is a figure which shows an example of a mode that one 2nd ellipse is applied with respect to the some person to whom the some 1st ellipse was fitted. 前フレームでの当てはめ処理で得られた第1楕円を撮像画像に重ねた様子を示す図である。It is a figure which shows a mode that the 1st ellipse obtained by the fitting process in the front frame was superimposed on the captured image. 現フレームでの当てはめ処理で得られた第2楕円を撮像画像に重ねた様子を示す図である。It is a figure which shows a mode that the 2nd ellipse obtained by the fitting process in the present flame | frame was superimposed on the captured image. 前フレームでの当てはめ処理で得られた第1楕円を撮像画像に重ねた様子を示す図である。It is a figure which shows a mode that the 1st ellipse obtained by the fitting process in the front frame was superimposed on the captured image. 現フレームでの当てはめ処理で得られた第2楕円を撮像画像に重ねた様子を示す図である。It is a figure which shows a mode that the 2nd ellipse obtained by the fitting process in the present flame | frame was superimposed on the captured image. 追跡処理部の動作を説明するための図である。It is a figure for demonstrating operation | movement of a tracking process part. 追跡処理部の動作を説明するための図である。It is a figure for demonstrating operation | movement of a tracking process part. 追跡処理部の動作を説明するための図である。It is a figure for demonstrating operation | movement of a tracking process part. 追跡処理部の動作を説明するための図である。It is a figure for demonstrating operation | movement of a tracking process part.

<画像処理システムの構成>
図1は画像処理システム1の構成を示す図である。画像処理システム1は、画像処理を用いて、対象物の位置を追跡するシステムである。画像処理システム1は、例えば、オフィス、学校等に導入される。画像処理システム1は、オフィス等の室内での人の位置を追跡する。なお、位置を追跡する対象物は人以外であっても良い。
<Configuration of image processing system>
FIG. 1 is a diagram showing a configuration of the image processing system 1. The image processing system 1 is a system that tracks the position of an object using image processing. The image processing system 1 is introduced into, for example, an office or a school. The image processing system 1 tracks the position of a person in a room such as an office. The object whose position is tracked may be other than a person.

図1に示されるように、画像処理システム1は、カメラ2及び画像処理装置3を備える。カメラ2は、図2に示されるように、例えば、室内300内の天井310に取り付けられる。カメラ2は、例えば全方位カメラであって、室内300を俯瞰撮影する。したがって、カメラ2の撮影範囲は室内300となる。カメラ2は、所定のフレームレート(例えば30fps)で、画像を撮影して出力する。カメラ2から順次出力される撮影画像100は、画像処理装置3に順次入力される。なお、図2には、室内300に存在する人(対象物)200も示されている。   As shown in FIG. 1, the image processing system 1 includes a camera 2 and an image processing device 3. As shown in FIG. 2, the camera 2 is attached to, for example, a ceiling 310 in the room 300. The camera 2 is, for example, an omnidirectional camera and takes a bird's-eye view of the room 300. Therefore, the shooting range of the camera 2 is the room 300. The camera 2 captures and outputs an image at a predetermined frame rate (for example, 30 fps). The captured images 100 that are sequentially output from the camera 2 are sequentially input to the image processing apparatus 3. FIG. 2 also shows a person (object) 200 present in the room 300.

本例では、撮影画像100はグレースケール画像であるが、カラー画像であっても良い。また、カメラ2は、天井310以外に取り付けられても良い。また、カメラ2は全方位カメラ以外であっても良い。   In this example, the captured image 100 is a grayscale image, but may be a color image. The camera 2 may be attached to a place other than the ceiling 310. The camera 2 may be other than an omnidirectional camera.

図3は撮影画像100の一例を示す図である。撮像画像100は魚眼画像とも呼ばれる。図3に示されるように、撮影画像100に写る室内300の床320の上には、複数の机330と複数の椅子340とが配置されている。室内300には複数の人200が存在する。具体的には、室内300には、壁350の傍に立っている2人の人200a,200bと、椅子340に座っている1人の人200cが存在している。したがって、撮影画像100には、3人の人200a,200b,200cが写っている。   FIG. 3 is a diagram illustrating an example of the captured image 100. The captured image 100 is also called a fisheye image. As shown in FIG. 3, a plurality of desks 330 and a plurality of chairs 340 are arranged on the floor 320 of the room 300 that is captured in the captured image 100. There are a plurality of people 200 in the room 300. Specifically, in the room 300, there are two persons 200a and 200b standing beside the wall 350 and one person 200c sitting on a chair 340. Accordingly, the photographed image 100 includes three people 200a, 200b, and 200c.

画像処理装置3は、入力される撮影画像100に基づいて、室内300での人200の位置を追跡する。言い換えれば、画像処理装置3は、入力される撮影画像100に基づいて、カメラ2の撮影範囲での人200の位置を追跡する。さらに言い換えれば、画像処理装置3は、入力される撮影画像100に基づいて、撮影画像100での人200の位置を追跡する。   The image processing apparatus 3 tracks the position of the person 200 in the room 300 based on the input captured image 100. In other words, the image processing device 3 tracks the position of the person 200 in the shooting range of the camera 2 based on the input captured image 100. In other words, the image processing apparatus 3 tracks the position of the person 200 in the captured image 100 based on the input captured image 100.

画像処理装置3は、例えば、一種のコンピュータであって、図1に示されるように、CPU4(Central Processing Unit)及び記憶部5を備えている。記憶部5は、ROM(Read Only Memory)及びRAM(Random Access Memory)等の、CPU4が読み取り可能な非一時的な記録媒体で構成されている。記憶部5には、画像処理装置3(コンピュータ)を制御するための制御プログラム6が記憶されている。CPU4が記憶部5内の制御プログラム6を実行することによって、画像処理装置3には様々な機能ブロックが形成される。   The image processing apparatus 3 is, for example, a kind of computer, and includes a CPU 4 (Central Processing Unit) and a storage unit 5 as shown in FIG. The storage unit 5 is configured by a non-transitory recording medium that can be read by the CPU 4, such as a ROM (Read Only Memory) and a RAM (Random Access Memory). The storage unit 5 stores a control program 6 for controlling the image processing apparatus 3 (computer). Various function blocks are formed in the image processing apparatus 3 by the CPU 4 executing the control program 6 in the storage unit 5.

なお、画像処理装置3の機能の一部又は全部は、その機能の実現のためにプログラム(ソフトフェア)が不要な、論理回路等を含むハードウェア回路で実現しても良い。また記憶部5は、ROM及びRAM以外の、コンピュータが読み取り可能な非一時的な記録媒体を備えていても良い。記憶部5は、例えば、小型のハードディスクドライブ及びSSD(Solid State Drive)等を備えていても良い。   Note that some or all of the functions of the image processing apparatus 3 may be realized by a hardware circuit including a logic circuit or the like that does not require a program (software) to realize the function. The storage unit 5 may include a computer-readable non-transitory recording medium other than the ROM and RAM. The storage unit 5 may include, for example, a small hard disk drive and an SSD (Solid State Drive).

<画像処理装置の構成>
図4は画像処理装置3の構成を示す図である。図4に示されるように、画像処理装置3は、画像処理部10、当てはめ処理部11、追跡処理部12及びカウント部13を備えている。画像処理部10は、撮影画像100に対して画像処理を行い、それによって得られた画像を入力画像140として出力する。入力画像140には、人200が写っており、人200を示す画像が含まれている。以後、人200を示す画像を「人領域」と呼ぶことがある。
<Configuration of image processing apparatus>
FIG. 4 is a diagram illustrating the configuration of the image processing apparatus 3. As shown in FIG. 4, the image processing apparatus 3 includes an image processing unit 10, a fitting processing unit 11, a tracking processing unit 12, and a counting unit 13. The image processing unit 10 performs image processing on the captured image 100 and outputs an image obtained thereby as an input image 140. The input image 140 shows a person 200 and includes an image showing the person 200. Hereinafter, an image showing the person 200 may be referred to as a “human area”.

当てはめ処理部11は、入力画像140に写る人200に対して図形を当てはめる当てはめ処理を行う。当てはめ処理は、入力画像140に含まれる人領域に対して図形を当てはめる処理であると言える。また、当てはめ処理は、入力画像140に含まれる人領域を図形で表す処理であるとも言える。本例では、当てはめ処理部11は、当てはめ処理において、入力画像140に写る人200に対して、例えば楕円を当てはめる。ここで、本願発明での楕円とは、円(真円)を含む概念である。以後、特に断らない限り、「楕円」と言えば、当てはめ処理部11が、入力画像140に写る人200に対して当てはめた楕円を意味する。   The fitting processing unit 11 performs a fitting process for fitting a figure to the person 200 shown in the input image 140. It can be said that the fitting process is a process of fitting a figure to a human region included in the input image 140. The fitting process can also be said to be a process of representing a human region included in the input image 140 with a graphic. In this example, the fitting processing unit 11 fits an ellipse, for example, to the person 200 shown in the input image 140 in the fitting process. Here, the ellipse in the present invention is a concept including a circle (perfect circle). Hereinafter, unless otherwise specified, “ellipse” means an ellipse that the fitting processing unit 11 has applied to the person 200 shown in the input image 140.

追跡処理部12は、当てはめ処理部11での当てはめ処理の結果に基づいて、入力画像140上での楕円の位置を追跡することによって、入力画像140上での人200の位置を追跡する追跡処理を行う。追跡処理は、入力画像140上での楕円の位置を追跡することによって、カメラ2の撮影領域(室内300)での人200の位置を追跡する処理であると言える。   The tracking processing unit 12 tracks the position of the person 200 on the input image 140 by tracking the position of the ellipse on the input image 140 based on the result of the fitting process in the fitting processing unit 11. I do. The tracking process can be said to be a process of tracking the position of the person 200 in the imaging region (room 300) of the camera 2 by tracking the position of the ellipse on the input image 140.

カウント部13は、追跡処理部12での追跡処理の結果に基づいて、入力画像140に写る人200の数を求めるカウント処理を行う。言い換えれば、カウント部13は、追跡処理部12での追跡処理の結果に基づいて、撮影画像100に写る人200の数を求める。さらに言い換えれば、カウント部13は、追跡処理部12での追跡処理の結果に基づいて、カメラ2の撮影範囲内(室内300)に存在する人200の数を求める。   The counting unit 13 performs a counting process for obtaining the number of people 200 shown in the input image 140 based on the result of the tracking process in the tracking processing unit 12. In other words, the count unit 13 obtains the number of people 200 that appear in the captured image 100 based on the result of the tracking process in the tracking processing unit 12. In other words, the count unit 13 obtains the number of people 200 existing in the shooting range (the room 300) of the camera 2 based on the result of the tracking process in the tracking processing unit 12.

図5は画像処理装置3の動作を示すフローチャートである。図5に示されるように、ステップs1において、画像処理装置3がカメラ2から撮影画像100を取得すると、画像処理部10は、ステップs2において、撮影画像100に対して画像処理を行って、入力画像140を生成する。ステップs2での具体的処理について後で説明する。   FIG. 5 is a flowchart showing the operation of the image processing apparatus 3. As shown in FIG. 5, when the image processing apparatus 3 acquires the captured image 100 from the camera 2 in step s1, the image processing unit 10 performs image processing on the captured image 100 in step s2, and inputs the captured image 100. An image 140 is generated. Specific processing in step s2 will be described later.

ステップs2の後、ステップs3において、当てはめ処理部11は、ステップs2で生成された入力画像140に写る人200に対して楕円を当てはめる当てはめ処理を行う。その後、ステップs4において、追跡処理部12は、ステップs3での当てはめ処理の結果に基づいて入力画像140上での楕円の位置を追跡することによって、入力画像140上での人200の位置を追跡する追跡処理を行う。その後、ステップs5において、カウント部13は、ステップs4での追跡処理の結果に基づいて、ステップs2で生成された入力画像140に映る人200の数を求めるカウント処理を行う。つまり、カウント部13は、ステップs4での追跡処理の結果に基づいて、ステップs1で取得させた撮影画像100に映る人200の数を求める。   After step s2, in step s3, the fitting processing unit 11 performs a fitting process for fitting an ellipse to the person 200 shown in the input image 140 generated in step s2. Thereafter, in step s4, the tracking processing unit 12 tracks the position of the person 200 on the input image 140 by tracking the position of the ellipse on the input image 140 based on the result of the fitting process in step s3. Follow the tracking process. Thereafter, in step s5, the counting unit 13 performs a counting process for obtaining the number of people 200 shown in the input image 140 generated in step s2, based on the result of the tracking process in step s4. That is, the count unit 13 obtains the number of people 200 shown in the captured image 100 acquired in step s1 based on the result of the tracking process in step s4.

その後、再度ステップs1が実行されて、新たな撮影画像100(次のフレームの撮像画像100)が画像処理装置3で取得されると、画像処理装置3は、ステップs2〜s5までの処理を同様に実行する。画像処理装置3は、撮影画像100が取得されるたびに(撮影画像100が入力されるたびに)、取得された撮影画像100を用いてステップs2〜s5までの処理を実行する。   After that, when step s1 is executed again and a new captured image 100 (the captured image 100 of the next frame) is acquired by the image processing device 3, the image processing device 3 performs the same processing from steps s2 to s5. To run. Each time the captured image 100 is acquired (every time the captured image 100 is input), the image processing apparatus 3 executes the processes from steps s2 to s5 using the acquired captured image 100.

以後、画像処理装置3が現在処理している入力画像140を「現フレームの入力画像140」と呼ぶことがある。また、画像処理装置3において、現フレームの入力画像140よりも一つ前に生成された入力画像140を「前フレームの入力画像140」と呼ぶことがある。   Hereinafter, the input image 140 currently processed by the image processing apparatus 3 may be referred to as “current frame input image 140”. In the image processing apparatus 3, the input image 140 generated immediately before the input image 140 of the current frame may be referred to as “the input image 140 of the previous frame”.

<画像処理部の詳細>
図6は画像処理部10の構成を示す図である。画像処理部10は、撮影画像100に対して複数種類の画像処理を実行して入力画像140を生成する。図6に示されるように、画像処理部10は、リサイズ部20、第1ノイズ除去部21、背景差分画像生成部22及び第2ノイズ除去部23を備えている。
<Details of image processing unit>
FIG. 6 is a diagram illustrating a configuration of the image processing unit 10. The image processing unit 10 performs a plurality of types of image processing on the captured image 100 to generate an input image 140. As illustrated in FIG. 6, the image processing unit 10 includes a resizing unit 20, a first noise removing unit 21, a background difference image generating unit 22, and a second noise removing unit 23.

リサイズ部20は、撮影画像100のサイズを縮小し、縮小後の撮影画像100を処理画像110として出力する。リサイズ部20は、例えば、撮影画像100の縦及び横の画素数を0.5倍に設定する。以後、縮小後の撮影画像100である処理画像110を「撮影画像110」と呼ぶことがある。撮影画像110に写る内容は、撮影画像100に写る内容と同じである。したがって、上述の図3は、撮影画像110の一例を示す図であるとも言える。   The resizing unit 20 reduces the size of the captured image 100 and outputs the reduced captured image 100 as a processed image 110. For example, the resizing unit 20 sets the number of vertical and horizontal pixels of the captured image 100 to 0.5 times. Hereinafter, the processed image 110 that is the reduced captured image 100 may be referred to as a “captured image 110”. The content that appears in the captured image 110 is the same as that that appears in the captured image 100. Therefore, it can be said that FIG. 3 described above is an example of the captured image 110.

第1ノイズ除去部21は、処理画像110に対して所定の画像処理を行って、処理画像110に含まれるノイズを除去する。第1ノイズ除去部21は、例えば、処理画像110に対してガウシアンフィルタを行って、処理画像110を平滑化する。これにより、処理画像110に含まれるノイズが除去される。第1ノイズ除去部21は、ノイズ除去後の処理画像110を処理画像120として出力する。   The first noise removing unit 21 performs predetermined image processing on the processed image 110 to remove noise included in the processed image 110. The first noise removing unit 21 smoothes the processed image 110 by performing a Gaussian filter on the processed image 110, for example. Thereby, the noise contained in the processed image 110 is removed. The first noise removing unit 21 outputs the processed image 110 after noise removal as the processed image 120.

なお、撮影画像100の画素数が小さいなどの理由で撮影画像100をリサイズする必要が無い場合には、リサイズ部20は不要となる。この場合には、第1ノイズ除去部21は、撮影画像100に対してガウシアンフィルタを行い、処理後の撮影画像100を処理画像120として出力する。   In addition, when there is no need to resize the captured image 100 because the number of pixels of the captured image 100 is small, the resizing unit 20 is not necessary. In this case, the first noise removing unit 21 performs a Gaussian filter on the captured image 100 and outputs the processed captured image 100 as the processed image 120.

背景差分画像生成部22は、処理画像120と、撮影画像100の背景だけを示す背景画像との差分を示す背景差分画像130を生成する。本例では、背景画像は、人200が存在しない室内300をカメラ2が撮影することによって得られる画像を、処理画像120と同じサイズまで縮小することによって得られる画像である。背景差分画像生成部22は、各画素について、処理画像120の画素値と背景画像の画素値との差分を求めて、それによって得られる各画素の差分値を2値化することによって背景差分画像130を生成する。したがって、背景差分画像130は2値化画像である。   The background difference image generation unit 22 generates a background difference image 130 indicating a difference between the processed image 120 and a background image indicating only the background of the captured image 100. In this example, the background image is an image obtained by reducing an image obtained by the camera 2 taking an image of the room 300 in which no person 200 exists to the same size as the processed image 120. The background difference image generation unit 22 obtains a difference between the pixel value of the processed image 120 and the pixel value of the background image for each pixel, and binarizes the difference value of each pixel obtained thereby, thereby obtaining a background difference image. 130 is generated. Therefore, the background difference image 130 is a binarized image.

第2ノイズ除去部23は、背景差分画像130に所定の画像処理を行って、背景差分画像130に含まれるノイズを除去する。第2ノイズ除去部23は、例えば、背景差分画像130に対して膨張処理及び収縮処理を繰り返し行って、背景差分画像130に含まれるノイズを除去する。第2ノイズ除去部23は、ノイズ除去後の背景差分画像130を入力画像140として出力する。   The second noise removing unit 23 performs predetermined image processing on the background difference image 130 to remove noise included in the background difference image 130. For example, the second noise removing unit 23 repeatedly performs expansion processing and contraction processing on the background difference image 130 to remove noise included in the background difference image 130. The second noise removing unit 23 outputs the background difference image 130 after noise removal as the input image 140.

図7は入力画像140(ノイズ除去された背景差分画像130)の一例を示す図である。図7の例では、画素値が“1”の部分(高輝度領域)が黒色で示されており、画素値が“0”の部分(低輝度領域)が白色で示されている。図7に示される入力画像140は、上述の図3に示される撮影画像100(撮影画像110)に対応している。つまり、図7に示される入力画像140は、図3に示される撮影画像100(撮影画像110)に基づいて生成された処理画像120と背景画像との差分を示している。   FIG. 7 is a diagram illustrating an example of the input image 140 (background difference image 130 from which noise has been removed). In the example of FIG. 7, a portion having a pixel value “1” (high luminance region) is shown in black, and a portion having a pixel value “0” (low luminance region) is shown in white. The input image 140 illustrated in FIG. 7 corresponds to the captured image 100 (captured image 110) illustrated in FIG. 3 described above. That is, the input image 140 shown in FIG. 7 shows the difference between the processed image 120 and the background image generated based on the captured image 100 (captured image 110) shown in FIG.

図7に示される入力画像140には、3人の人200が写っており、3つの人領域230が含まれている。具体的には、入力画像140には、図3に示される人200a,200b,200cをそれぞれ示す人領域230a,230b,230cが含まれている。人領域230a,230b,230cは高輝度領域である。入力画像140には、背景画像が含まれていないことから、画像処理部10は、入力画像140を生成することにより、室内300の人を検出していると言える。   The input image 140 shown in FIG. 7 includes three people 200 and includes three person regions 230. Specifically, the input image 140 includes human areas 230a, 230b, and 230c that respectively indicate the persons 200a, 200b, and 200c shown in FIG. The human areas 230a, 230b, and 230c are high luminance areas. Since the input image 140 does not include a background image, it can be said that the image processing unit 10 detects the person in the room 300 by generating the input image 140.

以上のような構成を有する画像処理部10では、画像処理装置3が撮影画像100を取得すると、上述の図5に示されるように、ステップs21において、リサイズ部20が撮影画像100をリサイズして処理画像110を生成する。そして、ステップs22において、第1ノイズ除去部21が処理画像110に含まれるノイズを除去して処理画像120を生成する。その後、ステップs23において、背景差分画像生成部22が、処理画像120と背景画像との差分を示す背景差分画像130を生成する。そして、ステップs24において、第2ノイズ除去部23が、背景差分画像130に含まれるノイズを除去して入力画像140を生成する。ステップs24において入力画像140が生成されると、上述のようにしてステップs3〜s5が順次実行される。   In the image processing unit 10 having the above configuration, when the image processing apparatus 3 acquires the captured image 100, the resize unit 20 resizes the captured image 100 in step s21 as shown in FIG. 5 described above. A processed image 110 is generated. In step s22, the first noise removing unit 21 removes noise included in the processed image 110 to generate the processed image 120. Thereafter, in step s23, the background difference image generation unit 22 generates a background difference image 130 indicating the difference between the processed image 120 and the background image. In step s24, the second noise removing unit 23 removes noise included in the background difference image 130 to generate the input image 140. When the input image 140 is generated in step s24, steps s3 to s5 are sequentially executed as described above.

以後、現フレームの入力画像140の元になる撮影画像110を「現フレームの撮影画像110」と呼ぶことがある。また、前フレームの入力画像140の元になる撮影画像110を「前フレームの撮影画像110」と呼ぶことがある。   Hereinafter, the captured image 110 that is the basis of the input image 140 of the current frame may be referred to as “the captured image 110 of the current frame”. In addition, the captured image 110 that is the basis of the input image 140 of the previous frame may be referred to as “the captured image 110 of the previous frame”.

<当てはめ処理部の詳細>
図8は当てはめ処理部11の構成を示す図である。図9は上述のステップs3での当てはめ処理の詳細を示すフローチャートである。図8に示されるように、当てはめ処理部11は、ラベリング部30、輪郭抽出部31、楕円当てはめ部32及び楕円統合部33を備えている。図9に示されるように、当てはめ処理では、まずステップs31においてラベリング部30での処理が実行され、その後、ステップs32において輪郭抽出部31での処理が実行される。次にステップs33において楕円当てはめ部32での処理が実行され、最後に楕円統合部33での処理が実行される。以下に各構成での具体的処理について説明する。
<Details of fitting processing section>
FIG. 8 is a diagram illustrating the configuration of the fitting processing unit 11. FIG. 9 is a flowchart showing details of the fitting process in step s3. As shown in FIG. 8, the fitting processing unit 11 includes a labeling unit 30, a contour extracting unit 31, an ellipse fitting unit 32, and an ellipse integrating unit 33. As shown in FIG. 9, in the fitting process, first, the process in the labeling unit 30 is executed in step s31, and then the process in the contour extracting unit 31 is executed in step s32. Next, in step s33, processing by the ellipse fitting unit 32 is executed, and finally processing by the ellipse integration unit 33 is executed. Specific processing in each configuration will be described below.

ラベリング部30は、入力画像140に含まれる高輝度領域に対して、4連結あるいは8連結等を用いたラベリングを行う。そして、ラベリング部30は、ラベリングによって得られた独立領域(連結領域)のうち、大きさがしきい値よりも小さい独立領域、あるいは大きさがしきい値以下の独立領域を除去する。これにより、入力画像140に含まれる小さい独立領域が除去される。つまり、入力画像140に含まれるノイズが除去される。ラベリング部30は、ノイズが除去された入力画像140を処理画像150として出力する。   The labeling unit 30 performs labeling using 4-connection or 8-connection on the high-luminance region included in the input image 140. And the labeling part 30 removes the independent area | region whose magnitude | size is smaller than a threshold value among the independent area | regions (connection area | region) obtained by labeling, or an independent area | region whose magnitude | size is below a threshold value. Thereby, a small independent area included in the input image 140 is removed. That is, noise included in the input image 140 is removed. The labeling unit 30 outputs the input image 140 from which noise has been removed as a processed image 150.

輪郭抽出部31は、処理画像150に含まれる高輝度領域の輪郭抽出を行い、処理画像150に含まれる高輝度領域の輪郭を示す輪郭抽出画像160を生成する。つまり、輪郭抽出部31は、処理画像150に含まれる各人領域の輪郭抽出を行い、処理画像150に含まれる各人領域の輪郭を示す輪郭抽出画像160を生成する。以後、人領域の輪郭を「人輪郭」と呼ぶ。   The contour extraction unit 31 performs contour extraction of the high luminance region included in the processed image 150 and generates a contour extracted image 160 indicating the contour of the high luminance region included in the processed image 150. That is, the contour extraction unit 31 performs contour extraction of each human region included in the processed image 150 and generates a contour extracted image 160 indicating the contour of each human region included in the processed image 150. Hereinafter, the contour of the human region is referred to as “human contour”.

楕円当てはめ部32は、輪郭抽出画像160に含まれる人輪郭に対して楕円を当てはめる。これにより、入力画像140に写る人200に対して楕円が当てはめられる。言い換えれば、入力画像140に含まれる人領域230に対して楕円が当てはめられる。楕円当てはめ部32は、例えば、最小二乗法を用いて輪郭抽出画像160に含まれる人輪郭に対して楕円を当てはめる。   The ellipse fitting unit 32 applies an ellipse to the human contour included in the contour extraction image 160. Thereby, an ellipse is applied to the person 200 shown in the input image 140. In other words, an ellipse is applied to the human region 230 included in the input image 140. The ellipse fitting unit 32 applies an ellipse to the human contour included in the contour extraction image 160 using, for example, the least square method.

図10は、図7に示される入力画像140から生成された輪郭抽出画像160に含まれる人輪郭に対して当てはめられた楕円250を、当該入力画像140に重ねた様子を示す図である。図11は、楕円250を、図3に示される撮影画像100をリサイズして得られる撮影画像110に重ねた様子を示す図である。   FIG. 10 is a diagram illustrating a state in which an ellipse 250 applied to the human contour included in the contour extraction image 160 generated from the input image 140 illustrated in FIG. 7 is superimposed on the input image 140. FIG. 11 is a diagram illustrating a state in which the ellipse 250 is superimposed on the captured image 110 obtained by resizing the captured image 100 illustrated in FIG. 3.

図10に示されるように、入力画像140に写る3人の人に対して楕円250が当てはめられる。具体的には、入力画像140に含まれる、人200aを示す人領域230aには楕円250aが当てはめられる。また、入力画像140に含まれる、人200bを示す人領域230bには楕円250bが当てはめられる。そして、入力画像140に含まれる、人200cを示す人領域230cには楕円250c1,250c2が当てはめられる。これにより、図11に示されるように、撮影画像110に写る人200aに対して楕円250aが当てはめられ、撮影画像110に写る人200bに対して楕円250bが当てはめられ、撮影画像110に写る人200cに対して楕円250c1,250c2が当てはめられる。   As shown in FIG. 10, an ellipse 250 is applied to three people shown in the input image 140. Specifically, an ellipse 250a is applied to a person area 230a indicating the person 200a included in the input image 140. Further, an ellipse 250b is applied to a human area 230b indicating the person 200b included in the input image 140. Then, ellipses 250c1 and 250c2 are applied to a human area 230c indicating the person 200c included in the input image 140. Thus, as shown in FIG. 11, the ellipse 250a is applied to the person 200a shown in the photographed image 110, the ellipse 250b is applied to the person 200b shown in the photographed image 110, and the person 200c appears in the photographed image 110. Ellipses 250c1 and 250c2 are fitted to the above.

楕円統合部33は、楕円当てはめ部32において、入力画像140に写る1人の人200に対して複数の楕円250が当てはめられた場合には、当該複数の楕円を統合して一つの新たな楕円を生成し、生成した新たな楕円を、当該1人の人200に対して当てはめ直す。つまり、楕円統合部33は、楕円当てはめ部32において、入力画像140に写る1人の人200に対して複数の楕円250が当てはめられた場合には、当該複数の楕円を統合して一つの新たな楕円を生成し、生成した新たな楕円を、当該複数の楕円の代わりに採用する。   When the ellipse fitting unit 32 applies a plurality of ellipses 250 to one person 200 shown in the input image 140 in the ellipse fitting unit 32, the ellipse integrating unit 33 integrates the plurality of ellipses to create one new ellipse. And the generated new ellipse is reapplied to the one person 200. That is, when the ellipse integration unit 33 applies a plurality of ellipses 250 to one person 200 shown in the input image 140 in the ellipse fitting unit 32, the ellipse integration unit 33 integrates the plurality of ellipses into one new one. A new ellipse is generated instead of the plurality of ellipses.

ここで、楕円当てはめ部32では、1人の人200に対して複数の楕円250が当てはめられることがある。例えば、人200の上着の色が背景の色と同じである場合には、人200の頭に対して1つの楕円250が当てはめられ、当該人200の下半身に対して1つの楕円250が当てはめられることがある。上述の図10,11の例では、椅子に座っている人200cの上半身及び下半身に対して2つの楕円250c1,250c2がそれぞれ当てはめられている。   Here, in the ellipse fitting unit 32, a plurality of ellipses 250 may be fitted to one person 200. For example, if the color of the jacket of the person 200 is the same as the background color, one ellipse 250 is fitted to the head of the person 200 and one ellipse 250 is fitted to the lower body of the person 200. May be. In the example of FIGS. 10 and 11 described above, two ellipses 250c1 and 250c2 are respectively applied to the upper and lower body of the person 200c sitting on the chair.

一方で、後述の説明から理解できるように、追跡処理部12は、基本的には、1つの楕円250については、1人の人200に対応するものとして取り扱う。したがって、追跡処理部12は、当てはめ処理部11において1人の人200に対して複数の楕円250が当てはめられる場合には、当該複数の楕円250には複数の人200がそれぞれ対応するものとして取り扱うことになる。その結果、室内300での人200の位置の追跡が正しく行われない可能性がある。   On the other hand, as can be understood from the following description, the tracking processing unit 12 basically treats one ellipse 250 as one corresponding to one person 200. Therefore, when the plurality of ellipses 250 are applied to one person 200 in the fitting processing section 11, the tracking processing unit 12 treats the plurality of ellipses 250 as corresponding to the plurality of persons 200, respectively. It will be. As a result, the position of the person 200 in the room 300 may not be correctly tracked.

そこで、楕円統合部33は、楕円当てはめ部32において、1人の人200に対して複数の楕円250が当てはめられた場合には、当該複数の楕円250を統合して得られる一つの新たな楕円を、当該複数の楕円250の代わりに採用する。これにより、楕円当てはめ部32において、1人の人200に対して複数の楕円250が当てはめられた場合であっても、最終的には、当該1人の1人200に対して1つの楕円を当てはめることが可能となる。   Therefore, the ellipse integration unit 33, when the ellipse fitting unit 32 applies a plurality of ellipses 250 to one person 200, creates a new ellipse obtained by integrating the plurality of ellipses 250. Is adopted instead of the plurality of ellipses 250. As a result, even when a plurality of ellipses 250 are applied to one person 200 in the ellipse fitting unit 32, one ellipse is finally assigned to the one person 200. It can be applied.

図12は、図11に示される、人200cに当てはめられた複数の楕円250c1,250c2を統合して得られる新たな楕円250cを、人200cに対して当てはめ直した様子を示す図である。図12に示されるように、楕円統合部33の働きによって、人200cに対して、一つの楕円250cが当てはめられる。   FIG. 12 is a diagram illustrating a state where a new ellipse 250c obtained by integrating a plurality of ellipses 250c1 and 250c2 applied to the person 200c shown in FIG. 11 is applied to the person 200c. As shown in FIG. 12, one ellipse 250c is applied to the person 200c by the action of the ellipse integration unit 33.

当てはめ処理部11は、楕円当てはめ部32での楕円250の当てはめの結果と、楕円統合部33での新たな楕円の再当てはめの結果とに基づいて、入力画像140に写る人200に対して最終的に当てはめられた楕円を特定するための楕円特定情報を、当てはめ処理結果として追跡処理部12に出力する。楕円特定情報には、楕円の中心座標、長軸長、短軸長及び傾きが含まれている。したがって、楕円特定情報から、楕円の位置及び形状を特定することができる。楕円特定情報に含まれる楕円の中心座標は、入力画像140上での楕円の中心座標である。楕円特定情報に含まれる楕円の中心座標は、撮影画像110上での楕円の中心座標であるとも言える。楕円特定情報に含まれる楕円の中心座標は、入力画像140(撮影画像110)に写る、当該楕円に対応する人の位置を示している。   Based on the result of fitting the ellipse 250 in the ellipse fitting unit 32 and the result of re-fitting a new ellipse in the ellipse integrating unit 33, the fitting processing unit 11 performs the final processing on the person 200 shown in the input image 140. The ellipse specifying information for specifying the ellipse that has been fitted is output to the tracking processing unit 12 as the fitting process result. The ellipse identification information includes the center coordinates, major axis length, minor axis length, and inclination of the ellipse. Therefore, the position and shape of the ellipse can be specified from the ellipse specifying information. The center coordinates of the ellipse included in the ellipse specifying information are the center coordinates of the ellipse on the input image 140. It can be said that the center coordinates of the ellipse included in the ellipse specifying information are the center coordinates of the ellipse on the captured image 110. The center coordinate of the ellipse included in the ellipse specifying information indicates the position of the person corresponding to the ellipse in the input image 140 (captured image 110).

<楕円統合処理の詳細>
次に楕円統合部33での楕円統合処理(ステップs34の処理)について詳細に説明する。本例では、楕円統合部33は、2つの楕円が第1〜第3条件のすべてを満たす場合に、当該2つの楕円が1人の人に当てはめられたと判断して、当該2つの楕円を統合して得られる一つの新たな楕円を、当該2つの楕円の代わりに採用する。以後、当該新たな楕円を「統合楕円」と呼ぶことがある。
<Details of ellipse integration processing>
Next, the ellipse integration process (the process of step s34) in the ellipse integration unit 33 will be described in detail. In this example, when the two ellipses satisfy all the first to third conditions, the ellipse integration unit 33 determines that the two ellipses are applied to one person, and integrates the two ellipses. One new ellipse obtained in this way is adopted instead of the two ellipses. Hereinafter, the new ellipse may be referred to as an “integrated ellipse”.

第1条件は、2つの楕円間の距離が第1しきい値以下であるという条件である。1人の人に対して2つの楕円が当てはめられている場合には、当該2つの楕円間の距離は小さい。そのため、2つの楕円が第1条件を満たす場合には、当該2つの楕円は1人の人に当てはめられている可能性がある。なお、第1条件は、2つの楕円間の距離が第1しきい値未満であるという条件であっても良い。第1条件の判定方法の具体例については後で詳細に説明する。   The first condition is a condition that the distance between the two ellipses is not more than the first threshold value. When two ellipses are fitted to one person, the distance between the two ellipses is small. Therefore, when two ellipses satisfy the first condition, there is a possibility that the two ellipses are applied to one person. The first condition may be a condition that the distance between the two ellipses is less than the first threshold value. A specific example of the determination method for the first condition will be described later in detail.

第2条件は、2つの楕円の位置が、入力画像140上において、特定の位置から延びる1本の直線上に存在するという条件である。この特定の位置は、入力画像140上において、撮影画像110(撮影画像100)に写る人の俯瞰角度が撮影画像110(撮影画像100)で最大となる位置に対応する対応位置である。   The second condition is a condition that the positions of two ellipses are on one straight line extending from a specific position on the input image 140. This specific position is a corresponding position on the input image 140 corresponding to a position where the bird's-eye view angle shown in the captured image 110 (captured image 100) is maximum in the captured image 110 (captured image 100).

ここで、撮影画像に写る人の俯瞰角度とは、その人がどのような俯瞰角度(俯角)で俯瞰したように写っているかを示している。言い換えれば、撮影画像に写る人の俯瞰角度とは、その人がある俯瞰角度で俯瞰したように写っている場合の当該ある俯瞰角度を意味している。したがって、撮影画像に写る人の俯瞰角度は、撮影画像に写る人の角度(撮影画像での人の見え方)を意味しているのであって、カメラの角度(姿勢)を意味しているのではない。撮影画像において、人が真上から俯瞰したように写っている場合には、撮影画像に写るその人の俯瞰角度は最大の90度となる。   Here, the bird's-eye view angle shown in the photographed image indicates what kind of bird's-eye view angle (the depression angle) the person looks like. In other words, the bird's-eye view angle in the captured image means the certain bird's-eye view angle when the person is seen as if seen from a certain bird's-eye view angle. Therefore, the bird's-eye view angle shown in the photographed image means the angle of the person shown in the photographed image (how the person looks in the photographed image), and means the angle (posture) of the camera. is not. In the captured image, when a person is seen as if seen from directly above, the overhead angle of the person appearing in the photographed image is 90 degrees at the maximum.

俯瞰撮影された撮影画像では、画像位置によって人の俯瞰角度が異なる。本例では、カメラ2は、室内300の天井310に取り付けられた全方位カメラであることから、撮影画像110の中心が、撮影画像110での人の俯瞰角度が最大となる位置となる。つまり、撮影画像110の中心において人の俯瞰角度が90度となる。そして、撮影画像110では、中心から離れるほど人の俯瞰角度が小さくなる。そのため、図13に示されるように、撮影画像110においては、中心111から離れて位置する人200(200a〜200c)は、中心111から外側に向かう方向112に沿って延びるように写る。   In the captured image obtained by the overhead view, the overhead angle of the person varies depending on the image position. In this example, since the camera 2 is an omnidirectional camera attached to the ceiling 310 of the room 300, the center of the captured image 110 is a position where the person's overhead angle in the captured image 110 is maximized. That is, the person's bird's-eye view angle at the center of the captured image 110 is 90 degrees. And in the picked-up image 110, a person's bird's-eye angle becomes small, so that it leaves | separates from a center. Therefore, as shown in FIG. 13, in the captured image 110, the person 200 (200 a to 200 c) located away from the center 111 appears to extend along the direction 112 from the center 111 toward the outside.

また、本例では、撮影画像110の中心が、人の俯瞰角度が最大となる最大位置となることから、入力画像140において、当該最大位置に対応する対応位置は、入力画像140の中心(2つの対角線の交点)となる。したがって、本例では、第2条件は、2つの楕円が、入力画像140上において、その中心から延びる1本の直線上に位置するという条件となる。別の見方をすれば、第2条件は、2つの楕円が、入力画像140から生成される輪郭抽出画像160上において、その中心から延びる1本の直線上に位置するという条件とも言える。また、さらに別の見方をすれば、第2条件は、2つの楕円が、撮影画像110上において、その中心から延びる1本の直線上に位置するという条件とも言える。以後、撮像画像110において、人の俯瞰角度が最大となる最大位置を「俯瞰角度最大位置」と呼ぶことがある。   In this example, since the center of the captured image 110 is the maximum position where the person's overhead angle is maximum, the corresponding position corresponding to the maximum position in the input image 140 is the center of the input image 140 (2 Intersection of two diagonals). Therefore, in this example, the second condition is a condition that two ellipses are located on one straight line extending from the center of the input image 140. From another point of view, the second condition can be said to be a condition that two ellipses are located on one straight line extending from the center on the contour extraction image 160 generated from the input image 140. Further, from another viewpoint, the second condition can be said to be a condition that two ellipses are located on one straight line extending from the center of the captured image 110. Hereinafter, in the captured image 110, the maximum position where the person's overhead angle is maximum may be referred to as “maximum overhead angle position”.

撮影画像110においては、人200は、撮影画像110の中心111から外側に向かう方向112に沿って延びるように写ることから、入力画像140から得られた2つの楕円が、入力画像140上において、その中心から外側に向かう方向に沿って並んでいる場合には、当該2つ楕円は、1人の人に対して当てはめられている可能性がある(図10の例では、人200cに当てはめられた2つの楕円250c1,250c2が、入力画像140上において、その中心から外側に向かう方向に沿って並んでいる)。つまり、入力画像140から得られた2つの楕円が、入力画像140上において、その中心から延びる1本の直線上に位置する場合には、当該2つ楕円は、入力画像140に写る1人の人に対して当てはめられている可能性がある。よって、2つの楕円が第2条件を満たす場合には、当該2つの楕円は1人の人に当てはめられている可能性がある。第2条件の判定方法の具体例については後で詳細に説明する。   In the photographed image 110, the person 200 appears to extend along the direction 112 extending outward from the center 111 of the photographed image 110, so that two ellipses obtained from the input image 140 are displayed on the input image 140. When arranged along the direction from the center to the outside, the two ellipses may be applied to one person (in the example of FIG. 10, applied to the person 200c). Two ellipses 250c1 and 250c2 are arranged on the input image 140 along the direction from the center to the outside). That is, when two ellipses obtained from the input image 140 are positioned on one straight line extending from the center of the input image 140, the two ellipses are represented by one person appearing in the input image 140. It may be applied to a person. Therefore, when two ellipses satisfy the second condition, there is a possibility that the two ellipses are applied to one person. A specific example of the determination method of the second condition will be described later in detail.

第3条件は、2つの楕円を統合して得られる統合楕円の大きさが第2しきい値以下であるという条件である。統合楕円の大きさとしては、例えば、統合楕円の面積が採用される。2つの楕円が1人の人に対して当てはめられている場合には、当該2つの楕円を統合して得られる統合楕円の大きさは、入力画像140に写る人の大きさに近くなる。したがって、2つの楕円を統合して得られる統合楕円の大きさがあまりにも大きい場合には、当該2つの楕円は別々の人に当てはめられている可能性が高い。よって、2つの楕円が第3条件を満たす場合には、当該2つの楕円は1人の人に当てはめられている可能性がある。なお、第3条件は、2つの楕円を統合して得られる統合楕円の大きさが第2しきい値未満であるという条件であっても良い。第3条件の判定方法の具体例については後で詳細に説明する。   The third condition is a condition that the size of the integrated ellipse obtained by integrating the two ellipses is not more than the second threshold value. As the size of the integrated ellipse, for example, the area of the integrated ellipse is adopted. When two ellipses are applied to one person, the size of the integrated ellipse obtained by integrating the two ellipses is close to the size of the person shown in the input image 140. Therefore, when the size of the integrated ellipse obtained by integrating the two ellipses is too large, there is a high possibility that the two ellipses are applied to different people. Therefore, when two ellipses satisfy the third condition, the two ellipses may be applied to one person. The third condition may be a condition that the size of the integrated ellipse obtained by integrating the two ellipses is less than the second threshold value. A specific example of the third condition determination method will be described later in detail.

本例では、カメラ2は、室内300の天井310に取り付けられた全方位カメラであることから、撮像画像110の中心は、撮像画像110における、カメラ2の位置に対応する位置であるとも言える。同様に、入力画像140の中心は、入力画像140における、カメラ2の位置に対応する位置であるとも言える。   In this example, since the camera 2 is an omnidirectional camera attached to the ceiling 310 of the room 300, it can be said that the center of the captured image 110 is a position corresponding to the position of the camera 2 in the captured image 110. Similarly, it can be said that the center of the input image 140 is a position corresponding to the position of the camera 2 in the input image 140.

<楕円統合処理のフロー>
図14は楕円統合処理(ステップs34の処理)を示すフローチャートである。図14に示されるように、楕円統合処理では、まずステップs341において、楕円統合部33は、楕円当てはめ部32で得られた複数の楕円を第1楕円群とし、当該第1楕円群に楕円が2つ以上存在するか否かを判定する。楕円統合部33は、第1楕円群に楕円が2つ以上存在すると判定すると、ステップs342において、第1楕円群から、処理対象となる第1対象楕円を決定する。そして、ステップs343において、楕円統合部33は、第1楕円群から、ステップs342で決定した第1対象楕円を削除する。一方で、ステップs341において、楕円統合部33は、Noと判定すると、楕円統合処理を終了する。
<Flow of ellipse integration processing>
FIG. 14 is a flowchart showing the ellipse integration process (the process of step s34). As shown in FIG. 14, in the ellipse integration process, first in step s341, the ellipse integration unit 33 sets a plurality of ellipses obtained by the ellipse fitting unit 32 as a first ellipse group, and an ellipse is included in the first ellipse group. It is determined whether there are two or more. If the ellipse integration unit 33 determines that there are two or more ellipses in the first ellipse group, in step s342, the ellipse integration unit 33 determines a first target ellipse to be processed from the first ellipse group. In step s343, the ellipse integration unit 33 deletes the first target ellipse determined in step s342 from the first ellipse group. On the other hand, if the ellipse integration unit 33 determines No in step s341, the ellipse integration process ends.

ステップs343の後、楕円統合部33は、ステップs344において、現在の第1楕円群を第2楕円群とし、第2楕円群から第2対象楕円を決定する。第2楕円群には、ステップs342で決定された第1対象楕円が含まれていない。したがって、ステップs344での第2対象楕円は、ステップs342での第1対象楕円とは異なる楕円となる。ステップs344の後、楕円統合部33は、ステップs345において、第2楕円群から、ステップs344で決定した第2対象楕円を削除する。   After step s343, in step s344, the ellipse integration unit 33 sets the current first ellipse group as the second ellipse group and determines the second target ellipse from the second ellipse group. The second ellipse group does not include the first target ellipse determined in step s342. Therefore, the second target ellipse in step s344 is an ellipse different from the first target ellipse in step s342. After step s344, the ellipse integration unit 33 deletes the second target ellipse determined in step s344 from the second ellipse group in step s345.

次にステップs346において、楕円統合部33は、第1及び第2対象楕円が第1条件を満たすか否かを判定する。つまり、楕円統合部33は、第1及び第2対象楕円の間の距離が第1しきい値以下であるか否かを判定する。   Next, in step s346, the ellipse integration unit 33 determines whether the first and second target ellipses satisfy the first condition. That is, the ellipse integration unit 33 determines whether the distance between the first and second target ellipses is equal to or less than the first threshold value.

楕円統合部33は、第1及び第2対象楕円が第1条件を満たしていると判定すると、ステップs347において、第1及び第2対象楕円が第2条件を満たすか否かを判定する。つまり、楕円統合部33は、第1及び第2対象楕円が、入力画像140上において、その中心から延びる1本の直線上に位置しているか否かを判定する。一方で、楕円統合部33は、第1及び第2対象楕円が第1条件を満たしていないと判定すると、つまり、第1及び第2対象楕円の間の距離が第1しきい値よりも大きいと判定すると、後述するステップs351を実行する。   If the ellipse integration unit 33 determines that the first and second target ellipses satisfy the first condition, in step s347, the ellipse integration unit 33 determines whether the first and second target ellipses satisfy the second condition. That is, the ellipse integration unit 33 determines whether or not the first and second target ellipses are located on one straight line extending from the center of the input image 140. On the other hand, if the ellipse integration unit 33 determines that the first and second target ellipses do not satisfy the first condition, that is, the distance between the first and second target ellipses is greater than the first threshold value. If determined, step s351 described later is executed.

楕円統合部33は、第1及び第2対象楕円が第2条件を満たしていると判定すると、ステップs348において、第1及び第2対象楕円が第3条件を満たすか否かを判定する。つまり、楕円統合部33は、第1及び第2対象楕円を統合して得られる統合楕円の大きさが第2しきい値以下か否かを判定する。一方で、楕円統合部33は、第1及び第2対象楕円が第2条件を満たしていないと判定すると、つまり、第1及び第2対象楕円が、入力画像140上において、その中心から延びる1本の直線上に位置していないと判定すると、ステップs351を実行する。   If the ellipse integration unit 33 determines that the first and second target ellipses satisfy the second condition, in step s348, the ellipse integration unit 33 determines whether the first and second target ellipses satisfy the third condition. That is, the ellipse integration unit 33 determines whether the size of the integrated ellipse obtained by integrating the first and second target ellipses is equal to or smaller than the second threshold value. On the other hand, if the ellipse integration unit 33 determines that the first and second target ellipses do not satisfy the second condition, that is, the first and second target ellipses 1 extend from the center on the input image 140. If it is determined that the position is not on the straight line of the book, step s351 is executed.

楕円統合部33は、第1及び第2対象楕円が第3条件を満たしていると判定すると、つまり、第1及び第2対象楕円が第1〜第3条件のすべてを満たしていると判定すると、ステップs349において、第1及び第2対象楕円が1人の人に対して当てはめられたと判断して、第1及び第2対象楕円を統合して得られる統合楕円を、第1及び第2対象楕円の代わりに採用する。その後、ステップs350において、楕円統合部33は、第1楕円群を更新する。具体的には、楕円統合部33は、第1楕円群から第2対象楕円を削除するとともに、第1楕円群にステップs349で採用した統合楕円を追加する。   If the ellipse integration unit 33 determines that the first and second target ellipses satisfy the third condition, that is, determines that the first and second target ellipses satisfy all of the first to third conditions. In step s349, it is determined that the first and second target ellipses are applied to one person, and the integrated ellipse obtained by integrating the first and second target ellipses is defined as the first and second targets. Adopt instead of ellipse. Thereafter, in step s350, the ellipse integration unit 33 updates the first ellipse group. Specifically, the ellipse integration unit 33 deletes the second target ellipse from the first ellipse group and adds the integrated ellipse employed in step s349 to the first ellipse group.

ステップs350の後、楕円統合部33は、再度ステップs341を実行して、更新後の第1楕円群に楕円が2つ以上存在するか否かを判定する。楕円統合部33は、Noと判定すると、楕円統合処理を終了する。一方で、楕円統合部33は、Yesと判定すると、ステップs342において、第1楕円群から新たな第1対象楕円を決定する。そして、楕円統合部33は、ステップs343において、第1楕円群から新たに決定した第1対象楕円を削除する。次に楕円統合部33は、ステップs344において、現在の第1楕円群を第2楕円群とし、第2楕円群から新たな第2対象楕円を決定する。楕円統合部33は以後同様に動作する。   After step s350, the ellipse integration unit 33 executes step s341 again to determine whether two or more ellipses exist in the updated first ellipse group. If the ellipse integration unit 33 determines No, it ends the ellipse integration process. On the other hand, if the ellipse integration unit 33 determines Yes, in step s342, a new first target ellipse is determined from the first ellipse group. Then, in step s343, the ellipse integration unit 33 deletes the first target ellipse newly determined from the first ellipse group. Next, in step s344, the ellipse integration unit 33 sets the current first ellipse group as the second ellipse group and determines a new second target ellipse from the second ellipse group. The ellipse integration unit 33 operates similarly thereafter.

ステップs346,s347,s348においてNoと判定される場合に実行されるステップs351では、楕円統合部33は、第2楕円群に楕円が存在するか否かを判定する。楕円統合部33は、第2楕円群に楕円が存在すると判定すると、ステップs344を実行して、第2楕円群から新たな第2対象楕円を決定する。一方で、楕円統合部33は、第2楕円群に楕円が存在しないと判定すると、ステップs341を実行する。以後、楕円統合部33は同様に動作する。   In step s351 executed when it is determined No in steps s346, s347, and s348, the ellipse integration unit 33 determines whether an ellipse exists in the second ellipse group. If the ellipse integration unit 33 determines that an ellipse is present in the second ellipse group, it executes step s344 to determine a new second target ellipse from the second ellipse group. On the other hand, if the ellipse integration unit 33 determines that no ellipse exists in the second ellipse group, step s341 is executed. Thereafter, the ellipse integration unit 33 operates in the same manner.

楕円統合部33が以上のように動作することによって、楕円当てはめ部32が入力画像140に写る1人の人に対して当てはめられた複数の楕円が一つの新たな楕円に統合される。そして、当該新たな楕円が、当該複数の楕円の代わりに採用され、当該1人の人に対して当てはめ直される。   As the ellipse integration unit 33 operates as described above, a plurality of ellipses applied by the ellipse fitting unit 32 to one person shown in the input image 140 are integrated into one new ellipse. Then, the new ellipse is adopted instead of the plurality of ellipses, and reapplied to the one person.

<楕円統合処理の一例>
次に、楕円当てはめ部32において図15に示される複数の楕円250が得られた場合を例に挙げて、図14に示される楕円統合処理の一例を説明する。図15では、楕円当てはめ部32において得られた複数の楕円250e〜250iが入力画像140上に配置されている。図15では、説明の便宜上、入力画像140に含まれる人領域が示されていない。以後、図において、入力画像140に含まれる人領域が説明に不要な場合には、人領域を削除して入力画像140を示す。
<Example of ellipse integration processing>
Next, an example of the ellipse integration process shown in FIG. 14 will be described by taking as an example the case where the ellipse fitting unit 32 has obtained a plurality of ellipses 250 shown in FIG. In FIG. 15, a plurality of ellipses 250 e to 250 i obtained in the ellipse fitting unit 32 are arranged on the input image 140. In FIG. 15, the human area included in the input image 140 is not shown for convenience of explanation. Thereafter, in the figure, when the human area included in the input image 140 is unnecessary for the description, the human area is deleted to show the input image 140.

楕円統合部33は、まず、楕円当てはめ部32で得られた複数の楕円250e〜250iを第1楕円群とし、第1楕円群に楕円が2つ以上存在するか否かを判定する(ステップs341)。ここでは、第1楕円群には、5つの楕円250e〜250iが存在することから、Yesと判定される。   First, the ellipse integration unit 33 sets the plurality of ellipses 250e to 250i obtained by the ellipse fitting unit 32 as a first ellipse group, and determines whether two or more ellipses exist in the first ellipse group (step s341). ). Here, since the first ellipse group includes five ellipses 250e to 250i, it is determined as Yes.

次に楕円統合部33は、第1楕円群から第1対象楕円を決定する(ステップs342)。ここでは、例えば、楕円250eが第1対象楕円250eとされる。そして、楕円統合部33は、第1楕円群から第1対象楕円250eを削除する(ステップs343)。   Next, the ellipse integration unit 33 determines a first target ellipse from the first ellipse group (step s342). Here, for example, the ellipse 250e is the first target ellipse 250e. Then, the ellipse integration unit 33 deletes the first target ellipse 250e from the first ellipse group (step s343).

次に楕円統合部33は、現在の第1楕円群(楕円250f〜250i)を第2楕円群とし、第2楕円群から第2対象楕円を決定する(ステップs344)。ここでは、例えば、楕円250fが第2対象楕円250fとされる。そして、楕円統合部33は、第2楕円群から第2対象楕円250fを削除する(ステップs345)。   Next, the ellipse integration unit 33 sets the current first ellipse group (ellipses 250f to 250i) as the second ellipse group, and determines the second target ellipse from the second ellipse group (step s344). Here, for example, the ellipse 250f is set as the second target ellipse 250f. Then, the ellipse integration unit 33 deletes the second target ellipse 250f from the second ellipse group (step s345).

次に楕円統合部33は、第1対象楕円250e及び第2対象楕円250fが第1条件を満たすか否かを判定する(ステップs346)。図16に示されるように、第1対象楕円250eと第2対象楕円250fの間の距離は小さいことから、第1条件は満たされる(Yes判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250e and the second target ellipse 250f satisfy the first condition (step s346). As FIG. 16 shows, since the distance between the 1st object ellipse 250e and the 2nd object ellipse 250f is small, the 1st condition is satisfy | filled (Yes determination).

次に楕円統合部33は、第1対象楕円250e及び第2対象楕円250fが第2条件を満たすか否かを判定する(ステップs347)。図16に示されるように、第1対象楕円250e及び第2対象楕円250fは、入力画像140上において、その中心141から延びる2本の直線142上にそれぞれ位置することから、つまり、中心141から外側に向かう方向に沿って並んでいないことから、第2条件は満たされない(No判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250e and the second target ellipse 250f satisfy the second condition (step s347). As shown in FIG. 16, the first target ellipse 250e and the second target ellipse 250f are located on the two straight lines 142 extending from the center 141 on the input image 140, that is, from the center 141. Since they are not lined up along the direction toward the outside, the second condition is not satisfied (No determination).

次に楕円統合部33は、第2楕円群に楕円が存在するかを判定する(ステップs351)。ここでは、第2楕円群には楕円250g〜250iが存在することから、楕円統合部33はYesと判定する。   Next, the ellipse integration unit 33 determines whether an ellipse exists in the second ellipse group (step s351). Here, since the ellipses 250g to 250i exist in the second ellipse group, the ellipse integration unit 33 determines Yes.

次に楕円統合部33は、楕円250g〜250iから成る第2楕円群から、新たな第2対象楕円を決定する(ステップs344)。ここでは、例えば、楕円250gが第2対象楕円250gとされる。そして、楕円統合部33は、第2楕円群から第2対象楕円250gを削除する(ステップs345)。   Next, the ellipse integration unit 33 determines a new second target ellipse from the second ellipse group including the ellipses 250g to 250i (step s344). Here, for example, the ellipse 250g is set as the second target ellipse 250g. Then, the ellipse integration unit 33 deletes the second target ellipse 250g from the second ellipse group (step s345).

次に楕円統合部33は、第1対象楕円250e及び第2対象楕円250gが第1条件を満たすか否かを判定する(ステップs346)。図17に示されるように、第1対象楕円250eと第2対象楕円250gの間の距離は大きいことから、第1条件は満たされない(No判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250e and the second target ellipse 250g satisfy the first condition (step s346). As FIG. 17 shows, since the distance between the 1st object ellipse 250e and the 2nd object ellipse 250g is large, the 1st condition is not satisfy | filled (No determination).

次に楕円統合部33は、第2楕円群に楕円が存在するか否かを判定する(ステップs351)。ここでは、第2楕円群には楕円250h,250iが存在することから、楕円統合部33はYesと判定する。   Next, the ellipse integration unit 33 determines whether an ellipse exists in the second ellipse group (step s351). Here, since the ellipses 250h and 250i exist in the second ellipse group, the ellipse integration unit 33 determines Yes.

以後、楕円統合部33は、同様に動作して、ステップs351において、第2楕円群に楕円が存在しないと判定すると、第1楕円群に楕円が2つ以上存在するか否かを判定する(ステップs341)。ここでは、第1楕円群には4つの楕円250f〜250iが存在することからYesと判定される。   Thereafter, when the ellipse integration unit 33 operates in the same manner and determines that there are no ellipses in the second ellipse group in step s351, the ellipse integration unit 33 determines whether two or more ellipses exist in the first ellipse group ( Step s341). Here, since the four ellipses 250f to 250i exist in the first ellipse group, it is determined as Yes.

次に楕円統合部33は、楕円250f〜250iから成る第1楕円群から第1対象楕円を決定する(ステップs342)。ここでは、例えば、楕円250fが第1対象楕円250fとされる。そして、楕円統合部33は、第1楕円群から第1対象楕円250fを削除する(ステップs343)。   Next, the ellipse integration unit 33 determines a first target ellipse from the first ellipse group including the ellipses 250f to 250i (step s342). Here, for example, the ellipse 250f is the first target ellipse 250f. Then, the ellipse integration unit 33 deletes the first target ellipse 250f from the first ellipse group (step s343).

次に楕円統合部33は、現在の第1楕円群(楕円250g〜250i)を第2楕円群とし、第2楕円群から第2対象楕円を決定する(ステップs344)。ここでは、例えば、楕円250gが第2対象楕円250gとされる。そして、楕円統合部33は、第2楕円群から第2対象楕円250gを削除する(ステップs345)。   Next, the ellipse integration unit 33 sets the current first ellipse group (ellipses 250g to 250i) as the second ellipse group, and determines the second target ellipse from the second ellipse group (step s344). Here, for example, the ellipse 250g is set as the second target ellipse 250g. Then, the ellipse integration unit 33 deletes the second target ellipse 250g from the second ellipse group (step s345).

次に楕円統合部33は、第1対象楕円250f及び第2対象楕円250gが第1条件を満たすか否かを判定する(ステップs346)。図18に示されるように、第1対象楕円250fと第2対象楕円250gの間の距離は大きいことから、第1条件は満たされない(No判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250f and the second target ellipse 250g satisfy the first condition (step s346). As shown in FIG. 18, since the distance between the first target ellipse 250f and the second target ellipse 250g is large, the first condition is not satisfied (No determination).

次に楕円統合部33は、第2楕円群に楕円が存在するかを判定する(ステップs351)。ここでは、第2楕円群には楕円250h,250iが存在することからYesと判定される。   Next, the ellipse integration unit 33 determines whether an ellipse exists in the second ellipse group (step s351). Here, since the ellipses 250h and 250i exist in the second ellipse group, it is determined as Yes.

以後、楕円統合部33は、同様に動作して、ステップs351において、第2楕円群に楕円が存在しないと判定すると、第1楕円群に楕円が2つ以上存在するかを判定する(ステップs341)。ここでは、第1楕円群には3つの楕円250g〜250iが存在することからYesと判定される。   Thereafter, when the ellipse integration unit 33 operates in the same manner and determines in step s351 that there are no ellipses in the second ellipse group, it determines whether there are two or more ellipses in the first ellipse group (step s341). ). Here, it is determined Yes because three ellipses 250g to 250i exist in the first ellipse group.

次に楕円統合部33は、楕円250g〜250iから成る第1楕円群から第1対象楕円を決定する(ステップs342)。ここでは、例えば、楕円250gが第1対象楕円250gとされる。そして、楕円統合部33は、第1楕円群から第1対象楕円250gを削除する(ステップs343)。   Next, the ellipse integration unit 33 determines a first target ellipse from the first ellipse group including the ellipses 250g to 250i (step s342). Here, for example, the ellipse 250g is the first target ellipse 250g. Then, the ellipse integration unit 33 deletes the first target ellipse 250g from the first ellipse group (step s343).

次に楕円統合部33は、現在の第1楕円群(楕円250h,250i)を第2楕円群とし、第2楕円群から第2対象楕円を決定する(ステップs344)。ここでは、例えば、楕円250hが第2対象楕円250hとされる。そして、楕円統合部33は、第2楕円群から第2対象楕円250hを削除する(ステップs345)。   Next, the ellipse integration unit 33 sets the current first ellipse group (ellipses 250h and 250i) as the second ellipse group, and determines the second target ellipse from the second ellipse group (step s344). Here, for example, the ellipse 250h is set as the second target ellipse 250h. Then, the ellipse integration unit 33 deletes the second target ellipse 250h from the second ellipse group (step s345).

次に楕円統合部33は、第1対象楕円250g及び第2対象楕円250hが第1条件を満たすか否かを判定する(ステップs346)。図19に示されるように、第1対象楕円250gと第2対象楕円250hの間の距離は小さいことから、第1条件は満たされる(Yes判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250g and the second target ellipse 250h satisfy the first condition (step s346). As FIG. 19 shows, since the distance between the 1st object ellipse 250g and the 2nd object ellipse 250h is small, the 1st condition is satisfy | filled (Yes determination).

次に楕円統合部33は、第1対象楕円250g及び第2対象楕円250hが第2条件を満たすか否かを判定する(ステップs347)。図19に示されるように、第1対象楕円250g及び第2対象楕円250hは、入力画像140上において、その中心141から延びる1本の直線142上に位置することから、つまり、中心141から外側に向かう方向に沿って並んでいることから、第2条件は満たされる(Yes判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250g and the second target ellipse 250h satisfy the second condition (step s347). As shown in FIG. 19, the first target ellipse 250 g and the second target ellipse 250 h are located on one straight line 142 extending from the center 141 on the input image 140, that is, outside the center 141. Therefore, the second condition is satisfied (Yes determination).

次に楕円統合部33は、第1対象楕円250g及び第2対象楕円250hが第3条件を満たすか否かを判定する(ステップs348)。図20に示されるように、第1対象楕円250g及び第2対象楕円250hを統合して得られる統合楕円250jの大きさは小さいことから、第3条件は満たされる(Yes判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250g and the second target ellipse 250h satisfy the third condition (step s348). As shown in FIG. 20, since the size of the integrated ellipse 250j obtained by integrating the first target ellipse 250g and the second target ellipse 250h is small, the third condition is satisfied (Yes determination).

楕円統合部33は、第3条件が満たされると判定すると、第1対象楕円250g及び第2対象楕円250hが1人の人に対して当てはめられたと判断する(ステップs349)。そして、楕円統合部33は、統合楕円250jを、第1対象楕円250g及び第2対象楕円250hの代わりに採用する(ステップs349)。   When determining that the third condition is satisfied, the ellipse integration unit 33 determines that the first target ellipse 250g and the second target ellipse 250h are applied to one person (step s349). Then, the ellipse integration unit 33 employs the integrated ellipse 250j instead of the first target ellipse 250g and the second target ellipse 250h (step s349).

次に楕円統合部33は、第1楕円群から第2対象楕円250hを削除する(ステップs350)。また、楕円統合部33は、第1楕円群に対して統合楕円250jを追加する(ステップs350)。   Next, the ellipse integration unit 33 deletes the second target ellipse 250h from the first ellipse group (step s350). Further, the ellipse integration unit 33 adds the integrated ellipse 250j to the first ellipse group (step s350).

次に楕円統合部33は、第1楕円群に楕円が2つ以上存在するか否かを判定する(ステップs341)。ここでは、第1楕円群には2つの楕円250i,250jが存在することからYesと判定される。   Next, the ellipse integration unit 33 determines whether there are two or more ellipses in the first ellipse group (step s341). Here, since the first ellipse group includes two ellipses 250i and 250j, it is determined as Yes.

次に楕円統合部33は、楕円250i,250jから成る第1楕円群から新たな第1対象楕円を決定する(ステップs342)。ここでは、例えば、楕円250j(統合楕円250j)が第1対象楕円250jとされる。そして、楕円統合部33は、第1楕円群から第1対象楕円250jを削除する(ステップs343)。   Next, the ellipse integration unit 33 determines a new first target ellipse from the first ellipse group including the ellipses 250i and 250j (step s342). Here, for example, the ellipse 250j (integrated ellipse 250j) is the first target ellipse 250j. Then, the ellipse integration unit 33 deletes the first target ellipse 250j from the first ellipse group (step s343).

次に楕円統合部33は、現在の第1楕円群(楕円250i)を第2楕円群とし、第2楕円群から第2対象楕円を決定する(ステップs344)。ここでは、楕円250iが第2対象楕円250iとされる。そして、楕円統合部33は、第2楕円群から第2対象楕円250iを削除する(ステップs345)。   Next, the ellipse integration unit 33 sets the current first ellipse group (ellipse 250i) as the second ellipse group, and determines the second target ellipse from the second ellipse group (step s344). Here, the ellipse 250i is the second target ellipse 250i. Then, the ellipse integration unit 33 deletes the second target ellipse 250i from the second ellipse group (step s345).

次に楕円統合部33は、第1対象楕円250j及び第2対象楕円250iが第1条件を満たすか否かを判定する(ステップs346)。図21に示されるように、第1対象楕円250jと第2対象楕円250iの間の距離は小さいことから、第1条件は満たされる(Yes判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250j and the second target ellipse 250i satisfy the first condition (step s346). As FIG. 21 shows, since the distance between the 1st object ellipse 250j and the 2nd object ellipse 250i is small, the 1st condition is satisfy | filled (Yes determination).

次に楕円統合部33は、第1対象楕円250j及び第2対象楕円250iが第2条件を満たすか否かを判定する(ステップs347)。図21に示されるように、第1対象楕円250j及び第2対象楕円250iは、入力画像140上において、その中心141から延びる1本の直線142上に位置することから、つまり、中心141から外側に向かう方向に沿って並んでいることから、第2条件は満たされる(Yes判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250j and the second target ellipse 250i satisfy the second condition (step s347). As shown in FIG. 21, the first target ellipse 250j and the second target ellipse 250i are located on a single straight line 142 extending from the center 141 on the input image 140, that is, outside the center 141. Therefore, the second condition is satisfied (Yes determination).

次に楕円統合部33は、第1対象楕円250j及び第2対象楕円250iが第3条件を満たすか否かを判定する(ステップs348)。図22に示されるように、第1対象楕円250j及び第2対象楕円250iを統合して得られる統合楕円250kの大きさは小さいことから、第3条件は満たされる(Yes判定)。   Next, the ellipse integration unit 33 determines whether or not the first target ellipse 250j and the second target ellipse 250i satisfy the third condition (step s348). As FIG. 22 shows, since the magnitude | size of the integrated ellipse 250k obtained by integrating the 1st object ellipse 250j and the 2nd object ellipse 250i is small, the 3rd condition is satisfy | filled (Yes determination).

次に楕円統合部33は、第1対象楕円250j及び第2対象楕円250iが1人の人に対して当てはめられたと判断する(ステップs349)。そして、楕円統合部33は、統合楕円250kを、第1対象楕円250j及び第2対象楕円250iの代わりに採用する(ステップs349)。   Next, the ellipse integration unit 33 determines that the first target ellipse 250j and the second target ellipse 250i have been applied to one person (step s349). Then, the ellipse integration unit 33 employs the integrated ellipse 250k instead of the first target ellipse 250j and the second target ellipse 250i (step s349).

次に楕円統合部33は、第1楕円群から第2対象楕円250iを削除する(ステップs350)。また楕円統合部33は、第1楕円群に対して統合楕円250kを追加する(ステップs350)。そして、楕円統合部33は、第1楕円群に楕円が2つ以上存在するか否かを判定する(ステップs341)。ここでは、第1楕円群には1つの楕円250kしか存在しないことからNoと判定される。楕円統合部33は、Noと判定すると楕円統合処理を終了する。   Next, the ellipse integration unit 33 deletes the second target ellipse 250i from the first ellipse group (step s350). The ellipse integration unit 33 adds the integrated ellipse 250k to the first ellipse group (step s350). Then, the ellipse integration unit 33 determines whether there are two or more ellipses in the first ellipse group (step s341). Here, it is determined No because only one ellipse 250k exists in the first ellipse group. If the ellipse integration unit 33 determines No, it ends the ellipse integration process.

図15〜22の例では、1人の人に当てはめられていた3つの楕円250g〜250iが統合され、それによって得られる新たな楕円250kが、当該3つの楕円250g〜250iの代わりに採用される。したがって、楕円統合処理後には、図22に示されるように、楕円250eと、楕円250fと、楕円250kとが残ることになる。当てはめ処理部11は、楕円250e,250f,250kに関する楕円特定情報を含む当てはめ処理結果を追跡処理部12に出力する。   15-22, three ellipses 250g to 250i fitted to one person are integrated, and a new ellipse 250k obtained thereby is adopted instead of the three ellipses 250g to 250i. . Therefore, after the ellipse integration process, as shown in FIG. 22, an ellipse 250e, an ellipse 250f, and an ellipse 250k remain. The fitting processing unit 11 outputs the fitting processing result including the ellipse specifying information regarding the ellipses 250e, 250f, and 250k to the tracking processing unit 12.

<第1条件の判定方法の詳細>
楕円統合部33は、2つの楕円が第1条件を満足するか否かを判定する場合には、当該2つの楕円のうちの一方の楕円の中心から、当該2つの楕円のうちの他方の楕円の中心までを結ぶ第2直線が、当該一方の楕円と交わる第1交点と、当該第2直線が当該他方の楕円と交わる第2交点との間の距離を、当該2つの楕円間の距離として求める。
<Details of first condition determination method>
When the ellipse integration unit 33 determines whether or not two ellipses satisfy the first condition, the ellipse integration unit 33 determines from the center of one of the two ellipses the other ellipse of the two ellipses. The distance between the first intersection where the second straight line connecting to the center of the first intersection intersects with the one ellipse and the second intersection where the second straight line intersects with the other ellipse is defined as the distance between the two ellipses. Ask.

例えば、図23に示される2つの楕円250m,250n間の距離を求める場合を考える。楕円統合部33は、楕円250mの中心251mから楕円250nの中心251nまでを結ぶ直線(線分)260を求める。そして、楕円統合部33は、直線260と楕円250mとの交点252mと、直線260と楕円250nとの交点252nとの間の距離dxを、楕円250m,250n間の距離とする。楕円統合部33は、ステップs346において、距離dxが第1しきい値以下か否かを判定することによって、楕円250m,250nが第1条件を満足するか否かを判定する。   For example, consider a case where the distance between two ellipses 250m and 250n shown in FIG. The ellipse integration unit 33 obtains a straight line (line segment) 260 connecting the center 251m of the ellipse 250m to the center 251n of the ellipse 250n. The ellipse integration unit 33 sets the distance dx between the intersection 252m between the straight line 260 and the ellipse 250m and the intersection 252n between the straight line 260 and the ellipse 250n as the distance between the ellipses 250m and 250n. In step s346, the ellipse integration unit 33 determines whether or not the ellipses 250m and 250n satisfy the first condition by determining whether or not the distance dx is equal to or less than the first threshold value.

なお、2つの楕円間の距離として、当該2つの楕円の中心間の距離を採用しても良い。この場合には、2つの楕円が互いに近くに存在するにもかかわらず、第1条件が満足されないことがある。例えば、上述の図23に示されるように、2つの楕円250m,250nのうち、少なくとも一方の楕円250nにおける、中心251nと交点252nとの間の距離dnが大きい場合、中心251m,251n間の距離dmnが大きくなる。そのため、楕円250m,250nが互いに近くに存在するにもかかわらず、第1条件が満足されないことがある。一方で、上述の距離dxを楕円250m,250n間の距離として採用する場合には、そのようなことなく、楕円250m,250nが互いに近くに存在することを適切に判定することができる。よって、楕円250m,250nが1人の人に当てはめられているか否かをより正しく判定することができる。   Note that the distance between the centers of the two ellipses may be adopted as the distance between the two ellipses. In this case, the first condition may not be satisfied even though the two ellipses are close to each other. For example, as shown in FIG. 23 described above, when the distance dn between the center 251n and the intersection 252n is large in at least one of the two ellipses 250m and 250n, the distance between the centers 251m and 251n. dmn increases. Therefore, the first condition may not be satisfied even though the ellipses 250m and 250n are close to each other. On the other hand, when the above-described distance dx is adopted as the distance between the ellipses 250m and 250n, it can be appropriately determined that the ellipses 250m and 250n are close to each other without such a situation. Therefore, it can be more correctly determined whether or not the ellipses 250m and 250n are applied to one person.

<第2条件の判定方法の詳細>
図24は、楕円統合部33が、2つの楕円が、入力画像140上において、その中心から延びる1本の直線上に位置しているか否かを判定する方法の一例を説明するための図である。図24では入力画像140上に2つの楕円250p,250qが配置されている。
<Details of second condition determination method>
FIG. 24 is a diagram for explaining an example of a method by which the ellipse integration unit 33 determines whether or not two ellipses are located on one straight line extending from the center of the input image 140. is there. In FIG. 24, two ellipses 250p and 250q are arranged on the input image 140.

楕円統合部33は、2つの楕円250p,250qが、入力画像140上において、その中心141から延びる1本の直線上に位置しているか否かを判定する場合には、入力画像140上において、中心141から、2つの楕円250p,250qのうちの一方の楕円250の中心まで延びる第1ベクトルを求める。また、楕円統合部33は、入力画像140上において、当該一方の楕円250の中心から、2つの楕円250p,250qのうちの他方の楕円250の中心まで延びる第2ベクトルを求める。図24の例では、中心141から楕円250qの中心251qまで延びるベクトルを第1ベクトル271としている。また、楕円250qの中心251qから、楕円250pの中心251pまで延びるベクトルを第2ベクトル272としている。   When the ellipse integration unit 33 determines whether or not the two ellipses 250p and 250q are located on one straight line extending from the center 141 on the input image 140, on the input image 140, A first vector extending from the center 141 to the center of one of the two ellipses 250p and 250q is obtained. In addition, the ellipse integration unit 33 obtains a second vector extending from the center of the one ellipse 250 to the center of the other ellipse 250 of the two ellipses 250p and 250q on the input image 140. In the example of FIG. 24, a vector extending from the center 141 to the center 251q of the ellipse 250q is a first vector 271. A vector extending from the center 251q of the ellipse 250q to the center 251p of the ellipse 250p is defined as a second vector 272.

次に楕円統合部33は、第1ベクトル271と第2ベクトル272とが成す角度αを求める。図25は角度αを示す図である。次に楕円統合部33は、角度αが90度以下であるか否かを判定する。楕円統合部33は、α≦90度であれば、角度αを判定角度βとする。一方で、楕円統合部33は、α>90度であれば、(180°−α)を判定角度βとする。図25に示される角度αは90度以下であることから、角度αがそのまま判定角度βとなる。   Next, the ellipse integration unit 33 obtains an angle α formed by the first vector 271 and the second vector 272. FIG. 25 is a diagram showing the angle α. Next, the ellipse integration unit 33 determines whether or not the angle α is 90 degrees or less. If α ≦ 90 degrees, the ellipse integration unit 33 sets the angle α as the determination angle β. On the other hand, if α> 90 degrees, the ellipse integration unit 33 sets (180 ° −α) as the determination angle β. Since the angle α shown in FIG. 25 is 90 degrees or less, the angle α becomes the determination angle β as it is.

次に楕円統合部33は、判定角度βが第3しきい値以下であるか否かを判定する。第3しきい値は例えば数度以下に設定される。楕円統合部33は、判定角度βが第3しきい値以下であれば、2つの楕円250p,250qが、入力画像140上において、中心141から延びる1本の直線上に位置していると判定する。つまり、楕円統合部33は、2つの楕円250p,250qが、入力画像140上において、中心141から外側に向かう方向に沿って並んでいると判定する。一方で、楕円統合部33は、判定角度βが第3しきい値よりも大きければ、2つの楕円250p,250qが、入力画像140上において、中心141から延びる1本の直線上に位置していないと判定する。つまり、楕円統合部33は、2つの楕円250p,250qが、入力画像140上において、中心141から外側に向かう方向に沿って並んでいないと判定する。図24,25の例では、判定角度βは第3しきい値以下となり、図26に示されるように、2つの楕円250p,250qが、入力画像140上において、中心141から延びる1本の直線142上に位置していると判定される。つまり、2つの楕円250p,250qの第2条件が満足されると判定される。   Next, the ellipse integration unit 33 determines whether the determination angle β is equal to or smaller than the third threshold value. For example, the third threshold value is set to several degrees or less. If the determination angle β is equal to or smaller than the third threshold value, the ellipse integration unit 33 determines that the two ellipses 250p and 250q are located on one straight line extending from the center 141 on the input image 140. To do. That is, the ellipse integration unit 33 determines that the two ellipses 250p and 250q are arranged along the direction from the center 141 toward the outside on the input image 140. On the other hand, if the determination angle β is larger than the third threshold value, the ellipse integration unit 33 positions the two ellipses 250p and 250q on one straight line extending from the center 141 on the input image 140. Judge that there is no. That is, the ellipse integration unit 33 determines that the two ellipses 250p and 250q are not aligned along the direction from the center 141 toward the outside on the input image 140. 24 and 25, the determination angle β is equal to or smaller than the third threshold value, and two ellipses 250p and 250q extend from the center 141 on the input image 140 as shown in FIG. 142 is determined to be located on the top. That is, it is determined that the second condition of the two ellipses 250p and 250q is satisfied.

なお、楕円統合部33は、判定角度βが第3しきい値未満であれば、2つの楕円250p,250qが、入力画像140上において、中心141から延びる1本の直線上に位置していると判定し、判定角度βが第3しきい値以上であれば、2つの楕円250p,250qが、入力画像140上において、中心141から延びる1本の直線上に位置していないと判定しても良い。   In the ellipse integration unit 33, if the determination angle β is less than the third threshold value, the two ellipses 250p and 250q are positioned on one straight line extending from the center 141 on the input image 140. If the determination angle β is equal to or greater than the third threshold value, it is determined that the two ellipses 250p and 250q are not located on one straight line extending from the center 141 on the input image 140. Also good.

また、図27に示されるように、中心141から楕円250pの中心251pまで延びるベクトルを第1ベクトル271とし、楕円250pの中心251pから、楕円250qの中心251qまで延びるベクトルを第2ベクトル272としても良い。この場合には、図28に示されるように、第1ベクトル271と第2ベクトル272との成す角度αは90度よりも大きくなる。したがって、判定角度βは(180度−α)となる。   27, a vector extending from the center 141 to the center 251p of the ellipse 250p is a first vector 271 and a vector extending from the center 251p of the ellipse 250p to the center 251q of the ellipse 250q is a second vector 272. good. In this case, as shown in FIG. 28, the angle α formed by the first vector 271 and the second vector 272 is greater than 90 degrees. Therefore, the determination angle β is (180 degrees−α).

また、上記の例では、第1ベクトル271及び第2ベクトル272が成す角度αから判定角度βを決定していたが、図29に示されるように、入力画像140の中心141から、2つの楕円250p,250qの中心251p,251qまでそれぞれ延びる2つのベクトル273が成す、180°以下の角度を、判定角度βとして採用しても良い。   In the above example, the determination angle β is determined from the angle α formed by the first vector 271 and the second vector 272. However, as shown in FIG. 29, two ellipses are formed from the center 141 of the input image 140. An angle of 180 ° or less formed by two vectors 273 extending to the centers 251p and 251q of 250p and 250q, respectively, may be adopted as the determination angle β.

<第3条件の判定方法の詳細>
図30は、楕円統合部33が2つの楕円を統合する方法の一例を説明するための図である。図30には、2つの楕円250r,250s(破線)と、それらが統合して得られる統合楕円250t(実線)とが示されている。
<Details of third condition determination method>
FIG. 30 is a diagram for explaining an example of a method by which the ellipse integration unit 33 integrates two ellipses. FIG. 30 shows two ellipses 250r and 250s (broken lines) and an integrated ellipse 250t (solid line) obtained by integrating them.

楕円統合部33は、2つの楕円250r,250sを統合する際には、楕円250r,250sの中心251r,251sを通る直線280を求める。そして、楕円統合部33は、楕円250rと直線280とが交わる2つの交点のうち、楕円250s側とは反対側の交点253s(楕円250sに対して遠い側の交点)を求める。また、楕円統合部33は、楕円250sと直線280とが交わる2つの交点のうち、楕円250r側とは反対側の交点253s(楕円250rに対して遠い側の交点)を求める。そして、楕円統合部33は、交点253rと交点253sとを結ぶ線分を長軸255tとする楕円250tを求める。このとき、楕円統合部33は、長軸255tの長さの所定割合を、楕円250tの短軸256tの長さとする。この所定割合は、例えば、一般的な人の身幅に対する背の高さの割合と同じ値に設定される。楕円統合部33は、求めた楕円250tを、2つの楕円250s,250rの統合楕円とする。なお、統合楕円の求め方はこれ以外であっても良い。   When integrating the two ellipses 250r and 250s, the ellipse integration unit 33 obtains a straight line 280 passing through the centers 251r and 251s of the ellipses 250r and 250s. Then, the ellipse integration unit 33 obtains an intersection 253s (an intersection far from the ellipse 250s) on the side opposite to the ellipse 250s among the two intersections where the ellipse 250r and the straight line 280 intersect. In addition, the ellipse integration unit 33 obtains an intersection 253s (an intersection far from the ellipse 250r) on the opposite side to the ellipse 250r among the two intersections where the ellipse 250s and the straight line 280 intersect. Then, the ellipse integration unit 33 obtains an ellipse 250t having a long axis 255t as a line segment connecting the intersection 253r and the intersection 253s. At this time, the ellipse integration unit 33 sets a predetermined ratio of the length of the major axis 255t as the length of the minor axis 256t of the ellipse 250t. This predetermined ratio is set to the same value as, for example, the ratio of the height of the person to the width of a general person. The ellipse integration unit 33 sets the obtained ellipse 250t as an integrated ellipse of the two ellipses 250s and 250r. Note that the method for obtaining the integrated ellipse may be other than this.

楕円統合部33は、求めた楕円250tの大きさが第2しきい値以上であるか否かを判定することによって、2つの楕円250r,250sが第3条件を満足するか否かを判定する。楕円統合部33は、楕円250tの大きさとして、楕円250tの面積を採用する。また楕円統合部33は、楕円250tの大きさとして、楕円250tの長軸長を採用しても良い。   The ellipse integration unit 33 determines whether or not the two ellipses 250r and 250s satisfy the third condition by determining whether or not the size of the obtained ellipse 250t is greater than or equal to the second threshold value. . The ellipse integration unit 33 adopts the area of the ellipse 250t as the size of the ellipse 250t. The ellipse integration unit 33 may adopt the major axis length of the ellipse 250t as the size of the ellipse 250t.

<追跡処理部の詳細>
次に追跡処理部12について詳細に説明する。図31は、追跡処理部12の構成を示す図である。図31に示されるように、追跡処理部12は、対応特定部40及び更新部44を備えている。対応特定部40は、1次特定部41、2次特定部42及び3次特定部43を備えている。追跡処理部12は、追跡処理において、当てはめ処理部11で得られる当てはめ処理結果170に基づいて記憶部5内の追跡情報50を更新することによって、入力画像140上での楕円の位置を追跡する。追跡情報50はフレームごとに更新される。つまり、追跡情報50は、カメラ2から画像処理装置3に撮影画像100が入力されるたびに、言い換えれば、画像処理部10で入力画像140が生成されるたびに更新される。
<Details of the tracking processor>
Next, the tracking processing unit 12 will be described in detail. FIG. 31 is a diagram illustrating a configuration of the tracking processing unit 12. As shown in FIG. 31, the tracking processing unit 12 includes a correspondence specifying unit 40 and an updating unit 44. The correspondence specifying unit 40 includes a primary specifying unit 41, a secondary specifying unit 42, and a tertiary specifying unit 43. In the tracking process, the tracking processing unit 12 tracks the position of the ellipse on the input image 140 by updating the tracking information 50 in the storage unit 5 based on the fitting process result 170 obtained by the fitting processing unit 11. . The tracking information 50 is updated for each frame. That is, the tracking information 50 is updated every time the captured image 100 is input from the camera 2 to the image processing apparatus 3, in other words, every time the input image 140 is generated by the image processing unit 10.

<追跡情報について>
追跡情報50には、入力画像140に写る人(撮影画像110に写る人)に当てはめられた楕円に関する図形情報500が含まれている。追跡処理部12は、楕円について図形情報500をフレームごとに更新することによって、入力画像140上での当該楕円の位置を追跡する。図形情報500は、基本的には、1つの楕円について1つ存在する。
<About tracking information>
The tracking information 50 includes graphic information 500 regarding an ellipse applied to a person shown in the input image 140 (a person shown in the captured image 110). The tracking processing unit 12 tracks the position of the ellipse on the input image 140 by updating the graphic information 500 for the ellipse for each frame. Basically, one graphic information 500 exists for one ellipse.

図32は図形情報500の一例を示す図である。図32に示されるように、図形情報500には、ID501、状態情報502及び楕円特定情報503が含まれる。また、図形情報500には、消失時刻504が含まれることがある。また、図形情報500には、併合相手ID505及び併合数506が含まれることがある。   FIG. 32 is a diagram showing an example of the graphic information 500. As shown in FIG. 32, the graphic information 500 includes an ID 501, state information 502, and ellipse specifying information 503. Further, the graphic information 500 may include a disappearance time 504. Further, the graphic information 500 may include a merge partner ID 505 and a merge number 506.

図形情報500に含まれるID501は、当該図形情報500に対応する楕円を識別するための識別情報である。ID501は、図形情報500を識別するための識別情報であるとも言える。また、ID501は、図形情報500に対応する楕円に対応する人を識別するための識別情報であるとも言える。   The ID 501 included in the graphic information 500 is identification information for identifying an ellipse corresponding to the graphic information 500. It can be said that the ID 501 is identification information for identifying the graphic information 500. It can also be said that the ID 501 is identification information for identifying a person corresponding to the ellipse corresponding to the graphic information 500.

図形情報500に含まれる楕円特定情報503は、当該図形情報500に対応する楕円を特定するための情報である。楕円特定情報503には、楕円の中心座標、長軸長、短軸長及び傾きが含まれている。したがって、楕円特定情報503により、楕円の位置及び形状が特定される。図形情報500に含まれる楕円特定情報503は、当該図形情報500に対応する楕円についての入力画像140上の最新の位置を示していると言える。言い換えれば、図形情報500に含まれる楕円特定情報503は、当該図形情報500に対応する楕円に対応する人についての撮影画像110上の最新の位置を示していると言える。さらに言い換えれば、図形情報500に含まれる楕円特定情報503は、当該図形情報500に対応する楕円に対応する人についての室内300での最新の位置(現在の位置)を示していると言える。追跡処理部12は、楕円特定情報503を更新することによって、当該楕円特定情報503に対応する楕円の位置を追跡する。   The ellipse specifying information 503 included in the graphic information 500 is information for specifying an ellipse corresponding to the graphic information 500. The ellipse identification information 503 includes the center coordinates, major axis length, minor axis length, and inclination of the ellipse. Therefore, the ellipse specifying information 503 specifies the position and shape of the ellipse. It can be said that the ellipse specifying information 503 included in the graphic information 500 indicates the latest position on the input image 140 for the ellipse corresponding to the graphic information 500. In other words, it can be said that the ellipse specifying information 503 included in the graphic information 500 indicates the latest position on the photographed image 110 for the person corresponding to the ellipse corresponding to the graphic information 500. In other words, it can be said that the ellipse specifying information 503 included in the graphic information 500 indicates the latest position (current position) in the room 300 of the person corresponding to the ellipse corresponding to the graphic information 500. The tracking processing unit 12 tracks the position of the ellipse corresponding to the ellipse specifying information 503 by updating the ellipse specifying information 503.

図形情報500に含まれる状態情報502は、追跡処理部12が検出した、当該図形情報500に対応する楕円の状態を示す情報である。追跡処理部12は、当てはめ処理結果170に基づいて入力画像140上での楕円の状態を検出し、その検出結果に基づいて、当該楕円についての図形情報500に含まれる状態情報502を更新する。状態情報502の種類としては、「出現」、「存在」、「消失」、「併合」及び「被併合」の5種類がある。   The state information 502 included in the graphic information 500 is information indicating the state of the ellipse corresponding to the graphic information 500 detected by the tracking processing unit 12. The tracking processing unit 12 detects the state of the ellipse on the input image 140 based on the fitting processing result 170, and updates the state information 502 included in the graphic information 500 about the ellipse based on the detection result. There are five types of status information 502: “appearance”, “existence”, “disappearance”, “merge”, and “merge”.

ここで、本例では、便宜上、入力画像140に写る人に対して楕円を当てはめた結果、入力画像140上に楕円が現れると考える。また、複数の人に対して1つの新しい楕円が当てはめられた場合には、当該複数の人に当てはめられていた複数の前の楕円のうちの1つの前の楕円が当該1つの新しい楕円となり、当該1つの新しい楕円が、当該複数の前の楕円のうちの残りの前の楕円を併合したと考える。   Here, in this example, for convenience, it is considered that an ellipse appears on the input image 140 as a result of fitting the ellipse to the person shown in the input image 140. When one new ellipse is applied to a plurality of people, one previous ellipse among the plurality of previous ellipses applied to the plurality of people becomes the one new ellipse, Consider that the one new ellipse merges the remaining previous ellipses of the plurality of previous ellipses.

追跡処理部12は、入力画面140上においてある楕円が初めて現れたと判定した場合には、当該ある楕円の図形情報500に含まれる状態情報502を「出現」に設定する。したがって、図形情報500に含まれる「出現」を示す状態情報502は、当該図形情報500に対応する楕円が入力画面140上に初めて現れたことを示している。楕円が入力画像140上に初めて現れたことは、当該楕円に対応する人が、入力画面140(撮影画像110)に初めて現れたことを意味している。したがって、図形情報500に含まれる「出現」を示す状態情報502は、当該図形情報500に対応する人が入力画面140(撮影画像110)に初めて現れたことを示している。   When the tracking processing unit 12 determines that an ellipse appears on the input screen 140 for the first time, the tracking processing unit 12 sets the state information 502 included in the graphic information 500 of the certain ellipse to “appear”. Therefore, the state information 502 indicating “appearance” included in the graphic information 500 indicates that an ellipse corresponding to the graphic information 500 has appeared on the input screen 140 for the first time. The first appearance of an ellipse on the input image 140 means that a person corresponding to the ellipse has first appeared on the input screen 140 (captured image 110). Therefore, the state information 502 indicating “appearance” included in the graphic information 500 indicates that a person corresponding to the graphic information 500 first appears on the input screen 140 (the photographed image 110).

追跡処理部12は、入力画面140上に現れていた楕円が、入力画面140上に現れなくなったと判定した場合には、当該楕円の図形情報500に含まれる状態情報502を「消失」に設定する。したがって、図形情報500に含まれる「消失」を示す状態情報502は、当該図形情報500に対応する楕円が入力画面140上に現れなくなったことを示している。入力画像140上に現れていた楕円が入力画像140上に現れなくなることは、当該楕円に対応する人が、入力画面140(撮影画像110)に写らなくなったことを意味している。したがって、図形情報500に含まれる「消失」を示す状態情報502は、当該図形情報500に対応する人が入力画面140(撮影画像110)に写らなくなったことを示している。   When it is determined that the ellipse that has appeared on the input screen 140 no longer appears on the input screen 140, the tracking processing unit 12 sets the state information 502 included in the graphic information 500 of the ellipse to “disappear”. . Therefore, the state information 502 indicating “disappearance” included in the graphic information 500 indicates that an ellipse corresponding to the graphic information 500 does not appear on the input screen 140. The fact that the ellipse that appeared on the input image 140 does not appear on the input image 140 means that the person corresponding to the ellipse is no longer shown on the input screen 140 (the photographed image 110). Therefore, the state information 502 indicating “disappearance” included in the graphic information 500 indicates that the person corresponding to the graphic information 500 is no longer displayed on the input screen 140 (captured image 110).

追跡処理部12は、ある楕円が、継続して、入力画面140上に現れていると判定した場合には、当該ある楕円の図形情報500に含まれる状態情報502を「存在」に設定する。したがって、図形情報500に含まれる「存在」を示す状態情報502は、当該図形情報500に対応する楕円が、継続して、入力画面140上に現れていることを示している。本例では、ある楕円が、2フレーム以上連続して入力画像140上に現れている場合には、当該ある楕円についての図形情報500に含まれる状態情報502が「存在」に設定される。ただし、追跡処理部12は、ある楕円が入力画面140上に現れなくなってから所定時間以内に入力画像140に再度現れるようになった場合には、当該ある楕円についての図形情報500に含まれる状態情報502を、「消失」から、「出現」ではなく「存在」に変更する。入力画像140上において継続して楕円が現れていることは、当該楕円に対応する人が、入力画面140(撮影画像110)において継続して写っていることを意味している。したがって、図形情報500に含まれる「存在」を示す状態情報502は、当該図形情報500に対応する人が、継続して、入力画面140(撮影画像110)に写っていることを示している。   When it is determined that a certain ellipse continues to appear on the input screen 140, the tracking processing unit 12 sets the state information 502 included in the graphic information 500 of the certain ellipse to “exist”. Therefore, the state information 502 indicating “existence” included in the graphic information 500 indicates that an ellipse corresponding to the graphic information 500 continuously appears on the input screen 140. In this example, when a certain ellipse appears on the input image 140 continuously for two or more frames, the state information 502 included in the graphic information 500 for the certain ellipse is set to “exist”. However, when a certain ellipse does not appear on the input screen 140 again and appears again in the input image 140 within a predetermined time, the tracking processing unit 12 includes a state included in the graphic information 500 regarding the certain ellipse. The information 502 is changed from “disappearance” to “existence” instead of “appearance”. The continuous appearance of an ellipse on the input image 140 means that a person corresponding to the ellipse is continuously captured on the input screen 140 (the captured image 110). Therefore, the state information 502 indicating “existence” included in the graphic information 500 indicates that the person corresponding to the graphic information 500 is continuously reflected in the input screen 140 (the photographed image 110).

追跡処理部12は、ある楕円が他の楕円を併合したと判定した場合には、当該ある楕円の図形情報500に含まれる状態情報502を「併合」に設定する。したがって、図形情報500に含まれる「併合」を示す状態情報502は、当該図形情報500に対応する楕円が他の楕円を併合していることを示している。   When it is determined that a certain ellipse merges another ellipse, the tracking processing unit 12 sets the state information 502 included in the graphic information 500 of the certain ellipse to “merged”. Therefore, the state information 502 indicating “merged” included in the graphic information 500 indicates that the ellipse corresponding to the graphic information 500 is merged with another ellipse.

追跡処理部12は、ある楕円が他の楕円に併合されたと判定した場合には、当該ある楕円の図形情報500に含まれる状態情報502を「被併合」に設定する。したがって、図形情報500に含まれる「被併合」を示す状態情報502は、当該図形情報500に対応する楕円が他の楕円に併合されていることを示している。   When it is determined that a certain ellipse has been merged with another ellipse, the tracking processing unit 12 sets the state information 502 included in the graphic information 500 of the certain ellipse to “merged”. Therefore, the state information 502 indicating “merge” included in the graphic information 500 indicates that the ellipse corresponding to the graphic information 500 is merged with another ellipse.

本例では、「併合」及び「被併合」は、複数の人に対して1つの楕円が当てはめられていることを単に意味しているだけであって、状態情報502が「併合」を示す楕円と、状態情報502が「被併合」を示す楕円との間において、入力画像140上での状態を区別するために使用しているわけではない。状態が「併合」の楕円と、状態が「被併合」との楕円とは同一であるが、本例では便宜上別々の楕円として扱っている。図形情報500の状態情報502が、どのような基準で「併合」に設定されるのか、「被併合」に設定されるのかについては、後の説明から明らかになる。   In this example, “merge” and “merge” simply mean that one ellipse is applied to a plurality of people, and the state information 502 is an ellipse indicating “merge”. And the state information 502 is not used to distinguish the state on the input image 140 between the ellipse indicating “merged”. An ellipse whose state is “merged” and an ellipse whose state is “merged” are the same, but in this example, they are treated as separate ellipses for convenience. It will become clear from the following description how the status information 502 of the graphic information 500 is set to “merged” or “merged”.

ここで、入力画像140において複数の人が互いに近くに写っている場合には、入力画像140に含まれる、当該複数の人を示す複数の人領域は繋がっている可能性が高い。したがって、当てはめ処理部11では、入力画像140において互いに近くに写る複数の人に対して、1つの楕円が当てはめられる可能性が高い。よって、図形情報500に含まれる「併合」あるいは「被併合」を示す状態情報502は、当該図形情報500に対応する人が、入力画像140において、他の人の近くに写っていることを示していると言える。   Here, in the case where a plurality of people appear close to each other in the input image 140, there is a high possibility that a plurality of person areas indicating the plurality of persons included in the input image 140 are connected. Therefore, in the fitting processing unit 11, there is a high possibility that one ellipse is fitted to a plurality of people appearing close to each other in the input image 140. Therefore, the state information 502 indicating “merge” or “merge” included in the graphic information 500 indicates that the person corresponding to the graphic information 500 is reflected in the input image 140 near another person. It can be said that.

以上の説明から理解できるように、図形情報500に含まれる状態情報502は、入力画像140上での楕円の状態を示す情報であるとともに、入力画像140上での人の状態を示す情報である。状態情報502は、撮影画像110上での人の状態を示す情報であるとも言えるし、室内300での人の状態を示す情報であると言える。   As can be understood from the above description, the state information 502 included in the graphic information 500 is information indicating the state of the ellipse on the input image 140 and information indicating the state of the person on the input image 140. . It can be said that the state information 502 is information indicating the state of a person on the captured image 110, or can be said to be information indicating the state of a person in the room 300.

図形情報500に含まれる消失時刻504は、追跡処理部12が、入力画面140上に現れていた楕円が、入力画面140上に現れなくなったと判定した時刻を示している。したがって、図形情報500に含まれる状態情報502が「消失」を示すときには、当該図形情報500に消失時刻504が含まれる。一方で、図形情報500に含まれる状態情報502が「消失」以外を示すときには、当該図形情報500に消失時刻504が含まれない。後述するように、図形情報500に含まれる消失時刻504が、現在時刻よりも所定時間以上前の場合には、当該図形情報500は追跡情報50から消去される。つまり、入力画像140上に楕円が現れなくなってから所定時間経過した後に、当該楕円の図形情報500が消去される。言い換えれば、入力画像140に人が写らなくなってから所定時間が経過した後に、当該人に対応する楕円の図形情報500は消去される。   The disappearance time 504 included in the graphic information 500 indicates the time when the tracking processing unit 12 determines that the ellipse that appeared on the input screen 140 no longer appears on the input screen 140. Therefore, when the state information 502 included in the graphic information 500 indicates “disappearance”, the disappearance time 504 is included in the graphic information 500. On the other hand, when the state information 502 included in the graphic information 500 indicates other than “disappearance”, the disappearance time 504 is not included in the graphic information 500. As will be described later, when the disappearance time 504 included in the graphic information 500 is more than a predetermined time before the current time, the graphic information 500 is deleted from the tracking information 50. That is, the graphic information 500 of the ellipse is deleted after a predetermined time has elapsed since the ellipse no longer appears on the input image 140. In other words, the ellipse graphic information 500 corresponding to the person is deleted after a predetermined time has passed since the person was not shown in the input image 140.

図形情報500に含まれる併合相手ID505は、当該図形情報500に含まれる状態情報502が「併合」を示す場合に、当該図形情報500に対応する楕円が併合している楕円の図形情報500に含まれるID501を示している。図形情報500に対応する楕円が複数の楕円を併合している場合には、当該図形情報500に含まれる併合相手ID505には複数のID501が含まれる。図形情報500に含まれる状態情報502が「併合」以外を示す場合には、当該図形情報500には併合相手ID505は含まれない。   The merge partner ID 505 included in the graphic information 500 is included in the graphic information 500 of the ellipse in which the ellipses corresponding to the graphic information 500 are merged when the state information 502 included in the graphic information 500 indicates “merged”. ID 501 is shown. When the ellipse corresponding to the graphic information 500 merges a plurality of ellipses, the merge partner ID 505 included in the graphic information 500 includes a plurality of IDs 501. When the status information 502 included in the graphic information 500 indicates other than “merged”, the graphic partner 500 does not include the merge partner ID 505.

図形情報500に含まれる併合数506は、当該図形情報500に含まれる状態情報502が「併合」を示す場合に、当該図形情報500に対応する楕円が併合している楕円の数を示している。図形情報500に含まれる併合数506がN個(N≧1)を示す場合には、当該図形情報500に対応する楕円はN個の楕円を併合している。図形情報500に含まれる併合数506がN個を示す場合には、当該図形情報500に対応する楕円は(N+1)人の人に対して当てはめられていると言える。図形情報500に含まれる状態情報502が「併合」以外を示す場合には、当該図形情報500には併合数506は含まれない。   The number of merges 506 included in the graphic information 500 indicates the number of ellipses in which the ellipses corresponding to the graphic information 500 are merged when the state information 502 included in the graphic information 500 indicates “merge”. . When the number of merges 506 included in the graphic information 500 indicates N (N ≧ 1), the ellipse corresponding to the graphic information 500 is merged with N ellipses. When the number of merges 506 included in the graphic information 500 indicates N, it can be said that the ellipse corresponding to the graphic information 500 is applied to (N + 1) people. When the state information 502 included in the graphic information 500 indicates other than “merged”, the graphic information 500 does not include the merged number 506.

以後、状態が「併合」を示す楕円、つまり他の楕円を併合している楕円を「併合主体楕円」と呼ぶことがある。また、状態が「被併合」を示す楕円、つまり他の楕円に併合されている楕円を「被併合楕円」と呼ぶことがある。そして、併合主体楕円と、当該併合主体楕円が併合している被併合楕円とから成る楕円グループを「併合楕円グループ」と呼ぶことがある。また、状態が「出現」を示す楕円を「出現楕円」と呼び、状態が「消失」を示す楕円を「消失楕円」と呼ぶことがある。   Hereinafter, an ellipse whose state indicates “merged”, that is, an ellipse that is merged with another ellipse may be referred to as a “merging main ellipse”. In addition, an ellipse whose state indicates “merged”, that is, an ellipse merged with another ellipse may be referred to as a “merged ellipse”. An ellipse group including a merged ellipse and a merged ellipse in which the merged ellipse is merged may be referred to as a “merged ellipse group”. In addition, an ellipse whose state indicates “appearance” may be referred to as “appearance ellipse”, and an ellipse whose state indicates “disappearance” may be referred to as “disappearance ellipse”.

<追跡処理部の各構成について>
次に追跡処理部12についての図31に示される各構成について説明する。以下では、前フレームでの当てはめ処理と言えば、前フレームの入力画像140についての当てはめ処理を意味し、現フレームでの当てはめ処理と言えば、現フレームの入力画像140についての当てはめ処理を意味する。また、前フレームでの当てはめ処理において得られた楕円を「第1楕円」と呼ぶことがある。また、現フレームでの当てはめ処理において得られた楕円を「第2楕円」と呼ぶことがある。また、併合主体楕円の第1楕円を「併合主体第1楕円」と呼び、併合主体楕円の第2楕円を「併合主体第2楕円」と呼ぶことがある。そして、被併合楕円の第1楕円を「被併合第1楕円」と呼び、被併合楕円の第2楕円を「被併合第2楕円」と呼ぶことがある。
<About each component of the tracking processor>
Next, each configuration shown in FIG. 31 for the tracking processing unit 12 will be described. Hereinafter, the fitting process in the previous frame means the fitting process for the input image 140 of the previous frame, and the fitting process in the current frame means the fitting process for the input image 140 in the current frame. . In addition, the ellipse obtained in the fitting process in the previous frame may be referred to as a “first ellipse”. In addition, the ellipse obtained in the fitting process in the current frame may be referred to as a “second ellipse”. Further, the first ellipse of the merged subject ellipse may be referred to as “merged subject first ellipse”, and the second ellipse of the merged subject ellipse may be referred to as “merged subject second ellipse”. The first ellipse of the merged ellipse may be referred to as “merge first ellipse”, and the second ellipse of the merged ellipse may be referred to as “merge second ellipse”.

当てはめ処理部11で得られる当てはめ処理結果170は、現フレームでの当てはめ処理で得られた第2楕円を示す楕円特定情報が含まれている。一方で、追跡処理部12に当てはめ処理結果170が入力された時点での記憶部5内の追跡情報50は、前フレームでの当てはめ処理で得られた第1楕円を示す図形情報500が含まれている。言い換えれば、当てはめ処理結果170に基づいて更新される前の追跡情報50には、前フレームでの当てはめ処理で得られた第1楕円を示す図形情報500が含まれている。したがって、更新前の追跡情報50は、前フレームでの当てはめ処理の結果を示していると言える。また、追跡情報50には、前フレームでの当てはめ処理よりも前の当てはめ処理で得られた楕円であって、すでに入力画像140上に現れなくなった楕円である消失楕円の図形情報500が含まれることもある。   The fitting process result 170 obtained by the fitting processing unit 11 includes ellipse specifying information indicating the second ellipse obtained by the fitting process in the current frame. On the other hand, the tracking information 50 in the storage unit 5 when the fitting process result 170 is input to the tracking processing unit 12 includes graphic information 500 indicating the first ellipse obtained by the fitting process in the previous frame. ing. In other words, the tracking information 50 before being updated based on the fitting process result 170 includes graphic information 500 indicating the first ellipse obtained by the fitting process in the previous frame. Therefore, it can be said that the tracking information 50 before the update indicates the result of the fitting process in the previous frame. Further, the tracking information 50 includes the ellipse graphic information 500 that is an ellipse obtained by the fitting process prior to the fitting process in the previous frame and that has already disappeared on the input image 140. Sometimes.

本例では、追跡処理部12は、画像処理部10で入力画像140が生成されるたびに、当該入力画像140についての当てはめ処理結果170と、記憶部50内の追跡情報50とに基づいて、前フレームでの当てはめ処理で得られた各第1楕円について、現フレームでの当てはめ処理で得られた、当該第1楕円に対応する第2楕円を特定する第1対応特定処理を行う。第1楕円に対応する第2楕円とは、第1楕円が当てはめられた人と同じ人に当てはめられた第2楕円である。さらに、追跡処理部12は、追跡情報50に消失楕円の図形情報500が含まれている場合には、当該図形情報500に基づいて、当該図形情報500が示す消失楕円に対応する第2楕円を特定する第2対応特定処理を行う。消失楕円に対応する第2楕円とは、消失楕円が当てはめられていた人と同じ人に当てはめられた第2楕円である。これにより、追跡処理部12は、入力画像140上での楕円の位置を追跡することができる。以後、第1対応特定処理及び第2対応特定処理をまとめて「対応特定処理」と呼ぶことがある。   In this example, every time the input image 140 is generated by the image processing unit 10, the tracking processing unit 12 is based on the fitting processing result 170 for the input image 140 and the tracking information 50 in the storage unit 50. For each first ellipse obtained by the fitting process in the previous frame, a first correspondence identifying process for identifying the second ellipse corresponding to the first ellipse obtained by the fitting process in the current frame is performed. The second ellipse corresponding to the first ellipse is a second ellipse applied to the same person as the person to whom the first ellipse was applied. Further, when the tracking information 50 includes the disappearing ellipse graphic information 500, the tracking processing unit 12 selects a second ellipse corresponding to the disappearing ellipse indicated by the graphic information 500 based on the graphic information 500. A second correspondence specifying process for specifying is performed. The second ellipse corresponding to the disappearing ellipse is a second ellipse applied to the same person as the person who has applied the disappearing ellipse. Thereby, the tracking processing unit 12 can track the position of the ellipse on the input image 140. Hereinafter, the first correspondence specifying process and the second correspondence specifying process may be collectively referred to as “correspondence specifying process”.

追跡処理部12では、対応特定部40が対応特定処理を行う。そして、更新部44が、対応特定部40での対応特定処理の結果に基づいて、記憶部5内の追跡情報50を更新する。これより、入力画像140上での楕円の位置が追跡される。つまり、入力画像140上での人の位置が追跡される。   In the tracking processing unit 12, the correspondence specifying unit 40 performs a correspondence specifying process. Then, the update unit 44 updates the tracking information 50 in the storage unit 5 based on the result of the correspondence specifying process in the correspondence specifying unit 40. Thereby, the position of the ellipse on the input image 140 is tracked. That is, the position of a person on the input image 140 is tracked.

図33は追跡処理部12での追跡処理を示すフローチャートである。図33に示されるように、ステップs41にいて、対応特定部40の1次特定部41は1次特定処理を行う。次にステップs42において、更新部44は、1次特定処理の結果に基づいて追跡情報50を更新する1次更新処理を行う。以後、1次特定処理と1次更新処理とをあわせて「1次処理」と呼ぶ。   FIG. 33 is a flowchart showing the tracking process in the tracking processing unit 12. As shown in FIG. 33, in step s41, the primary specifying unit 41 of the correspondence specifying unit 40 performs a primary specifying process. Next, in step s42, the update unit 44 performs a primary update process for updating the tracking information 50 based on the result of the primary specifying process. Hereinafter, the primary identification process and the primary update process are collectively referred to as “primary process”.

次にステップs43において、対応特定部40の2次特定部42は2次特定処理を行う。次にステップs44において、更新部44は、2次特定処理の結果に基づいて追跡情報50を更新する2次更新処理を行う。以後、2次特定処理と2次更新処理とをあわせて「2次処理」と呼ぶ。   Next, in step s43, the secondary specifying unit 42 of the correspondence specifying unit 40 performs a secondary specifying process. Next, in step s44, the update unit 44 performs a secondary update process for updating the tracking information 50 based on the result of the secondary specifying process. Hereinafter, the secondary specifying process and the secondary update process are collectively referred to as “secondary process”.

次にステップs45において、更新部44は、追跡情報50に、消失楕円の図形情報500が含まれているか否かを判定する。追跡情報50に消失楕円の図形情報500が含まれている場合には、更新部44は、消失楕円の図形情報500に含まれる消失時刻504が、現在時刻よりも所定時間以上前であるか否かを判定する。更新部44は、図形情報500に含まれる消失時刻504が、現在時刻よりも所定時間以上前である場合には、当該図形情報500を追跡情報50から削除する。これにより、入力画像140上に楕円が現れなくなってから所定時間経過した後に、当該楕円の図形情報500が追跡情報50から消去される。言い換えれば、入力画像140に人が写らなくなってから所定時間が経過した後に、当該人に対応する楕円の図形情報500が消去される。更新部44は、追跡情報50に、複数の消失楕円の図形情報500が含まれている場合には、各図形情報500について同様の処理を行う。以後、ステップs45での処理を「2.5次処理」あるいは「2.5次更新処理」と呼ぶことがある。   Next, in step s45, the update unit 44 determines whether or not the tracking information 50 includes the disappearing ellipse graphic information 500. When the tracking information 50 includes the disappearing ellipse graphic information 500, the update unit 44 determines whether the disappearance time 504 included in the disappearing ellipse graphic information 500 is a predetermined time or more before the current time. Determine whether. The update unit 44 deletes the graphic information 500 from the tracking information 50 when the disappearance time 504 included in the graphic information 500 is more than a predetermined time before the current time. As a result, the graphic information 500 of the ellipse is deleted from the tracking information 50 after a predetermined time has elapsed since the ellipse no longer appears on the input image 140. In other words, the ellipse graphic information 500 corresponding to the person is deleted after a predetermined time has elapsed since the person is no longer shown in the input image 140. When the tracking information 50 includes a plurality of disappearing ellipse graphic information 500, the update unit 44 performs the same processing for each graphic information 500. Hereinafter, the process in step s45 may be referred to as “2.5th order process” or “2.5th order update process”.

次にステップs46にいて、対応特定部40の3次特定部43は3次特定処理を行う。次にステップs47において、更新部44は、3次特定処理の結果に基づいて追跡情報50を更新する3次更新処理を行う。3次更新処理が実行されると、追跡処理が終了する。以後、3次特定処理と3次更新処理とをあわせて「3次処理」と呼ぶ。   Next, in step s46, the tertiary specifying unit 43 of the correspondence specifying unit 40 performs the tertiary specifying process. Next, in step s47, the update unit 44 performs a tertiary update process for updating the tracking information 50 based on the result of the tertiary specific process. When the tertiary update process is executed, the tracking process ends. Hereinafter, the tertiary identification process and the tertiary update process are collectively referred to as “tertiary process”.

なお、更新部44は、画像処理装置3が起動してから、当てはめ処理部11で初めて当てはめ処理が行われた場合には、当該当てはめ処理で得られた各楕円についての図形情報500を生成し、生成した図形情報500を追跡情報50として記憶部5に記憶する。画像処理装置3が起動してから、当てはめ処理部11で初めて行われた当てはめ処理で得られた各楕円の状態は「出現」となる。そして、更新部44は、追跡処理部12に当てはめ処理結果170が入力されるたびに、記憶部5内の追跡情報50を更新する。   Note that when the fitting processing unit 11 performs a fitting process for the first time after the image processing apparatus 3 is activated, the update unit 44 generates graphic information 500 for each ellipse obtained by the fitting process. The generated graphic information 500 is stored in the storage unit 5 as the tracking information 50. The state of each ellipse obtained by the fitting process performed for the first time by the fitting processing unit 11 after the image processing apparatus 3 is activated is “appearance”. The update unit 44 updates the tracking information 50 in the storage unit 5 every time the fitting process result 170 is input to the tracking processing unit 12.

<1次処理の詳細>
次に1次処理を詳細に説明する。1次処理の1次特定処理では、1次特定部41は、まず、追跡情報50に、併合主体第1楕円(状態が「併合」を示す第1楕円)の図形情報500(以後、「併合主体図形情報500」と呼ぶことがある)が含まれているか否かを判定する。言い換えれば、1次特定部41は、前フレームでの当てはめ処理において得られた第1楕円において、併合主体第1楕円が含まれているか否かを判定する。追跡情報50に、併合主体図形情報500が含まれていない場合には1次特定処理が終了する。この場合には、1次更新処理は行われない。
<Details of primary processing>
Next, the primary process will be described in detail. In the primary specifying process of the primary process, the primary specifying unit 41 first includes, in the tracking information 50, graphic information 500 (hereinafter, “merge” of the merged subject first ellipse (the first ellipse whose state indicates “merge”)). It is determined whether or not it is called “subject graphic information 500”. In other words, the primary specifying unit 41 determines whether or not the merged subject first ellipse is included in the first ellipse obtained in the fitting process in the previous frame. When the tracking information 50 does not include the merged subject graphic information 500, the primary specifying process ends. In this case, the primary update process is not performed.

1次特定部41は、追跡情報50に、併合主体図形情報500が含まれていると判定すると、併合主体図形情報500が示す併合主体第1楕円が複数の第2楕円に分離したか否かを判定する分離判定処理を行う。分離判定処理については後で詳細に説明する。1次特定部41は、併合主体第1楕円が複数の第2楕円に分離したと判定すると、当該複数の第2楕円を、当該併合主体第1楕円に対応する第2楕円として特定する。1次特定部41は、追跡情報50に複数の併合主体図形情報500が含まれる場合には、当該複数の併合図形情報500のそれぞれについて同様の処理を行う。これにより、前フレームでの当てはめ処理において得られた第1楕円に含まれる各併合主体第1楕円に対応する第2楕円が特定される。   If the primary identification unit 41 determines that the tracking information 50 includes the merged subject graphic information 500, whether or not the merged subject first ellipse indicated by the merged subject graphic information 500 is separated into a plurality of second ellipses. A separation determination process is performed to determine The separation determination process will be described later in detail. When determining that the merged main first ellipse has been separated into a plurality of second ellipses, the primary specifying unit 41 specifies the plurality of second ellipses as second ellipses corresponding to the merged main first ellipse. When the tracking information 50 includes a plurality of merged subject graphic information 500, the primary specifying unit 41 performs the same process for each of the plurality of merged graphic information 500. Thereby, the 2nd ellipse corresponding to each merge main 1st ellipse contained in the 1st ellipse obtained in the fitting process in the previous frame is specified.

<分離判定処理の詳細>
分離判定処理において、1次特定部41は、まず、前フレームでの当てはめ処理において、併合主体第1楕円が当てはめられた複数の人に対して、現フレームでの当てはめ処理において複数の第2楕円が当てはめられているか否かを判定する。1次特定部41は、前フレームでの当てはめ処理において、併合主体第1楕円が当てはめられた複数の人に対して、現フレームでの当てはめ処理において複数の第2楕円が当てはめられていると判定すると、当該併合主体第1楕円が当該複数の第2楕円に分離したと判定する。1次特定部41は、併合主体第1楕円が複数の第2楕円に分離したと判定すると、当該併合主体第1楕円に対応する第2楕円として、当該複数の第2楕円を特定する。一方で、1次特定部41は、前フレームでの当てはめ処理において、併合主体第1楕円が当てはめられた複数の人に対して、現フレームでの当てはめ処理において複数の第2楕円は当てはめられていないと判定すると、1次特定部41では、当該併合主体第1楕円に対応する第2楕円が特定されない。以後、併合主体第1楕円が複数の第2楕円に分離したと判定された際の当該複数の第2楕円の数を「楕円分離数」と呼ぶ。
<Details of separation determination processing>
In the separation determination process, the primary identification unit 41 first applies a plurality of second ellipses in the fitting process in the current frame to a plurality of persons to which the merged subject first ellipse is fitted in the fitting process in the previous frame. It is determined whether or not is applied. The primary identification unit 41 determines that a plurality of second ellipses are applied in the fitting process in the current frame to a plurality of persons in which the merged subject first ellipse is applied in the fitting process in the previous frame. Then, it is determined that the merged main first ellipse is separated into the plurality of second ellipses. When the primary specifying unit 41 determines that the merged main first ellipse is separated into a plurality of second ellipses, the primary specifying unit 41 specifies the plurality of second ellipses as second ellipses corresponding to the merged main first ellipse. On the other hand, the primary identification unit 41 applies a plurality of second ellipses in the fitting process in the current frame to a plurality of persons to which the merging subject first ellipse is fitted in the fitting process in the previous frame. If it is determined that there is not, the primary specifying unit 41 does not specify the second ellipse corresponding to the merged subject first ellipse. Hereinafter, the number of the plurality of second ellipses when it is determined that the merging main first ellipse is separated into the plurality of second ellipses is referred to as “ellipse separation number”.

図34,35は、併合主体第1楕円250xが複数の第2楕円250yに分離する様子の一例を示す図である。図34,35の例では、併合主体第1楕円250xが3人の人200に当てはめられている。   34 and 35 are diagrams showing an example of a state in which the merged main first ellipse 250x is separated into a plurality of second ellipses 250y. 34 and 35, the merged subject first ellipse 250x is applied to three persons 200. FIG.

前フレームでの当てはめ処理において、3人の人200に当てはめられた併合主体第1楕円250xが複数の第2楕円250yに分離するパターンとしては、大別して2種類のパターンがある。1つの目のパターンは、図34に示されるように、併合主体第1楕円250xが、現フレームでの当てはめ処理において、3つの第2楕円250yに分離するパターンである(楕円分離数が“3”)。このパターンでは、第1楕円250xが当てはめられていた3人の人200のそれぞれに対して、1つの第2楕円250yが当てはめられている。1つ目のパターンでは、併合主体第1楕円250xは、3つの第2楕円250yに対応することになる。   In the fitting process in the previous frame, there are roughly two types of patterns for separating the merged main first ellipse 250x into a plurality of second ellipses 250y applied to three persons 200. As shown in FIG. 34, the first eye pattern is a pattern in which the merged main first ellipse 250x is separated into three second ellipses 250y in the fitting process in the current frame (the ellipse separation number is “3”). "). In this pattern, one second ellipse 250y is applied to each of the three persons 200 to which the first ellipse 250x is applied. In the first pattern, the merged main first ellipse 250x corresponds to the three second ellipses 250y.

2つ目のパターンは、図35に示されるように、併合主体第1楕円250xが、現フレームでの当てはめ処理において、2つの第2楕円250yに分離するパターンである(楕円分離数が“2”)。このパターンでは、併合主体第1楕円250xが当てはめられていた3人の人200のうち、2人の人200に対して1つの第2楕円250yが当てはめられ、残りの1人の人200に対して1つの第2楕円250yが当てはめられている。2つ目のパターンでは、併合主体第1楕円250xは、2つの第2楕円250yに対応することになる。   As shown in FIG. 35, the second pattern is a pattern in which the merging main first ellipse 250x is separated into two second ellipses 250y in the fitting process in the current frame (the ellipse separation number is “2”). "). In this pattern, out of the three persons 200 to which the merging subject first ellipse 250x is applied, one second ellipse 250y is applied to the two persons 200, and the remaining one person 200 is compared. One second ellipse 250y is applied. In the second pattern, the merged main first ellipse 250x corresponds to the two second ellipses 250y.

なお、併合主体第1楕円は、それが属する併合楕円グループに含まれる被併合第1楕円と同じ楕円である。したがって、1次特定部41は、被併合第1楕円が複数の第2楕円に分離した否かを判定するとも言える。また、併合主体第1楕円が対応する複数の第2楕円は、当該併合主体第1楕円が属する併合楕円グループに含まれる被併合第1楕円に対応すると言える。また、併合主体第1楕円が対応する複数の第2楕円は、当該併合主体第1楕円が属する併合楕円グループを構成する各第1楕円に対応すると言える。   The merged subject first ellipse is the same ellipse as the merged first ellipse included in the merged ellipse group to which it belongs. Therefore, it can be said that the primary specifying unit 41 determines whether or not the merged first ellipse is separated into a plurality of second ellipses. Further, it can be said that the plurality of second ellipses to which the merged subject first ellipse corresponds correspond to the merged first ellipse included in the merged ellipse group to which the merged subject first ellipse belongs. In addition, it can be said that the plurality of second ellipses to which the merged subject first ellipse corresponds correspond to each first ellipse constituting the merged ellipse group to which the merged subject first ellipse belongs.

次に分離判定処理の具体例について説明する。1次特定部41は、例えば、併合主体第1楕円が2つの条件が満足するとき、当該併合主体第1楕円が複数の楕円に分割されたと判定する。   Next, a specific example of the separation determination process will be described. For example, when the merged subject first ellipse satisfies two conditions, the primary specifying unit 41 determines that the merged subject first ellipse is divided into a plurality of ellipses.

1つ目の条件は、併合主体第1楕円の位置に最も近い、現フレームでの当てはめ処理で得られた第2楕円の大きさが、当該併合主体第1楕円の大きさよりも十分に小さいという条件である。以後、この1つ目の条件を「分離第1条件」と呼ぶことがある。   The first condition is that the size of the second ellipse obtained by the fitting process in the current frame closest to the position of the merged subject first ellipse is sufficiently smaller than the size of the merged subject first ellipse. It is a condition. Hereinafter, the first condition may be referred to as a “separation first condition”.

2つ目の条件は、併合主体第1楕円において、現フレームでの当てはめ処理で得られた複数の第2楕円のそれぞれの少なくとも一部の領域が内包されるという条件である。以後、この2つ目の条件を「分離第2条件」と呼ぶことがある。   The second condition is a condition that at least a part of each of the plurality of second ellipses obtained by the fitting process in the current frame is included in the merged main first ellipse. Hereinafter, the second condition may be referred to as a “separation second condition”.

<分離第1条件の判定方法>
1次特定部41は、分離第1条件を満足するか否かを判定する際には、まず、現フレームでの当てはめ処理で得られた第2楕円のうち、併合主体第1楕円に最も近い位置の第2楕円を最近傍第2楕円として特定する。1次特定部41は、当てはめ処理部11で得られる当てはめ処理結果170と追跡情報50とに基づいて、最近傍第2楕円を特定することができる。
<Determination method of first separation condition>
When determining whether or not the separation first condition is satisfied, the primary identification unit 41 firstly is closest to the merged subject first ellipse among the second ellipses obtained by the fitting process in the current frame. The second ellipse at the position is specified as the nearest second ellipse. The primary specifying unit 41 can specify the nearest second ellipse based on the fitting processing result 170 and the tracking information 50 obtained by the fitting processing unit 11.

次に、1次特定部41は、併合主体第1楕円の大きさから、最近傍第2楕円の大きさを差し引いて得られる差分値が、第4しきい値よりも大きいか否かを判定する。1次特定部41は、例えば、併合主体第1楕円の面積を、併合主体第1楕円の大きさとして採用し、最近傍第2楕円の面積を、最近傍第2楕円の大きさとして採用する。1次特定部41は、当てはめ処理結果170に含まれる、最近傍第2楕円についての楕円特定情報から、近傍第2楕円の大きさを求めることができる。また1次特定部41は、追跡情報50に含まれる併合主体図形情報500の楕円特定情報503から、併合主体第1楕円の大きさを求めることができる。   Next, the primary specifying unit 41 determines whether or not the difference value obtained by subtracting the size of the nearest second ellipse from the size of the merged subject first ellipse is larger than the fourth threshold value. To do. For example, the primary specifying unit 41 employs the area of the merged subject first ellipse as the size of the merged subject first ellipse, and employs the area of the nearest second ellipse as the size of the nearest second ellipse. . The primary specifying unit 41 can obtain the size of the neighboring second ellipse from the ellipse specifying information about the nearest second ellipse included in the fitting process result 170. Further, the primary specifying unit 41 can determine the size of the merged subject first ellipse from the ellipse specifying information 503 of the merged subject graphic information 500 included in the tracking information 50.

1次特定部41は、差分値が第4しきい値よりも大きい場合には、最近傍第2楕円の大きさが、併合主体第1楕円の大きさよりも十分に小さいと判定する。つまり、1次特定部41は、分離第1条件を満足すると判定する。一方で、1次特定部41は、差分値が第4しきい値以下の場合には、分離第1条件を満足しないと判定する。   When the difference value is larger than the fourth threshold value, the primary specifying unit 41 determines that the size of the nearest second ellipse is sufficiently smaller than the size of the merged subject first ellipse. That is, the primary specifying unit 41 determines that the first separation condition is satisfied. On the other hand, the primary specific | specification part 41 determines with not satisfy | filling 1st separation conditions, when a difference value is below a 4th threshold value.

なお、1次特定部41は、差分値が第4しきい値以上である場合に、分離第1条件を満足すると判定し、差分値が第4しきい値未満である場合に、分離第1条件を満足しないと判定しても良い。   The primary identification unit 41 determines that the separation first condition is satisfied when the difference value is equal to or greater than the fourth threshold value, and the separation first value when the difference value is less than the fourth threshold value. It may be determined that the condition is not satisfied.

<分離第2条件の判定方法>
1次特定部41は、分離第2条件を満足するか否かを判定する際には、まず、現フレームでの当てはめ処理で得られた第2楕円のうち、その少なくとも一部の領域が、併合主体第1楕円に内包されている第2楕円を特定する。以後、その少なくとも一部の領域が、併合主体第1楕円に内包されている第2楕円を「被内包第2楕円」と呼ぶ。1次特定部41は、例えば、第2楕円の中心が、併合主体第1楕円内に存在する場合には、当該第2楕円を被内包第2楕円とする。1次特定部41は、当てはめ処理結果170と追跡情報50に基づいて、被内包第2楕円を特定することができる。そして、1次特定部41は、現フレームでの当てはめ処理で得られた第2楕円に含まれる被内包楕円の数が2つ以上であるか否かを判定する。
<Method for determining separation second condition>
When the primary identification unit 41 determines whether or not the second separation condition is satisfied, first, at least a part of the second ellipse obtained by the fitting process in the current frame is: The second ellipse included in the merged main first ellipse is specified. Hereinafter, the second ellipse in which at least a part of the area is included in the merged main first ellipse is referred to as “encapsulated second ellipse”. For example, when the center of the second ellipse exists within the merged main first ellipse, the primary specifying unit 41 sets the second ellipse as the second ellipse to be included. The primary specifying unit 41 can specify the second ellipse to be included based on the fitting process result 170 and the tracking information 50. Then, the primary specifying unit 41 determines whether or not the number of contained ellipses included in the second ellipse obtained by the fitting process in the current frame is two or more.

1次特定部41は、現フレームでの当てはめ処理で得られた第2楕円に含まれる被内包楕円の数が2つ以上であると判定すると、現フレームでの当てはめ処理で得られた複数の第2楕円のそれぞれの少なくとも一部の領域が併合主体第1楕円に内包されると判定する。つまり、1次特定部41は、分離第2条件を満足すると判定する。一方で、現フレームでの当てはめ処理で得られた第2楕円に含まれる被内包第2楕円の数が1つであると判定すると、分離第2条件を満足しないと判定する。   When the primary identification unit 41 determines that the number of the included ellipses included in the second ellipse obtained by the fitting process in the current frame is two or more, the primary specifying unit 41 has a plurality of pieces obtained by the fitting process in the current frame. It is determined that at least a part of the second ellipse is included in the merged main first ellipse. That is, the primary specifying unit 41 determines that the second separation condition is satisfied. On the other hand, if it is determined that the number of second ellipses to be included included in the second ellipse obtained by the fitting process in the current frame is one, it is determined that the second separation condition is not satisfied.

以上のようにして、1次特定部41は、併合主体第1楕円が、分離第1条件及び分離第2条件を満足するか否かを判定する。そして、1次特定部41は、併合主体第1楕円が、分離第1条件及び分離第2条件を満足する場合には、併合主体第1楕円が当てはめられた複数の人に対して、現フレームでの当てはめ処理において複数の第2楕円が当てはめられていると判定する。つまり、1次特定部41は、併合主体第1楕円が、複数の第2楕円に分離したと判定する。詳細には、1次特定部41は、併合主体第1楕円が、分離第2条件で特定された複数の被内包第2楕円に分離したと判定する。そして、1次特定部41は、複数の被内包第2楕円を、併合主体第1楕円に対応する第2楕円として特定する。併合主体第1楕円は、それが併合する被併合楕円と同じ楕円であることから、1次特定部41は、複数の被内包第2楕円を、併合主体第1楕円を含む併合楕円グループを構成する各第1楕円に対応する第2楕円として特定すると言える。   As described above, the primary specifying unit 41 determines whether or not the merged subject first ellipse satisfies the separation first condition and the separation second condition. When the merged subject first ellipse satisfies the separation first condition and the separation second condition, the primary identification unit 41 applies the current frame to a plurality of persons to which the merged subject first ellipse is applied. It is determined that a plurality of second ellipses are fitted in the fitting process at. That is, the primary specifying unit 41 determines that the merging main first ellipse is separated into a plurality of second ellipses. Specifically, the primary specifying unit 41 determines that the merging main first ellipse is separated into a plurality of encapsulated second ellipses specified by the separation second condition. And the primary specific | specification part 41 specifies a several to-be-enclosed 2nd ellipse as a 2nd ellipse corresponding to the merged main body 1st ellipse. Since the merged subject first ellipse is the same ellipse as the merged ellipse to which it is merged, the primary specifying unit 41 constitutes a plurality of contained second ellipses and a merged ellipse group including the merged subject first ellipses. It can be said that it identifies as the 2nd ellipse corresponding to each 1st ellipse to do.

このようにして、併合主体第1楕円が当てはめられた複数の人に対して、現フレームでの当てはめ処理において複数の第2楕円が当てはめられているか否かを判定することによって、人と楕円とを適切に対応付けることができる。よって、入力画像140上での楕円の位置の追跡によって、入力画像140での人の位置を適切に追跡することができる。   In this way, by determining whether or not a plurality of second ellipses are applied in the fitting process in the current frame for a plurality of people to which the merging subject first ellipse is applied, Can be appropriately associated. Therefore, by tracking the position of the ellipse on the input image 140, it is possible to appropriately track the position of the person on the input image 140.

なお、1次特定部41は、分離第2条件を満足するか否かの判定を、上記とは異なる方法で行っても良い。以下に、分離第2条件についての他の判定方法の一例について説明する。   The primary identification unit 41 may determine whether or not the second separation condition is satisfied by a method different from the above. Hereinafter, an example of another determination method for the second separation condition will be described.

1次特定部41は、図36に示されるような、第2楕円250yについての4つの交点257yを使用する。4つの交点257yは、第2楕円250yと、その長軸255yとが交わる2つの交点257yと、第2楕円250yとその短軸256yとが交わる2つの交点257yとで構成されている。1次特定部41は、現フレームでの当てはめ処理で得られた第2楕円のうち、4つの交点257yのうちの所定数以上の交点257yが併合主体第1楕円内に存在する第2楕円を、被内包第2楕円として特定する。この所定数は、1以上4以下の値に設定される。図37は、4つの交点257yのうちの2つの交点257yが、併合主体第1楕円250x内に存在する第2楕円250yの一例を示す図である。所定数が例えば“2”に設定される場合には、図37に示される第2楕円250yは、その少なくとも一部が併合主体第1楕円250xに内包される被内包第2楕円250yとなる。   The primary specifying unit 41 uses four intersection points 257y for the second ellipse 250y as shown in FIG. The four intersection points 257y are composed of two intersection points 257y where the second ellipse 250y and the major axis 255y intersect, and two intersection points 257y where the second ellipse 250y and the minor axis 256y intersect. The primary specifying unit 41 selects a second ellipse having a predetermined number or more of the intersection points 257y out of the four intersection points 257y in the merged subject first ellipse among the second ellipses obtained by the fitting process in the current frame. , Specify as the second ellipse to be encapsulated. This predetermined number is set to a value between 1 and 4. FIG. 37 is a diagram illustrating an example of a second ellipse 250y in which two of the four intersections 257y exist in the merged main first ellipse 250x. When the predetermined number is set to “2”, for example, the second ellipse 250y shown in FIG. 37 is an encapsulated second ellipse 250y in which at least a part of the second ellipse 250y is included in the merged main ellipse 250x.

1次特定部41は、被内包第2楕円を特定すると、上記と同様に動作して、現フレームでの当てはめ処理で得られた第2楕円に含まれる被内包楕円の数が2つ以上であるか否かを判定する。1次特定部41は、現フレームでの当てはめ処理で得られた第2楕円に含まれる被内包楕円の数が2つ以上であると判定すると、分離第2条件を満足すると判定する。一方で、現フレームでの当てはめ処理で得られた第2楕円に含まれる被内包第2楕円の数が1つであると判定すると、分離第2条件を満足しないと判定する。   When the primary specifying unit 41 specifies the second encapsulated ellipse, the primary specifying unit 41 operates in the same manner as described above, and the number of included ellipses included in the second ellipse obtained by the fitting process in the current frame is two or more. It is determined whether or not there is. If the primary specifying unit 41 determines that the number of contained ellipses included in the second ellipse obtained by the fitting process in the current frame is two or more, it determines that the second separation condition is satisfied. On the other hand, if it is determined that the number of second ellipses to be included included in the second ellipse obtained by the fitting process in the current frame is one, it is determined that the second separation condition is not satisfied.

なお、対応する第2楕円が特定された第1楕円を「特定済み第1楕円」と呼ぶことがある。また、第1楕円に対応するものとして特定された第2楕円を「特定済み第2楕円」と呼ぶことがある。また、対応する第2楕円が特定されていない第1楕円を「未特定第1楕円」と呼ぶことがある。また、第1楕円に対応するものとして特定されていない第2楕円を「未特定第2楕円」と呼ぶことがある。   The first ellipse in which the corresponding second ellipse is specified may be referred to as “specified first ellipse”. The second ellipse specified as corresponding to the first ellipse may be referred to as “specified second ellipse”. In addition, a first ellipse for which the corresponding second ellipse is not specified may be referred to as an “unspecified first ellipse”. A second ellipse that is not specified as corresponding to the first ellipse may be referred to as an “unspecified second ellipse”.

1次特定部41が、複数の被内包第2楕円を、併合主体第1楕円に対応する第2楕円として特定した場合には、複数の被内包第2楕円は特定済み第2楕円となり、併合主体第1楕円は特定済み第1楕円となる。さらに、当該併合主体第1楕円が併合する被併合第1楕円も特定済み第1楕円となる。   When the primary specifying unit 41 specifies a plurality of contained second ellipses as the second ellipse corresponding to the merged main first ellipse, the plurality of contained second ellipses become the specified second ellipses, and merged. The subject first ellipse becomes the identified first ellipse. Further, the merged first ellipse merged with the merged main first ellipse is also the identified first ellipse.

以後、特定済み第1楕円である併合主体第1楕円が属する併合楕円グループを「特定済み併合第1楕円グループ」と呼ぶことがある。特定済み併合第1楕円グループに含まれる各第1楕円は特定済み第1楕円である。また、特定済み併合第1楕円グループの楕円総数と言えば、当該特定済み併合第1楕円グループを構成する複数の第1楕円の総数を意味する。特定済み併合第1楕円グループの楕円総数は、当該特定済み併合第1楕円グループに属する併合主体第1楕円の図形情報500に含まれる併合数506に対して“1”を加算して得られる値となる。また、特定済み併合第1楕円グループに対応する楕円分離数と言えば、当該特定済み併合第1楕円グループに属する併合主体第1楕円の楕円分離数、つまり、当該併合主体第1楕円に対応する複数の第2楕円の数を意味する。また、特定済み併合第1楕円グループに対応する複数の特定済み第2楕円と言えば、当該特定済み併合第1楕円グループに属する併合主体第1楕円に対応する複数の第2楕円を意味する。   Hereinafter, the merged ellipse group to which the merged subject first ellipse that is the identified first ellipse may be referred to as a “specified merged first ellipse group”. Each first ellipse included in the identified merged first ellipse group is a specified first ellipse. Further, the total number of ellipses of the specified merged first ellipse group means the total number of first ellipses constituting the specified merged first ellipse group. The total number of ellipses of the specified merged first ellipse group is a value obtained by adding “1” to the merge number 506 included in the graphic information 500 of the merged subject first ellipse belonging to the specified merged first ellipse group. It becomes. Speaking of the number of ellipse separations corresponding to the specified merged first ellipse group, the number of ellipse separations of the merged subject first ellipse belonging to the specified merged first ellipse group, that is, corresponding to the merged subject first ellipse. It means the number of a plurality of second ellipses. Speaking of a plurality of specified second ellipses corresponding to the specified merged first ellipse group means a plurality of second ellipses corresponding to the merged subject first ellipse belonging to the specified merged first ellipse group.

<1次更新処理の詳細>
次に1次更新処理について詳細に説明する。1次更新処理において、更新部44は、1次特定処理で得られた特定済み併合第1楕円グループの各第1楕円の図形情報500を更新する。つまり、更新部44は、対応する第2楕円が特定された併合主体第1楕円の図形情報500と、当該併合主体第1楕円が併合する被併合第1楕円の図形情報500とを更新する。更新部44は、1次特定処理において複数の特定済み併合第1楕円グループが得られた場合には、当該複数の特定済み併合第1楕円グループのそれぞれについて、当該特定済み併合第1楕円グループの各第1楕円の図形情報500を更新する。なお、1次特定処理において特定済み併合第1楕円グループが得られなければ、1次更新処理はスキップされる。
<Details of the primary update process>
Next, the primary update process will be described in detail. In the primary update process, the update unit 44 updates the graphic information 500 of each first ellipse of the specified merged first ellipse group obtained in the primary specification process. That is, the update unit 44 updates the merged subject first ellipse graphic information 500 in which the corresponding second ellipse is specified, and the merged first ellipse graphic information 500 merged with the merged subject first ellipse. When the plurality of specified merged first ellipse groups are obtained in the primary specifying process, the updating unit 44 sets the specified merged first ellipse group for each of the plurality of specified merged first ellipse groups. The graphic information 500 of each first ellipse is updated. If the identified merged first ellipse group is not obtained in the primary identification process, the primary update process is skipped.

以下に、特定済み併合第1楕円グループの楕円総数と、当該特定済み併合第1楕円グループに対応する楕円分離数とが一致する場合と一致しない場合とに分けて、特定済み併合第1楕円グループの各第1楕円の図形情報500の更新方法について説明する。   The identified merged first ellipse group is divided into a case where the total number of ellipses of the identified merged first ellipse group and the number of ellipse separations corresponding to the identified merged first ellipse group are not matched. A method for updating the graphic information 500 of each first ellipse will be described.

<楕円総数と楕円分離数とが一致する場合>
特定済み併合第1楕円グループの楕円総数と、当該特定済み併合第1楕円グループに対応する楕円分離数とが一致する場合には、更新部44は、特定済み併合第1楕円グループに対応する複数の特定済み第2楕円に対して、当該特定済み併合第1楕円グループを構成する複数の第1楕円(特定済み第1楕円)の図形情報500をそれぞれ対応付ける。そして、更新部44は、特定済み併合第1楕円グループの各第1楕円の図形情報500を、それを対応付けた特定済み第2楕円の楕円特定情報に基づいて更新する。具体的には、更新部44は、特定済み併合第1楕円グループに含まれる第1楕円の図形情報500の楕円特定情報503が、当該図形情報500が対応付けられた特定済み第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。そして、更新部44は、当該図形情報500の状態情報502を「存在」に設定する。これにより、特定済み併合第1楕円グループの各第1楕円の図形情報500が更新される。第1楕円についての更新された図形情報500は、当該第1楕円に対応する第2楕円の図形情報500となる。なお、特定済み第2楕円の楕円特定情報は、当てはめ処理結果170に含まれている。
<When the total number of ellipses matches the number of ellipses separated>
When the total number of ellipses of the specified merged first ellipse group matches the number of ellipse separations corresponding to the specified merged first ellipse group, the updating unit 44 performs a plurality of operations corresponding to the specified merged first ellipse group. The graphic information 500 of a plurality of first ellipses (specified first ellipses) constituting the specified merged first ellipse group is associated with each specified second ellipse. And the update part 44 updates the graphic information 500 of each 1st ellipse of the identified merged 1st ellipse group based on the ellipse specific information of the identified 2nd ellipse which matched it. Specifically, the updating unit 44 uses the ellipse specifying information 503 of the graphic information 500 of the first ellipse included in the specified merged first ellipse group as the ellipse of the specified second ellipse associated with the graphic information 500. The ellipse identification information 503 is updated so as to match the identification information. Then, the update unit 44 sets the state information 502 of the graphic information 500 to “exist”. Thereby, the graphic information 500 of each first ellipse of the identified merged first ellipse group is updated. The updated graphic information 500 about the first ellipse becomes the graphic information 500 of the second ellipse corresponding to the first ellipse. Note that the ellipse specifying information of the specified second ellipse is included in the fitting process result 170.

図38は、特定済み併合第1楕円グループを構成する複数の第1楕円の図形情報500と、当該特定済み併合第1楕円グループに対応する複数の特定済み第2楕円との対応付けの一例を示す図である。図38の例では、特定済み併合第1楕円グループは4つの第1楕円で構成されている。したがって、特定済み併合第1楕円グループの楕円総数は“4”となる。そして、特定済み併合第1楕円グループに含まれる併合主体第1楕円は4つの第2楕円250ya〜250ydに分離している。したがって、楕円分離数は“4”となり、楕円総数と一致する。図38の例では、4つの第2楕円250ya〜250ydに対して、特定済み併合第1楕円グループを構成する4つの第1楕円にそれぞれ対応する4つの図形情報500a〜500dがそれぞれ対応付けられている。更新部44によって図形情報500a〜500dが更新されることにより、図形情報500aは第2楕円250yaに関する情報となり、図形情報500bは第2楕円250ybに関する情報となり、図形情報500cは第2楕円250ycに関する情報となり、図形情報500dは第2楕円250ydに関する情報となる。   FIG. 38 shows an example of correspondence between graphic information 500 of a plurality of first ellipses constituting a specified merged first ellipse group and a plurality of specified second ellipses corresponding to the specified merged first ellipse group. FIG. In the example of FIG. 38, the identified merged first ellipse group is composed of four first ellipses. Therefore, the total number of ellipses of the specified merged first ellipse group is “4”. The merged main first ellipse included in the specified merged first ellipse group is separated into four second ellipses 250ya to 250yd. Therefore, the ellipse separation number is “4”, which is equal to the total number of ellipses. In the example of FIG. 38, four graphic information 500a to 500d respectively corresponding to the four first ellipses constituting the identified merged first ellipse group are associated with the four second ellipses 250ya to 250yd. Yes. By updating the graphic information 500a to 500d by the updating unit 44, the graphic information 500a becomes information on the second ellipse 250ya, the graphic information 500b becomes information on the second ellipse 250yb, and the graphic information 500c is information on the second ellipse 250yc. Thus, the graphic information 500d is information related to the second ellipse 250yd.

<楕円総数と楕円分離数とが一致しない場合>
次に、特定済み併合第1楕円グループの楕円総数と、当該特定済み併合第1楕円グループに対応する分割数とが一致しない場合、つまり、当該楕円総数が当該楕円分離数よりも大きい場合の更新部44の動作について説明する。この場合、更新部44は、特定済み併合第1楕円グループに対応する複数の特定済み第2楕円のそれぞれに対して、できるだけに同じ数の図形情報500が対応付けられ、かつ互いに異なる図形情報500が対応付けられ、かつ図形情報500が対応付けられない特定済み第2楕円が存在しないように、当該特定済み併合第1楕円グループを構成する複数の第1楕円の図形情報500の少なくとも1つを対応付ける。
<When the total number of ellipses does not match the number of ellipse separation>
Next, update when the total number of ellipses of the specified merged first ellipse group does not match the number of divisions corresponding to the specified merged first ellipse group, that is, when the total number of ellipses is greater than the number of ellipse separations The operation of the unit 44 will be described. In this case, the updating unit 44 associates the same number of graphic information 500 as much as possible with each of the plurality of specified second ellipses corresponding to the specified merged first ellipse group and is different from each other. , And at least one of the plurality of first ellipse graphic information 500 constituting the specified merged first ellipse group so that there is no specified second ellipse to which the graphic information 500 is not associated. Associate.

更新部44は、1つの特定済み第2楕円に対して1つの図形情報500を対応付けた場合には、上記と同様に、当該図形情報500の楕円特定情報503が、当該図形情報500が対応付けられた特定済み第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。そして、更新部44は、当該図形情報500の状態情報502を「存在」に設定する。これにより、当該図形情報500が更新される。   When the updating unit 44 associates one graphic information 500 with one specified second ellipse, the ellipse specifying information 503 of the graphic information 500 corresponds to the graphic information 500 as described above. The ellipse specification information 503 is updated so as to match the ellipse specification information of the specified second ellipse. Then, the update unit 44 sets the state information 502 of the graphic information 500 to “exist”. Thereby, the graphic information 500 is updated.

一方で、更新部44は、1つの特定済み第2楕円に対してM個(M≧2)の図形情報500を対応付けた場合には、当該1つの特定済み第2楕円はM人の人200に対して当てはめられた第2楕円であるとする。そして、更新部44は、当該M個の図形情報500において、一つの図形情報500に含まれる状態情報502を「併合」に設定し、残りの図形情報500に含まれる状態情報を「被併合」に設定する。そして、更新部44は、状態情報502を「併合」に設定した図形情報500の併合相手ID505に、状態情報502を「被併合」に設定した図形情報500のID501を含める。また、更新部44は、状態情報502を「併合」に設定した図形情報500の併合数505を(M−1)とする。そして、更新部44は、当該M個の図形情報500のそれぞれについて、上記と同様に、当該図形情報500の楕円特定情報503が、当該図形情報500が対応付けられた特定済み第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。これにより、当該M個の図形情報500が更新される。   On the other hand, when the updating unit 44 associates M pieces (M ≧ 2) of graphic information 500 with one specified second ellipse, the one specified second ellipse is M persons. Let it be the second ellipse fitted to 200. Then, the update unit 44 sets the state information 502 included in one graphic information 500 to “merged” in the M pieces of graphic information 500, and sets the state information included in the remaining graphic information 500 to “merged”. Set to. Then, the update unit 44 includes the ID 501 of the graphic information 500 in which the status information 502 is set to “merged” in the merged partner ID 505 of the graphic information 500 in which the status information 502 is set to “merged”. Further, the updating unit 44 sets (M−1) as the merge number 505 of the graphic information 500 in which the state information 502 is set to “merged”. Then, for each of the M pieces of graphic information 500, the update unit 44, like the above, the ellipse specifying information 503 of the graphic information 500 is the ellipse of the specified second ellipse associated with the graphic information 500. The ellipse identification information 503 is updated so as to match the identification information. Thereby, the M pieces of graphic information 500 are updated.

図39,40は、特定済み併合第1楕円グループを構成する複数の第1楕円の図形情報500と、当該特定済み併合第1楕円グループに対応する複数の特定済み第2楕円との対応付けの一例を示す図である。図39,40の例では、上述の図38の例と比較して楕円分離数が異なっている。   39 and 40 show the correspondence between the graphic information 500 of the plurality of first ellipses constituting the specified merged first ellipse group and the plurality of specified second ellipses corresponding to the specified merged first ellipse group. It is a figure which shows an example. In the examples of FIGS. 39 and 40, the number of ellipse separations is different from the example of FIG. 38 described above.

図39の例では、特定済み併合第1楕円グループに含まれる併合主体第1楕円は2つの第2楕円250ya,250ybに分離しており、楕円分離数が“2”となっている。図39の例では、第2楕円250yaに対して2つの図形情報500a,500bが対応付けられており、第2楕円250ybに2つの図形情報500c,500dが対応付けられている。図39の例では、更新部44は、2つの図形情報500a,500bにおいて、一方の図形情報500の状態情報502を「併合」に設定し、他方の図形情報500の状態情報502を「被併合」に設定する。ここでは、例えば、図形情報500aの状態情報502を「併合」に設定し、図形情報500bの状態情報502を「被併合」に設定するとする。更新部44は、状態情報502を「併合」に設定した図形情報500aの併合相手ID505に、状態情報502を「被併合」に設定した図形情報500bのID501を含める。また、更新部44は、図形情報500aの併合数505を“1”とする。そして、更新部44は、図形情報500aの楕円特定情報503が、第2楕円250yaの楕円特定情報と一致するように、当該楕円特定情報503を更新し、図形情報500bの楕円特定情報503が、第2楕円250yaの楕円特定情報と一致するように、当該楕円特定情報503を更新する。同様にして、更新部44は、第2楕円250ybに対応付けられた2つの図形情報500c,500dを更新する。   In the example of FIG. 39, the merged subject first ellipse included in the identified merged first ellipse group is separated into two second ellipses 250ya and 250yb, and the ellipse separation number is “2”. In the example of FIG. 39, two pieces of graphic information 500a and 500b are associated with the second ellipse 250ya, and two pieces of graphic information 500c and 500d are associated with the second ellipse 250yb. In the example of FIG. 39, the update unit 44 sets the state information 502 of one graphic information 500 to “merged” in the two graphic information 500a and 500b, and sets the state information 502 of the other graphic information 500 to “merged”. To "". Here, for example, it is assumed that the state information 502 of the graphic information 500a is set to “merge” and the state information 502 of the graphic information 500b is set to “merge”. The update unit 44 includes the ID 501 of the graphic information 500b in which the status information 502 is set to “merged” in the merge partner ID 505 of the graphic information 500a in which the status information 502 is set to “merged”. Further, the updating unit 44 sets the merged number 505 of the graphic information 500a to “1”. Then, the update unit 44 updates the ellipse specifying information 503 so that the ellipse specifying information 503 of the graphic information 500a matches the ellipse specifying information of the second ellipse 250ya, and the ellipse specifying information 503 of the graphic information 500b The ellipse specifying information 503 is updated so as to coincide with the ellipse specifying information of the second ellipse 250ya. Similarly, the update unit 44 updates two pieces of graphic information 500c and 500d associated with the second ellipse 250yb.

図40の例では、特定済み併合第1楕円グループに含まれる併合主体第1楕円は3つの第2楕円250ya,250yb,250ycに分離しており、楕円分離数が“3”となっている。図40の例では、第2楕円250yaに1つの図形情報500aが対応付けられており、第2楕円250ybに1つの図形情報500bが対応付けられ、第2楕円250ycに2つの図形情報500c,500dが対応付けられている。図40の例では、更新部44は、第2楕円250yaに対応付けられた図形情報500aの楕円特定情報503が、第2楕円250yaの楕円特定情報と一致するように、当該楕円特定情報503を更新する。そして、更新部44は、図形情報500aの状態情報502を「存在」に設定する。更新部44は、第2楕円250ybに対応付けられた図形情報500bを同様に更新する。また、更新部44は、第2楕円250ycに対応付けられた図形情報500c,500dにおいて、一方の図形情報500の状態情報502を「併合」に設定し、他方の図形情報500の状態情報502を「被併合」に設定する。そして、更新部44は、状態情報502を「併合」に設定した図形情報500の併合相手ID505に、状態情報502を「被併合」に設定した図形情報500のID501を含める。また、更新部44は、状態情報502を「併合」に設定した図形情報500の併合数505を“1”とする。そして、更新部44は、図形情報500cの楕円特定情報503が、第2楕円250ycの楕円特定情報と一致するように、当該楕円特定情報503を更新し、図形情報500dの楕円特定情報503が、第2楕円250ycの楕円特定情報と一致するように、当該楕円特定情報503を更新する。これにより、図形情報500a〜500dが更新される。   In the example of FIG. 40, the merged subject first ellipse included in the identified merged first ellipse group is separated into three second ellipses 250ya, 250yb, 250yc, and the ellipse separation number is “3”. In the example of FIG. 40, one graphic information 500a is associated with the second ellipse 250ya, one graphic information 500b is associated with the second ellipse 250yb, and two graphic information 500c, 500d is associated with the second ellipse 250yc. Are associated. In the example of FIG. 40, the updating unit 44 changes the ellipse specifying information 503 so that the ellipse specifying information 503 of the graphic information 500a associated with the second ellipse 250ya matches the ellipse specifying information of the second ellipse 250ya. Update. Then, the update unit 44 sets the state information 502 of the graphic information 500a to “exist”. The updating unit 44 similarly updates the graphic information 500b associated with the second ellipse 250yb. Further, the update unit 44 sets the state information 502 of one graphic information 500 to “merged” in the graphic information 500c and 500d associated with the second ellipse 250yc, and sets the state information 502 of the other graphic information 500 to Set to “merged”. Then, the update unit 44 includes the ID 501 of the graphic information 500 in which the status information 502 is set to “merged” in the merged partner ID 505 of the graphic information 500 in which the status information 502 is set to “merged”. Further, the updating unit 44 sets the merged number 505 of the graphic information 500 in which the state information 502 is set to “merged” to “1”. Then, the update unit 44 updates the ellipse specifying information 503 so that the ellipse specifying information 503 of the graphic information 500c matches the ellipse specifying information of the second ellipse 250yc, and the ellipse specifying information 503 of the graphic information 500d The ellipse specifying information 503 is updated so as to coincide with the ellipse specifying information of the second ellipse 250yc. As a result, the graphic information 500a to 500d is updated.

以上のように、1次更新処理では、1次特定処理で得られた各特定済み併合第1楕円グループについて、それを構成する複数の第1楕円の図形情報500が更新される。   As described above, in the primary update process, the graphic information 500 of the plurality of first ellipses constituting the first merged first ellipse group obtained in the primary identification process is updated.

<2次処理の詳細>
次に2次処理を詳細に説明する。2次処理の2次特定処理において、2次特定部42は、まず、1次更新処理が行われた追跡情報50に、対応する第2楕円が1次特定処理で特定されなかった第1楕円の図形情報500(以後、「未特定図形情報500と呼ぶことがある)が含まれるか否かを判定する。言い換えれば、2次特定部42は、1次更新処理が行われた追跡情報50に、未特定第1楕円の図形情報500が含まれているか否かを判定する。さらに言い換えれば、2次特定部42は、1次更新処理された追跡情報50に、未だ更新されていない図形情報500が含まれるか否かを判定する。
<Details of secondary processing>
Next, the secondary processing will be described in detail. In the secondary specifying process of the secondary process, the secondary specifying unit 42 first sets the first ellipse in which the corresponding second ellipse is not specified in the primary specifying process in the tracking information 50 that has been subjected to the primary update process. The graphic information 500 (hereinafter, sometimes referred to as “unspecified graphic information 500”) is included. In other words, the secondary specifying unit 42 performs the tracking information 50 on which the primary update processing has been performed. Whether or not the graphic information 500 of the unspecified first ellipse is included, and in other words, the secondary specifying unit 42 is not updated to the tracking information 50 subjected to the primary update process. It is determined whether information 500 is included.

2次特定部42は、1次更新処理が行われた追跡情報50に未特定図形情報500が含まれていると判定すると、1次更新処理が行われた追跡情報50に含まれる、状態情報502が「被併合」以外を示す未特定図形情報500が示す未特定第1楕円に対応する第2楕円を、所定の情報に基づいて特定する。状態情報502が「被併合」以外を示す未特定図形情報500を特に「対象未特定図形情報500」と呼ぶ。1次更新処理された追跡情報50に、消失楕円の図形情報500が含まれている場合には、2次特定部42は、当該消失楕円に対応する第2楕円を特定する第2対応特定処理を行う。2次特定部41は、追跡情報50に複数の対象未特定図形情報500が含まれる場合には、当該複数の対象未特定図形情報500のそれぞれについて同様の処理を行う。2次特定部42は、1次更新処理が行われた追跡情報50に、未特定図形情報500が含まれていないと判定すると、2次特定処理を終了する。この場合には、2次更新処理は行われない。   When the secondary specifying unit 42 determines that the unspecified graphic information 500 is included in the tracking information 50 that has been subjected to the primary update process, the state information included in the tracking information 50 that has been subjected to the primary update process Based on the predetermined information, the second ellipse corresponding to the unspecified first ellipse indicated by the unspecified graphic information 500 in which 502 indicates other than “merge” is specified. The unspecified graphic information 500 whose status information 502 indicates other than “merged” is particularly referred to as “target unspecified graphic information 500”. When the tracking information 50 subjected to the primary update process includes the graphic information 500 of the disappearing ellipse, the secondary specifying unit 42 specifies the second ellipse corresponding to the disappearing ellipse. I do. When the tracking information 50 includes a plurality of target unspecified graphic information 500, the secondary specifying unit 41 performs the same process for each of the plurality of target unspecified graphic information 500. If the secondary identification unit 42 determines that the unspecified graphic information 500 is not included in the tracking information 50 that has undergone the primary update process, the secondary identification process ends. In this case, the secondary update process is not performed.

以下では、1次更新処理が行われた追跡情報50に含まれる各対象未特定図形情報500が示す未特定第1楕円を「2次処理対象の第1楕円」と呼ぶことがある。2次処理の第1楕円には、状態が「被併合」の第1楕円は含まれない。また、現フレームでの当てはめ処理において得られた第2楕円のうち、1次特定処理で得られた特定済み第2楕円以外の第2楕円を「2次処理対象の第2楕円」と呼ぶことがある。2次特定部42は、2次処理対象の第1楕円に対応する第2楕円を、例えば最近傍法(Nearest Neighbor)を用いて、2次処理対象の第2楕円から特定する。図41は2次特定処理を示すフローチャートである。   Hereinafter, the unspecified first ellipse indicated by each target unspecified graphic information 500 included in the tracking information 50 that has been subjected to the primary update process may be referred to as a “second ellipse to be processed secondarily”. The first ellipse of the secondary process does not include the first ellipse whose state is “merged”. Further, among the second ellipses obtained in the fitting process in the current frame, the second ellipses other than the identified second ellipse obtained in the primary identification process are referred to as “second ellipses to be subjected to secondary processing”. There is. The secondary specifying unit 42 specifies the second ellipse corresponding to the first ellipse to be subjected to the secondary processing from the second ellipse to be subjected to the secondary processing using, for example, the nearest neighbor method (Nearest Neighbor). FIG. 41 is a flowchart showing the secondary specifying process.

図41に示されるように、ステップs431において、2次特定部42は、1次更新処理が行われた追跡情報50に未特定図形情報500が含まれるか否かを判定する。2次特定部41は、1次更新処理が行われた追跡情報50に未特定図形情報500が含まれていないと判定すると、2次特定処理を終了する。一方で、2次特定部41は、1次更新処理が行われた追跡情報50に未特定図形情報500が含まれていると判定すると、ステップs432を実行する。   As shown in FIG. 41, in step s431, the secondary specifying unit 42 determines whether or not the unspecified graphic information 500 is included in the tracking information 50 that has undergone the primary update process. If the secondary specifying unit 41 determines that the unspecified graphic information 500 is not included in the tracking information 50 that has undergone the primary update process, the secondary specifying process ends. On the other hand, when determining that the unspecified graphic information 500 is included in the tracking information 50 that has been subjected to the primary update process, the secondary specifying unit 41 executes step s432.

ステップs432では、2次特定部42は、2次処理対象の第1楕円から一つの第1楕円を選択し、選択した第1楕円を選択第1楕円とする。ステップs432の後、ステップs433において、2次特定部42は、2次処理対象の第2楕円に含まれる未特定第2楕円から、選択第1楕円に最も位置が近い第2楕円を最近傍第2楕円として特定する。ステップs433において、2次特定部42は、例えば、選択第1楕円の中心に最も近い中心を有する未特定第2楕円を最近傍第2楕円とする。   In step s432, the secondary specifying unit 42 selects one first ellipse from the first ellipses to be subjected to the secondary processing, and sets the selected first ellipse as the selected first ellipse. After step s432, in step s433, the secondary specifying unit 42 selects the second ellipse closest to the selected first ellipse from the unspecified second ellipse included in the second ellipse to be subjected to the secondary processing. Identify as 2 ellipses. In step s433, the secondary specifying unit 42 sets, for example, the unspecified second ellipse having the center closest to the center of the selected first ellipse as the nearest second ellipse.

次にステップs434において、2次特定部42は、選択第1楕円と最近傍第2楕円との間の距離を求める。2次特定部42は、例えば、選択第1楕円の中心と最近傍第2楕円の中心との間の距離を、当該選択第1楕円と当該最近傍第2楕円との間の距離とする。そして、2次特定部42は、求めた距離が第5しきい値以下であるか否かを判定する。   Next, in step s434, the secondary specifying unit 42 obtains the distance between the selected first ellipse and the nearest second ellipse. For example, the secondary specifying unit 42 sets the distance between the center of the selected first ellipse and the center of the nearest second ellipse as the distance between the selected first ellipse and the nearest second ellipse. And the secondary specific | specification part 42 determines whether the calculated | required distance is below a 5th threshold value.

2次特定部42は、ステップs434において、求めた距離が第5しきい値以下であると判定すると、ステップs435において、最近傍第2楕円を、選択第1楕円に対応する第2楕円に決定する。これにより、選択第1楕円は特定済み第1楕円となる。また、最近傍第2楕円が特定済み第2楕円となり、2次処理対象の第2楕円に特定済み第2楕円が含まれることになる。ステップs435の後、2次特定部42はステップs436を実行する。一方で、2次特定部42は、ステップs434において、求めた距離が第5しきい値よりも大きいと判定すると、ステップs436を実行する。求めた距離が第5しきい値よりも大きいと判定される場合には、最近傍第2楕円は未特定第2楕円のままである。   If the secondary specifying unit 42 determines in step s434 that the obtained distance is equal to or smaller than the fifth threshold value, in step s435, the nearest second ellipse is determined as the second ellipse corresponding to the selected first ellipse. To do. As a result, the selected first ellipse becomes the identified first ellipse. Further, the nearest second ellipse becomes the specified second ellipse, and the specified second ellipse is included in the second ellipse to be subjected to the secondary processing. After step s435, the secondary specifying unit 42 executes step s436. On the other hand, when determining that the obtained distance is larger than the fifth threshold value in step s434, the secondary specifying unit 42 executes step s436. If it is determined that the obtained distance is greater than the fifth threshold, the nearest second ellipse remains the unspecified second ellipse.

ステップs436では、2次特定部42は、2次処理対象の第1楕円のすべてを処理したか否かを判定する。つまり、2次特定部42は、2次処理対象の第1楕円をすべて選択第1楕円としたか否かを判定する。ステップs436においてYesと判定されると、2次特定処理が終了する。一方で、ステップs436においてNoと判定されると、2次特定部42は再度ステップs432を実行する。ここでは、2次処理対象の第1楕円のうち、未だ処理されていない第1楕円、つまり未だ選択第1楕円とされていない第1楕円が選択されて、選択第1楕円とされる。次に、2次特定部41は、ステップs433を実行して、2次処理対象の第2楕円に含まれる未特定第2楕円から、選択第1楕円に最も位置が近い第2楕円を最近傍第2楕円として特定する。以後、2次特定部41は同様に動作する。   In step s436, the secondary specifying unit 42 determines whether or not all of the first ellipses to be processed are processed. That is, the secondary specifying unit 42 determines whether or not all the first ellipses to be subjected to the secondary processing are selected first ellipses. If it determines with Yes in step s436, a secondary specific process will be complete | finished. On the other hand, if it determines with No in step s436, the secondary specific | specification part 42 will perform step s432 again. Here, among the first ellipses to be subjected to the secondary processing, the first ellipse that has not yet been processed, that is, the first ellipse that has not yet been selected, is selected as the selected first ellipse. Next, the secondary specifying unit 41 executes step s433, and selects the second ellipse closest to the selected first ellipse from the unspecified second ellipse included in the second ellipse to be subjected to the secondary processing. The second ellipse is specified. Thereafter, the secondary specifying unit 41 operates in the same manner.

このように、2次特定部42は、2次処理対象の第1楕円に最も位置が近い2次処理対象の第2楕円であって、当該第1楕円との距離が第5しきい値以下の2次処理対象の第2楕円を、当該第1楕円に対応する第2楕円として特定する。   As described above, the secondary specifying unit 42 is the second ellipse to be processed secondarily closest to the second ellipse to be processed, and the distance from the first ellipse is equal to or less than the fifth threshold value. Is identified as the second ellipse corresponding to the first ellipse.

なお、上記のステップs434では、2次特定部42は、選択第1楕円と最近傍第2楕円との間の距離が第5しきい値未満であるか否かを判定しても良い。この場合には、2次特定部42は、2次処理対象の第1楕円に最も位置が近い2次処理対象の第2楕円であって、当該第1楕円との距離が第5しきい値未満の2次処理対象の第2楕円を、当該第1楕円に対応する第2楕円として特定することになる。   In step s434 described above, the secondary specifying unit 42 may determine whether the distance between the selected first ellipse and the nearest second ellipse is less than the fifth threshold value. In this case, the secondary specifying unit 42 is the second ellipse to be secondary-processed closest to the first ellipse to be secondary-processed, and the distance from the first ellipse is the fifth threshold value. The second ellipse to be subjected to the secondary processing is less than the second ellipse corresponding to the first ellipse.

<2次更新処理の詳細>
次に2次更新処理について詳細に説明する。2次更新処理において、更新部44は、2次特定処理で新たに得られた各特定済み第1楕円の図形情報500を2次更新対象の図形情報500とする。そして、更新部44は、2次更新対象の各図形情報500を、当該図形情報500が示す特定済み第1楕円に対応する第2楕円の楕円特定情報に基づいて更新する。
<Details of secondary update processing>
Next, the secondary update process will be described in detail. In the secondary update process, the update unit 44 sets the graphic information 500 of each identified first ellipse newly obtained in the secondary specification process as the graphic information 500 to be secondary updated. Then, the updating unit 44 updates each piece of graphic information 500 to be subjected to secondary update based on the ellipse specifying information of the second ellipse corresponding to the specified first ellipse indicated by the graphic information 500.

2次更新処理での図形情報500の更新方法は、当該図形情報500に含まれる状態情報502の値に応じて異なる。   The method for updating the graphic information 500 in the secondary update process differs depending on the value of the state information 502 included in the graphic information 500.

例えば、2次更新対象の図形情報500の状態情報502が「出現」を示す場合には、更新部44は、当該図形情報500に対応する楕円(人)が入力画像140上に継続して現れていると判定して、当該状態情報502を「存在」に変更する。そして、更新部44は、当該図形情報500の楕円特定情報503が、当該図形情報500が示す特定済み第1楕円に対応する第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。   For example, when the state information 502 of the graphic information 500 that is the secondary update target indicates “appearance”, the update unit 44 continuously displays an ellipse (person) corresponding to the graphic information 500 on the input image 140. And the status information 502 is changed to “exist”. Then, the updating unit 44 sets the ellipse specifying information 503 so that the ellipse specifying information 503 of the graphic information 500 matches the ellipse specifying information of the second ellipse corresponding to the specified first ellipse indicated by the graphic information 500. Update.

2次更新対象の図形情報500の状態情報502が「存在」を示す場合には、更新部44は、当該状態情報502を「存在」のままとする。そして、更新部44は、当該図形情報500の楕円特定情報503が、当該図形情報500が示す特定済み第1楕円に対応する第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。   When the state information 502 of the graphic information 500 that is the secondary update target indicates “exist”, the update unit 44 keeps the state information 502 “exist”. Then, the updating unit 44 sets the ellipse specifying information 503 so that the ellipse specifying information 503 of the graphic information 500 matches the ellipse specifying information of the second ellipse corresponding to the specified first ellipse indicated by the graphic information 500. Update.

2次更新対象の図形情報500の状態情報502が「併合」を示す場合には、更新部44は、当該状態情報502を「併合」のままとする。そして、更新部44は、当該図形情報500の楕円特定情報503が、当該図形情報500が示す特定済み第1楕円(併合主体第1楕円)に対応する第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。   When the state information 502 of the graphic information 500 that is the secondary update target indicates “merge”, the update unit 44 keeps the state information 502 “merge”. Then, the updating unit 44 causes the ellipse specifying information 503 of the graphic information 500 to match the ellipse specifying information of the second ellipse corresponding to the specified first ellipse (the merged main first ellipse) indicated by the graphic information 500. The ellipse specifying information 503 is updated.

また、2次更新対象の図形情報500の状態情報502が「併合」を示す場合には、更新部44は、当該図形情報500が示す併合主体第1楕円に併合されている各被併合第1楕円の図形情報500も更新する。つまり、2次更新対象の図形情報500の状態情報502が「併合」を示す場合には、更新部44は、当該図形情報500に含まれる併合相手ID505が示すID501を含む図形情報500も更新する。具体的には、更新部44は、併合第1楕円の図形情報500の楕円特定情報503が、当該被併合第1楕円を併合する併合主体第1楕円に対応する第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。被併合第1楕円の図形情報500の状態情報502は「被併合」から変更されない。これにより、併合主体楕円の図形情報500の更新に応じて、当該併合主体楕円が併合する各被併合楕円の図形情報500が更新される。   In addition, when the state information 502 of the graphic information 500 that is the secondary update target indicates “merged”, the updating unit 44 merges each merged first ellipse merged with the merged subject first ellipse indicated by the graphic information 500. The ellipse graphic information 500 is also updated. That is, when the state information 502 of the graphic information 500 that is the secondary update target indicates “merge”, the update unit 44 also updates the graphic information 500 including the ID 501 indicated by the merge partner ID 505 included in the graphic information 500. . Specifically, the update unit 44 includes the ellipse specifying information 503 of the merged first ellipse graphic information 500, and the ellipse specifying information of the second ellipse corresponding to the merged first ellipse that merges the merged first ellipse. The ellipse identification information 503 is updated so as to match. The state information 502 of the graphic information 500 of the merged first ellipse is not changed from “merge”. Thereby, according to the update of the graphic information 500 of the merged subject ellipse, the graphic information 500 of each merged ellipse to which the merged subject ellipse merges is updated.

2次更新処理の対象の図形情報500の状態情報502が「消失」を示す場合には、更新部44は、当該図形情報500に対応する楕円(人)が入力画像140上に現れたと判定して、当該状態情報502を「存在」に変更する。また、更新部44は、当該図形情報500の楕円特定情報503が、当該図形情報500が示す特定済み第1楕円に対応する第2楕円の楕円特定情報と一致するように、当該楕円特定情報503を更新する。そして、更新部44は、当該図形500に含まれる消失時刻504を消去する。   When the state information 502 of the graphic information 500 to be subjected to the secondary update process indicates “disappearance”, the update unit 44 determines that an ellipse (person) corresponding to the graphic information 500 has appeared on the input image 140. The status information 502 is changed to “exist”. The update unit 44 also updates the ellipse specifying information 503 so that the ellipse specifying information 503 of the graphic information 500 matches the ellipse specifying information of the second ellipse corresponding to the specified first ellipse indicated by the graphic information 500. Update. Then, the update unit 44 deletes the disappearance time 504 included in the graphic 500.

以上のようにして、1次更新処理された追跡情報50は、2次特定処理の結果に基づいて更新される。   As described above, the tracking information 50 subjected to the primary update process is updated based on the result of the secondary specifying process.

更新部44は、2次処理の後、2.5次処理(2.5次更新処理)を行う。つまり、更新部44は、1次更新処理及び2次更新処理が行われた追跡情報50に、消失楕円の図形情報500が含まれているか否かを判定する。追跡情報50に消失楕円の図形情報500が含まれている場合には、更新部44は、消失楕円の図形情報500に含まれる消失時刻504が、現在時刻よりも所定時間以上前であるか否かを判定する。更新部44は、図形情報500に含まれる消失時刻504が、現在時刻よりも所定時間以上前である場合には、当該図形情報500を追跡情報50から削除する。   The update unit 44 performs 2.5th order processing (2.5th order update processing) after the secondary processing. That is, the update unit 44 determines whether or not the tracking information 50 that has undergone the primary update process and the secondary update process includes the graphic information 500 of the lost ellipse. When the tracking information 50 includes the disappearing ellipse graphic information 500, the update unit 44 determines whether the disappearance time 504 included in the disappearing ellipse graphic information 500 is a predetermined time or more before the current time. Determine whether. The update unit 44 deletes the graphic information 500 from the tracking information 50 when the disappearance time 504 included in the graphic information 500 is more than a predetermined time before the current time.

このように、本例では、消失楕円の図形情報500、つまり、入力画像140に写らなくなった人に対応する楕円の図形情報500をすぐに削除するのではなく、人が写らなくなってからしばらく経過した後に削除している。これにより、人が物陰に一時的に隠れる場合など、人が写らなくなってからすぐに写るようになる場合に、写らなくなる前と、写るようになった後で、その人に対して同じ図形情報500を対応付けることができる。よって、人が入力画像140において一時的に写らなくなった場合であっても、その人の位置を追跡することができる。   Thus, in this example, the ellipse graphic information 500 of the disappearing ellipse, that is, the ellipse graphic information 500 corresponding to the person who no longer appears in the input image 140 is not deleted immediately, but a certain time has passed since the person disappeared. Have been deleted after. This allows the same graphic information for the person to appear before and after it disappears when it becomes visible immediately after it disappears, such as when a person is temporarily hidden behind objects. 500 can be associated. Therefore, even when a person temporarily disappears in the input image 140, the position of the person can be tracked.

<3次処理の詳細>
上述のように、2次特定処理では、第1楕円に対応付けられた第2楕円は、その後において、別の第1楕円に対応する第2楕円を特定する際の候補から除外されている。したがって、複数の第1楕円が当てはめられていた複数の人に対して共通の第2楕円が当てはめられた場合には、当該第2楕円は、当該複数の第1楕円のすべてに対応する第2楕円であるにもかかわらず、2次特定処理では、当該第2楕円は、当該複数の第1楕円のうちの1つの第1楕円だけに対応付けられる。
<Details of tertiary processing>
As described above, in the secondary specifying process, the second ellipse associated with the first ellipse is subsequently excluded from candidates for specifying the second ellipse corresponding to another first ellipse. Therefore, when a common second ellipse is applied to a plurality of people who have been fitted with a plurality of first ellipses, the second ellipse is a second corresponding to all of the plurality of first ellipses. In spite of being an ellipse, in the secondary specifying process, the second ellipse is associated with only one first ellipse among the plurality of first ellipses.

図42は、複数の第1楕円がそれぞれ当てはめられていた複数の人に対して共通の第2楕円が当てはめられた様子の一例を示す図である。図42の例では、3つの第1楕円250x1,250x2,250x3がそれぞれ当てはめられていた3人の人200に対して共通の1つの第2楕円250yが当てはめられている。図42の例では、第2楕円250yは、第1楕円250x1,250x2,250x3のすべてに対応する第2楕円であるにもかかわらず、2次特定処理では、第2楕円250yは、第1楕円250x1,250x2,250x3のうちの1つの第1楕円だけに対応する第2楕円として特定される。よって、2次特定処理後では、当該1つの第1楕円は特定済み第1楕円となり、第2楕円250yは特定済み第2楕円となり、第1楕円250x1,250x2,250x3のうちの残りの2つの第1楕円は未特定第1楕円となる。そのため、2次更新処理後では、当該残りの2つの第1楕円の図形情報500は更新されていない。   FIG. 42 is a diagram illustrating an example of a state in which a common second ellipse is applied to a plurality of persons to which a plurality of first ellipses are respectively applied. In the example of FIG. 42, one common second ellipse 250y is applied to the three persons 200 to which the three first ellipses 250x1, 250x2, and 250x3 are respectively applied. In the example of FIG. 42, although the second ellipse 250y is a second ellipse corresponding to all of the first ellipses 250x1, 250x2, and 250x3, in the secondary specifying process, the second ellipse 250y is the first ellipse. It is specified as a second ellipse corresponding to only one first ellipse of 250x1, 250x2, 250x3. Therefore, after the secondary specifying process, the one first ellipse becomes the specified first ellipse, the second ellipse 250y becomes the specified second ellipse, and the remaining two of the first ellipses 250x1, 250x2, 250x3. The first ellipse is an unspecified first ellipse. Therefore, after the secondary update process, the remaining two first ellipse graphic information 500 is not updated.

本例では、複数の第1楕円が当てはめられていた複数の人に対して1つの第2楕円が当てはめられた場合、便宜上、当該複数の第1楕円のうち、2次処理において当該第2楕円が対応付けられた特定済み第1楕円が当該第2楕円に遷移し、残りの未特定第1楕円は、当該第2楕円に併合されたと考える。   In this example, when one second ellipse is applied to a plurality of people who have been fitted with a plurality of first ellipses, for convenience, the second ellipse in the secondary process among the plurality of first ellipses. It is considered that the specified first ellipse associated with is transitioned to the second ellipse, and the remaining unspecified first ellipses are merged with the second ellipse.

3次特定処理において、3次特定部43は、2.5次更新処理が行われた追跡情報50に含まれる、未特定第1楕円の図形情報500(未特定図形情報500)が示す未特定第1楕円が、特定済み第2楕円に併合されているか否かを判定する。そして、3次特定部43は、未特定第1楕円が、特定済み第2楕円に併合されている場合には、当該特定済み第2楕円を、当該未特定第1楕円に対応する第2楕円として特定する。これにより、複数の第1楕円が当てはめられた複数の人に対して1つの第2楕円が当てはめられた場合、当該複数の第1楕円のうち、2次処理において当該第2楕円が対応付けられなかった未特定第1楕円を、適切に当該第2楕円に対応付けることができる。以下に、3次特定処理について詳細に説明する。   In the tertiary specifying process, the tertiary specifying unit 43 includes the unspecified first ellipse graphic information 500 (unspecified graphic information 500) included in the tracking information 50 that has been subjected to the 2.5th update process. It is determined whether the first ellipse is merged with the identified second ellipse. Then, when the unspecified first ellipse is merged with the specified second ellipse, the tertiary specifying unit 43 converts the specified second ellipse into the second ellipse corresponding to the unspecified first ellipse. As specified. Thereby, when one second ellipse is applied to a plurality of persons to which a plurality of first ellipses are applied, the second ellipse is associated in the secondary process among the plurality of first ellipses. The unspecified first ellipse that did not exist can be appropriately associated with the second ellipse. Hereinafter, the tertiary specifying process will be described in detail.

<3次特定処理の詳細>
3次特定処理において、3次特定部43は、2.5次更新処理が行われた追跡情報50に、未特定図形情報500が含まれているか否かを判定する。言い換えれば、3次特定部43は、1次更新処理、2次更新処理及び2.5次更新処理が行われた追跡情報50に、未だ更新されていない図形情報500が含まれるか否かを判定する。
<Details of tertiary identification processing>
In the tertiary specifying process, the tertiary specifying unit 43 determines whether or not the unspecified graphic information 500 is included in the tracking information 50 that has been subjected to the 2.5th update process. In other words, the tertiary specifying unit 43 determines whether the graphic information 500 that has not yet been updated is included in the tracking information 50 that has undergone the primary update process, the secondary update process, and the 2.5th update process. judge.

3次特定部43は、2.5次更新処理が行われた追跡情報50に、未特定図形情報500が含まれていると判定すると、2.5次更新処理が行われた追跡情報50に含まれる、状態情報502が「被併合」以外を示す未特定図形情報500(対象未特定図形情報500)が示す未特定第1楕円が、特定済み第2楕円に併合されているか否かを判定する併合判定処理を行う。併合判定処理については後で説明する。そして、3次特定部43は、未特定第1楕円が、特定済み第2楕円に併合されていると判定すると、当該特定済み第2楕円を、未特定第1楕円に対応する第2楕円であると特定する。3次特定部43は、2.5次更新処理が行われた追跡情報50に、複数の対象未特定図形情報500が含まれている場合には、当該複数の対象未特定図形情報500のそれぞれついて同様の処理を行う。3次特定部44は、2.5次更新処理が行われた追跡情報50に、未特定図形情報500が含まれていないと判定すると、3次特定処理を終了する。なお、特定済み第2楕円に併合されていないと判定された未特定第1楕円は、3次更新処理において消失楕円となる。   When the tertiary specifying unit 43 determines that the unspecified graphic information 500 is included in the tracking information 50 that has been subjected to the 2.5th order update process, It is determined whether or not the unspecified first ellipse indicated by the unspecified graphic information 500 (target unspecified graphic information 500) whose state information 502 is other than “merge” is merged with the specified second ellipse. Perform merge determination processing. The merge determination process will be described later. And if the tertiary specific | specification part 43 determines with the unspecified 1st ellipse being merged with the specified 2nd ellipse, the said specified 2nd ellipse will be a 2nd ellipse corresponding to an unspecified 1st ellipse. Identifies it. When the tracking information 50 that has undergone the 2.5th update process includes a plurality of target unspecified graphic information 500, the tertiary specifying unit 43 sets each of the plurality of target unspecified graphic information 500. The same processing is performed. If the tertiary identification unit 44 determines that the unspecified graphic information 500 is not included in the tracking information 50 that has undergone the 2.5th-order update process, the tertiary identification process ends. Note that the unspecified first ellipse that is determined not to be merged with the specified second ellipse becomes a lost ellipse in the tertiary update process.

以後、特定済み第2楕円に併合されているか否かが判定される未特定第1楕円を「3次処理対象の第1楕円」と呼ぶことがある。   Hereinafter, the unspecified first ellipse for which it is determined whether or not it has been merged with the specified second ellipse may be referred to as a “first ellipse to be tertiary processed”.

<併合判定処理の詳細>
併合判定処理において、3次特定部43は、3次処理対象の第1楕円が2つの条件を満足するときに、当該第1楕円が特定済み第2楕円に併合されていると判定する。
<Details of merge determination process>
In the merge determination process, the tertiary specifying unit 43 determines that the first ellipse is merged with the specified second ellipse when the first ellipse to be subjected to the tertiary process satisfies two conditions.

1つ目の条件は、3次処理対象の第1楕円に位置が近い特定済み第2楕円が存在するという条件である。以後、この1つ目の条件を「併合第1条件」と呼ぶことがある。また、3次処理対象の第1楕円に位置が近い特定済み第2楕円を「近傍特定済み第2楕円」と呼ぶ。   The first condition is that there is a specified second ellipse whose position is close to the first ellipse to be subjected to the tertiary processing. Hereinafter, the first condition may be referred to as “merging first condition”. Further, the specified second ellipse whose position is close to the first ellipse to be subjected to the tertiary processing is referred to as “neighbor specified second ellipse”.

2つの目の条件は、近傍特定済み第2楕円が、3次処理対象の第1楕円の少なくとも一部を内包しているという条件である。以後、この2つ目の条件を「併合第2条件」と呼ぶことがある。   The second condition is a condition that the second ellipse whose neighborhood has been specified includes at least a part of the first ellipse to be subjected to the tertiary processing. Hereinafter, the second condition may be referred to as “merge second condition”.

<併合第1条件の判定方法>
3次特定部43は、併合第1条件を満足するか否かを判定する際には、1次処理及び2次処理で得られた特定済み第2楕円に、近傍特定済み第2楕円が存在するか否かを判定する。3次特定部43は、例えば、3次処理対象の第1楕円の中心との距離が第6しきい値以下の中心を有する特定済み第2楕円を近傍特定済み第2楕円とする。つまり、3次特定部43は、1次処理及び2次処理で得られた特定済み第2楕円において、3次処理対象の第1楕円の中心との距離が第6しきい値以下の中心を有する特定済み第2楕円が存在するか否かを判定する。3次特定部44は、1次処理及び2次処理で得られた特定済み第2楕円において近傍特定済み第2楕円が存在すると判定すると、併合第1条件を満足すると判定する。一方で、3次特定部43は、1次処理及び2次処理で得られた特定済み第2楕円において近傍特定済み第2楕円が存在しないと判定すると、併合第1条件を満足しないと判定する。なお、3次処理対象の第1楕円の中心との距離が第6しきい値未満の中心を有する特定済み第2楕円を近傍特定済み第2楕円としても良い。
<Judgment method of merger first condition>
When the tertiary specifying unit 43 determines whether or not the first condition for merging is satisfied, the second ellipse whose neighborhood has been specified exists in the specified second ellipse obtained by the primary process and the secondary process. It is determined whether or not to do. For example, the tertiary specifying unit 43 sets the specified second ellipse having a center whose distance from the center of the first ellipse to be subjected to the tertiary processing is equal to or less than a sixth threshold as the neighborhood specified second ellipse. That is, the tertiary specifying unit 43 has a center whose distance from the center of the first ellipse to be subjected to the tertiary processing is the sixth threshold value or less in the specified second ellipse obtained by the primary processing and the secondary processing. It is determined whether or not the specified second ellipse exists. If the tertiary specifying unit 44 determines that the second ellipse in the vicinity specified in the specified second ellipse obtained by the primary process and the secondary process exists, it determines that the merged first condition is satisfied. On the other hand, if the tertiary specifying unit 43 determines that there is no neighboring specified second ellipse in the specified second ellipse obtained by the primary processing and the secondary processing, it determines that the merged first condition is not satisfied. . Note that the specified second ellipse having a center whose distance from the center of the first ellipse to be third-processed is less than the sixth threshold value may be set as the second ellipse whose neighborhood has been specified.

<併合第2条件の判定方法>
3次特定部43は、3次処理対象の第1楕円について併合第1条件を満足する場合にだけ、当該3次処理対象の第1楕円について併合第2条件を満足するか否かを判定する。3次処理部43は、1次処理及び2次処理で得られた特定済み第2楕円において、近傍特定済み第2楕円が1つだけ存在する場合は、その近傍特定済み第2楕円が3次処理対象の第1楕円の少なくとも一部を内包しているか否かを判定する。一方で、3次処理部43は、1次処理及び2次処理で得られた特定済み第2楕円において、近傍特定済み第2楕円が複数存在する場合は、その複数の近傍特定済み第2楕円のうち、3次処理対象の第1楕円に対して最も位置が近い近傍特定済み第2楕円を使用対象とする。そして、3次特定部43は、使用対象の近傍特定済み第2楕円が、3次処理対象の第1楕円の少なくとも一部を内包しているか否かを判定する。3次処理部43は、例えば、複数の近傍特定済み第2楕円のうち、その中心と、3次処理対象の第1楕円の中心との距離が最も小さい近傍特定済み第2楕円を使用対象とする。
<Judgment method of merger second condition>
The tertiary specifying unit 43 determines whether or not the merged second condition is satisfied for the first ellipse for the third processing target only when the merged first condition is satisfied for the first ellipse for the third processing target. . In the identified second ellipse obtained by the primary processing and the secondary processing, the tertiary processing unit 43, when there is only one neighborhood identified second ellipse, the neighborhood identified second ellipse is tertiary. It is determined whether or not at least a part of the first ellipse to be processed is included. On the other hand, in the identified second ellipse obtained by the primary process and the secondary process, the tertiary processing unit 43, when there are a plurality of neighborhood identified second ellipses, the plurality of neighborhood identified second ellipses. Among them, the second ellipse whose neighborhood has been identified that is closest to the first ellipse to be subjected to the tertiary processing is used. Then, the tertiary specifying unit 43 determines whether or not the second ellipse whose vicinity has been specified includes at least a part of the first ellipse to be processed. The tertiary processing unit 43 uses, for example, the second identified ellipse whose distance between the center of the plurality of second identified ellipses and the center of the first ellipse to be third-processed is the smallest as the target of use. To do.

3次特定部43は、併合第2条件を満足するか否かを判定する際には、例えば、3次処理対象の第1楕円と、その長軸及び短軸との4つの交点を使用する(上述の図36参照)。3次特定部43は、4つの交点のうち所定数以上の交点が近傍特定済み第2楕円内に存在するとき、近傍特定済み第2楕円が、3次処理対象の第1楕円の少なくとも一部を内包していると判定する。つまり、3次特定部43は併合第2条件を満足すると判定する。一方で、3次特定部43は、4つの交点のうち所定数未満の交点だけが近傍特定済み第2楕円内に存在するとき、併合第2条件を満足しないと判定する。   When determining whether or not the merged second condition is satisfied, the tertiary specifying unit 43 uses, for example, four intersections of the first ellipse to be subjected to the tertiary processing and its long and short axes. (See FIG. 36 above). The tertiary specifying unit 43, when a predetermined number or more of the four intersections are present in the second ellipse whose neighborhood has been specified, the second ellipse whose neighborhood has been specified is at least a part of the first ellipse to be subjected to the tertiary processing Is determined to be included. That is, the tertiary identification unit 43 determines that the merged second condition is satisfied. On the other hand, the tertiary specification unit 43 determines that the merged second condition is not satisfied when only the intersections less than the predetermined number among the four intersections exist in the second ellipse whose neighborhood has been specified.

以上のようにして、3次特定部43は、3次処理対象の第1楕円が、併合第1条件及び併合第2条件を満足するか否かを判定する。そして、3次特定部43は、3次処理対象の第1楕円が、併合第1条件及び併合第2条件を満足する場合には、当該第1楕円が、近傍特定済み第2楕円に併合されたと判定する。そして、3次特定部43は、近傍特定済み第2楕円を、3次処理対象の第1楕円に対応する第2楕円として特定する。これにより、3次処理対象の第1楕円は特定済み第1楕円となる。   As described above, the tertiary specifying unit 43 determines whether or not the first ellipse to be subjected to the tertiary processing satisfies the merge first condition and the merge second condition. Then, the tertiary specifying unit 43 merges the first ellipse into the second ellipse whose neighborhood has been specified when the first ellipse to be subjected to the tertiary processing satisfies the merged first condition and the merged second condition. It is determined that Then, the tertiary specifying unit 43 specifies the second ellipse whose neighborhood has been specified as the second ellipse corresponding to the first ellipse to be subjected to the tertiary processing. Thereby, the first ellipse to be subjected to the tertiary processing becomes the identified first ellipse.

なお、上述の図42に示される場合などにおいては、3次処理対象の複数の第1楕円に対応する第2楕円として、同じ特定済み第1楕円が特定されることがある。例えば、図42の例において、3次処理対象の第1楕円が、第1楕円250x1,250x2であるとすると、3次特定処理では、この2つの第1楕円250x1,250x2に対応する第2楕円として、第2楕円250yが特定される。   In the case shown in FIG. 42 described above, the same specified first ellipse may be specified as the second ellipse corresponding to the plurality of first ellipses to be tertiary processed. For example, in the example of FIG. 42, if the first ellipse to be subjected to the tertiary processing is the first ellipse 250x1, 250x2, the second ellipse corresponding to the two first ellipses 250x1, 250x2 in the tertiary specifying process. As a result, the second ellipse 250y is specified.

3次特定部43は、併合第2条件を満足するか否かの判定を、上記とは異なる方法で行っても良い。例えば、3次特定部43は、3次処理対象の第1楕円の中心が近傍特定済み第2楕円内に存在する場合に、当該近傍特定済み第2楕円が、当該第1楕円の少なくとも一部を内包していると判定しても良い。   The tertiary identification unit 43 may determine whether or not the second merged condition is satisfied by a method different from the above. For example, when the center of the first ellipse to be subjected to the third processing exists in the second ellipse whose neighborhood has been specified, the tertiary specifying unit 43 has at least a part of the first ellipse as the second ellipse whose neighborhood has been specified It may be determined that it is included.

また、3次特定部43は、併合第2条件を使用せずに、3次処理対象の第1楕円が併合第1条件を満足する場合に、当該第1楕円が、近傍特定済み第2楕円に併合されたと判定しても良い。   In addition, the tertiary specifying unit 43 does not use the merged second condition, and when the first ellipse to be subjected to the tertiary processing satisfies the merged first condition, the first ellipse is determined as the neighborhood specified second ellipse. It may be determined that they have been merged.

また、3次特定部43は、1次処理及び2次処理で得られた特定済み第2楕円において、3次処理対象の第1楕円の少なくとも一部を内包する特定済み第2楕円が存在する場合には、当該第1楕円が当該特定済み第2楕円に併合されていると判定しても良い。   The tertiary specifying unit 43 includes a specified second ellipse that includes at least a part of the first ellipse to be processed in the specified second ellipse obtained by the primary processing and the secondary processing. In this case, it may be determined that the first ellipse is merged with the specified second ellipse.

このように、3次処理対象の第1楕円が、特定済み第2楕円に併合されているか否かを判定することによって、人と楕円とを適切に対応付けることができる。よって、入力画像140上での楕円の位置の追跡によって、入力画像140での人の位置を適切に追跡することができる。   In this way, by determining whether or not the first ellipse to be subjected to the tertiary processing is merged with the specified second ellipse, it is possible to appropriately associate the person and the ellipse. Therefore, by tracking the position of the ellipse on the input image 140, it is possible to appropriately track the position of the person on the input image 140.

また、3次処理対象の第1楕円が併合第1条件及び併合第2条件の両方を満足する場合に、当該第1楕円が、近傍特定済み第2楕円に併合されたと判定することによって、人と楕円とをより適切に対応付けることができる。よって、入力画像140での人の位置をより適切に追跡することができる。   In addition, when the first ellipse subject to the tertiary processing satisfies both the merged first condition and the merged second condition, it is determined that the first ellipse has been merged into the neighborhood-specified second ellipse. And an ellipse can be associated more appropriately. Therefore, the position of the person in the input image 140 can be tracked more appropriately.

<3次更新処理の詳細>
次に3次更新処理について詳細に説明する。3次更新処理において、更新部44は、3次特定処理で新たに得られた各特定済み第1楕円の図形情報500を更新する。以後、3次更新処理の対象の、特定済み第1楕円の図形情報500を「3次更新対象の第1楕円図形情報500」と呼ぶことがある。
<Details of tertiary update processing>
Next, the tertiary update process will be described in detail. In the tertiary update process, the update unit 44 updates the graphic information 500 of each specified first ellipse newly obtained in the tertiary specification process. Hereinafter, the graphic information 500 of the specified first ellipse to be subjected to the tertiary update process may be referred to as “first elliptic graphic information 500 to be subjected to the tertiary update”.

また、更新部44は、3次特定処理で新たに得られた特定済み第1楕円に対応する特定済み第2楕円の図形情報500を更新する。この図形情報500は、2次更新処理が行われた図形情報500である。以後、3次更新処理の対象の、特定済み第2楕円の図形情報500を「3次更新対象の第2楕円図形情報500」と呼ぶことがある。   Further, the updating unit 44 updates the graphic information 500 of the specified second ellipse corresponding to the specified first ellipse newly obtained by the tertiary specifying process. The graphic information 500 is graphic information 500 that has been subjected to secondary update processing. Hereinafter, the graphic information 500 of the specified second ellipse to be subjected to the tertiary update process may be referred to as “second elliptic graphic information 500 to be subjected to the tertiary update”.

更新部44は、3次更新対象の第1楕円図形情報500を更新する際には、当該第1楕円図形情報500の状態情報502を「被併合」に設定する。また、更新部44は、3次更新対象の第1楕円図形情報500の楕円特定情報503が、当該第1楕円図形情報500が示す特定済み第1楕円が対応する特定済み第2楕円の楕円特定情報と一致するように当該楕円特定情報503を更新する。   The updating unit 44 sets the state information 502 of the first ellipse graphic information 500 to “merged” when updating the first ellipse graphic information 500 to be tertiary updated. The update unit 44 also specifies the ellipse specification of the specified second ellipse corresponding to the specified first ellipse indicated by the first ellipse graphic information 500 in the ellipse specification information 503 of the first ellipse graphic information 500 to be subjected to the tertiary update. The ellipse identification information 503 is updated so as to match the information.

更新部44が3次更新対象の第2楕円図形情報500を更新する処理は、当該第2楕円図形情報500の状態情報502が「併合」である場合と、「併合」以外の値である場合とで異なる。   The update unit 44 updates the second ellipse graphic information 500 that is the third update target when the state information 502 of the second ellipse graphic information 500 is “merged” or a value other than “merged”. And different.

まず、3次更新対象の第2楕円図形情報500の状態情報502が「併合」である場合の更新部44の動作について説明する。この場合には、更新部44は、3次更新対象の第2楕円図形情報500の状態情報502を「併合」のままとする。また、更新部44は、3次更新対象の第2楕円図形情報500の楕円特定情報503を変化させない。そして、更新部44は、3次更新対象の第2楕円図形情報500の併合相手ID505及び併合数506を更新する。具体的には、更新部44は、3次更新対象の第2楕円図形情報500が示す特定済み第2楕円に対応する、3次特定処理で得られた特定済み第1楕円の数がP(≧1)個である場合、併合相手ID505に、当該P個の特定済み第1楕円の図形情報500のID501を含めるとともに、併合数506の値を“P”だけ増加させる。これにより、2次更新処理されている3更新対象の第2楕円図形情報500が3次更新処理される。   First, the operation of the updating unit 44 when the state information 502 of the second ellipse graphic information 500 to be tertiary updated is “merged” will be described. In this case, the update unit 44 keeps the state information 502 of the second ellipse graphic information 500 that is the third update target as “merged”. Further, the updating unit 44 does not change the ellipse specifying information 503 of the second ellipse graphic information 500 that is the third update target. Then, the update unit 44 updates the merge partner ID 505 and the merge number 506 of the second ellipse graphic information 500 that is the third update target. Specifically, the updating unit 44 determines that the number of identified first ellipses obtained by the tertiary identifying process corresponding to the identified second ellipse indicated by the second ellipse graphic information 500 to be tertiary updated is P ( If ≧ 1), the IDs 501 of the P identified first ellipse graphic information 500 are included in the merge partner ID 505 and the value of the merge number 506 is increased by “P”. As a result, the second ellipse graphic information 500 that is the third update target that has been subjected to the secondary update process is subjected to the tertiary update process.

次に、3次更新対象の第2楕円図形情報500の状態情報502が「併合」以外の値である場合の更新部44の動作について説明する。この場合には、更新部44は、3次更新対象の第2楕円図形情報500の状態情報502を「併合」に変化させる。また、更新部44は、3次更新対象の第2楕円図形情報500の楕円特定情報503を変化させない。そして、更新部44は、3次更新対象の第2楕円図形情報500に対して併合相手ID505及び併合数506を追加する。更新部44は、3次更新対象の第2楕円図形情報500が示す特定済み第2楕円に対応する、3次特定処理で得られた特定済み第1楕円の数がP個である場合、併合相手ID505に、当該P個の特定済み第1楕円の図形情報500のID501を含めるとともに、併合数506の値を“P”に設定する。これにより、2次更新処理されている3更新対象の第2楕円図形情報500が3次更新処理される。   Next, the operation of the updating unit 44 when the state information 502 of the second ellipse graphic information 500 to be thirdarily updated is a value other than “merged” will be described. In this case, the update unit 44 changes the state information 502 of the second ellipse graphic information 500 that is the third update target to “merged”. Further, the updating unit 44 does not change the ellipse specifying information 503 of the second ellipse graphic information 500 that is the third update target. Then, the update unit 44 adds the merge partner ID 505 and the merge number 506 to the second ellipse graphic information 500 that is the third update target. The update unit 44 merges when the number of identified first ellipses obtained by the tertiary identification process corresponding to the identified second ellipse indicated by the second elliptic figure information 500 to be thirdarily updated is P. The partner ID 505 includes the ID 501 of the P identified first ellipse graphic information 500 and sets the value of the merged number 506 to “P”. As a result, the second ellipse graphic information 500 that is the third update target that has been subjected to the secondary update process is subjected to the tertiary update process.

また、更新部44は、3次更新処理において、未特定第1楕円の図形情報500が2.5次更新処理後の追跡情報50に含まれている場合には、当該未特定第1楕円に対応する第2楕円は存在しないと判定する。つまり、更新部44は、当該図形情報500に対応する楕円が入力画像140上に現れなくなったと判定する。そして、更新部44は、当該図形情報500の状態情報502を「消失」に設定する。また、更新部44は、当該図形情報500に、消失時刻504として現在の時刻を含める。   In addition, in the tertiary update process, when the graphic information 500 of the unspecified first ellipse is included in the tracking information 50 after the 2.5th update process, the update unit 44 sets the unspecified first ellipse to the unspecified first ellipse. It is determined that the corresponding second ellipse does not exist. That is, the update unit 44 determines that the ellipse corresponding to the graphic information 500 no longer appears on the input image 140. Then, the update unit 44 sets the state information 502 of the graphic information 500 to “disappear”. Further, the update unit 44 includes the current time as the disappearance time 504 in the graphic information 500.

また、更新部44は、現フレームでの当てはめ処理で得られた第2楕円のうち、未だ第1楕円が対応付けられていない未特定第2楕円の図形情報500を生成する。前フレームの入力画像140に写っていなかった人が現フレームの入力画像に写るようになった場合、当該人に当てはめられた第2楕円は、1次〜3次特定処理が終了した後、未特定第2楕円となっている。更新部44は、未だ第1楕円が対応付けられていない未特定第2楕円の図形情報500として、状態情報502が「出現」を示し、楕円特定情報503が当該未特定第2楕円の楕円特定情報を示す図形情報500を生成する。そして、更新部44は、生成した図形情報500を追跡情報50に追加する。   Further, the update unit 44 generates graphic information 500 of an unspecified second ellipse that is not yet associated with the first ellipse among the second ellipses obtained by the fitting process in the current frame. When a person who was not shown in the input image 140 of the previous frame comes to be shown in the input image of the current frame, the second ellipse applied to the person is not displayed after the primary to tertiary specifying process is completed. It is a specific second ellipse. The update unit 44 indicates that the state information 502 indicates “appearance” as the graphic information 500 of the unspecified second ellipse that is not yet associated with the first ellipse, and the ellipse specifying information 503 indicates the ellipse specifying the unspecified second ellipse. Graphic information 500 indicating the information is generated. Then, the update unit 44 adds the generated graphic information 500 to the tracking information 50.

以上のようにして、追跡処理部12が、1次処理、2次処理、2.5次処理及び3次処理を行うことによって、前フレームでの当てはめ処理で得られた各第1楕円について、現フレームでの当てはめ処理で得られた、当該第1楕円に対応する第2楕円を特定する第1対応特定処理と、消失楕円に対応する第2楕円を特定する第2対応特定処理とが行われる。そして、追跡処理部12が、当てはめ処理結果170が入力されるたびに、1次処理、2次処理、2.5次処理及び3次処理を行うことによって、追跡情報50が順次更新され、入力画像140上での楕円の位置が追跡される。追跡情報50に含まれる図形情報500の楕円特定情報503に含まれる中心座標が、当該図形情報500に対応する楕円の入力画像140上での現在の位置を示している。追跡情報50が順次更新されることによって、入力画像140(撮像画像110)上での人の位置が追跡されると言える。また、追跡情報50が順次更新されることによって、室内300内での人の位置が追跡されると言える。図形情報500の楕円特定情報503に含まれる中心座標は、当該図形情報500に対応する人の入力画像140上での現在の位置を示しており、さらに、当該図形情報500に対応する人の撮像画像110上での現在の位置を示している。   As described above, the tracking processing unit 12 performs the primary processing, the secondary processing, the 2.5th processing, and the tertiary processing, so that each first ellipse obtained by the fitting processing in the previous frame is The first correspondence specifying process for specifying the second ellipse corresponding to the first ellipse and the second correspondence specifying process for specifying the second ellipse corresponding to the lost ellipse obtained by the fitting process in the current frame are performed. Is called. Then, each time the fitting processing result 170 is input, the tracking processing unit 12 performs the primary processing, the secondary processing, the 2.5th processing, and the tertiary processing, so that the tracking information 50 is sequentially updated and input. The position of the ellipse on the image 140 is tracked. The center coordinates included in the ellipse specifying information 503 of the graphic information 500 included in the tracking information 50 indicate the current position of the ellipse corresponding to the graphic information 500 on the input image 140. It can be said that the position of the person on the input image 140 (captured image 110) is tracked by sequentially updating the tracking information 50. Moreover, it can be said that the position of the person in the room 300 is tracked by sequentially updating the tracking information 50. The center coordinates included in the ellipse specifying information 503 of the graphic information 500 indicate the current position on the input image 140 of the person corresponding to the graphic information 500, and further, imaging of the person corresponding to the graphic information 500 The current position on the image 110 is shown.

また、図形情報500に含まれる状態情報502を参照することによって、当該図形情報500に対応する人の室内300内での状態を把握することができる。例えば、図形情報500の状態情報502が「出現」を示す場合には、当該図形情報500に対応する人が室内300に入ってきたことを示す。また、追跡情報50に含まれる図形情報500の状態情報502が「存在」を示す場合には、当該図形情報500に対応する人が室内300に継続して存在することを示す。また、追跡情報50に含まれる図形情報500の状態情報502が「消失」を示す場合には、当該図形情報500に対応する人が室内300から出て行ったことを示す。また、追跡情報50に含まれる図形情報500の状態情報502が「併合」あるいは「被併合」を示す場合には、当該図形情報500に対応する人が室内300において他の人の近くに存在することを示す。   Further, by referring to the state information 502 included in the graphic information 500, it is possible to grasp the state of the person corresponding to the graphic information 500 in the room 300. For example, when the state information 502 of the graphic information 500 indicates “appearance”, it indicates that a person corresponding to the graphic information 500 has entered the room 300. Further, when the state information 502 of the graphic information 500 included in the tracking information 50 indicates “exist”, it indicates that a person corresponding to the graphic information 500 continues to exist in the room 300. Further, when the state information 502 of the graphic information 500 included in the tracking information 50 indicates “disappearance”, it indicates that the person corresponding to the graphic information 500 has left the room 300. In addition, when the state information 502 of the graphic information 500 included in the tracking information 50 indicates “merged” or “merge”, the person corresponding to the graphic information 500 exists in the room 300 near another person. It shows that.

<カウント部の詳細>
カウント部13は、追跡処理部12での追跡処理が終了すると、その追跡処理の結果に基づいて、現フレームの入力画像140に写る人の数を求める。具体的には、カウント部13は、追跡処理において更新された追跡情報50に基づいて、現フレームの入力画像140に写る人の数を求める。以下に、追跡情報50に基づいて、入力画像140に写る人の数を求める方法について説明する。
<Details of the counting unit>
When the tracking processing in the tracking processing unit 12 is completed, the counting unit 13 obtains the number of people that appear in the input image 140 of the current frame based on the result of the tracking processing. Specifically, the count unit 13 obtains the number of people who appear in the input image 140 of the current frame based on the tracking information 50 updated in the tracking process. Hereinafter, a method for obtaining the number of people shown in the input image 140 based on the tracking information 50 will be described.

本例では、カウント部13は、入力画像140に写る人の数を求める際に、追跡情報50のうち、状態情報502が「出現」を示す図形情報500と、状態情報502が「存在」を示す図形情報500と、状態情報502が「併合」を示す図形情報500とを使用する。   In this example, when the count unit 13 obtains the number of persons shown in the input image 140, among the tracking information 50, the graphic information 500 in which the state information 502 indicates “appearance” and the state information 502 indicates “existence”. Graphic information 500 to be shown and graphic information 500 whose status information 502 indicates “merged” are used.

ここで、追跡情報50に含まれる、状態情報502が「出現」を示す図形情報500の数をK1、追跡情報50に含まれる、状態情報502が「存在」を示す図形情報500の数をK2、追跡情報50に含まれる、状態情報502が「併合」を示す図形情報500の数をK3とする。また、追跡情報50に含まれる、状態情報502が「併合」を示す図形情報500に対して、1番からK3番までの番号を割り当てる。そして、k番(1≦k≦K3)の図形情報500に含まれる併合数506の値をJkとする。   Here, K1 is the number of graphic information 500 whose status information 502 indicates “appearance” included in the tracking information 50, and K2 is the number of graphic information 500 whose status information 502 is “existence” included in the tracking information 50. The number of graphic information 500 included in the tracking information 50 and indicating that the status information 502 is “merged” is represented by K3. Also, numbers 1 to K3 are assigned to the graphic information 500 whose status information 502 indicates “merged” included in the tracking information 50. The value of the merge number 506 included in the graphic information 500 of the kth (1 ≦ k ≦ K3) is Jk.

カウント部13は、以下の式(1)を用いて、入力画像140に写る人の総数Ktotalを求める。   The counting unit 13 obtains the total number Ktotal of people appearing in the input image 140 using the following formula (1).

Figure 0006568772
Figure 0006568772

状態情報502が「出現」を示す図形情報500は1人の人に対応している。また、状態情報502が「存在」を示す図形情報500は1人の人に対応している。そして、状態情報502が「併合」を示す図形情報500は、当該図形情報500に含まれる併合数506の値よりも1つだけ大きい数の人に対応している。したがって、現フレームの入力画像140に写る人の総数Ktotalは、式(1)のように表すことができる。   The graphic information 500 whose status information 502 indicates “appearance” corresponds to one person. Further, the graphic information 500 whose status information 502 indicates “exist” corresponds to one person. The graphic information 500 in which the status information 502 indicates “merged” corresponds to a number of people that is one larger than the value of the merged number 506 included in the graphic information 500. Therefore, the total number Ktotal of people appearing in the input image 140 of the current frame can be expressed as in Expression (1).

なお、カウント部13は、上記とは異なる方法で、入力画像140に写る人の数を求めても良い。例えば、カウント部13は、追跡情報50に含まれる、状態情報502が「消失」以外を示す図形情報500の数を、入力画像140に写る人の総数としても良い。   Note that the count unit 13 may obtain the number of people shown in the input image 140 by a method different from the above. For example, the count unit 13 may use the number of graphic information 500 included in the tracking information 50 indicating that the status information 502 is other than “disappeared” as the total number of people in the input image 140.

また、本例では、ある入力画像140に初めて現れた人が、その次に生成される入力画像140に現れなくなる可能性は低いことから、カウント部13は、入力画像140に写る人の数を求める際に、状態情報502が「出現」を示す図形情報500を使用しなくても良い。この場合には、カウント部13は、例えば以下の式(2)を用いて、現フレームの入力画像140に写る人の総数Ktotalを求める。   In this example, since it is unlikely that a person who first appears in a certain input image 140 will not appear in the next generated input image 140, the counting unit 13 determines the number of persons appearing in the input image 140. When obtaining, the graphic information 500 indicating that the status information 502 indicates “appearance” may not be used. In this case, the count unit 13 obtains the total number Ktotal of people appearing in the input image 140 of the current frame using, for example, the following equation (2).

Figure 0006568772
Figure 0006568772

また、図形情報500の楕円特定情報503に含まれる中心座標は、当該図形情報500に対応する人の位置を示していることから、カウント部13は、室内300において、エリアごとに人数を求めることができる。例えば、室内300を4つのエリアに分割すると、カウント部13は、当該4つのエリアのそれぞれに人が何人いるか特定することができる。   Further, since the center coordinates included in the ellipse specifying information 503 of the graphic information 500 indicate the position of the person corresponding to the graphic information 500, the counting unit 13 obtains the number of people for each area in the room 300. Can do. For example, when the room 300 is divided into four areas, the count unit 13 can specify how many people are in each of the four areas.

図43は、前フレームの入力画像140に対して行われた当てはめ処理で得られた第1楕円を、前フレームの撮影画像110xに重ねた様子の一例を示す図である。図44は、現フレームの入力画像140に対して行われた当てはめ処理で得られた第2楕円を、現フレームの撮影画像110yに重ねた様子の一例を示す図である。   FIG. 43 is a diagram illustrating an example of a state in which the first ellipse obtained by the fitting process performed on the input image 140 of the previous frame is superimposed on the captured image 110x of the previous frame. FIG. 44 is a diagram illustrating an example of a state in which the second ellipse obtained by the fitting process performed on the input image 140 of the current frame is superimposed on the captured image 110y of the current frame.

図43には、人200z1,200z2に対して共通に当てはめられた第1楕円250x12と、人200z3に対して当てはめられた第1楕円250x3とが示されている。また図43には、前フレームの入力画像140についての当てはめ処理結果170に基づいて更新された追跡情報50に含まれる、状態情報502が「消失」を示す図形情報500が示す消失楕円250x4が示されている。   FIG. 43 shows a first ellipse 250x12 that is commonly applied to the persons 200z1 and 200z2, and a first ellipse 250x3 that is applied to the person 200z3. FIG. 43 also shows an erasure ellipse 250x4 indicated by the graphic information 500 whose state information 502 indicates “disappearance”, which is included in the tracking information 50 updated based on the fitting process result 170 for the input image 140 of the previous frame. Has been.

図44には、人200z1に当てはめられた第2楕円250y1と、人200z2に対して当てはめられた第2楕円250y2と、人200z3に対して当てはめられた第2楕円250y3と、人200z4に対して当てはめられた第2楕円250y4とが示されている。   44 shows a second ellipse 250y1 fitted to the person 200z1, a second ellipse 250y2 fitted to the person 200z2, a second ellipse 250y3 fitted to the person 200z3, and a person 200z4. A fitted second ellipse 250y4 is shown.

図43に示される第1楕円250x12は、併合主体第1楕円250x12である(被併合第1楕円250x12とも言える)。併合主体第1楕円250x12は、図44に示される2つの第2楕円250y1,250y2に分離している。また、消失楕円250x4は、人200z4に当てはめられていた楕円であって、入力画像140に写らないようになった人200z4が、現フレームの入力画像140において写るようになっている。   The first ellipse 250x12 shown in FIG. 43 is the merged main first ellipse 250x12 (also referred to as the merged first ellipse 250x12). The merged main first ellipse 250x12 is separated into two second ellipses 250y1 and 250y2 shown in FIG. Further, the disappearing ellipse 250x4 is an ellipse that has been applied to the person 200z4, and the person 200z4 that is not shown in the input image 140 is shown in the input image 140 of the current frame.

図43,44の例では、1次特定処理において、2つの第2楕円250y1,250y2が、併合主体第1楕円250x12に対応する第2楕円として特定される。したがって、1次更新処理では、併合主体第1楕円250x12の図形情報500及び被併合第1楕円250x12の図形情報500の状態情報502がともに「存在」に設定される。   In the example of FIGS. 43 and 44, in the primary specifying process, the two second ellipses 250y1 and 250y2 are specified as the second ellipses corresponding to the merged main first ellipse 250x12. Therefore, in the primary update process, both the graphic information 500 of the merged subject first ellipse 250x12 and the state information 502 of the graphic information 500 of the merged first ellipse 250x12 are set to “exist”.

2次特定処理では、2次処理対象の第1楕円250x3及び消失楕円250x4に対応する第2楕円が、2次処理対象の第2楕円250y3,250y4から特定される。ここでは、第2楕円250y3が、第1楕円250x3に対応する第2楕円として特定され、第2楕円250y4が、消失楕円250x4に対応する第2楕円として特定される。2次更新処理において、消失楕円250x4の図形情報500の状態情報502は「消失」から「存在」に変更される。なお、図43,44の例では、3次処理対象の第1楕円が存在しない。   In the secondary specifying process, the second ellipse corresponding to the first ellipse 250x3 and the disappearing ellipse 250x4 as the secondary processing target is specified from the second ellipses 250y3 and 250y4 as the secondary processing target. Here, the second ellipse 250y3 is specified as the second ellipse corresponding to the first ellipse 250x3, and the second ellipse 250y4 is specified as the second ellipse corresponding to the disappearing ellipse 250x4. In the secondary update process, the state information 502 of the graphic information 500 of the disappearing ellipse 250x4 is changed from “disappearing” to “existing”. In the example of FIGS. 43 and 44, the first ellipse to be subjected to the tertiary processing does not exist.

図45は、前フレームの入力画像140に対して行われた当てはめ処理で得られた第1楕円を、前フレームの撮影画像110xに重ねた様子の他の例を示す図である。図46は、現フレームの入力画像140に対して行われた当てはめ処理で得られた第2楕円を、現フレームの撮影画像110yに重ねた様子の他の例を示す図である。   FIG. 45 is a diagram illustrating another example of a state in which the first ellipse obtained by the fitting process performed on the input image 140 of the previous frame is overlaid on the captured image 110x of the previous frame. FIG. 46 is a diagram illustrating another example of a state in which the second ellipse obtained by the fitting process performed on the input image 140 of the current frame is overlaid on the captured image 110y of the current frame.

図45には、人200z1に対して当てはめられた第1楕円250x1と、人200z2に対して当てはめられた第1楕円250x2と、人200z3に対して当てはめられた第1楕円250x3と、人200z4に対して当てはめられた第1楕円250x4とが示されている。   FIG. 45 shows a first ellipse 250x1 fitted to the person 200z1, a first ellipse 250x2 fitted to the person 200z2, a first ellipse 250x3 fitted to the person 200z3, and a person 200z4. A first ellipse 250x4 fitted to it is shown.

図46には、2人の人200z1,z2に対して共通に当てはめられた第2楕円250y12と、人200z3に対して当てはめられた第2楕円250y3と、人200z5に対して当てはめられた第2楕円250y5とが示されている。また図46には、現フレームの入力画像140についての当てはめ処理結果170に基づいて更新された追跡情報50に含まれる、状態情報502が「消失」を示す図形情報500が示す消失楕円250y4が示されている。   In FIG. 46, a second ellipse 250y12 that is commonly applied to two persons 200z1 and z2, a second ellipse 250y3 that is applied to person 200z3, and a second ellipse 250y3 that is applied to person 200z5. An ellipse 250y5 is shown. FIG. 46 also shows an erasure ellipse 250y4 indicated by the graphic information 500 in which the state information 502 indicates “disappearance”, which is included in the tracking information 50 updated based on the fitting process result 170 for the input image 140 of the current frame. Has been.

図45,46の例では、前フレームでの当てはめ処理で得られた第1楕円に、併合主体第1楕円が含まれていないことから、1次処理は行われない。   45 and 46, since the first ellipse obtained by the fitting process in the previous frame does not include the merged subject first ellipse, the primary process is not performed.

2次特定処理では、2次処理対象の第1楕円250x1〜250x4に対応する第2楕円が、2次処理対象の第2楕円250y12,250y3,250y5から特定される。この例では、第2楕円250y3が、第1楕円250x3に対応する第2楕円として特定される。また、第2楕円250y12が、第1楕円250x1,250x2の一方、例えば第1楕円250x1に対応する第2楕円として特定される。2次更新処理では、第1楕円250x1の図形情報500が更新され、当該図形情報500は第2楕円y12に関する情報となる。第1楕円250x4に近い第2楕円が存在しないことから、2次特定処理では、第1楕円250x4に対応する第2楕円は特定されない。また、第1楕円250x1,250x2の他方、つまり第1楕円250x2に対応する第2楕円も特定されない。   In the secondary specifying process, the second ellipse corresponding to the first ellipse 250x1 to 250x4 that is the secondary processing target is specified from the second ellipses 250y12, 250y3, and 250y5 that are the secondary processing target. In this example, the second ellipse 250y3 is specified as the second ellipse corresponding to the first ellipse 250x3. Further, the second ellipse 250y12 is specified as one of the first ellipses 250x1 and 250x2, for example, the second ellipse corresponding to the first ellipse 250x1. In the secondary update process, the graphic information 500 of the first ellipse 250x1 is updated, and the graphic information 500 becomes information regarding the second ellipse y12. Since there is no second ellipse close to the first ellipse 250x4, the second ellipse corresponding to the first ellipse 250x4 is not specified in the secondary specifying process. Further, the other of the first ellipses 250x1 and 250x2, that is, the second ellipse corresponding to the first ellipse 250x2 is not specified.

3次特定処理では、3次処理対象の第1楕円250x2,250x4に対応する第2楕円が、特定済み第2楕円250y12,250y3から特定される。この例では、第1楕円250x2に対応する第2楕円として、特定済み第2楕円250y12が特定される。第1楕円250x4に近い特定済み第2楕円は存在しないことから、3次特定処理では、第1楕円250x4に対応する第2楕円は特定されない。   In the tertiary specifying process, the second ellipse corresponding to the first ellipse 250x2 and 250x4 to be subjected to the tertiary process is specified from the specified second ellipses 250y12 and 250y3. In this example, the identified second ellipse 250y12 is identified as the second ellipse corresponding to the first ellipse 250x2. Since there is no specified second ellipse close to the first ellipse 250x4, the second ellipse corresponding to the first ellipse 250x4 is not specified in the tertiary specifying process.

3次更新処理では、3次特定処理で新たに得られた特定済み第1楕円250x1の図形情報500の状態情報502が「被併合」に設定される。また、第1楕円250x1に対応する第2楕円y12の図形情報500(2次更新処理で更新された第1楕円250x1の図形情報500)の状態情報502が「併合」に設定される。   In the tertiary update process, the state information 502 of the graphic information 500 of the identified first ellipse 250x1 newly obtained in the tertiary identification process is set to “merged”. Further, the state information 502 of the graphic information 500 of the second ellipse y12 corresponding to the first ellipse 250x1 (the graphic information 500 of the first ellipse 250x1 updated by the secondary update process) is set to “merged”.

また3次更新処理では、3次更新処理後の追跡情報50に含まれる、未特定第1楕円250x4の図形情報500の状態情報502が「消失」に設定される。そして、3次更新処理では、現フレームでの当てはめ処理で得られた第2楕円のうち、未だ第1楕円が対応付けられていない未特定第2楕円250y5の図形情報500が生成されて、追跡情報50に追加される。当該図形情報500の状態情報502は「出現」に設定される。   In the tertiary update process, the state information 502 of the graphic information 500 of the unspecified first ellipse 250x4 included in the tracking information 50 after the tertiary update process is set to “disappear”. In the tertiary update process, the graphic information 500 of the unspecified second ellipse 250y5 that is not yet associated with the first ellipse among the second ellipses obtained by the fitting process in the current frame is generated and tracked. Added to information 50. The state information 502 of the graphic information 500 is set to “appearance”.

なお、上記の例では、1次更新処理において、併合主体楕円の図形情報500の楕円特定情報503の更新した場合には、それに応じて、当該併合主体楕円が併合する被併合楕円の図形情報500の楕円特定情報503を更新していたが、当該併合主体楕円が併合する被併合楕円の図形情報500の楕円特定情報503を、最後、つまり3次更新処理で行っても良い。同様に、2次更新処理において、併合主体楕円の図形情報500の楕円特定情報503の更新した場合には、当該併合主体楕円が併合する被併合楕円の図形情報500の楕円特定情報503を、最後、つまり3次更新処理で行っても良い。   In the above example, when the ellipse specifying information 503 of the figure information 500 of the merged subject ellipse is updated in the primary update process, the figure information 500 of the merged ellipse to which the merged subject ellipse is merged accordingly. The ellipse specifying information 503 of the figure information 500 of the merged ellipse to which the merged main ellipse is merged may be performed at the end, that is, in the tertiary update process. Similarly, in the secondary update process, when the ellipse specifying information 503 of the merged subject ellipse graphic information 500 is updated, the ellipse specifying information 503 of the merged ellipse graphic information 500 to which the merged subject ellipse is merged is updated to the last. That is, it may be performed by a tertiary update process.

また、上記の例では、併合主体楕円の図形情報500の楕円特定情報503の更新に応じて、当該併合主体楕円が併合する被併合楕円の図形情報500の楕円特定情報503を更新していたが、当該被併合楕円の図形情報500の楕円特定情報503を更新しなくても良い。この場合には、被併合楕円の図形情報500の楕円特定情報503を使用する必要がある場合には、更新されない当該楕円特定情報503の代わりに、当該被併合楕円を統合する統合主体楕円の図形情報500の楕円特定情報503を使用する。   In the above example, the ellipse specifying information 503 of the merged ellipse graphic information 500 to which the merged main ellipse is merged is updated according to the update of the ellipse specifying information 503 of the merged main ellipse graphic information 500. The ellipse specifying information 503 of the figure information 500 of the merged ellipse need not be updated. In this case, when it is necessary to use the ellipse specifying information 503 of the figure information 500 of the merged ellipse, instead of the ellipse specifying information 503 that is not updated, the figure of the integrated main ellipse that integrates the merged ellipse The ellipse specifying information 503 of the information 500 is used.

また、上記の例では、入力画像140に写る人に対して楕円を当てはめていたが、他の図形を当てはめても良い。例えば、入力画像140に写る人に対して矩形を当てはめても良い。入力画像140上での対象物の位置を追跡する場合には、入力画像140に写る対象物の形状に応じて、当該対象物に当てはめる図形を決定することが好ましい。   In the above example, an ellipse is applied to the person shown in the input image 140, but other figures may be applied. For example, a rectangle may be applied to a person shown in the input image 140. When tracking the position of the object on the input image 140, it is preferable to determine a figure to be applied to the object according to the shape of the object shown in the input image 140.

また、1次処理、2次処理、2.5次処理及び3次処理の実行の順番を入れ替えることが可能である。例えば、2.5次処理を1次処理の前に実行しても良い。また、2次処理を1次処理の前に実行しても良い。   In addition, the order of execution of the primary process, the secondary process, the 2.5th process, and the tertiary process can be switched. For example, the 2.5th order process may be executed before the primary process. Further, the secondary process may be executed before the primary process.

<画像処理システムの利用例>
以上のような画像処理システム1は、様々な用途で利用することができる。例えば、画像処理システム1は、室内300の空調制御に利用することができる。例えば、カウント部13が、室内300の総人数を求める場合には、カウント部13が求めた総人数が零になると、室内300の各空調機を停止することができる。また、カウント部13が求める総数が零から1以上に変化すると、室内300の各空調機を動作せることができる。また、カウント部13が、室内300の各エリアでの人数を求める場合には、人数が多いエリアの温度を下げたり、人数が少ないエリアの温度を上げたりすることができる。
<Usage example of image processing system>
The image processing system 1 as described above can be used for various purposes. For example, the image processing system 1 can be used for air conditioning control of the room 300. For example, when the counting unit 13 calculates the total number of people in the room 300, when the total number of people calculated by the counting unit 13 becomes zero, each air conditioner in the room 300 can be stopped. Moreover, when the total number which the count part 13 calculates | requires changes from zero to 1 or more, each air conditioner of the room | chamber interior 300 can be operated. Further, when the counting unit 13 calculates the number of people in each area of the room 300, the temperature of the area with a large number of people can be lowered, or the temperature of the area with a small number of people can be raised.

また、画像処理システム1は、室内300の照明制御に利用することができる。例えば、カウント部13が、室内300の総人数を求める場合には、カウント部13が求めた総人数が零になると、室内300の各照明器具を消灯することができる。また、カウント部13が求める総数が零から1以上に変化すると、室内300の各照明器具を点灯させることができる。また、カウント部13が、室内300の各エリアでの人数を求める場合には、人数が零になったエリアだけの照明器具を消灯することができる。   The image processing system 1 can be used for lighting control of the room 300. For example, when the counting unit 13 determines the total number of people in the room 300, each lighting device in the room 300 can be turned off when the total number of people calculated by the counting unit 13 becomes zero. Moreover, when the total number which the count part 13 calculates | requires changes from zero to 1 or more, each lighting fixture in the room 300 can be lighted. Further, when the counting unit 13 calculates the number of people in each area of the room 300, it is possible to turn off the lighting fixtures only in the area where the number of people becomes zero.

また、画像処理システム1は、室内300の入退室管理に利用することができる。例えば、カウント部13が、室内300の総人数を求める場合には、カウント部13が求めた総人数が零になると、室内300から人がすべて退出したと判断して、室内300を監視するセキュリティシステムを動作させることができる。   The image processing system 1 can be used for room entry / exit management. For example, when the counting unit 13 determines the total number of people in the room 300, when the total number of people calculated by the counting unit 13 becomes zero, it is determined that all the people have left the room 300, and the security for monitoring the room 300 is detected. The system can be operated.

また、画像処理システム1は、室内300を自動で掃除する掃除ロボットの制御に利用することができる。例えば、随時更新される追跡情報50を監視し、その監視結果から、室内300において人が多くの時間存在していたエリアを特定する。そして、そのエリアを重点的に掃除するように掃除ロボットを制御することができる。   Further, the image processing system 1 can be used to control a cleaning robot that automatically cleans the room 300. For example, the tracking information 50 updated at any time is monitored, and the area in which the person has existed for many hours in the room 300 is specified from the monitoring result. Then, the cleaning robot can be controlled so as to cleanly clean the area.

また、画像処理システム1はマーケティングに利用することができる。例えば、カメラ2が美術館に設置され、画像処理装置3が美術館での人の位置を追跡する場合には、追跡情報50を監視することによって、人が良く集まる展示物、つまり人気のある展示物を特定することができる。   The image processing system 1 can be used for marketing. For example, when the camera 2 is installed in an art museum and the image processing apparatus 3 tracks the position of a person in the art museum, by monitoring the tracking information 50, an exhibit in which people often gather, that is, a popular exhibit. Can be specified.

また、画像処理システム1は、駐車場管理に利用することができる。例えば、カメラ2が駐車場に設置され、画像処理装置3が駐車場での車の位置を追跡する場合には、カウント部13で駐車場内の車の台数を求めることができる。これにより、駐車場に空きがあるか否かを自動判定することができる。   The image processing system 1 can be used for parking management. For example, when the camera 2 is installed in a parking lot and the image processing apparatus 3 tracks the position of the car in the parking lot, the count unit 13 can determine the number of cars in the parking lot. Thereby, it can be determined automatically whether there is a vacancy in a parking lot.

また、画像処理システム1は、養殖において利用することができる。例えば、養殖場での生け簀内の様子をカメラ2で撮影し、画像処理装置3がカメラ2での撮影画像に基づいて生け簀内の養殖魚の数を求めることができる。   The image processing system 1 can be used in aquaculture. For example, the state in the cage in the farm can be photographed with the camera 2, and the image processing device 3 can obtain the number of farmed fish in the cage based on the photographed image in the camera 2.

また、画像処理システム1は、牧場において利用することができる。例えば、牧場の様子カメラ2で撮影し、画像処理装置3がカメラ2での撮像画像に基づいて牧場での馬あるいは羊の数を求めることができる。   Further, the image processing system 1 can be used in a ranch. For example, the state of the ranch can be photographed by the camera 2, and the image processing device 3 can obtain the number of horses or sheep on the ranch based on the image captured by the camera 2.

以上のように、画像処理装置3は、入力画像140に写る人に対して図形を当てはめ、当該図形の入力画像140上での位置を追跡することによって、入力画像140上での人の位置を追跡している。したがって、画像処理装置3の処理負荷を低減することができる。   As described above, the image processing apparatus 3 applies the figure to the person shown in the input image 140 and tracks the position of the figure on the input image 140, thereby determining the position of the person on the input image 140. Tracking. Therefore, the processing load on the image processing apparatus 3 can be reduced.

<各種変形例>
以下に各種変形例について説明する。
<Various modifications>
Various modifications will be described below.

<第1変形例>
人が室内300を同じ距離だけ移動したとしても、カメラ2と人との距離が離れるにつれて、入力画像140(撮像画像110)上では人の移動距離は小さくなる。したがって、人の入力画像140上の移動距離は、入力画像140における、カメラ2の位置に対応する位置、つまり入力画像140の中心141から離れるほど小さくなる。つまり、人の入力画像140上の移動距離は、中心141から近い位置では大きくなるが、中心141から遠い位置では小さくなる。よって、入力画像140の中心に近い位置では、前フレームの入力画像140に写る人と、現フレームの入力画像140に写る人との間の距離がある程度大きい場合であっても、それらの人は同一人物であると言えるが、入力画像140の中心から遠い位置では、当該距離がある程度小さくないと、それらの人は同一人物であるとは言えない。
<First Modification>
Even if the person moves the room 300 by the same distance, the moving distance of the person becomes smaller on the input image 140 (captured image 110) as the distance between the camera 2 and the person increases. Therefore, the movement distance of the person on the input image 140 becomes smaller as the distance from the position corresponding to the position of the camera 2 in the input image 140, that is, from the center 141 of the input image 140 is increased. That is, the movement distance of the person on the input image 140 increases at a position close to the center 141, but decreases at a position far from the center 141. Therefore, at a position close to the center of the input image 140, even if the distance between the person shown in the input image 140 of the previous frame and the person shown in the input image 140 of the current frame is large to some extent, Although it can be said that they are the same person, at a position far from the center of the input image 140, the person cannot be said to be the same person unless the distance is somewhat small.

そこで、本変形例では、2次特定処理において、選択第1楕円の位置(例えば選択第1楕円の中心)が入力画像140の中心141から離れるほど、選択第1楕円と最近傍第2楕円との間の距離と比較される第5しきい値を小さくする。これにより、選択第1楕円が当てはめられた人と同一の人に対して当てはめられた第2楕円を適切に特定することができる。   Therefore, in the present modification, in the secondary specifying process, the selected first ellipse and the nearest second ellipse are separated as the position of the selected first ellipse (for example, the center of the selected first ellipse) is further away from the center 141 of the input image 140. The fifth threshold value compared with the distance between is reduced. Thereby, the 2nd ellipse applied to the same person as the person to whom the selection 1st ellipse was applied can be specified appropriately.

本変形例では、第5しきい値は複数段階に変化する。例えば、第5しきい値は、値A1〜A4の4段階に変換する。ここで、A1<A2<A3<A4である。図47に示されるように、選択第1楕円の位置が、中心141からの距離がd1までの領域AR1内に存在する場合には、第5しきい値はA4に設定される。選択第1楕円の位置が、中心141からの距離がd1からd2(>d1)までの領域AR2内に存在する場合には、第5しきい値はA3に設定される。選択第1楕円の位置が、中心141からの距離がd2からd3(>d2)までの領域AR3内に存在する場合には、第5しきい値はA2に設定される。そして、選択第1楕円の位置が、中心141からの距離がd3よりも大きい領域AR4内に存在する場合には、第5しきい値はA1に設定される。第5しきい値の変化の態様はこの限りではない。例えば、第5しきい値は2段階に変化しても良い。   In the present modification, the fifth threshold value changes in a plurality of stages. For example, the fifth threshold value is converted into four levels of values A1 to A4. Here, A1 <A2 <A3 <A4. As shown in FIG. 47, when the position of the selected first ellipse exists in the area AR1 whose distance from the center 141 is up to d1, the fifth threshold value is set to A4. When the position of the selected first ellipse is in the area AR2 from the center 141 to the distance d1 to d2 (> d1), the fifth threshold value is set to A3. When the position of the selected first ellipse is within the area AR3 from the distance d2 to d3 (> d2) from the center 141, the fifth threshold value is set to A2. Then, when the position of the selected first ellipse exists in the area AR4 whose distance from the center 141 is larger than d3, the fifth threshold value is set to A1. The mode of change of the fifth threshold value is not limited to this. For example, the fifth threshold value may change in two stages.

なお、カメラ2が水平画角180度のカメラである場合には、入力画像140における、カメラ2の位置に対応する位置145は、図48のようになる。位置145は、入力画像140における、水平方向に延びる一辺146の長手方向の中心に存在する。このような場合には、領域AR1〜AR5は図48に示されるようになる。位置145は、入力画像140上において、撮影画像110に写る人の俯瞰角度が撮影画像110で最大となる位置(俯瞰角度最大位置)に対応する対応位置でもある。   If the camera 2 is a camera with a horizontal angle of view of 180 degrees, the position 145 corresponding to the position of the camera 2 in the input image 140 is as shown in FIG. The position 145 exists in the center of the input image 140 in the longitudinal direction of one side 146 extending in the horizontal direction. In such a case, the areas AR1 to AR5 are as shown in FIG. The position 145 is also a corresponding position corresponding to a position (maximum bird's-eye angle position) in the captured image 110 where the overhead angle of the person shown in the captured image 110 is the maximum on the input image 140.

<第2変形例>
上述のように、人の入力画像140上の移動距離は、入力画像140の中心141から離れるほど小さくなる。したがって、上述の図42に示されるように、複数の第1楕円250x1〜250x3が当てはめられた複数の人200に対して1つの第2楕円250yが当てはめられた場合、入力画像140上での当該複数の第1楕円250x1〜250x3の位置は、中心141から離れるほど、入力画像140上での第2楕円250yの位置に近くなる。
<Second Modification>
As described above, the moving distance of the person on the input image 140 decreases as the distance from the center 141 of the input image 140 increases. Therefore, as shown in FIG. 42 described above, when one second ellipse 250y is applied to a plurality of people 200 to which a plurality of first ellipses 250x1 to 250x3 is applied, The positions of the plurality of first ellipses 250x1 to 250x3 are closer to the position of the second ellipse 250y on the input image 140 as the distance from the center 141 increases.

そこで、本変形例では、3次特定処理において、3次処理対象の第1楕円の位置(例えば第1楕円の中心)が、入力画像140の中心141から離れるほど、当該第1楕円に近い特定済み第2楕円が存在するか否かを判定する際に使用される第6しきい値を小さくする。これにより、3次処理対象の第1楕円が特定済み第2楕円に併合されているか否かをより適切に判定することができる。   Therefore, in the present modification, in the tertiary specifying process, the position of the first ellipse to be processed (for example, the center of the first ellipse) is specified closer to the first ellipse as the distance from the center 141 of the input image 140 increases. The sixth threshold value used in determining whether or not the second ellipse is present is reduced. Thereby, it can be determined more appropriately whether the 1st ellipse of the tertiary processing object is merged with the specified 2nd ellipse.

本変形例では、第6しきい値は、第1変形例での第5しきい値と同様に、例えば、値B1〜B4の4段階に変換する。ここで、B1<B2<B3<B4である。上述の図47,48に示されるように、3次処理対象の第1楕円の位置が領域AR1内に存在する場合には、第6しきい値はB4に設定される。3次処理対象の第1楕円の位置が領域AR2内に存在する場合には、第6しきい値はB3に設定される。3次処理対象の第1楕円の位置が領域AR3内に存在する場合には、第6しきい値はB2に設定される。そして、3次処理対象の第1楕円の位置が領域AR4内に存在する場合には、第6しきい値はB1に設定される。第6しきい値の変化の態様はこの限りではない。   In the present modification, the sixth threshold value is converted into, for example, four stages of values B1 to B4, similarly to the fifth threshold value in the first modification example. Here, B1 <B2 <B3 <B4. As shown in FIGS. 47 and 48 described above, when the position of the first ellipse to be subjected to the tertiary processing is present in the area AR1, the sixth threshold value is set to B4. When the position of the first ellipse to be subjected to the tertiary processing exists in the area AR2, the sixth threshold value is set to B3. When the position of the first ellipse to be subjected to the tertiary processing is present in the area AR3, the sixth threshold value is set to B2. When the position of the first ellipse to be subjected to the tertiary processing exists in the area AR4, the sixth threshold value is set to B1. The mode of change of the sixth threshold value is not limited to this.

<第3変形例>
撮像画像110において、俯瞰角度最大位置から離れるほど、人は、俯瞰角度最大位置から外側に向かう方向に沿って延びるように写る。そのため、当てはめ処理において、入力画像140に写る1人の人に対して複数の楕円が当てはめられた場合、入力画像140における、俯瞰角度最大位置に対応する位置から離れるほど、当該複数の楕円の間の距離は大きくなる傾向にある。上記の例では、入力画像140における、俯瞰角度最大位置に対応する位置は、入力画像140の中心141である。したがって、当てはめ処理において、入力画像140に写る1人の人に対して複数の楕円が当てはめられた場合、入力画像140の中心141から離れるほど、当該複数の楕円の間の距離は大きくなる傾向にある。
<Third Modification>
In the captured image 110, as the distance from the maximum bird's-eye angle position increases, the person appears to extend along the direction from the maximum bird's-eye angle position toward the outside. Therefore, in the fitting process, when a plurality of ellipses are applied to one person shown in the input image 140, the distance between the ellipses increases as the distance from the position corresponding to the maximum overhead angle position in the input image 140 increases. The distance tends to increase. In the above example, the position corresponding to the maximum overhead angle position in the input image 140 is the center 141 of the input image 140. Therefore, in the fitting process, when a plurality of ellipses are fitted to one person shown in the input image 140, the distance between the plurality of ellipses tends to increase as the distance from the center 141 of the input image 140 increases. is there.

そこで、本変形例では、楕円統合処理において、第1及び第2対象楕円を統合して得られる統合楕円の位置(例えば統合楕円の中心の位置)が入力画像140の中心141から離れるほど、当該第1及び第2対象楕円が第1条件を満足しているか否かを判定する際に使用される第1しきい値を大きくする。この場合には、上述の図14に示されるフローチャーにおいて、ステップs346の前に、統合楕円が求められる。これにより、第1及び第2対象楕円が1人の人に対して当てはめられているか否かをより適切に判断することができる。   Therefore, in this modification, in the ellipse integration process, the position of the integrated ellipse obtained by integrating the first and second target ellipses (for example, the position of the center of the integrated ellipse) is farther from the center 141 of the input image 140. The first threshold value used when determining whether or not the first and second target ellipses satisfy the first condition is increased. In this case, the integrated ellipse is obtained before step s346 in the flowchart shown in FIG. Thereby, it can be judged more appropriately whether the 1st and 2nd object ellipse is applied to one person.

本変形例では、第1しきい値は、例えば、値C1〜C4の4段階に変換する。ここで、C1<C2<C3<C4である。上述の図47,48に示されるように、統合楕円の位置が領域AR1内に存在する場合には、第1しきい値はC1に設定される。統合楕円の位置が領域AR2内に存在する場合には、第1しきい値はC2に設定される。統合楕円の位置が領域AR3内に存在する場合には、第1しきい値はC3に設定される。そして、統合楕円の位置が領域AR4内に存在する場合には、第1しきい値はC4に設定される。第1しきい値の変化の態様はこの限りではない。   In the present modification, the first threshold value is converted into, for example, four levels of values C1 to C4. Here, C1 <C2 <C3 <C4. As shown in FIGS. 47 and 48 described above, when the position of the integrated ellipse exists in the area AR1, the first threshold value is set to C1. When the position of the integrated ellipse exists in the area AR2, the first threshold value is set to C2. When the position of the integrated ellipse exists in the area AR3, the first threshold value is set to C3. When the position of the integrated ellipse exists in the area AR4, the first threshold value is set to C4. The mode of change of the first threshold value is not limited to this.

なお、統合楕円の大きさは、入力画像140の中心から離れるほど大きくなる。したがって、楕円統合処理では、第3条件が満足しているか否かを判定する際に、統合楕円の大きさと比較される第2しきい値を、第1しきい値と同様に変化させても良い。   Note that the size of the integrated ellipse increases as the distance from the center of the input image 140 increases. Therefore, in the ellipse integration process, when determining whether or not the third condition is satisfied, the second threshold value compared with the size of the integrated ellipse may be changed in the same manner as the first threshold value. good.

また、カメラ2と人との距離が大きい場合には、撮像画像110において、当該人は小さく写ることになる。カメラ2の撮影範囲が狭い場合には、カメラ2と人との距離の影響をあまり受けずに、撮像画像110において、俯瞰角度最大位置から離れるほど、人は延びるように写る。一方で、カメラ2の撮影範囲が広い場合には、俯瞰角度最大位置(カメラ2の位置に対応する位置)からある程度以上離れると、カメラ2と人との距離の影響を受けて、逆に、俯瞰角度最大位置から離れるほど人は縮んで写るようになる。   In addition, when the distance between the camera 2 and the person is large, the person appears small in the captured image 110. When the shooting range of the camera 2 is narrow, the person is seen to extend as the distance from the maximum overhead angle position increases in the captured image 110 without being affected by the distance between the camera 2 and the person. On the other hand, when the shooting range of the camera 2 is wide, the camera 2 is influenced by the distance between the camera 2 and the person, if it is more than a certain distance from the maximum overhead angle position (position corresponding to the position of the camera 2). The farther away from the maximum bird's-eye angle position, the more the person will appear to be captured.

このような場合には、統合楕円の位置が、入力画像140の中心141から所定範囲内に存在する場合には、当該統合楕円の位置が中心141から離れるほど第1しきい値を大きくする。そして、統合楕円の位置が所定範囲外に存在する場合には、当該統合楕円の位置が中心141から離れるほど第1しきい値を小さくする。例えば、図49に示されるように、統合楕円の位置が、入力画像140の中心141から距離d14までの所定範囲149内に存在する場合には、当該統合楕円の位置が中心141から離れるほど第1しきい値を大きくする。例えば、統合楕円の位置が、中心141からの距離がd11までの領域AR11内に存在する場合には、第1しきい値はC1に設定される。統合楕円の位置が、中心141からの距離がd11からd12(>d11)までの領域AR12内に存在する場合には、第1しきい値はC2に設定される。統合楕円の位置が、中心141からの距離がd12からd13(>d12)までの領域AR13内に存在する場合には、第1しきい値はC3に設定される。そして、統合楕円の位置が、中心141からの距離がd13からd14(>d13)までの領域AR14内に存在する場合には、第1しきい値はC4に設定される。なお、図49において、所定範囲149は斜線で示されている。   In such a case, when the position of the integrated ellipse is within a predetermined range from the center 141 of the input image 140, the first threshold value is increased as the position of the integrated ellipse is further away from the center 141. If the position of the integrated ellipse is outside the predetermined range, the first threshold value is decreased as the position of the integrated ellipse is farther from the center 141. For example, as shown in FIG. 49, when the position of the integrated ellipse is within a predetermined range 149 from the center 141 of the input image 140 to the distance d14, the position of the integrated ellipse increases as the distance from the center 141 increases. 1 Increase the threshold. For example, when the position of the integrated ellipse exists in the area AR11 whose distance from the center 141 is d11, the first threshold value is set to C1. When the position of the integrated ellipse exists in the area AR12 whose distance from the center 141 is from d11 to d12 (> d11), the first threshold value is set to C2. When the position of the integrated ellipse exists in the area AR13 whose distance from the center 141 is from d12 to d13 (> d12), the first threshold value is set to C3. When the position of the integrated ellipse exists in the area AR14 from the center 141 to the distance d13 to d14 (> d13), the first threshold value is set to C4. In FIG. 49, the predetermined range 149 is indicated by hatching.

一方で、統合楕円の位置が所定範囲149外に存在する場合には、当該統合楕円の位置が中心141から離れるほど第1しきい値を小さくする。例えば、統合楕円の位置が、中心141からの距離がd14からd15(>d15)までの領域AR15内に存在する場合には、第1しきい値はC3に設定される。そして、統合楕円の位置が、中心141からの距離がd15よりも大きい領域AR16内に存在する場合には、第1しきい値はC2に設定される。   On the other hand, when the position of the integrated ellipse is outside the predetermined range 149, the first threshold value is decreased as the position of the integrated ellipse is farther from the center 141. For example, when the position of the integrated ellipse is in the area AR15 whose distance from the center 141 is from d14 to d15 (> d15), the first threshold value is set to C3. When the position of the integrated ellipse exists in the area AR16 whose distance from the center 141 is larger than d15, the first threshold value is set to C2.

このように、統合楕円の位置に応じて第1しきい値を変化させることにより、俯瞰角度最大位置からある程度以上離れると、カメラ2と人との距離の影響を受けて、逆に、俯瞰角度最大位置から離れるほど人は縮んで写るようになる場合であっても、第1及び第2対象楕円が1人の人に対して当てはめられているか否かをより適切に判断することができる。   In this way, by changing the first threshold value according to the position of the integrated ellipse, if the distance from the maximum overhead angle position is more than a certain extent, the overhead angle is adversely affected by the distance between the camera 2 and the person. Even when the person is shrunk as the distance from the maximum position decreases, it can be more appropriately determined whether or not the first and second target ellipses are applied to one person.

なお、カメラ2が水平画角180度のカメラである場合には、所定範囲149、領域AR11〜AR16は、例えば図50のようになる。   When the camera 2 is a camera having a horizontal angle of view of 180 degrees, the predetermined range 149 and the areas AR11 to AR16 are as shown in FIG. 50, for example.

また、俯瞰角度最大位置からある程度以上離れると、カメラ2と人との距離の影響を受けて、逆に、俯瞰角度最大位置から離れるほど人は縮んで写るようになる場合には、第2しきい値を第1しきい値と同様に変化させてもよい。   In addition, if the person is more distant from the maximum bird's-eye angle position due to the influence of the distance between the camera 2 and the person and, on the contrary, the more the person gets closer to the bird's-eye angle position, the second is shown. The threshold value may be changed in the same manner as the first threshold value.

<第4変形例>
上述のように、撮像画像110において、俯瞰角度最大位置から離れるほど、人は延びるように写る。そのため、1つの第1楕円が当てはめられていた2人の人に対して、2つの第2楕円がそれぞれ当てはめられた場合、第1楕円の大きさと、各第2楕円の大きさとの差は、入力画像140の中心141から離れるほど大きくなる。
<Fourth Modification>
As described above, in the captured image 110, the person appears to extend as the distance from the maximum overhead angle position increases. Therefore, when two second ellipses are respectively applied to two people who have been fitted with one first ellipse, the difference between the size of the first ellipse and the size of each second ellipse is: The distance from the center 141 of the input image 140 increases.

そこで、本変形例では、1次特定処理において、併合主体第1楕円の位置が、入力画像140の中心から離れるほど、当該併合主体第1楕円の大きさから、最近傍第2楕円の大きさを差し引いて得られる差分値と比較される第4しきい値を大きくする。これにより、併合主体第1楕円が複数の楕円に分離したことをより適切に判定することができる。第4しきい値は、例えば、上記の第3変形例での第1しきい値と同様に変化させることができる。   Therefore, in the present modification, in the primary specifying process, the size of the nearest second ellipse is determined from the size of the merged subject first ellipse as the position of the merged subject first ellipse is further away from the center of the input image 140. The fourth threshold value to be compared with the difference value obtained by subtracting is increased. Thereby, it can determine more appropriately that the merging main 1st ellipse separated into a plurality of ellipses. For example, the fourth threshold value can be changed in the same manner as the first threshold value in the third modified example.

なお、上述のように、俯瞰角度最大位置からある程度以上離れると、カメラ2と人との距離の影響を受けて、俯瞰角度最大位置から離れるほど人が縮んで写るようになる場合がある。このような場合には、上記の第3変形例と同様に、併合楕円の位置が、入力画像140の中心141から所定範囲内に存在する場合には、当該併合楕円の位置が中心141から離れるほど第4しきい値を大きくする。そして、併合楕円の位置が所定範囲外に存在する場合には、当該併合楕円の位置が中心141から離れるほど第4しきい値を小さくする。   In addition, as described above, when the user is away from the maximum bird's-eye angle position to some extent, the person may appear to be shrunk as the distance from the highest bird's-eye angle position is influenced by the distance between the camera 2 and the person. In such a case, as in the third modified example, if the position of the merged ellipse is within a predetermined range from the center 141 of the input image 140, the position of the merged ellipse is separated from the center 141. The fourth threshold is increased as the time increases. When the position of the merged ellipse is outside the predetermined range, the fourth threshold value is decreased as the position of the merged ellipse moves away from the center 141.

<第5変形例>
撮像画像110において、人の俯瞰角度が大きい位置では、人は、俯瞰角度最大位置から離れる方向に沿って延びるようには写らないことがある。
<Fifth Modification>
In the captured image 110, at a position where the person's overhead angle is large, the person may not appear to extend along a direction away from the maximum overhead angle position.

そこで、本変形例では、楕円統合処理において、第1対象楕円と第2対象楕円とを統合して得られる統合楕円の位置(例えば統合楕円の中心)と、入力画像140の中心141との差が第7しきい値以下の場合には、第2条件を使用しない。つまり、第1対象楕円と第2対象楕円とを統合して得られる統合楕円の位置と、入力画像140の中心141との差が第7しきい値以下の場合には、第2条件を満足するか否かにかかわらず、第1条件及び第3条件を満足するときには、当該第1及び第2対象楕円が1人の人に対して当てはめられたと判断する。言い換えれば、第1対象楕円と第2対象楕円とを統合して得られる統合楕円が、入力画像140の中心141から所定範囲内に位置する場合には、第2条件を満足するか否かにかかわらず、第1条件及び第3条件を満足するときには、当該第1及び第2対象楕円が1人の人に対して当てはめられたと判断する。一方で、第1対象楕円と第2対象楕円とを統合して得られる統合楕円の位置と、入力画像140の中心141との差が第7しきい値以上の場合には、上記と同様に、第1条件、第2条件及び第3条件を満足するときに、当該第1及び第2対象楕円が1人の人に対して当てはめられたと判断する。これにより、第1及び第2対象楕円が1人の人に対して当てはめられているか否かをより適切に判断することができる。   Therefore, in this modification, in the ellipse integration process, the difference between the position of the integrated ellipse obtained by integrating the first target ellipse and the second target ellipse (for example, the center of the integrated ellipse) and the center 141 of the input image 140. Is less than the seventh threshold value, the second condition is not used. That is, when the difference between the position of the integrated ellipse obtained by integrating the first target ellipse and the second target ellipse and the center 141 of the input image 140 is equal to or smaller than the seventh threshold value, the second condition is satisfied. Regardless of whether or not to do so, when the first condition and the third condition are satisfied, it is determined that the first and second target ellipses are applied to one person. In other words, if the integrated ellipse obtained by integrating the first target ellipse and the second target ellipse is located within a predetermined range from the center 141 of the input image 140, whether or not the second condition is satisfied. Regardless, when the first condition and the third condition are satisfied, it is determined that the first and second target ellipses are applied to one person. On the other hand, when the difference between the position of the integrated ellipse obtained by integrating the first target ellipse and the second target ellipse and the center 141 of the input image 140 is equal to or greater than the seventh threshold, the same as above. When the first condition, the second condition, and the third condition are satisfied, it is determined that the first and second target ellipses are applied to one person. Thereby, it can be judged more appropriately whether the 1st and 2nd object ellipse is applied to one person.

なお、統合楕円の位置と、入力画像140の中心141との差が第7しきい値未満の場合に、第2条件を使用しなくても良い。   Note that the second condition may not be used when the difference between the position of the integrated ellipse and the center 141 of the input image 140 is less than the seventh threshold value.

以上のように、画像処理システム1は詳細に説明されたが、上記した説明は、全ての局面において例示であって、この発明がそれに限定されるものではない。また、上述した各種変形例は、相互に矛盾しない限り組み合わせて適用可能である。そして、例示されていない無数の変形例が、この発明の範囲から外れることなく想定され得るものと解される。   As described above, the image processing system 1 has been described in detail. However, the above description is illustrative in all aspects, and the present invention is not limited thereto. The various modifications described above can be applied in combination as long as they do not contradict each other. And it is understood that the countless modification which is not illustrated can be assumed without deviating from the scope of the present invention.

1 画像処理システム
2 カメラ
3 画像処理装置
6 制御プログラム
10 画像処理部
11 当てはめ処理部
12 追跡処理部
13 カウント部
DESCRIPTION OF SYMBOLS 1 Image processing system 2 Camera 3 Image processing apparatus 6 Control program 10 Image processing part 11 Fitting process part 12 Tracking process part 13 Count part

Claims (29)

互いに異なる時刻での対象物が写る複数枚の入力画像のそれぞれについて、当該入力画像に写る当該対象物に対して図形を当てはめる当てはめ処理を行う第1処理部と、
前記当てはめ処理の結果に基づいて、前記入力画像上での前記図形の位置を追跡することによって、前記入力画像での前記対象物の位置を追跡する追跡処理を行う第2処理部と
を備え
前記第1処理部は、
前記入力画像に写る前記対象物に対して図形を当てはめる第3処理部と、
前記第3処理部において、一つの前記対象物に対して複数の図形が当てはめられた場合には、当該複数の図形を統合して得られる一つの新たな図形を、当該複数の図形の代わりに採用する第4処理部と
を有する、画像処理装置。
A first processing unit that performs a fitting process for fitting a figure to each of the plurality of input images in which objects at different times are captured,
A second processing unit that performs a tracking process for tracking the position of the object in the input image by tracking the position of the graphic on the input image based on the result of the fitting process ;
The first processing unit includes:
A third processing unit for applying a figure to the object shown in the input image;
In the third processing unit, when a plurality of figures are applied to one object, one new figure obtained by integrating the plurality of figures is used instead of the plurality of figures. A fourth processing unit to be adopted
An image processing apparatus.
請求項1に記載の画像処理装置であって、
前記追跡処理の結果に基づいて、前記入力画像に写る前記対象物の数を求める第処理部をさらに備える、画像処理装置。
The image processing apparatus according to claim 1,
An image processing apparatus, further comprising: a fifth processing unit that obtains the number of objects in the input image based on a result of the tracking process.
請求項1及び請求項2のいずれか一つに記載の画像処理装置であって、
前記第2処理部は、前記図形に関する図形情報を生成し、
前記第2処理部は、前記当てはめ処理の結果に基づいて、前記図形情報を更新する更新処理を行う、画像処理装置。
An image processing apparatus according to any one of claims 1 and 2,
The second processing unit generates graphic information regarding the graphic,
The image processing apparatus, wherein the second processing unit performs an update process for updating the graphic information based on a result of the fitting process.
請求項3に記載の画像処理装置であって、
前記図形情報は、前記図形の状態を示す状態情報と、前記図形を特定するための図形特定情報とを含む、画像処理装置。
The image processing apparatus according to claim 3,
The graphic information is an image processing apparatus including state information indicating a state of the graphic and graphic specifying information for specifying the graphic.
請求項3及び請求項4のいずれか一つに記載の画像処理装置であって、
前記第2処理部は、第1時刻での前記対象物が写る第1入力画像についての前記当てはめ処理において得られた各第1図形について、当該第1時刻よりも後の第2時刻での前記対象物が写る第2入力画像についての前記当てはめ処理において得られた、当該第1図形に対応する対応第2図形を特定する対応特定処理を行い、
前記第2処理部は、前記対応特定処理の結果に基づいて前記更新処理を行う、画像処理装置。
An image processing apparatus according to any one of claims 3 and 4,
The second processing unit, for each first graphic obtained in the fitting process for the first input image in which the object is captured at the first time, at the second time after the first time. Performing a correspondence specifying process for specifying a corresponding second graphic corresponding to the first graphic obtained in the fitting process for the second input image in which the object is captured;
The image processing apparatus, wherein the second processing unit performs the update process based on a result of the correspondence specifying process.
請求項5に記載の画像処理装置であって、
前記第2処理部は、
前記第1図形に対応する前記対応第2図形を特定する際には、
前記第2入力画像についての前記当てはめ処理において得られた第2図形のうち、前記第1図形に最も位置が近い第2図形であって、前記第1図形との第1距離が第1しきい値以下あるいは未満の第2図形である近傍第2図形を、前記対応第2図形として特定する、画像処理装置。
The image processing apparatus according to claim 5,
The second processing unit includes:
When specifying the corresponding second graphic corresponding to the first graphic,
Among the second figures obtained in the fitting process for the second input image, the second figure is closest to the first figure, and the first distance from the first figure is the first threshold. An image processing apparatus that identifies a neighboring second graphic that is a second graphic less than or less than a value as the corresponding second graphic.
請求項5に記載の画像処理装置であって、
前記第2処理部は、前記対応特定処理において、
前記第1及び第2入力画像についての前記当てはめ処理の結果に基づいて、
前記第1入力画像についての前記当てはめ処理において得られた複数の第1図形が当てはめられた複数の対象物に対して、前記第2入力画像についての前記当てはめ処理において一つの第2図形が当てはめられたか否かを判定する、画像処理装置。
The image processing apparatus according to claim 5,
In the correspondence specifying process, the second processing unit includes:
Based on the result of the fitting process for the first and second input images,
One second figure is applied in the fitting process for the second input image to a plurality of objects to which the plurality of first figures obtained in the fitting process for the first input image are applied. An image processing apparatus for determining whether or not
請求項7に記載の画像処理装置であって、
前記第2処理部は、
前記第1図形に対応する前記対応第2図形を特定する際には、
前記第2入力画像についての前記当てはめ処理において得られた第2図形のうち、前記第1図形に最も位置が近い第2図形であって、前記第1図形との第1距離が第1しきい値以下あるいは未満の第2図形である近傍第2図形を、前記対応第2図形として特定し、
前記第2処理部は、前記近傍第2図形が前記対応第2図形として特定されなかった前記第1図形である未特定第1図形が存在する場合には、当該未特定第1図形との第2距離が第2しきい値以下あるいは未満である前記対応第2図形が存在するとき、当該対応第2図形に対応する前記第1図形が当てはめられた前記対象物だけではなく、当該未特定第1図形が当てはめられた前記対象物に対しても、当該対応第2図形が当てはめられたと判定する、画像処理装置。
The image processing apparatus according to claim 7,
The second processing unit includes:
When specifying the corresponding second graphic corresponding to the first graphic,
Among the second figures obtained in the fitting process for the second input image, the second figure is closest to the first figure, and the first distance from the first figure is the first threshold. A neighboring second graphic that is a second graphic less than or less than the value is identified as the corresponding second graphic;
When there is an unspecified first graphic that is the first graphic for which the neighboring second graphic has not been specified as the corresponding second graphic, the second processing unit determines whether the second specific graphic with the unspecified first graphic is When there is the corresponding second graphic whose two distances are less than or less than the second threshold value, not only the object to which the first graphic corresponding to the corresponding second graphic is applied, but also the unspecified first graphic. An image processing apparatus that determines that the corresponding second graphic is also applied to the object to which one graphic is applied.
請求項7に記載の画像処理装置であって、
前記第2処理部は、
前記第1図形に対応する前記対応第2図形を特定する際には、
前記第2入力画像についての前記当てはめ処理において得られた第2図形のうち、前記第1図形に最も位置が近い第2図形であって、前記第1図形との第1距離が第1しきい値以下あるいは未満の第2図形である近傍第2図形を、前記対応第2図形として特定し、
前記第2処理部は、前記近傍第2図形が前記対応第2図形として特定されなかった前記第1図形である未特定第1図形が存在する場合には、当該未特定第1図形の少なくとも一部の領域を内包する前記対応第2図形が存在するとき、当該対応第2図形に対応する前記第1図形が当てはめられた前記対象物だけではなく、当該未特定第1図形が当てはめられた前記対象物に対しても、当該対応第2図形が当てはめられたと判定する、画像処理装置。
The image processing apparatus according to claim 7,
The second processing unit includes:
When specifying the corresponding second graphic corresponding to the first graphic,
Among the second figures obtained in the fitting process for the second input image, the second figure is closest to the first figure, and the first distance from the first figure is the first threshold. A neighboring second graphic that is a second graphic less than or less than the value is identified as the corresponding second graphic;
In the case where there is an unspecified first graphic that is the first graphic for which the neighboring second graphic is not specified as the corresponding second graphic, the second processing unit includes at least one of the unspecified first graphic. When the corresponding second graphic including the area of the part exists, not only the object to which the first graphic corresponding to the corresponding second graphic is applied, but also the unspecified first graphic is applied. An image processing apparatus that determines that the corresponding second graphic is also applied to an object.
請求項9に記載の画像処理装置であって、
前記第2処理部は、前記近傍第2図形が前記対応第2図形として特定されなかった前記第1図形である未特定第1図形が存在する場合には、当該未特定第1図形との第2距離が第2しきい値以下あるいは未満であって、当該未特定第1図形の少なくとも一部の領域を内包する前記対応第2図形が存在するとき、当該対応第2図形に対応する前記第1図形が当てはめられた前記対象物だけではなく、当該未特定第1図形が当てはめられた前記対象物に対しても、当該対応第2図形が当てはめられたと判定する、画像処理装置。
The image processing apparatus according to claim 9,
When there is an unspecified first graphic that is the first graphic for which the neighboring second graphic has not been specified as the corresponding second graphic, the second processing unit determines whether the second specific graphic with the unspecified first graphic is When two corresponding distances are less than or less than a second threshold and there is the corresponding second graphic including at least a part of the unspecified first graphic, the second corresponding to the corresponding second graphic An image processing apparatus that determines that the corresponding second graphic is applied not only to the object to which one graphic is applied, but also to the object to which the unspecified first graphic is applied.
請求項6、請求項8、請求項9及び請求項10のいずれか一つに記載の画像処理装置であって、
前記入力画像は、前記対象物を撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、
前記第2処理部は、前記第1図形の位置が、前記第1入力画像における、前記カメラの位置に対応する対応位置から離れるほど、当該第1図形に対応する前記対応第2図形を特定する際に使用される前記第1しきい値を小さく設定する、画像処理装置。
An image processing apparatus according to any one of claims 6, 8, 9, and 10,
The input image is an image obtained by image processing of a captured image captured by a camera that captures the object,
The second processing unit identifies the corresponding second graphic corresponding to the first graphic as the position of the first graphic is further away from the corresponding position corresponding to the position of the camera in the first input image. An image processing apparatus that sets the first threshold value used at the time to be small.
請求項8及び請求項10のいずれか一つに記載の画像処理装置であって、
前記第2処理部は、前記未特定第1図形の位置が、前記第1入力画像上において、前記カメラの位置に対応する対応位置から離れるほど、前記第2しきい値を小さく設定する、画像処理装置。
An image processing apparatus according to any one of claims 8 and 10,
The second processing unit sets the second threshold value to be smaller as the position of the unspecified first graphic moves away from the corresponding position corresponding to the position of the camera on the first input image. Processing equipment.
請求項5乃至請求項12のいずれか一つに記載の画像処理装置であって、
前記第2処理部は、前記対応特定処理において、
前記第1及び第2入力画像についての前記当てはめ処理の結果に基づいて、
前記第1入力画像についての前記当てはめ処理において得られた一つの第1図形が当てはめられた複数の対象物に対して、前記第2入力画像についての前記当てはめ処理において複数の第2図形が当てはめられた否かを判定する、画像処理装置。
An image processing apparatus according to any one of claims 5 to 12,
In the correspondence specifying process, the second processing unit includes:
Based on the result of the fitting process for the first and second input images,
A plurality of second figures are applied in the fitting process for the second input image to a plurality of objects to which one first figure obtained in the fitting process for the first input image is applied. An image processing apparatus for determining whether or not the
請求項13に記載の画像処理装置であって、
前記第2処理部は、前記一つの第1図形の大きさから、当該一つの第1図形に最も位置が近い、前記第2入力画像についての前記当てはめ処理において得られた第2図形の大きさを差し引いて得られる差分値が第3しきい値よりも大きいあるいは当該第3しきい値以上であって、かつ、当該一つの第1図形において、前記第2入力画像についての前記当てはめ処理において得られた複数の第2図形のそれぞれの少なくとも一部の領域が内包される場合には、前記一つの第1図形に対応する複数の対象物に対して、当該複数の第2図形が当てはめられたと判定する、画像処理装置。
The image processing apparatus according to claim 13,
The second processing unit determines the size of the second graphic obtained in the fitting process for the second input image that is closest in position to the one first graphic from the size of the one first graphic. The difference value obtained by subtracting is greater than or equal to the third threshold value, and is obtained in the fitting process for the second input image in the one first graphic. When at least a part of each of the plurality of second figures is included, the plurality of second figures are applied to a plurality of objects corresponding to the one first figure. An image processing apparatus for determining.
請求項14に記載の画像処理装置であって、
前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、
前記第2処理部は、前記一つの第1図形の位置が、前記第1入力画像上において、前記撮影画像に写る人の撮影俯角が前記撮影画像で最大となる位置に対応する対応位置から離れるほど、前記第3しきい値を大きく設定する、画像処理装置。
The image processing apparatus according to claim 14,
The input image is an image obtained by performing image processing on a photographed image photographed by a camera that photographs the object in an overhead view,
The second processing unit moves the position of the one first figure away from a corresponding position corresponding to a position where a shooting depression angle of a person appearing in the captured image is maximum in the captured image on the first input image. The image processing apparatus sets the third threshold value to be larger.
請求項15に記載の画像処理装置であって、
前記第2処理部は、
前記一つの第1図形の位置が、前記対応位置から第1所定範囲内に存在する場合には、前記一つの第1図形の位置が前記対応位置から離れるほど前記第3しきい値を大きく設定し、
前記一つの第1図形の位置が前記第1所定範囲外に存在する場合には、前記一つの第1図形の位置が前記対応位置から離れるほど前記第3しきい値を小さく設定する、画像処理装置。
The image processing apparatus according to claim 15, wherein
The second processing unit includes:
When the position of the first graphic is within a first predetermined range from the corresponding position, the third threshold value is set to be larger as the position of the first graphic is farther from the corresponding position. And
Image processing in which, when the position of the first graphic is outside the first predetermined range, the third threshold value is set smaller as the position of the first graphic is farther from the corresponding position. apparatus.
請求項5乃至請求項16のいずれか一つに記載の画像処理装置であって、
前記第2処理部は、前記対応特定処理において、前記入力画像に写らなくなった前記対象物に当てはめられた前記図形である第3図形に対応する、前記第2入力画像についての前記当てはめ処理において得られた第2図形を特定し、その特定結果に基づいて、当該第3図形についての前記図形情報を更新し、
前記第2処理部は、前記入力画像に写らなくなった前記対象物に当てはめられた前記第3図形についての前記図形情報を、前記対象物が前記入力画像に写らなくなってから所定時間経過した後に消去する、画像処理装置。
An image processing apparatus according to any one of claims 5 to 16, comprising:
The second processing unit is obtained in the fitting process for the second input image corresponding to the third graphic that is the graphic applied to the object that is no longer shown in the input image in the correspondence specifying process. The second graphic is identified, and based on the identification result, the graphic information about the third graphic is updated,
The second processing unit erases the graphic information about the third graphic applied to the object that is no longer shown in the input image after a predetermined time has elapsed since the target no longer appears in the input image. An image processing apparatus.
請求項1乃至請求項17のいずれか一つに記載の画像処理装置であって、
前記第処理部は、
前記第処理部で得られた2つの図形の間の第3距離が第4しきい値以下あるいは未満であり、かつ当該2つの図形を統合して得られる一つの新たな図形の大ききが第5しきい値以下あるいは未満の場合、
当該2つの図形が一つの前記対象物に対して当てはめられたと判断して、当該新たな図形を当該2つの図形の代わりに採用する、画像処理装置。
An image processing apparatus according to any one of claims 1 to 17 ,
The fourth processing unit includes:
The third distance between the two graphics obtained by the third processing unit is less than or less than the fourth threshold value, and the size of one new graphic obtained by integrating the two graphics is increased. If below or below the fifth threshold,
An image processing apparatus that determines that the two graphics are applied to one object and employs the new graphics instead of the two graphics.
請求項18に記載の画像処理装置であって、
前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、
前記第処理部は、
前記第処理部で得られた2つの図形が、前記入力画像上において、前記撮影画像に写る人の撮影俯角が前記撮影画像で最大となる位置に対応する対応位置から延びる1本の第1直線上に位置し、かつ当該2つの図形の間の前記第3距離が前記第4しきい値以下あるいは未満であり、かつ当該2つの図形を統合して得られる一つの新たな図形の大ききが前記第5しきい値以下あるいは未満の場合、
当該2つの図形が一つの前記対象物に対して当てはめられたと判断して、当該新たな図形を当該2つの図形の代わりに採用する、画像処理装置。
The image processing apparatus according to claim 18 , wherein
The input image is an image obtained by performing image processing on a photographed image photographed by a camera that photographs the object in an overhead view,
The fourth processing unit includes:
Two first figures obtained by the third processing unit extend from corresponding positions corresponding to positions where a shooting depression angle of a person appearing in the captured image is maximum in the captured image on the input image. One new figure that is located on a straight line and the third distance between the two figures is less than or less than the fourth threshold and that is obtained by integrating the two figures Is less than or less than the fifth threshold,
An image processing apparatus that determines that the two graphics are applied to one object and employs the new graphics instead of the two graphics.
請求項18及び請求項19のいずれか一つに記載の画像処理装置であって、
前記図形は楕円であって、
前記第処理部は、前記第処理部で得られた2つの楕円のうちの一方の楕円の中心から、当該2つの楕円のうちの他方の楕円の中心までを結ぶ第2直線が当該一方の楕円と交わる第1交点と、当該第2直線が当該他方の楕円と交わる第2交点との間の距離を、前記第3距離とする、画像処理装置。
An image processing apparatus according to any one of claims 18 and 19 ,
The figure is an ellipse,
The fourth processing unit includes a second straight line connecting the center of one ellipse of the two ellipses obtained by the third processing unit to the center of the other ellipse of the two ellipses. An image processing apparatus, wherein a distance between a first intersection that intersects the ellipse and a second intersection that intersects the other ellipse is the third distance.
請求項18に記載の画像処理装置であって、
前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、
前記第処理部は、2つの図形の間の前記第3距離と比較される前記第4しきい値を、当該2つの図形を統合して得られる新たな図形の位置が、前記撮影画像において撮影俯角が最大となる位置に対応する入力画像での対応位置から離れるほど大きく設定する、画像処理装置。
The image processing apparatus according to claim 18 , wherein
The input image is an image obtained by performing image processing on a photographed image photographed by a camera that photographs the object in an overhead view,
The fourth processing unit sets the fourth threshold value to be compared with the third distance between two figures, and the position of a new figure obtained by integrating the two figures in the captured image. An image processing apparatus that is set to increase as the distance from the corresponding position in the input image corresponding to the position where the shooting depression angle is maximized.
請求項21に記載の画像処理装置であって、
前記第処理部は、
2つの図形を統合して得られる新たな図形の位置が前記対応位置から第2所定範囲内に存在する場合には、当該2つの図形の間の前記第3距離と比較される前記第4しきい値を、当該新たな図形の位置が前記対応位置から離れるほど大きく設定し、
2つの図形を統合して得られる新たな図形の位置が前記第2所定範囲外に存在する場合には、当該2つの図形の間の前記第3距離と比較される前記第4しきい値を、当該新たな図形の位置が前記対応位置から離れるほど小さく設定する、画像処理装置。
The image processing apparatus according to claim 21 ,
The fourth processing unit includes:
When the position of a new figure obtained by integrating two figures is within a second predetermined range from the corresponding position, the fourth distance is compared with the third distance between the two figures. Set the threshold value so that the position of the new figure is farther from the corresponding position,
When the position of a new figure obtained by integrating two figures is outside the second predetermined range, the fourth threshold value to be compared with the third distance between the two figures is set. An image processing apparatus that sets the position of the new figure so small that the position of the new figure is far from the corresponding position.
請求項18に記載の画像処理装置であって、
前記入力画像は、前記対象物を俯瞰撮影するカメラで撮影された撮影画像が画像処理されることによって得られた画像であって、
前記第処理部は、2つの図形を統合して得られる新たな図形の大ききと比較される前記第5しきい値を、当該新たな図形の位置が、前記撮影画像において撮影俯角が最大となる位置に対応する入力画像での対応位置から離れるほど大きく設定する、画像処理装置。
The image processing apparatus according to claim 18 , wherein
The input image is an image obtained by performing image processing on a photographed image photographed by a camera that photographs the object in an overhead view,
The fourth processing unit sets the fifth threshold value to be compared with the size of a new figure obtained by integrating two figures, the position of the new figure being the maximum shooting depression angle in the photographed image. The image processing apparatus is set so as to increase as the distance from the corresponding position in the input image corresponding to the position becomes.
請求項23に記載の画像処理装置であって、
前記第処理部は、
2つの図形を統合して得られる新たな図形の位置が前記対応位置から第2所定範囲内に存在する場合には、当該新たな図形の大きさと比較される前記第5しきい値を、当該新たな図形の位置が前記対応位置から離れるほど大きく設定し、
2つの図形を統合して得られる新たな図形の位置が前記第2所定範囲外に存在する場合には、当該新たな図形の大きさと比較される前記第5しきい値を、当該新たな図形の位置が前記対応位置から離れるほど小さく設定する、画像処理装置。
The image processing apparatus according to claim 23 , wherein
The fourth processing unit includes:
When the position of a new figure obtained by integrating two figures is within a second predetermined range from the corresponding position, the fifth threshold value to be compared with the size of the new figure is set to Set the position of the new figure as far away from the corresponding position,
When the position of a new figure obtained by integrating two figures is outside the second predetermined range, the fifth threshold value to be compared with the size of the new figure is set as the new figure. An image processing apparatus that sets the position to be smaller as the position of the distance from the corresponding position increases.
請求項19に記載の画像処理装置であって、
前記第処理部は、2つの図形を統合して得られる一つの新たな図形の位置と前記対応位置との差が第6しきい値以下あるいは未満の場合には、当該2つの図形が前記第1直線上に位置するか否かにかかわらず、当該2つの図形の間の前記第3距離が前記第4しきい値以下あるいは未満であり、かつ当該新たな図形の大ききが前記第5しきい値以下あるいは未満のとき、当該2つの図形が一つの前記対象物に対して当てはめられたと判断して、当該新たな図形を当該2つの図形の代わりに採用する、画像処理装置。
The image processing apparatus according to claim 19 ,
When the difference between the position of one new figure obtained by integrating two figures and the corresponding position is less than or less than a sixth threshold value, the fourth processing unit Regardless of whether or not it is located on the first straight line, the third distance between the two figures is less than or less than the fourth threshold value, and the size of the new figure is the fifth. An image processing apparatus that determines that the two graphics are applied to one of the objects when the threshold is less than or less than a threshold, and adopts the new graphics instead of the two graphics.
請求項1乃至請求項25のいずれか一つに記載の画像処理装置であって、
前記対象物を撮影するカメラで撮影された撮影画像に対して画像処理を行って前記入力画像を生成する第6処理部をさらに備える、画像処理装置。
An image processing apparatus according to any one of claims 1 to 25 , wherein:
An image processing apparatus, further comprising: a sixth processing unit that performs image processing on a captured image captured by a camera that captures the object and generates the input image.
請求項26に記載の画像処理装置と、
前記画像処理装置の前記第6処理部が前記画像処理を行う前記撮影画像を撮影するカメラと
を備える、画像処理システム。
An image processing device according to claim 26 ;
An image processing system, wherein the sixth processing unit of the image processing apparatus includes a camera that captures the captured image that performs the image processing.
互いに異なる時刻での対象物が写る複数枚の入力画像のそれぞれについて、当該入力画像に写る当該対象物に対して図形を当てはめる当てはめ処理を行う第1工程と、
前記当てはめ処理の結果に基づいて、前記入力画像での前記図形の位置を追跡することによって、前記入力画像での前記対象物の位置を追跡する追跡処理を行う第2工程と
を備え
前記第1工程において、一つの前記対象物に対して複数の図形が当てはめられた場合には、当該複数の図形を統合して得られる一つの新たな図形を、当該複数の図形の代わりに採用する、画像処理装置の動作方法。
A first step of performing a fitting process for fitting a figure to each of the plurality of input images in which the objects at different times are captured,
A second step of performing a tracking process for tracking the position of the object in the input image by tracking the position of the graphic in the input image based on the result of the fitting process ,
In the first step, when a plurality of figures are applied to one object, one new figure obtained by integrating the plurality of figures is used instead of the plurality of figures. A method of operating the image processing apparatus.
画像処理装置を制御するための制御プログラムであって、
前記画像処理装置に、
互いに異なる時刻での対象物が写る複数枚の入力画像のそれぞれについて、当該入力画像に写る当該対象物に対して図形を当てはめる当てはめ処理を行う第1工程と、
前記当てはめ処理の結果に基づいて、前記入力画像での前記図形の位置を追跡することによって、前記入力画像での前記対象物の位置を追跡する追跡処理を行う第2工程と
を実行させ
前記第1工程において、一つの前記対象物に対して複数の図形が当てはめられた場合には、当該複数の図形を統合して得られる一つの新たな図形を、当該複数の図形の代わりに採用する処理を実行させるための制御プログラム。
A control program for controlling an image processing apparatus,
In the image processing apparatus,
A first step of performing a fitting process for fitting a figure to each of the plurality of input images in which the objects at different times are captured,
Performing a tracking process for tracking the position of the object in the input image by tracking the position of the figure in the input image based on the result of the fitting process ; and
In the first step, when a plurality of figures are applied to one object, one new figure obtained by integrating the plurality of figures is used instead of the plurality of figures. control program order processing by the execution of.
JP2015219138A 2015-11-09 2015-11-09 Image processing apparatus, image processing system, operation method of image processing apparatus, and control program Expired - Fee Related JP6568772B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015219138A JP6568772B2 (en) 2015-11-09 2015-11-09 Image processing apparatus, image processing system, operation method of image processing apparatus, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015219138A JP6568772B2 (en) 2015-11-09 2015-11-09 Image processing apparatus, image processing system, operation method of image processing apparatus, and control program

Publications (2)

Publication Number Publication Date
JP2017091127A JP2017091127A (en) 2017-05-25
JP6568772B2 true JP6568772B2 (en) 2019-08-28

Family

ID=58768298

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015219138A Expired - Fee Related JP6568772B2 (en) 2015-11-09 2015-11-09 Image processing apparatus, image processing system, operation method of image processing apparatus, and control program

Country Status (1)

Country Link
JP (1) JP6568772B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021125137A (en) * 2020-02-07 2021-08-30 オムロン株式会社 Image processing apparatus and image processing method
JP7074161B2 (en) * 2020-07-07 2022-05-24 フジテック株式会社 Image processing device and image processing method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008134939A (en) * 2006-11-29 2008-06-12 Nippon Telegr & Teleph Corp <Ntt> Moving body tracking device, moving body tracking method, moving body tracking program describing the method, and recording medium storing the program
JP4819866B2 (en) * 2008-12-26 2011-11-24 日本電信電話株式会社 Image tracking device, image tracking method, and image tracking program
JP5758165B2 (en) * 2011-03-30 2015-08-05 セコム株式会社 Article detection device and stationary person detection device
JP6240016B2 (en) * 2014-03-31 2017-11-29 セコム株式会社 Tracking device and tracking system

Also Published As

Publication number Publication date
JP2017091127A (en) 2017-05-25

Similar Documents

Publication Publication Date Title
KR101064573B1 (en) System to track moving objects using particle filtration
JP4971191B2 (en) Identification of spurious areas in video frames
US11106920B2 (en) People flow estimation device, display control device, people flow estimation method, and recording medium
JP4741650B2 (en) Method of object tracking in video sequence
JP4643766B1 (en) Moving body detection apparatus and moving body detection method
JP5528151B2 (en) Object tracking device, object tracking method, and object tracking program
US9478033B1 (en) Particle-based tracking of objects within images
US20130343604A1 (en) Video processing apparatus and video processing method
JP4926603B2 (en) Smoke detector
JP5832910B2 (en) Image monitoring device
CN107403436A (en) A kind of character contour quick detection and tracking based on depth image
US20160253554A1 (en) Determination device and determination method
JP6568772B2 (en) Image processing apparatus, image processing system, operation method of image processing apparatus, and control program
JPH08329254A (en) Contour extractor
WO2016194770A1 (en) Image processing device for recognition of end of queue
JP5261546B2 (en) Smoke detector
JP4813289B2 (en) Smoke detector
JP2014026370A (en) Image area segmentation device and image area segmentation program
JP4926602B2 (en) Smoke detector
KR102161212B1 (en) System and method for motion detecting
JP5128454B2 (en) Wrinkle detection device, wrinkle detection method and program
JP4750758B2 (en) Attention area extraction method, attention area extraction device, computer program, and recording medium
JP6177708B2 (en) Moving object detection device, moving object detection method, and control program
JP6396051B2 (en) Area state estimation device, area state estimation method, program, and environment control system
KR20120071287A (en) Apparatus and method for tracking position using webcam

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190328

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190709

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190805

R150 Certificate of patent or registration of utility model

Ref document number: 6568772

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees