WO2016139868A1 - Image analysis device, image analysis method, and image analysis program - Google Patents

Image analysis device, image analysis method, and image analysis program Download PDF

Info

Publication number
WO2016139868A1
WO2016139868A1 PCT/JP2015/085600 JP2015085600W WO2016139868A1 WO 2016139868 A1 WO2016139868 A1 WO 2016139868A1 JP 2015085600 W JP2015085600 W JP 2015085600W WO 2016139868 A1 WO2016139868 A1 WO 2016139868A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
background
moving object
captured image
foreground
Prior art date
Application number
PCT/JP2015/085600
Other languages
French (fr)
Japanese (ja)
Inventor
靖和 田中
安川 徹
伸生 中嶋
Original Assignee
ノ-リツプレシジョン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ノ-リツプレシジョン株式会社 filed Critical ノ-リツプレシジョン株式会社
Priority to JP2017503327A priority Critical patent/JP6638723B2/en
Publication of WO2016139868A1 publication Critical patent/WO2016139868A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Definitions

  • the present invention relates to an image analysis apparatus, an image analysis method, and an image analysis program.
  • the background subtraction method is generally well known as a method for detecting a moving object in a photographed image photographed by a photographing device.
  • the background difference method is a method of extracting a region (foreground region) that is different from the background image by calculating the difference between the background image acquired in advance and the captured image (input image).
  • the pixel value of the area where the moving object is captured changes from the background image. Therefore, according to the background subtraction method, the area where the moving object is captured can be extracted as the foreground area, and the presence of the moving object can be detected.
  • Patent Document 1 proposes a method of detecting an area in which a person to be watched is captured using a background difference method. Specifically, each estimation condition is set on the assumption that the foreground region extracted by the background subtraction method is related to the behavior of the person being watched over, and by determining whether or not each of these estimation conditions is satisfied A method for estimating the behavior of the watching target person has been proposed.
  • the present inventors have found that the following problems occur when a moving object is detected based on a general background subtraction method. That is, it is assumed that a moving object such as a human moves a stationary object such as furniture that exists within the angle of view of the photographing apparatus. For example, this applies to a case where a target person appearing in a photographed image is sitting with a chair that is within the angle of view of the photographing apparatus.
  • the area where the moving stationary object is captured in addition to the area where the moving object is captured It will be detected as a foreground area. Therefore, as a result of the moving object having some effect on the background within the angle of view of the imaging device, such as moving a stationary object that is a part of the background, the general background subtraction method cannot properly detect the moving object.
  • the present inventors have found that this problem arises.
  • the present invention has been made in consideration of such points, and an object of the present invention is to provide a technique that can appropriately detect a moving object in the background subtraction method.
  • the present invention adopts the following configuration in order to solve the above-described problems.
  • an image analysis device includes an image acquisition unit that acquires a captured image captured by a capturing device, a background image set as a background of the captured image based on a background difference method, and the By calculating a difference from the acquired captured image, a background difference calculation unit that extracts a foreground region of the acquired captured image, and among the target objects that appear in the extracted foreground region, A moving object detector that detects a moving object that moves from the foreground area, and determines whether or not the number of detected moving objects matches the number of target objects that appear in the foreground area. When it is determined that the number of moving objects does not match the number of target objects appearing in the foreground area, the background image is updated using the acquired photographed image for the target area excluding the area where the moving object appears. It includes a scene update section.
  • the image analysis apparatus extracts the foreground area of the captured image based on the background difference method, and detects a moving object from the extracted foreground area. Then, the image processing apparatus determines whether or not the number of detected moving objects matches the number of target objects appearing in the foreground region, and the number of detected moving objects matches the number of target objects appearing in the foreground region. If it is determined not to, the background image is updated using the acquired captured image for the target region excluding the region where the moving object is captured.
  • the image analysis apparatus uses a background image to be used for the background subtraction method in a captured image obtained after a change in the background for a target area including a background area in which a change has occurred. Update.
  • the background image when the background changes, the background image can be updated for the region. Therefore, in the background subtraction method, it is possible to prevent the background area where the change has occurred from being extracted as the foreground area. Therefore, according to the above configuration, it is possible to appropriately detect the moving object in the background difference method.
  • the moving object may be an object that moves within the angle of view of the photographing apparatus, and is, for example, a living organism such as a human being.
  • the target object shown in the foreground area may include a stationary object moved by the moving object, a coating applied by the moving object so that a change occurs in the background, and the like.
  • the stationary object is, for example, furniture.
  • the coated material is, for example, paint.
  • the target object shown in the foreground region can include any target object that can be extracted as a difference by the background difference method.
  • the target object that appears in the foreground area includes an object that is temporarily or permanently brought into the imaging range by the moving object.
  • an object that is temporarily brought in there may be a baggage that a person, who is a moving object, left unattended immediately after returning home, a laundry that is loaded immediately after being taken in, or the like.
  • a baggage that a person, who is a moving object, left unattended immediately after returning home, a laundry that is loaded immediately after being taken in, or the like.
  • furniture, a figurine, etc. can be mentioned as an example of the object brought in permanently.
  • the image acquisition unit may continuously acquire a captured image captured by the imaging device, and the moving object detection unit may continuously The moving object may be continuously detected in the captured image by tracking the moving object once detected in the captured image.
  • the background update unit is configured to detect when the moving object is not detected when the moving object is not detected in the captured image due to the moving object moving outside the angle of view of the imaging device.
  • the background image may be updated with the acquired image.
  • the background image when there is no moving object within the angle of view of the photographing apparatus, the background image can be updated with the photographed image acquired at that time. Therefore, even if the moving object causes a change in the background, the entire background image can be updated in a lump without the moving object thereafter. That is, after a moving object has moved outside the angle of view of the imaging device, when the moving object enters again within the angle of view of the imaging device, the moving object that has entered again can be properly detected by the background subtraction method. it can. Therefore, according to the said structure, it becomes possible to detect a moving object appropriately in the background subtraction method.
  • the image acquisition unit may acquire a captured image including depth data indicating the depth of each pixel in the captured image.
  • the moving object detection unit analyzes a state of the target object in the foreground area in real space based on a depth of each pixel in the foreground area obtained by referring to the depth data.
  • the moving object may be detected from the foreground region.
  • the acquired captured image is a two-dimensional image
  • the acquired captured image hardly changes even if the moving object moves depending on the viewpoint of the imaging apparatus.
  • the acquired captured image includes depth data indicating the depth of each pixel.
  • the depth of each pixel indicates the depth from the photographing apparatus to the subject. Therefore, if this depth data is used, the state of the subject in real space (three-dimensional space) can be analyzed.
  • an information processing system that realizes each of the above-described configurations, an information processing method, or a program may be used. It may be a storage medium that can be read by a computer, other devices, machines, or the like in which such a program is recorded.
  • the computer-readable recording medium is a medium that stores information such as programs by electrical, magnetic, optical, mechanical, or chemical action.
  • the information processing system may be realized by one or a plurality of information processing devices.
  • a computer acquires a captured image captured by an imaging device, and a background image set as a background of the captured image based on a background difference method
  • the step of extracting a foreground area of the acquired captured image by calculating a difference from the acquired captured image, and moving within the angle of view of the imaging apparatus among the target objects reflected in the extracted foreground area Detecting a moving object to be detected from the foreground region, determining whether or not the number of detected moving objects matches the number of target objects appearing in the foreground region, When it is determined that the number does not match the number of target objects appearing in the foreground area, the background image is obtained using the acquired captured image for the target area excluding the area where the moving object appears. And updating the an information processing method for execution.
  • an image analysis program includes a step of acquiring a captured image captured by a capturing apparatus in a computer, and a background set as a background of the captured image based on a background difference method
  • FIG. 1A schematically illustrates a scene to which the present invention is applied (a time point before a person enters the angle of view of the camera).
  • FIG. 1B schematically illustrates a scene to which the present invention is applied (when a person enters the angle of view of the camera).
  • FIG. 1C schematically illustrates a scene where the present invention is applied (when a person sits on a chair).
  • FIG. 1D schematically illustrates a scene where the present invention is applied (when a person leaves the chair).
  • FIG. 2 illustrates a hardware configuration of the image analysis apparatus according to the embodiment.
  • FIG. 3 illustrates the relationship between the depth acquired by the camera according to the embodiment and the subject.
  • FIG. 4 illustrates a functional configuration of the image analysis apparatus according to the embodiment.
  • FIG. 1A schematically illustrates a scene to which the present invention is applied (a time point before a person enters the angle of view of the camera).
  • FIG. 1B schematically illustrates a scene to which the present invention is applied
  • FIG. 5 illustrates a processing procedure related to the update of the background image in the image analysis apparatus according to the embodiment.
  • FIG. 6A illustrates a captured image (at the time when a person enters the angle of view of the camera) acquired by the camera according to the embodiment.
  • FIG. 6B illustrates a captured image (when a person sits on a chair) acquired by the camera according to the embodiment.
  • FIG. 6C illustrates a captured image (at the time when the person leaves the chair) acquired by the camera according to the embodiment.
  • FIG. 7 illustrates the coordinate relationship in the captured image according to the embodiment.
  • FIG. 8 illustrates the positional relationship between an arbitrary point (pixel) of the captured image and the camera in the real space according to the embodiment.
  • FIG. 9 illustrates a background image (before update) according to the embodiment.
  • FIG. 10A illustrates the difference (foreground region) between the captured image and the background image of FIG. 6A.
  • FIG. 10B illustrates the difference (foreground region) between the captured image and the background image of FIG. 6B.
  • FIG. 10C illustrates the difference (foreground region) between the captured image and the background image of FIG. 6C.
  • FIG. 11 illustrates a background image (after update) according to the embodiment.
  • FIG. 12 illustrates another scene in which the image analysis apparatus according to the embodiment updates the background image.
  • FIG. 13A illustrates a scene in which a plurality of moving objects enter within the angle of view of the imaging apparatus according to the embodiment.
  • FIG. 13B illustrates a scene in which a plurality of moving objects enter within the angle of view of the imaging apparatus according to the embodiment.
  • this embodiment will be described with reference to the drawings.
  • this embodiment described below is only an illustration of the present invention in all respects. It goes without saying that various improvements and modifications can be made without departing from the scope of the present invention. That is, in implementing the present invention, a specific configuration according to the embodiment may be adopted as appropriate.
  • data appearing in the present embodiment is described in a natural language, more specifically, it is specified by a pseudo language, a command, a parameter, a machine language, or the like that can be recognized by a computer.
  • FIGS. 1A to 1D show an example of a scene in which the image analysis apparatus 1 according to the present embodiment is used.
  • a person who enters a room sits by pulling a chair placed in the room, and then the person leaves the room.
  • the scene to go is illustrated.
  • the image analysis apparatus 1 according to the present embodiment is an information processing apparatus that detects a moving object in a captured image based on a background difference method. Therefore, in the scene, the image analysis apparatus 1 according to the present embodiment detects a person who has entered the room as a moving object.
  • FIG. 1A schematically illustrates a scene before a person appears within the angle of view of the camera 2.
  • the image analysis apparatus 1 is connected to a camera 2 and acquires a captured image 3 captured by the camera 2.
  • a table and a chair are arranged as part of the background within the angle of view of the camera 2.
  • Each of the table and the chair is a stationary object, and is an example of a target object other than a moving object.
  • the image analysis apparatus 1 acquires a captured image 3 obtained by capturing this scene before a person appears within the angle of view of the camera 2 as a background image 4.
  • the background image 4 is not limited to such an example, and the image analysis apparatus 1 may acquire the background image 4 at an arbitrary timing.
  • FIG. 1B schematically illustrates a scene in which a person enters the angle of view of the camera 2 after the scene illustrated in FIG. 1A.
  • This person is an example of the moving object of the present invention.
  • the image analysis apparatus 1 calculates the difference between the background image 4 set as the background and the acquired captured image 3 based on the background difference method, thereby obtaining the foreground region of the acquired captured image 3. Extract.
  • the portion where the change occurs between the background image 4 and the captured image 3 is an area where a person is captured. For this reason, an area in which a person is captured is extracted as a foreground area.
  • FIG. 1C schematically illustrates a scene in which a person pulls a chair existing within the angle of view of the camera 2 after the scene illustrated in FIG. 1B.
  • the person as the moving object moves from the left end of the captured image 3 to the region where the chair is reflected.
  • the image analysis apparatus 1 extracts an area in which the person is captured as a foreground area based on the background difference method.
  • the image analysis apparatus 1 integrally extracts an area where the person and the chair are captured as a foreground area.
  • FIG. 1D schematically illustrates a scene in which the target person leaves the chair after the scene illustrated in FIG. 1C.
  • the person is away from the chair, and the chair is offset from its original position. Therefore, in the scene illustrated in FIG. 1D, the image analysis apparatus 1 extracts two areas, that is, the area where the person appears and the area where the chair appears as the foreground area.
  • the image analysis apparatus 1 detects, from the foreground area, a moving object that moves within the angle of view of the camera 2 among the extracted target objects that appear in the foreground area, and the number of detected moving objects is in the foreground area. It is determined whether or not the number matches the number of target objects. In one example, the image analysis apparatus 1 recognizes a lump area having a size equal to or larger than a threshold value as an object.
  • the image analysis apparatus 1 recognizes a region where a person and a chair are captured as one object, and detects a person who is a moving object in this region. That is, in the scene illustrated in FIG. 1C, the image analysis apparatus 1 determines that the number of detected moving objects matches the number of target objects that appear in the foreground region.
  • the image analysis apparatus 1 detects a person who is a moving object in the area where the person is captured while recognizing the area where the person is captured and the area where the chair is captured as separate objects. That is, in the scene illustrated in FIG. 1D, the image analysis apparatus 1 determines that the number of detected moving objects does not match the number of target objects that appear in the foreground region.
  • a scene in which the number of detected moving objects is determined not to match the number of target objects in the foreground area is a scene in which at least a part of the background has been altered. That is, in this scene, due to the influence of the modification of at least a part of the background, the modified area is extracted independently as the foreground area in addition to the area where the moving object appears.
  • the image analysis apparatus 1 updates the background image 4 using the acquired captured image 3 for the target region excluding the region where the moving object is captured. That is, the image analysis apparatus 1 updates the background image 4 by using the captured image 3 obtained by capturing the state of the area where the chair is extracted as the foreground area as a result of moving from the original position.
  • the image analysis apparatus 1 when a change occurs in at least a part of the background, the photographed image 3 photographed after the change has occurred with respect to the changed region.
  • the background image 4 can be updated. Therefore, in the background subtraction method, it is possible to prevent the background area where the change has occurred from being extracted as the foreground area. Therefore, according to the present embodiment, it is possible to provide a technique that can appropriately detect a moving object in the background subtraction method.
  • the image analysis apparatus 1 is not limited to such a scene, but is used to detect a moving object in a scene where at least part of the background may be altered. Widely applicable.
  • a person moving within the angle of view of the camera 2 is illustrated as an example of the moving object.
  • the moving object is not limited to such an example, and may be other than a person as long as the object moves within the angle of view of the camera 2.
  • the target object appearing in the foreground area is not limited to such an example, and can include any object that can be extracted as the foreground area by the background subtraction method.
  • the location of the image analysis device 1 can be determined as appropriate according to the embodiment as long as the captured image 3 can be acquired from the camera 2.
  • the image analysis apparatus 1 may be disposed so as to be close to the camera 2 as illustrated in FIGS. 1A to 1D.
  • the image analysis apparatus 1 may be connected to the camera 2 via a network, or may be disposed at a place completely different from the camera 2.
  • FIG. 2 illustrates the hardware configuration of the image analysis apparatus 1 according to the present embodiment.
  • the image analysis apparatus 1 stores a control unit 11 including a CPU, a RAM (Random Access Memory), a ROM (Read Only Memory), and the like, a program 5 executed by the control unit 11, and the like.
  • Unit 12 a touch panel display 13 for displaying and inputting images, a speaker 14 for outputting sound, an external interface 15 for connecting to an external device, a communication interface 16 for communicating via a network, and This is a computer to which a drive 17 for reading a program stored in the storage medium 6 is electrically connected.
  • the communication interface and the external interface are described as “communication I / F” and “external I / F”, respectively.
  • the components can be omitted, replaced, and added as appropriate according to the embodiment.
  • the control unit 11 may include a plurality of processors.
  • the touch panel display 13 may be replaced with an input device and a display device that are separately connected independently.
  • the speaker 14 may be omitted.
  • the speaker 14 may be connected to the image analysis device 1 as an external device instead of as an internal device of the image analysis device 1.
  • the image analysis apparatus 1 may incorporate a camera 2.
  • the image analysis device 1 may include a plurality of external interfaces 15 and may be connected to a plurality of external devices.
  • the camera 2 according to the present embodiment is connected to the image analysis apparatus 1 via the external interface 15 and is installed to photograph a person who has entered the room.
  • the installation purpose of the camera 2 is not limited to such an example, and can be selected as appropriate according to the embodiment.
  • This camera 2 corresponds to the photographing apparatus of the present invention.
  • the camera 2 includes a depth sensor 21 for measuring the depth of the subject.
  • the type and measurement method of the depth sensor 21 may be appropriately selected according to the embodiment.
  • the depth sensor 21 may be a sensor of TOF (TimeFOf Flight) method or the like.
  • the configuration of the camera 2 is not limited to such an example, and can be appropriately selected according to the embodiment.
  • the camera 2 may be a known imaging device that captures a two-dimensional image (for example, an RGB image) without acquiring the depth.
  • the camera 2 may be a stereo camera. Since the stereo camera shoots the subject within the shooting range from a plurality of different directions, the depth of the subject can be recorded.
  • the camera 2 may be replaced with the depth sensor 21 alone.
  • the depth sensor 21 may be an infrared depth sensor that measures the depth based on infrared irradiation so that the depth can be acquired without being affected by the brightness of the shooting location.
  • relatively inexpensive imaging apparatuses including such an infrared depth sensor include Kinect from Microsoft, Xtion from ASUS, and CARMINE from PrimeSense.
  • FIG. 3 shows an example of a distance that can be handled as the depth according to the present embodiment.
  • the depth represents the depth of the subject.
  • the depth of the subject may be expressed by, for example, a straight line distance A between the camera 2 and the object, or a perpendicular distance B from the horizontal axis with respect to the subject of the camera 2. It may be expressed as
  • the depth according to the present embodiment may be the distance A or the distance B.
  • the distance B is treated as the depth.
  • the distance A and the distance B can be converted into each other by using, for example, the three-square theorem. Therefore, the following description using the distance B can be applied to the distance A as it is.
  • the image analysis apparatus 1 according to the present embodiment can specify the position of the subject in the real space.
  • the storage unit 12 of the image analysis apparatus 1 stores the background image 4 used for the background difference method.
  • the background image 4 is an image set as the background of the captured image 3 and can be appropriately acquired according to the embodiment.
  • the storage unit 12 may hold the captured image 3 acquired before the person who is the moving object enters the angle of view of the camera 2 as the background image 4.
  • the background image 4 is stored in the storage unit 12 in advance.
  • the storage location of the background image 4 may not be limited to such an example.
  • the background image 4 may be held in another information processing apparatus or the like.
  • the image analysis apparatus 1 may access the other information processing apparatus via a network or the like to acquire the background image 4 used for the background difference method processing.
  • the storage unit 12 further stores the program 5.
  • the program 5 is a program for causing the image analysis apparatus 1 to execute each process related to the background image update described later, and corresponds to the “image analysis program” of the present invention.
  • the program 5 may be recorded on the storage medium 6.
  • the storage medium 6 stores information such as a program by an electrical, magnetic, optical, mechanical, or chemical action so that information such as a program recorded by a computer or other device or machine can be read. It is a medium to do.
  • the storage medium 6 corresponds to the “storage medium” of the present invention.
  • 2 illustrates a disk-type storage medium such as a CD (Compact Disk) or a DVD (Digital Versatile Disk) as an example of the storage medium 6.
  • the type of the storage medium 6 is not limited to the disk type and may be other than the disk type. Examples of the storage medium other than the disk type include a semiconductor memory such as a flash memory.
  • an image analysis device 1 may be, for example, a device designed exclusively for the provided service, or a general-purpose device such as a PC (Personal Computer) or a tablet terminal. Furthermore, the image analysis apparatus 1 may be implemented by one or a plurality of computers.
  • FIG. 4 illustrates a functional configuration of the image analysis apparatus 1 according to the present embodiment.
  • the control unit 11 of the image analysis device 1 expands the program 5 stored in the storage unit 12 in the RAM.
  • the control part 11 interprets and runs the program 5 expand
  • the image analysis device 1 functions as a computer including the image acquisition unit 31, the background difference calculation unit 32, the moving object detection unit 33, and the background update unit 34.
  • the image acquisition unit 31 acquires a captured image 3 captured by the camera 2.
  • the background difference calculation unit 32 extracts the foreground region of the acquired captured image 3 by calculating the difference between the background image 4 stored in the storage unit 12 and the acquired captured image 3 based on the background difference method. To do.
  • the foreground area may include an area where a background change occurs in addition to a person who is a moving object.
  • the moving object detection unit 33 detects, from the foreground area, a moving object that moves within the angle of view of the camera 2 among the extracted target objects reflected in the foreground area, and the background update unit 34 detects the detected moving object. It is determined whether or not the number of matches the number of target objects in the foreground area.
  • the background update unit 34 determines that the number of detected moving objects does not match the number of target objects appearing in the foreground area, the background update unit 34 acquires the captured image 3 for the target area excluding the area where the moving object appears. Is used to update the background image 4.
  • FIG. 5 illustrates a processing procedure related to the update of the background image of the image analysis apparatus 1.
  • the processing procedure related to the background image update described below corresponds to the “image analysis method” of the present invention.
  • the processing procedure related to the background image update described below is merely an example, and each processing may be changed as much as possible. Further, in the processing procedure described below, steps can be omitted, replaced, and added as appropriate according to the embodiment.
  • step S101 In step S ⁇ b> 101, the control unit 11 functions as the image acquisition unit 31 and acquires the captured image 3 captured by the camera 2. Then, the control part 11 advances a process to following step S102.
  • the captured image 3 acquired in step S101 will be described with reference to FIGS. 6A to 6C.
  • 6A to 6C illustrate the captured images 3a to 3c acquired in this step S101.
  • the control unit 11 As illustrated in FIGS. 6A to 6C, the control unit 11 according to the present embodiment continuously acquires the captured image 3 captured by the camera 2 as, for example, a moving image.
  • the captured image 3 a in FIG. 6A is a captured image 3 that was captured when a person entered the angle of view of the camera 2.
  • a photographed image 3b in FIG. 6B is a photographed image 3 photographed when a person sits with a chair pulled within the angle of view of the camera 2 after the photographed image 3a in FIG. 6A is photographed.
  • the captured image 3c in FIG. 6C is a captured image 3 that is captured when the target person leaves the chair after the captured image 3b in FIG. 6B is captured.
  • the control unit 11 may acquire such captured images 3a to 3c in synchronization with the video signal of the camera 2. Then, at the stage where one or a plurality of photographed images 3 are acquired, the control unit 11 can immediately execute the processing from steps S102 to S105 described later to the one or a plurality of photographed images 3 that have been acquired. Good.
  • the image analysis apparatus 1 can perform real-time image processing by continuously executing such an operation continuously, and can detect a moving object existing in the shooting range of the camera 2 in real time.
  • the camera 2 includes a depth sensor 21.
  • the captured images 3a to 3c acquired in step S101 include depth data indicating the depth of each pixel.
  • each of the captured images 3a to 3c illustrated in FIGS. 6A to 6C is the captured image 3 in which the gray value of each pixel is determined according to the depth of each pixel.
  • the control unit 11 can specify the position of each pixel in the real space. That is, the control unit 11 can specify the position in the three-dimensional space (real space) of the subject captured in each pixel from the coordinates (two-dimensional information) and the depth of each pixel in the captured image 3. .
  • the control unit 11 specifies the position of each pixel in the real space.
  • FIG. 7 illustrates the coordinate relationship in the captured image 3.
  • FIG. 8 illustrates the positional relationship between an arbitrary pixel (point s) of the captured image 3 and the camera 2 in the real space. 7 corresponds to a direction perpendicular to the paper surface of FIG. That is, the length of the captured image 3 shown in FIG. 8 corresponds to the length in the vertical direction (H pixels) illustrated in FIG. Further, the length in the horizontal direction (W pixels) illustrated in FIG. 7 corresponds to the length in the vertical direction of the photographed image 3 that does not appear in FIG.
  • the coordinates of an arbitrary pixel (point s) of the captured image 3 are (x s , y s ), the horizontal angle of view of the camera 2 is V x , and the vertical image Assume that the corner is V y . Further, it is assumed that the number of pixels in the horizontal direction of the captured image 3 is W, the number of pixels in the vertical direction is H, and the coordinates of the center point (pixel) of the captured image 3 are (0, 0).
  • the control unit 11 can acquire information indicating the angle of view (V x , V y ) of the camera 2 from the camera 2.
  • the method for acquiring information indicating the angle of view (V x , V y ) of the camera 2 is not limited to such an example, and the control unit 11 is information indicating the angle of view (V x , V y ) of the camera 2. May be acquired based on user input, or may be acquired as a preset setting value.
  • the control unit 11 can acquire the coordinates (x s , y s ) of the point s and the number of pixels (W ⁇ H) of the captured image 3 from the captured image 3.
  • the control unit 11 can acquire the depth Ds of the point s by referring to the depth data included in the captured image 3.
  • the control unit 11 can specify the position of each pixel (point s) in the real space by using these pieces of information. For example, the control unit 11 performs vector S (S x , S y , S z) from the camera 2 to the point s in the camera coordinate system illustrated in FIG. , 1) can be calculated. Thereby, the position of the point s in the two-dimensional coordinate system in the captured image 3 and the position of the point s in the camera coordinate system can be mutually converted.
  • the vector S is a vector of a three-dimensional coordinate system centered on the camera 2.
  • the camera 2 may be tilted with respect to the horizontal direction. That is, the camera coordinate system may be tilted from the world coordinate system in the three-dimensional space (real space). Therefore, the control unit 11 applies the projective transformation using the roll angle, pitch angle ( ⁇ in FIG. 8), and yaw angle of the camera 2 to the vector S, so that the vector S of the camera coordinate system is converted to the world coordinate system. And the position of the point s in the world coordinate system may be calculated.
  • the data format of the captured image 3 including the depth data may not be limited to such an example, and may be appropriately selected according to the embodiment.
  • the captured image 3 may be data (for example, a depth map) in which the depth of the subject within the imaging range is two-dimensionally distributed.
  • the captured image 3 may include an RGB image together with the depth data.
  • Such a captured image 3 may be a moving image or one or a plurality of still images.
  • Step S102 the control unit 11 functions as the background difference calculation unit 32, and based on the background difference method, the background image 4 stored in the storage unit 12 and each acquired in step S101.
  • the difference from the captured images 3a to 3c is calculated.
  • the control unit 11 extracts the foreground area of each of the captured images 3a to 3c acquired in step S101.
  • the control unit 11 proceeds to the next step S103.
  • the background image 4 stored in the storage unit 12 will be described with reference to FIG. FIG. 9 illustrates the background image 4 a stored in the storage unit 12.
  • the background image 4a is the background image 4 acquired before the photographed image 3a of FIG. 6A is photographed, that is, before a person enters the angle of view of the camera 2.
  • the control unit 11 acquires, as the background image 4, the captured image 3 at the time when there is no moving object before starting the processing of this operation example.
  • the background image 4 also includes depth data in the same manner as the captured image 3.
  • the method of acquiring the background image 4 is not limited to such an example, and can be set as appropriate according to the embodiment.
  • step S102 the control unit 11 calculates a difference between each of the captured images 3a to 3c acquired in step S101 and the background image 4. For example, the control unit 11 calculates a pixel value difference between corresponding pixels of each of the captured images 3a to 3c and the background image 4, and when the calculated difference exceeds a predetermined threshold value, The pixel is recognized as a pixel in the foreground area.
  • the method for extracting the foreground region is not limited to such an example, and can be appropriately set based on various background subtraction methods.
  • FIGS. 10A to 10C illustrate foreground regions extracted in the captured images 3a to 3c by such processing.
  • FIG. 10A illustrates a difference area (foreground area) between the captured image 3a in FIG. 6A and the background image 4a in FIG.
  • FIG. 10B illustrates a difference area (foreground area) between the captured image 3b in FIG. 6B and the background image 4a in FIG.
  • FIG. 10C illustrates a difference area (foreground area) between the captured image 3c in FIG. 6C and the background image 4a in FIG. 10A to 10C are views of the shooting range of the camera 2 as viewed from above. That is, the vertical direction of each of FIGS. 10A to 10C corresponds to the direction perpendicular to the paper surface of FIGS. 6A to 6C.
  • the gray value of each pixel of each of the captured images 3a to 3c and the background image 4a is determined according to the depth of each pixel. Therefore, the difference in pixel value between corresponding pixels of each of the captured images 3a to 3c and the background image 4 corresponds to the difference in depth of each pixel. Therefore, as illustrated in FIGS. 10A to 10C, in the present embodiment, based on the background subtraction method, it is possible to extract a region where the background has changed in real space as a foreground region.
  • an area in which a person is captured is extracted as a foreground area.
  • the area where the person and the chair are captured is extracted as a foreground area.
  • the area where the person is photographed and the area where the chair is photographed are extracted as separate foreground areas. Since each of the captured images 3a to 3c and the background image 4a includes depth data, in this step S102, an area where the background has changed in real space can be extracted as a foreground area.
  • Step S103 Returning to FIG. 5, in the next step S ⁇ b> 103, the control unit 11 functions as the moving object detection unit 33, and moves to move within the angle of view of the camera 2 among the target objects captured in the foreground area extracted in step S ⁇ b> 102. An object is detected from the foreground region. Then, when the detection of the moving object is completed, the control unit 11 advances the processing to the next step S104.
  • the control unit 11 recognizes a block of foreground areas having a size equal to or larger than a predetermined threshold as one target object.
  • the control unit 11 has a single foreground object in the foreground area because the foreground area appears in one place as illustrated in FIGS. 10A and 10B. Recognize.
  • the control unit 11 recognizes that there are two target objects in the foreground area because the foreground area appears apart in two places as illustrated in FIG. 10C.
  • the method for recognizing the number of target objects appearing in the foreground region is not limited to such an example, and may be appropriately selected according to the embodiment.
  • the control unit 11 recognizes that the target object is a moving object when it is determined that the target object in the foreground region is an object moving in real space. For example, as illustrated in FIGS. 10A to 10C, the control unit 11 can acquire the depth of each pixel in the foreground region by referring to the depth data. As described above, the depth of each pixel indicates the position of each pixel in the real space.
  • control unit 11 can analyze the state of the target object in the foreground area in the real space based on the depth of each pixel in the foreground area. Specifically, the control unit 11 can determine whether or not the position of the foreground region varies in real space based on the depth of each pixel in the foreground region.
  • the control unit 11 determines that the position of the foreground region is fluctuating in the real space, the control unit 11 recognizes that the target object in the foreground region is moving in the real space, and the target object is You may recognize that it is a moving object. That is, in this case, the control unit 11 can detect a moving object from the foreground area. On the other hand, when the position of the foreground area has not changed in real space, the control unit 11 may recognize that the target object appearing in the foreground area is an object other than a moving object (for example, a stationary object). . Note that such a change in the foreground region can also be determined based on an optical flow or the like.
  • control unit 11 may recognize a moving object as follows. That is, when a moving object enters within the angle of view of the camera 2, a foreground region appears on the periphery of the captured image 3 as illustrated in FIGS. 6A and 10A. Therefore, when the foreground area appears on the periphery of the captured image 3, the control unit 11 may recognize that the target object appearing in the foreground area is a moving object and increment the number of moving objects.
  • control unit 11 may continuously detect the moving object in the captured image 3 by tracking (tracking) the moving object once detected in the continuously acquired captured image 3. Such tracking can be performed based on an optical flow or the like. That is, as illustrated in FIGS. 10A to 10C, the foreground area in which a person is photographed varies in a series of captured images 3. Therefore, the control unit 11 may identify a foreground area where a person is captured from among the foreground areas appearing in each captured image 3 by tracking the fluctuating foreground area based on an optical flow or the like.
  • the control unit 11 recognizes that the moving object has moved out of the angle of view, and decrements the number of moving objects. Good. Accordingly, the control unit 11 can manage the number of moving objects that appear in the captured image 3 acquired in series.
  • the control unit 11 can detect a moving object as described above, for example. Specifically, in the scenes of FIGS. 6A and 6B, the control unit 11 recognizes a group of foreground areas illustrated in FIGS. 10A and 10B as moving objects. Further, in the scene of FIG. 6C, the control unit 11 recognizes the left foreground region illustrated in FIG. 10C as a moving object, and the right foreground region illustrated in FIG. 10C is an object other than the moving object. Recognize.
  • the method of recognizing a moving object is not limited to these examples, and may be appropriately selected according to the embodiment.
  • the method for recognizing each state in the image analysis apparatus 1 is not limited to such an example. If the state in which the moving object is detected can be recognized, the method is appropriately determined according to the embodiment. May be set.
  • Step S104 In the next step S104, the control unit 11 functions as the background update unit 34, and determines whether or not the number of moving objects detected in step S103 matches the number of target objects appearing in the foreground region. If the control unit 11 determines that the number of moving objects detected in step S103 does not match the number of target objects in the foreground area, the control unit 11 proceeds to the next step S105. On the other hand, if it is determined that the number of moving objects detected in step S103 matches the number of target objects that appear in the foreground area, the control unit 11 omits the process of the next step S105 and performs this operation example. This process is terminated.
  • the method for determining whether or not the number of moving objects detected in step S103 matches the number of target objects appearing in the foreground region may be appropriately set according to the embodiment. For example, when there is no foreground area corresponding to the target object other than the moving object, in other words, when all the foreground areas correspond to the moving objects, the control unit 11 detects the moving object detected in step S103. Can be determined to match the number of target objects in the foreground area. On the other hand, when there is at least one foreground area corresponding to the target object other than the moving object, it can be determined that the number of moving objects detected in step S103 does not match the number of target objects appearing in the foreground area. .
  • the control unit 11 recognizes that the number of target objects and the number of moving objects are one each, and therefore the number of moving objects detected in step S103 is the foreground. It is determined that the number matches the number of target objects appearing in the region, and the processing according to this operation example is terminated.
  • the control unit 11 recognizes that the number of target objects is two while the number of moving objects is one, and thus the moving object detected in step S103. Is determined not to coincide with the number of target objects in the foreground area. And the control part 11 advances a process to following step S105.
  • Step S105 In the next step S105, the control unit 11 functions as the background update unit 34 and updates the background image 4 using the acquired captured image 3 for the target region excluding the region where the moving object is captured. Then, when the update of the background image 4 is completed in step S105, the control unit 11 ends the process according to this operation example.
  • step S105 is executed in the scene illustrated in FIG. 6C among the scenes illustrated in FIGS. 6A to 6C. Therefore, an example of the process of step S105 will be described using the captured image 3c illustrated in FIG. 6C.
  • the control unit 11 determines a target area (hereinafter, also referred to as “update area”) used for updating the background image 4a from an area excluding the area 301 in which a person as a moving object is captured in the captured image 3c. .
  • the method for determining the update area can be appropriately selected according to the embodiment. However, it is preferable that the update region is determined so as to include a foreground region (for example, region 302) in which a target object other than a moving object is captured.
  • control unit 11 may determine all the regions except the region where the moving object is captured (for example, the region 301) as the update region. In addition, for example, the control unit 11 may determine all regions except the region where the moving object is captured and a predetermined range around the region as the update region. For example, the captured image 3 may be divided into a predetermined number of blocks. And the control part 11 may determine the block which does not contain the area
  • the control unit 11 updates the background image 4a using the captured image 3c for the determined update region (region 303).
  • the method of updating the background image 4 using the captured image 3 can be set as appropriate according to the embodiment.
  • the control unit 11 may update the background image 4a by replacing the pixel value of each pixel of the background image 4a with the pixel value of each pixel of the captured image 3c.
  • the control unit 11 calculates the pixel value of each pixel of the background image 4a from the plurality of captured images 3 acquired during a predetermined time including the time when the captured image 3c is acquired.
  • the background image 4a may be updated by replacing the average value of each pixel.
  • the control unit 11 generates a new background image 4b illustrated in FIG.
  • FIG. 11 exemplifies a new background image 4b updated by the process of step S105.
  • the region where the chair moved from the original position is illustrated in FIG. 9 using each pixel included in the region 302 of the captured image 3c illustrated in FIG. 6C. Updated from the background image 4a. Therefore, in the captured image 3 acquired thereafter, even if the foreground region extraction process based on the background difference method in step S102 is applied, the region in which the chair appears is not extracted as the foreground region.
  • the background image 4 is updated using the captured image 3. That is, when a foreground area in which a target object other than a moving object is captured, a new background image that does not extract the foreground area using the captured image 3 and the original background image 4 acquired at that time. 4 is generated.
  • the control unit 11 stores the newly generated background image 4 in the storage unit 12. At this time, the control unit 11 may delete the original background image 4 from the storage unit 12, that is, may replace the original background image 4 with a new background image 4 in the storage unit 12. Further, the control unit 11 may leave the original background image 4 in the storage unit 12 as it is.
  • the treatment of the original background image 4 can be appropriately selected according to the embodiment.
  • the control part 11 may update the background image 4.
  • the control unit 11 may continuously detect the moving object in the captured image 3 by tracking the moving object once detected in the captured image 3 continuously acquired in step S103. . Then, when the moving object is not detected in the captured image 3 due to the moving object moving outside the angle of view of the camera 2, the control unit 11 captures the captured image acquired when the moving object is not detected. 3 may update the background image 4.
  • this update process will be described with reference to FIG.
  • FIG. 12 illustrates a scene where a moving object no longer exists within the angle of view of the camera 2.
  • the control unit 11 may increment the number of moving objects when the moving object enters the angle of view of the camera 2, and when the moving object moves out of the angle of view of the camera 2, the control unit 11 You may decrement the number. Then, as illustrated in FIG. 12, when the number of moving objects becomes zero during this decrement, the control unit 11 updates the entire background image 4 with the captured image 3 acquired at this time. Also good.
  • control unit 11 may store the captured image 3 acquired when the moving object no longer exists in the storage unit 12 as a new background image 4. Further, for example, the control unit 11 may generate a new background image 4 by averaging the captured images 3 acquired within a predetermined time after the moving object no longer exists.
  • the background image 4 when there is no moving object within the angle of view of the camera 2, the background image 4 can be updated with the captured image 3 acquired at that time. Therefore, even if the moving object causes a change in the background, the entire area of the background image 4 can be updated at a time in the absence of the moving object thereafter. That is, after a moving object moves outside the angle of view of the camera 2, when the moving object enters again within the angle of view of the camera 2, the moving object that has re-entered can be properly detected by the background subtraction method. it can. Therefore, according to the method, it is possible to appropriately detect the moving object in the background difference method.
  • FIG. 13A exemplifies a scene in which two persons have entered into the angle of view of the camera 2 and have entered.
  • FIG. 13B illustrates a scene in which two persons entering the angle of view of the camera 2 are separated from each other after the scene illustrated in FIG. 13A.
  • the control unit 11 recognizes a group of foreground areas having a size equal to or larger than a predetermined threshold as one target object. Therefore, in the scene illustrated in FIG. 13A, the control unit 11 recognizes that one moving object exists in the captured image 3. Thereafter, in the scene illustrated in FIG. 13B, the control unit 11 recognizes that there are two moving objects in the captured image 3.
  • the situation recognized by the control unit 11 and the actual situation in the captured image 3 can be different.
  • the number of moving objects detected in step S103 is an object to be reflected in the foreground area unless the background is altered in the area excluding the area where the person is captured. It matches the number of objects. Therefore, even if the situation recognized by the control unit 11 and the actual situation in the captured image 3 deviate, the control unit 11 can execute the process according to the above operation example without any problem.
  • the image analysis apparatus 1 updates the background image 4 using the acquired captured image 3 for the target region excluding the region where the moving object is captured. More specifically, when the number of foreground regions to be extracted is larger than the number of moving objects captured in the captured image 3, the image analysis apparatus 1 according to the present embodiment includes the captured image 3 acquired at that time. Using the original background image 4, a new background image 4 is generated so that a foreground region that captures an object other than the moving object is not extracted.
  • the image analysis apparatus 1 when a change occurs in at least a part of the background, the photographed image 3 photographed after the change has occurred with respect to the changed region.
  • the background image 4 can be updated. Therefore, according to the present embodiment, it is possible to prevent a region that captures an object other than a moving object from being extracted as a foreground region in the processing based on the background difference method, thereby appropriately moving a moving object based on the background difference method. It can be made detectable.
  • the acquired captured image 3 includes depth data indicating the depth of each pixel. Therefore, as illustrated in FIGS. 10A to 10C, the position of the foreground region in the real space can be specified by using this depth data. Therefore, according to the configuration, regardless of the viewpoint of the camera 2, the state of the target object in the foreground area in the real space is analyzed, and based on the result of the analysis, whether the foreground area corresponds to the moving object. It can be determined whether or not. Therefore, according to the configuration, the background image used for the background difference method can be updated so that the moving object based on the background difference method can be appropriately detected regardless of the viewpoint of the camera 2. That is, it is possible to provide a background difference method that is robust against differences in the viewpoint of the camera 2.
  • the movement of the moving object is detected because there is no significant change in the area where the moving object appears in the two-dimensional image. It ’s difficult.
  • the movement of the moving object can be detected based on the depth.
  • a moving object overlaps a stationary object in a captured image it is difficult to separate these objects in a two-dimensional image.
  • the background image used for the background subtraction method can be updated regardless of the viewpoint of the camera 2.
  • the image analysis apparatus 1 according to the present embodiment can detect a moving object in the captured image 3 captured by the camera 2. Therefore, the image analysis apparatus 1 according to the present embodiment can be used in various systems that involve detection of moving objects.
  • the image analysis apparatus 1 can be used in a system that detects a watching target person as a moving object.
  • the captured image 3 includes depth data, it is possible to analyze the state of the person being watched over in real space based on the depth data.
  • the control part 11 analyzes that it is in the state where danger is approaching a watching target person, you may alert
  • the image analysis apparatus 1 can be used in a system that detects a suspicious person entering a building as a moving object.
  • the camera 2 is installed on a route through which a suspicious person can enter.
  • the control unit 11 may display the moving object on the touch panel display 13 while being color-coded with other target objects.
  • the manager of the building can instantly recognize the moving object from the captured image 3 displayed on the touch panel display 13, and can easily find the suspicious person.
  • the camera 2 includes the depth sensor 21 so that the depth of each pixel of the captured image 3 can be acquired.
  • the camera 2 may not be limited to such an example, and may not be configured to be able to acquire the depth.
  • the camera 2 may be a known imaging device that can acquire a two-dimensional image such as an RGB image. Even in this case, the image analysis apparatus 1 can extract the foreground region based on the background difference method, detect the moving object, and update the background image 4 in the same manner as described above.

Abstract

The purpose of the present invention is to provide a technology which allows accurate detection of moving objectsusing background subtraction. An image analysis device according to an aspect of the present invention comprises: an image acquisition unit which acquires a photographic image which is photographed by a photography device; a background subtraction computation unit which, by computing the difference between a background image and the photographic image on the basis of background subtraction, extracts a foreground region of the photographic image; a moving object detection unit which detects from the extracted foreground region, among objects appearing in the extracted foreground region, moving objects which move in the field of view of the photographic image; and a background update unit which determines whether the number of detected moving objects matches the number of objects appearing in the foreground region, and if it is determined that the number of detected moving objects does not match the number of objects appearing in the foreground region, updates the background image, using the acquired photographic image, for the region excluding the region in which the moving objects appear.

Description

画像解析装置、画像解析方法、及び、画像解析プログラムImage analysis apparatus, image analysis method, and image analysis program
 本発明は、画像解析装置、画像解析方法、及び、画像解析プログラムに関する。 The present invention relates to an image analysis apparatus, an image analysis method, and an image analysis program.
 撮影装置により撮影した撮影画像内で移動物体を検出する方法として、背景差分法が一般的によく知られている。背景差分法は、事前に取得した背景画像と撮影画像(入力画像)との差分を算出することで、背景画像と相違する領域(前景領域)を撮影画像内において抽出する手法である。撮影画像内に移動物体が存在する場合には、移動物体の写る領域の画素値は背景画像から変化する。そのため、この背景差分法によれば、移動物体の写る領域をこの前景領域として抽出することができ、これによって、移動物体の存在を検出することができる。 The background subtraction method is generally well known as a method for detecting a moving object in a photographed image photographed by a photographing device. The background difference method is a method of extracting a region (foreground region) that is different from the background image by calculating the difference between the background image acquired in advance and the captured image (input image). When there is a moving object in the captured image, the pixel value of the area where the moving object is captured changes from the background image. Therefore, according to the background subtraction method, the area where the moving object is captured can be extracted as the foreground area, and the presence of the moving object can be detected.
 近年、この背景差分法による移動物体の検出は、様々な分野で利用されている。例えば、特許文献1では、背景差分法を利用して見守り対象者の写る領域を検出する手法が提案されている。具体的には、背景差分法により抽出される前景領域が見守り対象者の行動に関連すると仮定して各推定条件が設定されており、この各推定条件が満たされるか否かを判定することによって当該見守り対象者の行動を推定する方法が提案されている。 In recent years, detection of moving objects by the background subtraction method has been used in various fields. For example, Patent Document 1 proposes a method of detecting an area in which a person to be watched is captured using a background difference method. Specifically, each estimation condition is set on the assumption that the foreground region extracted by the background subtraction method is related to the behavior of the person being watched over, and by determining whether or not each of these estimation conditions is satisfied A method for estimating the behavior of the watching target person has been proposed.
特開2014-236896号公報JP 2014-236896 A
 しかしながら、本件発明者らは、一般的な背景差分法に基づいて移動物体を検出する場合に、次のような問題点が生じることを見出した。すなわち、人間等の移動物体が、撮影装置の画角内に存在する家具等の静止物体を移動させたとする。例えば、撮影画像に写る対象人物が撮影装置の画角内に存在する椅子を引いて座る場合等がこれに該当する。 However, the present inventors have found that the following problems occur when a moving object is detected based on a general background subtraction method. That is, it is assumed that a moving object such as a human moves a stationary object such as furniture that exists within the angle of view of the photographing apparatus. For example, this applies to a case where a target person appearing in a photographed image is sitting with a chair that is within the angle of view of the photographing apparatus.
 このような場合、移動物体が静止物体を移動させた後に、撮影装置により取得される撮影画像と背景画像との差分を算出すると、移動物体の写る領域の他、移動した静止物体の写る領域も前景領域として検出されてしまう。したがって、背景の一部である静止物体が移動させられる等、撮影装置の画角内で移動物体が何らかの作用を背景に及ぼした結果、一般的な背景差分法では移動物体を適正に検出できなくなるという問題点が生じることを本件発明者らは見出した。 In such a case, after calculating the difference between the captured image acquired by the imaging apparatus and the background image after the moving object moves the stationary object, the area where the moving stationary object is captured in addition to the area where the moving object is captured It will be detected as a foreground area. Therefore, as a result of the moving object having some effect on the background within the angle of view of the imaging device, such as moving a stationary object that is a part of the background, the general background subtraction method cannot properly detect the moving object. The present inventors have found that this problem arises.
 本発明は、一側面では、このような点を考慮してなされたものであり、背景差分法において移動物体を適正に検出可能にする技術を提供することを目的とする。 In one aspect, the present invention has been made in consideration of such points, and an object of the present invention is to provide a technique that can appropriately detect a moving object in the background subtraction method.
 本発明は、上述した課題を解決するために、以下の構成を採用する。 The present invention adopts the following configuration in order to solve the above-described problems.
 すなわち、本発明の一側面に係る画像解析装置は、撮影装置により撮影された撮影画像を取得する画像取得部と、背景差分法に基づいて、前記撮影画像の背景に設定された背景画像と前記取得した撮影画像との差分を算出することで、前記取得した撮影画像の前景領域を抽出する背景差分算出部と、抽出された前記前景領域に写る対象物体のうち、前記撮影装置の画角内を移動する移動物体を前記前景領域から検出する移動物体検出部と、検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致するか否かを判定し、検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致しないと判定した場合に、前記移動物体の写る領域を除いた対象領域について、前記取得した撮影画像を用いて前記背景画像を更新する背景更新部と、を備える。 That is, an image analysis device according to one aspect of the present invention includes an image acquisition unit that acquires a captured image captured by a capturing device, a background image set as a background of the captured image based on a background difference method, and the By calculating a difference from the acquired captured image, a background difference calculation unit that extracts a foreground region of the acquired captured image, and among the target objects that appear in the extracted foreground region, A moving object detector that detects a moving object that moves from the foreground area, and determines whether or not the number of detected moving objects matches the number of target objects that appear in the foreground area. When it is determined that the number of moving objects does not match the number of target objects appearing in the foreground area, the background image is updated using the acquired photographed image for the target area excluding the area where the moving object appears. It includes a scene update section.
 上記構成に係る画像解析装置は、背景差分法に基づいて撮影画像の前景領域を抽出し、抽出した当該前景領域から移動物体を検出する。そして、当該画像処理装置は、検出した移動物体の数が前景領域に写る対象物体の数と一致するか否かを判定し、検出した移動物体の数が前景領域に写る対象物体の数と一致しないと判定した場合には、移動物体の写る領域を除いた対象領域について、取得した撮影画像を用いて背景画像を更新する。 The image analysis apparatus according to the above configuration extracts the foreground area of the captured image based on the background difference method, and detects a moving object from the extracted foreground area. Then, the image processing apparatus determines whether or not the number of detected moving objects matches the number of target objects appearing in the foreground region, and the number of detected moving objects matches the number of target objects appearing in the foreground region. If it is determined not to, the background image is updated using the acquired captured image for the target region excluding the region where the moving object is captured.
 ここで、検出した移動物体の数が前景領域に写る対象物体の数と一致しない場合とは、換言すると、撮影装置の画角内で移動物体が何らかの作用を背景に及ぼした結果、背景に変化が生じた場合である。このような場合に、上記構成に係る画像解析装置は、変化が生じた背景の領域を含む対象領域について、背景に変化が生じた後に取得された撮影画像で背景差分法に利用する背景画像を更新する。 Here, when the number of detected moving objects does not match the number of target objects appearing in the foreground area, in other words, the moving object has some effect on the background within the angle of view of the imaging device, and changes to the background. Is the case. In such a case, the image analysis apparatus according to the above configuration uses a background image to be used for the background subtraction method in a captured image obtained after a change in the background for a target area including a background area in which a change has occurred. Update.
 すなわち、上記構成によれば、背景に変化が生じた場合に、その領域について背景画像を更新することができる。そのため、背景差分法において、その変化の生じた背景の領域が前景領域として抽出されないようにすることができる。したがって、上記構成によれば、背景差分法において移動物体を適正に検出することが可能になる。 That is, according to the above configuration, when the background changes, the background image can be updated for the region. Therefore, in the background subtraction method, it is possible to prevent the background area where the change has occurred from being extracted as the foreground area. Therefore, according to the above configuration, it is possible to appropriately detect the moving object in the background difference method.
 なお、移動物体は、撮影装置の画角内を移動する物体であればよく、例えば、人間等の生物である。また、前景領域に写る対象物体は、移動物体の他、当該移動物体によって移動させられた静止物体、背景に変化が生じるよう移動物体により塗布された塗布物等を含んでよい。静止物体とは、例えば、家具等である。また、塗布物とは、例えば、ペンキ等である。前景領域に写る対象物体は、背景差分法により差分として抽出されうるあらゆる対象物を含むことができる。更に、前景領域に写る対象物体には、撮影範囲内に移動物体が一時的又は恒久的に持ち込んだ物体も含まれる。例えば、一時的に持ち込まれる物体の一例として、移動物体である人物が帰宅直後に放置した荷物、取り込まれた直後の積まれた洗濯物等を挙げることができる。また、恒久的に持ち込まれる物体の一例として、家具、置物等を挙げることができる。 Note that the moving object may be an object that moves within the angle of view of the photographing apparatus, and is, for example, a living organism such as a human being. In addition to the moving object, the target object shown in the foreground area may include a stationary object moved by the moving object, a coating applied by the moving object so that a change occurs in the background, and the like. The stationary object is, for example, furniture. Moreover, the coated material is, for example, paint. The target object shown in the foreground region can include any target object that can be extracted as a difference by the background difference method. Furthermore, the target object that appears in the foreground area includes an object that is temporarily or permanently brought into the imaging range by the moving object. For example, as an example of an object that is temporarily brought in, there may be a baggage that a person, who is a moving object, left unattended immediately after returning home, a laundry that is loaded immediately after being taken in, or the like. Moreover, furniture, a figurine, etc. can be mentioned as an example of the object brought in permanently.
 また、上記一側面に係る画像解析装置の別の形態として、前記画像取得部は、前記撮影装置により撮影された撮影画像を継続的に取得してもよく、前記移動物体検出部は、継続的に取得される前記撮影画像内において一度検出した前記移動物体を追跡することで、前記撮影画像内で前記移動物体を継続的に検出してもよい。そして、前記背景更新部は、前記移動物体が前記撮影装置の画角外に移動することで、前記撮影画像内に前記移動物体が検出されなくなった場合に、当該移動物体が検出されなくなった時点に取得した撮影画像で前記背景画像を更新してもよい。 As another form of the image analysis device according to the above aspect, the image acquisition unit may continuously acquire a captured image captured by the imaging device, and the moving object detection unit may continuously The moving object may be continuously detected in the captured image by tracking the moving object once detected in the captured image. The background update unit is configured to detect when the moving object is not detected when the moving object is not detected in the captured image due to the moving object moving outside the angle of view of the imaging device. The background image may be updated with the acquired image.
 当該構成によれば、撮影装置の画角内に移動物体が存在しなくなった場合に、その時点で取得される撮影画像によって背景画像を更新することができる。そのため、移動物体が背景に変化を生じさせても、その後に、移動物体の存在しない状態で、背景画像の全域を一括で更新することができる。すなわち、移動物体が撮影装置の画角外に移動した後に、当該撮影装置の画角内に再度移動物体が進入した場合に、背景差分法によって当該再度進入した移動物体を適正に検出することができる。したがって、当該構成によれば、背景差分法において移動物体を適正に検出することが可能になる。 According to this configuration, when there is no moving object within the angle of view of the photographing apparatus, the background image can be updated with the photographed image acquired at that time. Therefore, even if the moving object causes a change in the background, the entire background image can be updated in a lump without the moving object thereafter. That is, after a moving object has moved outside the angle of view of the imaging device, when the moving object enters again within the angle of view of the imaging device, the moving object that has entered again can be properly detected by the background subtraction method. it can. Therefore, according to the said structure, it becomes possible to detect a moving object appropriately in the background subtraction method.
 また、上記一側面に係る画像解析装置の別の形態として、前記画像取得部は、前記撮影画像内の各画素の深度を示す深度データを含む撮影画像を取得してもよい。そして、前記移動物体検出部は、前記深度データを参照することで得られる前記前景領域内の各画素の深度に基づいて、前記前景領域に写る前記対象物体の実空間上の状態を解析することで、前記前景領域から前記移動物体を検出してもよい。 As another form of the image analysis device according to the above aspect, the image acquisition unit may acquire a captured image including depth data indicating the depth of each pixel in the captured image. The moving object detection unit analyzes a state of the target object in the foreground area in real space based on a depth of each pixel in the foreground area obtained by referring to the depth data. Thus, the moving object may be detected from the foreground region.
 取得される撮影画像が二次元画像の場合、撮影装置の視点によっては移動物体が移動しても取得される撮影画像に殆ど変化が生じない可能性がある。このような場合、取得される撮影画像において、前景領域に写る対象物体のうち移動物体を区別して検出するのが困難になる。移動物体を検出できない場合には、背景画像の更新ができなくなり、背景差分法による移動物体の検出を適正に行えない可能性が生じる。 When the acquired captured image is a two-dimensional image, there is a possibility that the acquired captured image hardly changes even if the moving object moves depending on the viewpoint of the imaging apparatus. In such a case, it is difficult to distinguish and detect a moving object among the target objects shown in the foreground area in the acquired captured image. If the moving object cannot be detected, the background image cannot be updated, and there is a possibility that the moving object cannot be properly detected by the background difference method.
 これに対して、当該構成によれば、取得される撮影画像には、各画素の深度を示す深度データが含まれている。この各画素の深度は、撮影装置から被写体までの深さを示す。そのため、この深度データを利用すれば、当該被写体の実空間(三次元空間)上の状態を解析することができる。 On the other hand, according to the configuration, the acquired captured image includes depth data indicating the depth of each pixel. The depth of each pixel indicates the depth from the photographing apparatus to the subject. Therefore, if this depth data is used, the state of the subject in real space (three-dimensional space) can be analyzed.
 したがって、当該構成によれば、撮影装置の視点に依らず、前景領域に写る各対象物体の実空間上の状態を解析し、当該各対象物体のうちから移動物体を区別して検出することができる。よって、当該構成によれば、撮影装置の視点に依らず、背景差分法による移動物体の検出を適正に行えるように、当該背景差分法に利用する背景画像を更新することが可能になる。すなわち、撮影装置の視点の相違に頑強な背景差分法を提供することができる。 Therefore, according to this configuration, it is possible to analyze the state of each target object in the foreground area in the real space and detect the moving object from among the target objects regardless of the viewpoint of the photographing apparatus. . Therefore, according to this configuration, it is possible to update the background image used for the background difference method so that the moving object can be appropriately detected by the background difference method regardless of the viewpoint of the photographing apparatus. That is, it is possible to provide a background difference method that is robust against differences in the viewpoints of the photographing devices.
 なお、上記各形態に係る画像解析装置の別の形態として、以上の各構成を実現する情報処理システムであってもよいし、情報処理方法であってもよいし、プログラムであってもよいし、このようなプログラムを記録したコンピュータその他装置、機械等が読み取り可能な記憶媒体であってもよい。ここで、コンピュータ等が読み取り可能な記録媒体とは、プログラム等の情報を、電気的、磁気的、光学的、機械的、又は、化学的作用によって蓄積する媒体である。また、情報処理システムは、1又は複数の情報処理装置によって実現されてもよい。 As another form of the image analysis apparatus according to each of the above embodiments, an information processing system that realizes each of the above-described configurations, an information processing method, or a program may be used. It may be a storage medium that can be read by a computer, other devices, machines, or the like in which such a program is recorded. Here, the computer-readable recording medium is a medium that stores information such as programs by electrical, magnetic, optical, mechanical, or chemical action. The information processing system may be realized by one or a plurality of information processing devices.
 例えば、本発明の一側面に係る画像解析方法は、コンピュータが、撮影装置により撮影された撮影画像を取得するステップと、背景差分法に基づいて、前記撮影画像の背景に設定された背景画像と前記取得した撮影画像との差分を算出することで、前記取得した撮影画像の前景領域を抽出するステップと、抽出された前記前景領域に写る対象物体のうち、前記撮影装置の画角内を移動する移動物体を前記前景領域から検出するステップと、検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致するか否かを判定するステップと、検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致しないと判定した場合に、前記移動物体の写る領域を除いた対象領域について、前記取得した撮影画像を用いて前記背景画像を更新するステップと、を実行する情報処理方法である。 For example, in an image analysis method according to one aspect of the present invention, a computer acquires a captured image captured by an imaging device, and a background image set as a background of the captured image based on a background difference method The step of extracting a foreground area of the acquired captured image by calculating a difference from the acquired captured image, and moving within the angle of view of the imaging apparatus among the target objects reflected in the extracted foreground area Detecting a moving object to be detected from the foreground region, determining whether or not the number of detected moving objects matches the number of target objects appearing in the foreground region, When it is determined that the number does not match the number of target objects appearing in the foreground area, the background image is obtained using the acquired captured image for the target area excluding the area where the moving object appears. And updating the an information processing method for execution.
 また、例えば、本発明の一側面に係る画像解析プログラムは、コンピュータに、撮影装置により撮影された撮影画像を取得するステップと、背景差分法に基づいて、前記撮影画像の背景に設定された背景画像と前記取得した撮影画像との差分を算出することで、前記取得した撮影画像の前景領域を抽出するステップと、抽出された前記前景領域に写る対象物体のうち、前記撮影装置の画角内を移動する移動物体を前記前景領域から検出するステップと、検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致するか否かを判定するステップと、検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致しないと判定した場合に、前記移動物体の写る領域を除いた対象領域について、前記取得した撮影画像を用いて前記背景画像を更新するステップと、を実行させるためのプログラムである。 Further, for example, an image analysis program according to one aspect of the present invention includes a step of acquiring a captured image captured by a capturing apparatus in a computer, and a background set as a background of the captured image based on a background difference method A step of extracting a foreground area of the acquired captured image by calculating a difference between the image and the acquired captured image; and within an angle of view of the imaging apparatus among the target objects reflected in the extracted foreground area Detecting from the foreground area, determining whether the number of detected moving objects matches the number of target objects appearing in the foreground area, and detecting the detected movement When it is determined that the number of objects does not match the number of target objects appearing in the foreground area, the acquired captured image is used for the target area excluding the area where the moving object appears. Is a program for executing the steps of: updating the background image.
 本発明によれば、背景差分法において移動物体を適正に検出することが可能になる。 According to the present invention, it is possible to properly detect a moving object in the background subtraction method.
図1Aは、本発明が適用される場面(カメラの画角内に人物が進入する前の時点)を模式的に例示する。FIG. 1A schematically illustrates a scene to which the present invention is applied (a time point before a person enters the angle of view of the camera). 図1Bは、本発明が適用される場面(カメラの画角内に人物が進入した時点)を模式的に例示する。FIG. 1B schematically illustrates a scene to which the present invention is applied (when a person enters the angle of view of the camera). 図1Cは、本発明が適用される場面(人物が椅子に座った時点)を模式的に例示する。FIG. 1C schematically illustrates a scene where the present invention is applied (when a person sits on a chair). 図1Dは、本発明が適用される場面(人物が椅子から離れた時点)を模式的に例示する。FIG. 1D schematically illustrates a scene where the present invention is applied (when a person leaves the chair). 図2は、実施の形態に係る画像解析装置のハードウェア構成を例示する。FIG. 2 illustrates a hardware configuration of the image analysis apparatus according to the embodiment. 図3は、実施の形態に係るカメラにより取得される深度と被写体との関係を例示する。FIG. 3 illustrates the relationship between the depth acquired by the camera according to the embodiment and the subject. 図4は、実施の形態に係る画像解析装置の機能構成を例示する。FIG. 4 illustrates a functional configuration of the image analysis apparatus according to the embodiment. 図5は、実施の形態に係る画像解析装置における背景画像の更新に関する処理手順を例示する。FIG. 5 illustrates a processing procedure related to the update of the background image in the image analysis apparatus according to the embodiment. 図6Aは、実施の形態に係るカメラにより取得される撮影画像(カメラの画角内に人物が進入した時点)を例示する。FIG. 6A illustrates a captured image (at the time when a person enters the angle of view of the camera) acquired by the camera according to the embodiment. 図6Bは、実施の形態に係るカメラにより取得される撮影画像(人物が椅子に座った時点)を例示する。FIG. 6B illustrates a captured image (when a person sits on a chair) acquired by the camera according to the embodiment. 図6Cは、実施の形態に係るカメラにより取得される撮影画像(人物が椅子から離れた時点)を例示する。FIG. 6C illustrates a captured image (at the time when the person leaves the chair) acquired by the camera according to the embodiment. 図7は、実施の形態に係る撮影画像内の座標関係を例示する。FIG. 7 illustrates the coordinate relationship in the captured image according to the embodiment. 図8は、実施の形態に係る撮影画像の任意の点(画素)とカメラとの実空間内での位置関係を例示する。FIG. 8 illustrates the positional relationship between an arbitrary point (pixel) of the captured image and the camera in the real space according to the embodiment. 図9は、実施の形態に係る背景画像(更新前)を例示する。FIG. 9 illustrates a background image (before update) according to the embodiment. 図10Aは、図6Aの撮影画像と背景画像との差分(前景領域)を例示する。FIG. 10A illustrates the difference (foreground region) between the captured image and the background image of FIG. 6A. 図10Bは、図6Bの撮影画像と背景画像との差分(前景領域)を例示する。FIG. 10B illustrates the difference (foreground region) between the captured image and the background image of FIG. 6B. 図10Cは、図6Cの撮影画像と背景画像との差分(前景領域)を例示する。FIG. 10C illustrates the difference (foreground region) between the captured image and the background image of FIG. 6C. 図11は、実施の形態に係る背景画像(更新後)を例示する。FIG. 11 illustrates a background image (after update) according to the embodiment. 図12は、実施の形態に係る画像解析装置が背景画像を更新するその他の場面を例示する。FIG. 12 illustrates another scene in which the image analysis apparatus according to the embodiment updates the background image. 図13Aは、実施の形態に係る撮影装置の画角内に複数の移動物体が進入する場面を例示する。FIG. 13A illustrates a scene in which a plurality of moving objects enter within the angle of view of the imaging apparatus according to the embodiment. 図13Bは、実施の形態に係る撮影装置の画角内に複数の移動物体が進入する場面を例示する。FIG. 13B illustrates a scene in which a plurality of moving objects enter within the angle of view of the imaging apparatus according to the embodiment.
 以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。ただし、以下で説明する本実施形態は、あらゆる点において本発明の例示に過ぎない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。つまり、本発明の実施にあたって、実施形態に応じた具体的構成が適宜採用されてもよい。なお、本実施形態において登場するデータを自然言語により説明しているが、より具体的には、コンピュータが認識可能な疑似言語、コマンド、パラメタ、マシン語等で指定される。 Hereinafter, an embodiment according to one aspect of the present invention (hereinafter also referred to as “this embodiment”) will be described with reference to the drawings. However, this embodiment described below is only an illustration of the present invention in all respects. It goes without saying that various improvements and modifications can be made without departing from the scope of the present invention. That is, in implementing the present invention, a specific configuration according to the embodiment may be adopted as appropriate. Although data appearing in the present embodiment is described in a natural language, more specifically, it is specified by a pseudo language, a command, a parameter, a machine language, or the like that can be recognized by a computer.
 §1 適用場面
 まず、図1A~図1Dを用いて、本発明が適用される場面について説明する。図1A~図1Dは、本実施形態に係る画像解析装置1が用いられる場面の一例として、部屋に入ってきた人物が室内に配置された椅子を引いて座り、その後、その人物が部屋から出ていく場面を例示している。本実施形態に係る画像解析装置1は、背景差分法に基づいて撮影画像内の移動物体を検出する情報処理装置である。そのため、当該場面では、本実施形態に係る画像解析装置1は、部屋に入ってきた人物を移動物体として検出する。
§1 Application Scenes First, scenes to which the present invention is applied will be described with reference to FIGS. 1A to 1D. 1A to 1D show an example of a scene in which the image analysis apparatus 1 according to the present embodiment is used. A person who enters a room sits by pulling a chair placed in the room, and then the person leaves the room. The scene to go is illustrated. The image analysis apparatus 1 according to the present embodiment is an information processing apparatus that detects a moving object in a captured image based on a background difference method. Therefore, in the scene, the image analysis apparatus 1 according to the present embodiment detects a person who has entered the room as a moving object.
 具体的に、図1Aは、カメラ2の画角内に人物が現れる前の場面を模式的に例示している。本実施形態に係る画像解析装置1は、カメラ2と接続しており、このカメラ2により撮影された撮影画像3を取得する。また、本実施形態では、カメラ2の画角内には、テーブルと椅子とが背景の一部として配置されている。このテーブル及び椅子はそれぞれ静止物体であり、移動物体以外の対象物体の一例である。画像解析装置1は、カメラ2の画角内に人物が現れる前のこの場面を撮影した撮影画像3を背景画像4として取得する。ただし、背景画像4はこのような例に限られなくてもよく、画像解析装置1は任意のタイミングで背景画像4を取得してもよい。 Specifically, FIG. 1A schematically illustrates a scene before a person appears within the angle of view of the camera 2. The image analysis apparatus 1 according to the present embodiment is connected to a camera 2 and acquires a captured image 3 captured by the camera 2. In the present embodiment, a table and a chair are arranged as part of the background within the angle of view of the camera 2. Each of the table and the chair is a stationary object, and is an example of a target object other than a moving object. The image analysis apparatus 1 acquires a captured image 3 obtained by capturing this scene before a person appears within the angle of view of the camera 2 as a background image 4. However, the background image 4 is not limited to such an example, and the image analysis apparatus 1 may acquire the background image 4 at an arbitrary timing.
 次に、図1Bは、図1Aで例示される場面の後に、カメラ2の画角内に人物が進入した場面を模式的に例示している。この人物は、本発明の移動物体の一例である。本実施形態に係る画像解析装置1は、背景差分法に基づいて、背景に設定された背景画像4と取得した撮影画像3との差分を算出することで、取得した撮影画像3の前景領域を抽出する。この場面では、背景画像4と撮影画像3とで変化の生じている部分は人物の写る領域である。そのため、人物の写る領域が前景領域として抽出される。 Next, FIG. 1B schematically illustrates a scene in which a person enters the angle of view of the camera 2 after the scene illustrated in FIG. 1A. This person is an example of the moving object of the present invention. The image analysis apparatus 1 according to the present embodiment calculates the difference between the background image 4 set as the background and the acquired captured image 3 based on the background difference method, thereby obtaining the foreground region of the acquired captured image 3. Extract. In this scene, the portion where the change occurs between the background image 4 and the captured image 3 is an area where a person is captured. For this reason, an area in which a person is captured is extracted as a foreground area.
 続いて、図1Cは、図1Bで例示される場面の後に、カメラ2の画角内に存在する椅子を人物が引いて座った場面を模式的に例示している。図1Bの場面から図1Cの場面までの間、移動物体である人物は、撮影画像3の左端から椅子の写る領域まで移動する。この間に取得される撮影画像3それぞれにおいて、画像解析装置1は、背景差分法に基づいて、この人物の写る領域を前景領域として抽出する。 Subsequently, FIG. 1C schematically illustrates a scene in which a person pulls a chair existing within the angle of view of the camera 2 after the scene illustrated in FIG. 1B. From the scene of FIG. 1B to the scene of FIG. 1C, the person as the moving object moves from the left end of the captured image 3 to the region where the chair is reflected. In each of the captured images 3 acquired during this time, the image analysis apparatus 1 extracts an area in which the person is captured as a foreground area based on the background difference method.
 そして、図1Cに例示されるように、その人物が椅子を引いて座ろうとすると、椅子は、その人物と一体となって元の位置から移動する。そのため、この図1Cに例示される場面では、画像解析装置1は、その人物及び椅子の写る領域を一体的に前景領域として抽出する。 Then, as illustrated in FIG. 1C, when the person pulls the chair and sits down, the chair moves together with the person from the original position. Therefore, in the scene illustrated in FIG. 1C, the image analysis apparatus 1 integrally extracts an area where the person and the chair are captured as a foreground area.
 更に、図1Dは、図1Cで例示される場面の後に、対象人物が椅子から離れた場面を模式的に例示している。この場面では、人物は椅子から離れており、その椅子は元の位置からずれている。そのため、図1Dに例示される場面では、画像解析装置1は、人物の写る領域及び椅子の写る領域の2つの領域を前景領域として抽出する。 Furthermore, FIG. 1D schematically illustrates a scene in which the target person leaves the chair after the scene illustrated in FIG. 1C. In this scene, the person is away from the chair, and the chair is offset from its original position. Therefore, in the scene illustrated in FIG. 1D, the image analysis apparatus 1 extracts two areas, that is, the area where the person appears and the area where the chair appears as the foreground area.
 ここで、画像解析装置1は、抽出された前景領域に写る対象物体のうち、カメラ2の画角内を移動する移動物体を前景領域から検出し、検出された移動物体の数が前景領域に写る対象物体の数と一致するか否かを判定する。一例では、画像解析装置1は、閾値以上の大きさを有する一塊の領域を一物体として認識する。 Here, the image analysis apparatus 1 detects, from the foreground area, a moving object that moves within the angle of view of the camera 2 among the extracted target objects that appear in the foreground area, and the number of detected moving objects is in the foreground area. It is determined whether or not the number matches the number of target objects. In one example, the image analysis apparatus 1 recognizes a lump area having a size equal to or larger than a threshold value as an object.
 そのため、画像解析装置1は、図1Cの場面では、人物及び椅子の写る領域を一物体として認識しつつ、この領域において移動物体である人物を検出する。すなわち、図1Cに例示される場面では、画像解析装置1は、検出された移動物体の数が前景領域に写る対象物体の数と一致すると判定する。 Therefore, in the scene of FIG. 1C, the image analysis apparatus 1 recognizes a region where a person and a chair are captured as one object, and detects a person who is a moving object in this region. That is, in the scene illustrated in FIG. 1C, the image analysis apparatus 1 determines that the number of detected moving objects matches the number of target objects that appear in the foreground region.
 一方、画像解析装置1は、図1Dの場面では、人物の写る領域及び椅子の写る領域をそれぞれ別個の物体として認識しつつ、人物の写る領域において移動物体である人物を検出する。すなわち、図1Dに例示される場面では、画像解析装置1は、検出された移動物体の数が前景領域に写る対象物体の数とは一致しないと判定する。 On the other hand, in the scene of FIG. 1D, the image analysis apparatus 1 detects a person who is a moving object in the area where the person is captured while recognizing the area where the person is captured and the area where the chair is captured as separate objects. That is, in the scene illustrated in FIG. 1D, the image analysis apparatus 1 determines that the number of detected moving objects does not match the number of target objects that appear in the foreground region.
 図1Dに例示されるように、検出された移動物体の数が前景領域に写る対象物体の数とは一致しないと判定される場面とは、背景の少なくとも一部に改変が生じた場面である。すなわち、この場面では、背景の少なくとも一部に改変が生じた影響により、移動物体の写る領域の他に、当該改変の生じた領域が独立して前景領域として抽出される。 As illustrated in FIG. 1D, a scene in which the number of detected moving objects is determined not to match the number of target objects in the foreground area is a scene in which at least a part of the background has been altered. . That is, in this scene, due to the influence of the modification of at least a part of the background, the modified area is extracted independently as the foreground area in addition to the area where the moving object appears.
 このような場合に、本実施形態に係る画像解析装置1は、移動物体の写る領域を除いた対象領域について、取得した撮影画像3を用いて背景画像4を更新する。つまり、画像解析装置1は、元の位置から移動したことで前景領域として抽出されるようになった椅子の写る領域に関して、その状態を撮影した撮影画像3を用いて背景画像4を更新する。 In such a case, the image analysis apparatus 1 according to the present embodiment updates the background image 4 using the acquired captured image 3 for the target region excluding the region where the moving object is captured. That is, the image analysis apparatus 1 updates the background image 4 by using the captured image 3 obtained by capturing the state of the area where the chair is extracted as the foreground area as a result of moving from the original position.
 すなわち、本実施形態に係る画像解析装置1によれば、背景の少なくとも一部に変化が生じた場合に、その変化の生じた領域に関して、変化の生じた後に撮影された撮影画像3を用いて背景画像4を更新することができる。そのため、背景差分法において、その変化の生じた背景の領域が前景領域として抽出されないようにすることができる。したがって、本実施形態によれば、背景差分法において移動物体を適正に検出可能にする技術を提供することができる。 That is, according to the image analysis apparatus 1 according to the present embodiment, when a change occurs in at least a part of the background, the photographed image 3 photographed after the change has occurred with respect to the changed region. The background image 4 can be updated. Therefore, in the background subtraction method, it is possible to prevent the background area where the change has occurred from being extracted as the foreground area. Therefore, according to the present embodiment, it is possible to provide a technique that can appropriately detect a moving object in the background subtraction method.
 なお、本実施形態では、説明の便宜のため、部屋に入ってきた人物(移動物体)が椅子(静止物体)を引いて座り、その後、椅子から立ち上がって部屋から出ていく場面を例示する。ただし、本実施形態に係る画像解析装置1は、このような場面に限定して適用される訳ではなく、背景の少なくとも一部に改変の生じる可能性のある場面で移動物体を検出するのに広く適用可能である。 In this embodiment, for convenience of explanation, a scene in which a person (moving object) entering the room sits by pulling a chair (stationary object), then stands up from the chair and exits the room is illustrated. However, the image analysis apparatus 1 according to the present embodiment is not limited to such a scene, but is used to detect a moving object in a scene where at least part of the background may be altered. Widely applicable.
 また、本実施形態では、移動物体の一例として、カメラ2の画角内を移動する人物が例示されている。しかしながら、移動物体は、このような例に限られなくてもよく、カメラ2の画角内を移動する物体であれば、人物以外であってもよい。 In the present embodiment, a person moving within the angle of view of the camera 2 is illustrated as an example of the moving object. However, the moving object is not limited to such an example, and may be other than a person as long as the object moves within the angle of view of the camera 2.
 また、本実施形態では、前景領域に写る対象物体の一例として、人物の他に、それぞれ静止物体であるテーブル及び椅子が例示されている。しかしながら、前景領域に写る対象物体は、このような例に限られなくてもよく、背景差分法により前景領域として抽出されうるあらゆる対象物を含むことができる。 Further, in this embodiment, as an example of the target object shown in the foreground area, a table and a chair, which are stationary objects, are illustrated in addition to a person. However, the target object appearing in the foreground area is not limited to such an example, and can include any object that can be extracted as the foreground area by the background subtraction method.
 また、画像解析装置1の配置場所は、カメラ2から撮影画像3を取得可能であれば、実施の形態に応じて適宜決定可能である。例えば、画像解析装置1は、図1A~図1Dに例示されるように、カメラ2に近接するように配置されてもよい。また、画像解析装置1は、ネットワークを介してカメラ2と接続してもよく、当該カメラ2とは全く異なる場所に配置されてもよい。 Further, the location of the image analysis device 1 can be determined as appropriate according to the embodiment as long as the captured image 3 can be acquired from the camera 2. For example, the image analysis apparatus 1 may be disposed so as to be close to the camera 2 as illustrated in FIGS. 1A to 1D. In addition, the image analysis apparatus 1 may be connected to the camera 2 via a network, or may be disposed at a place completely different from the camera 2.
 §2 構成例
 <ハードウェア構成>
 次に、図2を用いて、画像解析装置1のハードウェア構成を説明する。図2は、本実施形態に係る画像解析装置1のハードウェア構成を例示する。画像解析装置1は、図2に例示されるように、CPU、RAM(Random Access Memory)、ROM(Read Only Memory)等を含む制御部11、制御部11で実行するプログラム5等を記憶する記憶部12、画像の表示と入力を行うためのタッチパネルディスプレイ13、音声を出力するためのスピーカ14、外部装置と接続するための外部インタフェース15、ネットワークを介して通信を行うための通信インタフェース16、及び記憶媒体6に記憶されたプログラムを読み込むためのドライブ17が電気的に接続されたコンピュータである。図2では、通信インタフェース及び外部インタフェースは、それぞれ、「通信I/F」及び「外部I/F」と記載されている。
§2 Configuration example <Hardware configuration>
Next, the hardware configuration of the image analysis apparatus 1 will be described with reference to FIG. FIG. 2 illustrates the hardware configuration of the image analysis apparatus 1 according to the present embodiment. As illustrated in FIG. 2, the image analysis apparatus 1 stores a control unit 11 including a CPU, a RAM (Random Access Memory), a ROM (Read Only Memory), and the like, a program 5 executed by the control unit 11, and the like. Unit 12, a touch panel display 13 for displaying and inputting images, a speaker 14 for outputting sound, an external interface 15 for connecting to an external device, a communication interface 16 for communicating via a network, and This is a computer to which a drive 17 for reading a program stored in the storage medium 6 is electrically connected. In FIG. 2, the communication interface and the external interface are described as “communication I / F” and “external I / F”, respectively.
 なお、画像解析装置1の具体的なハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換、及び追加が可能である。例えば、制御部11は、複数のプロセッサを含んでもよい。また、例えば、タッチパネルディスプレイ13は、それぞれ別個独立に接続される入力装置及び表示装置に置き換えられてもよい。また、例えば、スピーカ14は省略されてもよい。また、例えば、スピーカ14は、画像解析装置1の内部装置としてではなく、外部装置として画像解析装置1に接続されてもよい。また、画像解析装置1はカメラ2を内蔵してもよい。更に、画像解析装置1は、複数の外部インタフェース15を備えてもよく、複数の外部装置と接続してもよい。 It should be noted that regarding the specific hardware configuration of the image analysis apparatus 1, the components can be omitted, replaced, and added as appropriate according to the embodiment. For example, the control unit 11 may include a plurality of processors. In addition, for example, the touch panel display 13 may be replaced with an input device and a display device that are separately connected independently. For example, the speaker 14 may be omitted. Further, for example, the speaker 14 may be connected to the image analysis device 1 as an external device instead of as an internal device of the image analysis device 1. Further, the image analysis apparatus 1 may incorporate a camera 2. Furthermore, the image analysis device 1 may include a plurality of external interfaces 15 and may be connected to a plurality of external devices.
 本実施形態に係るカメラ2は、外部インタフェース15を介して画像解析装置1に接続しており、室内に入ってきた人物を撮影するために設置されている。ただし、このカメラ2の設置目的は、このような例に限られなくてもよく、実施の形態に応じて適宜選択可能である。このカメラ2は、本発明の撮影装置に相当する。 The camera 2 according to the present embodiment is connected to the image analysis apparatus 1 via the external interface 15 and is installed to photograph a person who has entered the room. However, the installation purpose of the camera 2 is not limited to such an example, and can be selected as appropriate according to the embodiment. This camera 2 corresponds to the photographing apparatus of the present invention.
 本実施形態では、カメラ2は、被写体の深度を測定するための深度センサ21を備えている。この深度センサ21の種類及び測定方法は、実施の形態に応じて適宜選択されてよい。例えば、深度センサ21として、TOF(Time Of Flight)方式等のセンサを挙げることができる。 In this embodiment, the camera 2 includes a depth sensor 21 for measuring the depth of the subject. The type and measurement method of the depth sensor 21 may be appropriately selected according to the embodiment. For example, the depth sensor 21 may be a sensor of TOF (TimeFOf Flight) method or the like.
 ただし、カメラ2の構成は、このような例に限定されず、実施の形態に応じて適宜選択可能である。例えば、カメラ2は、深度を取得せずに、二次元画像(例えば、RGB画像)を撮影する公知の撮影装置であってもよい。また、深度を測定可能なようにカメラ2を構成する場合には、カメラ2は、ステレオカメラであってもよい。ステレオカメラは、撮影範囲内の被写体を複数の異なる方向から撮影するため、当該被写体の深度を記録することができる。また、カメラ2は、深度センサ21単体に置き換わってもよい。 However, the configuration of the camera 2 is not limited to such an example, and can be appropriately selected according to the embodiment. For example, the camera 2 may be a known imaging device that captures a two-dimensional image (for example, an RGB image) without acquiring the depth. Further, when the camera 2 is configured so that the depth can be measured, the camera 2 may be a stereo camera. Since the stereo camera shoots the subject within the shooting range from a plurality of different directions, the depth of the subject can be recorded. The camera 2 may be replaced with the depth sensor 21 alone.
 なお、歩行者を撮影する場所は暗い可能性がある。そこで、撮影場所の明るさに影響されずに深度を取得可能なように、深度センサ21は、赤外線の照射に基づいて深度を測定する赤外線深度センサであってもよい。このような赤外線深度センサを含む比較的安価な撮影装置として、例えば、マイクロソフト社のKinect、ASUS社のXtion、PrimeSense社のCARMINEを挙げることができる。 Note that the place where pedestrians are photographed may be dark. Therefore, the depth sensor 21 may be an infrared depth sensor that measures the depth based on infrared irradiation so that the depth can be acquired without being affected by the brightness of the shooting location. Examples of relatively inexpensive imaging apparatuses including such an infrared depth sensor include Kinect from Microsoft, Xtion from ASUS, and CARMINE from PrimeSense.
 ここで、図3を用いて、本実施形態に係る深度センサ21によって測定される深度を詳細に説明する。図3は、本実施形態に係る深度として扱うことが可能な距離の一例を示す。当該深度は、被写体の深さを表現する。図3で例示されるように、被写体の深さは、例えば、カメラ2と対象物との直線の距離Aで表現されてもよいし、カメラ2の被写体に対する水平軸から下ろした垂線の距離Bで表現されてもよい。 Here, the depth measured by the depth sensor 21 according to the present embodiment will be described in detail with reference to FIG. FIG. 3 shows an example of a distance that can be handled as the depth according to the present embodiment. The depth represents the depth of the subject. As exemplified in FIG. 3, the depth of the subject may be expressed by, for example, a straight line distance A between the camera 2 and the object, or a perpendicular distance B from the horizontal axis with respect to the subject of the camera 2. It may be expressed as
 すなわち、本実施形態に係る深度は、距離Aであってもよいし、距離Bであってもよい。本実施形態では、距離Bを深度として扱うことにする。ただし、距離Aと距離Bとは、例えば、三平方の定理等を用いることで、互いに変換可能である。そのため、距離Bを用いた以降の説明は、そのまま、距離Aに適用することが可能である。このような深度を利用することで、本実施形態に係る画像解析装置1は、実空間上における被写体の位置を特定することができる。 That is, the depth according to the present embodiment may be the distance A or the distance B. In the present embodiment, the distance B is treated as the depth. However, the distance A and the distance B can be converted into each other by using, for example, the three-square theorem. Therefore, the following description using the distance B can be applied to the distance A as it is. By using such a depth, the image analysis apparatus 1 according to the present embodiment can specify the position of the subject in the real space.
 また、本実施形態に係る画像解析装置1の記憶部12は、背景差分法に利用する背景画像4を格納している。背景画像4は、撮影画像3の背景として設定された画像であり、実施の形態に応じて適宜取得可能である。例えば、記憶部12は、上記のとおり、移動物体である人物がカメラ2の画角内に進入する前に取得した撮影画像3を背景画像4として保持してもよい。 In addition, the storage unit 12 of the image analysis apparatus 1 according to the present embodiment stores the background image 4 used for the background difference method. The background image 4 is an image set as the background of the captured image 3 and can be appropriately acquired according to the embodiment. For example, as described above, the storage unit 12 may hold the captured image 3 acquired before the person who is the moving object enters the angle of view of the camera 2 as the background image 4.
 なお、図2では、背景画像4は予め記憶部12に格納されている。しかしながら、背景画像4の保存場所はこのような例に限定されなくてもよい。例えば、背景画像4は他の情報処理装置等に保持されてもよい。この場合、画像解析装置1は、この他の情報処理装置にネットワーク等を介してアクセスして、背景差分法の処理に利用する背景画像4を取得してもよい。 In FIG. 2, the background image 4 is stored in the storage unit 12 in advance. However, the storage location of the background image 4 may not be limited to such an example. For example, the background image 4 may be held in another information processing apparatus or the like. In this case, the image analysis apparatus 1 may access the other information processing apparatus via a network or the like to acquire the background image 4 used for the background difference method processing.
 なお、記憶部12は、更にプログラム5を格納する。このプログラム5は、画像解析装置1に後述する背景画像の更新に関する各処理を実行させるためのプログラムであり、本発明の「画像解析プログラム」に相当する。このプログラム5は記憶媒体6に記録されていてもよい。 The storage unit 12 further stores the program 5. The program 5 is a program for causing the image analysis apparatus 1 to execute each process related to the background image update described later, and corresponds to the “image analysis program” of the present invention. The program 5 may be recorded on the storage medium 6.
 記憶媒体6は、コンピュータその他装置、機械等が記録されたプログラム等の情報を読み取り可能なように、当該プログラム等の情報を、電気的、磁気的、光学的、機械的又は化学的作用によって蓄積する媒体である。記憶媒体6は、本発明の「記憶媒体」に相当する。なお、図2は、記憶媒体6の一例として、CD(Compact Disk)、DVD(Digital Versatile Disk)等のディスク型の記憶媒体を例示している。しかしながら、記憶媒体6の種類は、ディスク型に限定される訳ではなく、ディスク型以外であってもよい。ディスク型以外の記憶媒体として、例えば、フラッシュメモリ等の半導体メモリを挙げることができる。 The storage medium 6 stores information such as a program by an electrical, magnetic, optical, mechanical, or chemical action so that information such as a program recorded by a computer or other device or machine can be read. It is a medium to do. The storage medium 6 corresponds to the “storage medium” of the present invention. 2 illustrates a disk-type storage medium such as a CD (Compact Disk) or a DVD (Digital Versatile Disk) as an example of the storage medium 6. However, the type of the storage medium 6 is not limited to the disk type and may be other than the disk type. Examples of the storage medium other than the disk type include a semiconductor memory such as a flash memory.
 また、このような画像解析装置1は、例えば、提供されるサービス専用に設計された装置であってもよいし、PC(Personal Computer)、タブレット端末等の汎用の装置であってもよい。更に、画像解析装置1は、1又は複数のコンピュータにより実装されてもよい。 Further, such an image analysis device 1 may be, for example, a device designed exclusively for the provided service, or a general-purpose device such as a PC (Personal Computer) or a tablet terminal. Furthermore, the image analysis apparatus 1 may be implemented by one or a plurality of computers.
 <機能構成例>
 次に、図4を用いて、画像解析装置1の機能構成を説明する。図4は、本実施形態に係る画像解析装置1の機能構成を例示する。本実施形態では、画像解析装置1の制御部11は、記憶部12に記憶されたプログラム5をRAMに展開する。そして、制御部11は、RAMに展開されたプログラム5をCPUにより解釈及び実行して、各構成要素を制御する。これにより、画像解析装置1は、画像取得部31、背景差分算出部32、移動物体検出部33及び背景更新部34を備えるコンピュータとして機能する。
<Functional configuration example>
Next, the functional configuration of the image analysis apparatus 1 will be described with reference to FIG. FIG. 4 illustrates a functional configuration of the image analysis apparatus 1 according to the present embodiment. In the present embodiment, the control unit 11 of the image analysis device 1 expands the program 5 stored in the storage unit 12 in the RAM. And the control part 11 interprets and runs the program 5 expand | deployed by RAM by CPU, and controls each component. Accordingly, the image analysis device 1 functions as a computer including the image acquisition unit 31, the background difference calculation unit 32, the moving object detection unit 33, and the background update unit 34.
 画像取得部31は、カメラ2によって撮影された撮影画像3を取得する。背景差分算出部32は、背景差分法に基づいて、記憶部12に記憶された背景画像4と取得した撮影画像3との差分を算出することで、当該取得した撮影画像3の前景領域を抽出する。この前景領域には、上記のとおり、移動物体である人物の他、背景の変化の生じた領域が含まれる可能性がある。 The image acquisition unit 31 acquires a captured image 3 captured by the camera 2. The background difference calculation unit 32 extracts the foreground region of the acquired captured image 3 by calculating the difference between the background image 4 stored in the storage unit 12 and the acquired captured image 3 based on the background difference method. To do. As described above, the foreground area may include an area where a background change occurs in addition to a person who is a moving object.
 そこで、移動物体検出部33は、抽出された前景領域に写る対象物体のうち、カメラ2の画角内を移動する移動物体を前景領域から検出し、背景更新部34は、検出された移動物体の数が前景領域に写る対象物体の数と一致するか否かを判定する。そして、背景更新部34は、検出された移動物体の数が前景領域に写る対象物体の数と一致しないと判定した場合に、移動物体の写る領域を除いた対象領域について、取得した撮影画像3を用いて背景画像4を更新する。 Therefore, the moving object detection unit 33 detects, from the foreground area, a moving object that moves within the angle of view of the camera 2 among the extracted target objects reflected in the foreground area, and the background update unit 34 detects the detected moving object. It is determined whether or not the number of matches the number of target objects in the foreground area. When the background update unit 34 determines that the number of detected moving objects does not match the number of target objects appearing in the foreground area, the background update unit 34 acquires the captured image 3 for the target area excluding the area where the moving object appears. Is used to update the background image 4.
 なお、本実施形態では、これらの機能がいずれも汎用のCPUによって実現される例を説明している。しかしながら、これらの機能の一部又は全部が、1又は複数の専用のプロセッサにより実現されてもよい。また、画像解析装置1の機能構成に関して、実施形態に応じて、適宜、機能の省略、置換、及び追加が行われてもよい。各機能に関しては後述する動作例で詳細に説明する。 In the present embodiment, an example is described in which all of these functions are realized by a general-purpose CPU. However, some or all of these functions may be realized by one or more dedicated processors. In addition, regarding the functional configuration of the image analysis apparatus 1, functions may be omitted, replaced, and added as appropriate according to the embodiment. Each function will be described in detail in an operation example described later.
 §3 動作例
 次に、図5を用いて、画像解析装置1の動作例を説明する。図5は、画像解析装置1の背景画像の更新に関する処理手順を例示する。なお、以下で説明する背景画像の更新に関する処理手順は、本発明の「画像解析方法」に相当する。ただし、以下で説明する背景画像の更新に関する処理手順は一例にすぎず、各処理は可能な限り変更されてもよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
§3 Operation Example Next, an operation example of the image analysis apparatus 1 will be described with reference to FIG. FIG. 5 illustrates a processing procedure related to the update of the background image of the image analysis apparatus 1. The processing procedure related to the background image update described below corresponds to the “image analysis method” of the present invention. However, the processing procedure related to the background image update described below is merely an example, and each processing may be changed as much as possible. Further, in the processing procedure described below, steps can be omitted, replaced, and added as appropriate according to the embodiment.
 (ステップS101)
 ステップS101では、制御部11は、画像取得部31として機能し、カメラ2により撮影された撮影画像3を取得する。その後、制御部11は、次のステップS102に処理を進める。
(Step S101)
In step S <b> 101, the control unit 11 functions as the image acquisition unit 31 and acquires the captured image 3 captured by the camera 2. Then, the control part 11 advances a process to following step S102.
 ここで、図6A~図6Cを用いて、本ステップS101において取得される撮影画像3を説明する。図6A~図6Cは、本ステップS101において取得される撮影画像3a~3cを例示する。図6A~図6Cに例示されるように、本実施形態に係る制御部11は、カメラ2により撮影された撮影画像3を、例えば、動画像として、継続的に取得する。 Here, the captured image 3 acquired in step S101 will be described with reference to FIGS. 6A to 6C. 6A to 6C illustrate the captured images 3a to 3c acquired in this step S101. As illustrated in FIGS. 6A to 6C, the control unit 11 according to the present embodiment continuously acquires the captured image 3 captured by the camera 2 as, for example, a moving image.
 具体的には、図6Aの撮影画像3aは、カメラ2の画角内に人物が進入した時点に撮影された撮影画像3である。また、図6Bの撮影画像3bは、図6Aの撮影画像3aが撮影された後、カメラ2の画角内に存在する椅子を人物が引いて座った時点に撮影された撮影画像3である。更に、図6Cの撮影画像3cは、図6Bの撮影画像3bが撮影された後、対象人物が椅子から離れた時点に撮影された撮影画像3である。 Specifically, the captured image 3 a in FIG. 6A is a captured image 3 that was captured when a person entered the angle of view of the camera 2. A photographed image 3b in FIG. 6B is a photographed image 3 photographed when a person sits with a chair pulled within the angle of view of the camera 2 after the photographed image 3a in FIG. 6A is photographed. Furthermore, the captured image 3c in FIG. 6C is a captured image 3 that is captured when the target person leaves the chair after the captured image 3b in FIG. 6B is captured.
 制御部11は、このような撮影画像3a~3cを、カメラ2のビデオ信号に同期して取得してもよい。そして、1又は複数枚の撮影画像3を取得した段階で、制御部11は、後述するステップS102~S105までの処理を取得した1又は複数枚の撮影画像3に対して即座に実行してもよい。画像解析装置1は、このような動作を絶え間なく連続して実行することにより、リアルタイム画像処理を実現し、カメラ2の撮影範囲に存在する移動物体の検出をリアルタイムに行うことができる。 The control unit 11 may acquire such captured images 3a to 3c in synchronization with the video signal of the camera 2. Then, at the stage where one or a plurality of photographed images 3 are acquired, the control unit 11 can immediately execute the processing from steps S102 to S105 described later to the one or a plurality of photographed images 3 that have been acquired. Good. The image analysis apparatus 1 can perform real-time image processing by continuously executing such an operation continuously, and can detect a moving object existing in the shooting range of the camera 2 in real time.
 なお、本実施形態では、カメラ2は、深度センサ21を備えている。そのため、本ステップS101において取得される撮影画像3a~3cには、各画素の深度を示す深度データが含まれている。詳細には、図6A~図6Cで例示される撮影画像3a~3cはそれぞれ、各画素の濃淡値が当該各画素の深度に応じて定められた撮影画像3である。 In the present embodiment, the camera 2 includes a depth sensor 21. For this reason, the captured images 3a to 3c acquired in step S101 include depth data indicating the depth of each pixel. Specifically, each of the captured images 3a to 3c illustrated in FIGS. 6A to 6C is the captured image 3 in which the gray value of each pixel is determined according to the depth of each pixel.
 図6A~図6Cでは、黒色の画素ほど、カメラ2に近いことを示す。一方、白色の画素ほど、カメラ2から遠いことを示す。制御部11は、この深度データに基づいて、各画素の写る対象の実空間での位置を特定することができる。すなわち、制御部11は、撮影画像3内の各画素の座標(二次元情報)と深度とから、当該各画素内に写る被写体の三次元空間(実空間)での位置を特定することができる。以下、図7及び図8を用いて、制御部11が各画素の実空間上での位置を特定する計算例を示す。 6A to 6C show that the black pixels are closer to the camera 2. On the other hand, a white pixel is farther from the camera 2. Based on the depth data, the control unit 11 can specify the position of each pixel in the real space. That is, the control unit 11 can specify the position in the three-dimensional space (real space) of the subject captured in each pixel from the coordinates (two-dimensional information) and the depth of each pixel in the captured image 3. . Hereinafter, a calculation example in which the control unit 11 specifies the position of each pixel in the real space will be described with reference to FIGS. 7 and 8.
 図7は、撮影画像3内の座標関係を例示する。また、図8は、撮影画像3の任意の画素(点s)とカメラ2との実空間内での位置関係を例示する。なお、図7の左右方向は、図8の紙面に垂直な方向に対応する。すなわち、図8で表れている撮影画像3の長さは、図7で例示される縦方向の長さ(Hピクセル)に対応する。また、図7で例示される横方向の長さ(Wピクセル)は、図8で表れていない撮影画像3の紙面垂直方向の長さに対応する。 FIG. 7 illustrates the coordinate relationship in the captured image 3. FIG. 8 illustrates the positional relationship between an arbitrary pixel (point s) of the captured image 3 and the camera 2 in the real space. 7 corresponds to a direction perpendicular to the paper surface of FIG. That is, the length of the captured image 3 shown in FIG. 8 corresponds to the length in the vertical direction (H pixels) illustrated in FIG. Further, the length in the horizontal direction (W pixels) illustrated in FIG. 7 corresponds to the length in the vertical direction of the photographed image 3 that does not appear in FIG.
 図7で例示されるように、撮影画像3の任意の画素(点s)の座標は(xs,ys)であるとし、カメラ2の横方向の画角がVx、縦方向の画角がVyであるとする。また、撮影画像3の横方向のピクセル数がWであるとし、縦方向のピクセル数がHであるとし、撮影画像3の中心点(画素)の座標が(0,0)であるとする。 As illustrated in FIG. 7, the coordinates of an arbitrary pixel (point s) of the captured image 3 are (x s , y s ), the horizontal angle of view of the camera 2 is V x , and the vertical image Assume that the corner is V y . Further, it is assumed that the number of pixels in the horizontal direction of the captured image 3 is W, the number of pixels in the vertical direction is H, and the coordinates of the center point (pixel) of the captured image 3 are (0, 0).
 制御部11は、カメラ2の画角(Vx、Vy)を示す情報をカメラ2から取得することができる。ただし、カメラ2の画角(Vx、Vy)を示す情報を取得する方法はこのような例に限られず、制御部11は、カメラ2の画角(Vx、Vy)を示す情報を、ユーザ入力に基づき取得してもよいし、予め設定されている設定値として取得してもよい。また、制御部11は、撮影画像3から、点sの座標(xs,ys)及び撮影画像3のピクセル数(W×H)を取得することができる。更に、制御部11は、撮影画像3に含まれる深度データを参照することによって、点sの深度Dsを取得することができる。 The control unit 11 can acquire information indicating the angle of view (V x , V y ) of the camera 2 from the camera 2. However, the method for acquiring information indicating the angle of view (V x , V y ) of the camera 2 is not limited to such an example, and the control unit 11 is information indicating the angle of view (V x , V y ) of the camera 2. May be acquired based on user input, or may be acquired as a preset setting value. Further, the control unit 11 can acquire the coordinates (x s , y s ) of the point s and the number of pixels (W × H) of the captured image 3 from the captured image 3. Furthermore, the control unit 11 can acquire the depth Ds of the point s by referring to the depth data included in the captured image 3.
 制御部11は、これらの情報を利用することで、当該各画素(点s)の実空間上の位置を特定することができる。例えば、制御部11は、以下の数1~3で示される関係式に基づいて、図8に例示されるカメラ座標系におけるカメラ2から点sまでのベクトルS(Sx,Sy,Sz,1)の各値を算出することができる。これにより、撮影画像3内の二次元座標系における点sの位置とカメラ座標系における点sの位置とは相互に変換可能になる。 The control unit 11 can specify the position of each pixel (point s) in the real space by using these pieces of information. For example, the control unit 11 performs vector S (S x , S y , S z) from the camera 2 to the point s in the camera coordinate system illustrated in FIG. , 1) can be calculated. Thereby, the position of the point s in the two-dimensional coordinate system in the captured image 3 and the position of the point s in the camera coordinate system can be mutually converted.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000003
 ただし、上記ベクトルSは、カメラ2を中心とした三次元座標系のベクトルである。このカメラ2は、図8に例示されるように、水平方向に対して傾いている場合がある。すなわち、カメラ座標系は、三次元空間(実空間)のワールド座標系から傾いている場合がある。そのため、制御部11は、カメラ2のロール角、ピッチ角(図8のα)及びヨー角を用いた射影変換を上記ベクトルSに適用することによって、上記カメラ座標系のベクトルSをワールド座標系のベクトルに変換し、ワールド座標系における点sの位置を算出してもよい。 However, the vector S is a vector of a three-dimensional coordinate system centered on the camera 2. As illustrated in FIG. 8, the camera 2 may be tilted with respect to the horizontal direction. That is, the camera coordinate system may be tilted from the world coordinate system in the three-dimensional space (real space). Therefore, the control unit 11 applies the projective transformation using the roll angle, pitch angle (α in FIG. 8), and yaw angle of the camera 2 to the vector S, so that the vector S of the camera coordinate system is converted to the world coordinate system. And the position of the point s in the world coordinate system may be calculated.
 なお、深度データを含む撮影画像3のデータ形式は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてもよい。例えば、撮影画像3は、撮影範囲内の被写体の深度が二次元状に分布したデータ(例えば、深度マップ)であってもよい。また、例えば、撮影画像3は、深度データとともに、RGB画像を含んでもよい。このような撮影画像3は、動画像であってもよいし、1又は複数枚の静止画像であってもよい。 In addition, the data format of the captured image 3 including the depth data may not be limited to such an example, and may be appropriately selected according to the embodiment. For example, the captured image 3 may be data (for example, a depth map) in which the depth of the subject within the imaging range is two-dimensionally distributed. For example, the captured image 3 may include an RGB image together with the depth data. Such a captured image 3 may be a moving image or one or a plurality of still images.
 (ステップS102)
 図5に戻り、次のステップS102では、制御部11は、背景差分算出部32として機能し、背景差分法に基づいて、記憶部12に格納されている背景画像4とステップS101で取得した各撮影画像3a~3cとの差分を算出する。これによって、制御部11は、ステップS101で取得した各撮影画像3a~3cの前景領域を抽出する。そして、各撮影画像3a~3cの前景領域を抽出すると、制御部11は、次のステップS103に処理を進める。
(Step S102)
Returning to FIG. 5, in the next step S102, the control unit 11 functions as the background difference calculation unit 32, and based on the background difference method, the background image 4 stored in the storage unit 12 and each acquired in step S101. The difference from the captured images 3a to 3c is calculated. Thereby, the control unit 11 extracts the foreground area of each of the captured images 3a to 3c acquired in step S101. When the foreground area of each of the captured images 3a to 3c is extracted, the control unit 11 proceeds to the next step S103.
 ここで、図9を用いて、記憶部12に格納されている背景画像4について説明する。図9は、記憶部12に格納されている背景画像4aを例示する。背景画像4aは、図6Aの撮影画像3aが撮影される前、すなわち、カメラ2の画角内に人物が進入する前の時点に取得された背景画像4である。制御部11は、例えば、本動作例の処理を開始する前に、移動物体が存在しない時点の撮影画像3を背景画像4として取得する。そのため、本実施形態では、背景画像4も撮影画像3と同様に深度データを含む。ただし、このような背景画像4を取得する方法は、このような例に限られなくてもよく、実施の形態に応じて適宜設定可能である。 Here, the background image 4 stored in the storage unit 12 will be described with reference to FIG. FIG. 9 illustrates the background image 4 a stored in the storage unit 12. The background image 4a is the background image 4 acquired before the photographed image 3a of FIG. 6A is photographed, that is, before a person enters the angle of view of the camera 2. For example, the control unit 11 acquires, as the background image 4, the captured image 3 at the time when there is no moving object before starting the processing of this operation example. For this reason, in the present embodiment, the background image 4 also includes depth data in the same manner as the captured image 3. However, the method of acquiring the background image 4 is not limited to such an example, and can be set as appropriate according to the embodiment.
 本ステップS102では、制御部11は、ステップS101で取得した各撮影画像3a~3cと背景画像4との差分を算出する。例えば、制御部11は、各撮影画像3a~3c及び背景画像4の対応画素同士の画素値の差分を算出し、算出した差分が所定の閾値を超える場合に、各撮影画像3a~3cの当該画素を前景領域の画素と認定する。ただし、前景領域を抽出する方法は、このような例に限られなくてもよく、種々の背景差分法に基づいて適宜設定可能である。 In step S102, the control unit 11 calculates a difference between each of the captured images 3a to 3c acquired in step S101 and the background image 4. For example, the control unit 11 calculates a pixel value difference between corresponding pixels of each of the captured images 3a to 3c and the background image 4, and when the calculated difference exceeds a predetermined threshold value, The pixel is recognized as a pixel in the foreground area. However, the method for extracting the foreground region is not limited to such an example, and can be appropriately set based on various background subtraction methods.
 図10A~図10Cは、このような処理によって各撮影画像3a~3cにおいて抽出される前景領域を例示する。図10Aは、図6Aの撮影画像3aと図9の背景画像4aとの差分領域(前景領域)を例示する。図10Bは、図6Bの撮影画像3bと図9の背景画像4aとの差分領域(前景領域)を例示する。図10Cは、図6Cの撮影画像3cと図9の背景画像4aとの差分領域(前景領域)を例示する。図10A~図10Cは、カメラ2の撮影範囲を上から見た図である。すなわち、図10A~図10Cそれぞれの上下方向は、図6A~図6Cそれぞれの紙面に垂直な方向に相当する。 FIGS. 10A to 10C illustrate foreground regions extracted in the captured images 3a to 3c by such processing. FIG. 10A illustrates a difference area (foreground area) between the captured image 3a in FIG. 6A and the background image 4a in FIG. FIG. 10B illustrates a difference area (foreground area) between the captured image 3b in FIG. 6B and the background image 4a in FIG. FIG. 10C illustrates a difference area (foreground area) between the captured image 3c in FIG. 6C and the background image 4a in FIG. 10A to 10C are views of the shooting range of the camera 2 as viewed from above. That is, the vertical direction of each of FIGS. 10A to 10C corresponds to the direction perpendicular to the paper surface of FIGS. 6A to 6C.
 上記のとおり、各撮影画像3a~3c及び背景画像4aの各画素の濃淡値は当該各画素の深度に応じて定められている。そのため、各撮影画像3a~3c及び背景画像4の対応画素同士の画素値の差分は、各画素の深度の差分に相当する。したがって、図10A~図10Cに例示するように、本実施形態では、背景差分法に基づいて、実空間上で背景に変化の生じた領域を前景領域として抽出することができる。 As described above, the gray value of each pixel of each of the captured images 3a to 3c and the background image 4a is determined according to the depth of each pixel. Therefore, the difference in pixel value between corresponding pixels of each of the captured images 3a to 3c and the background image 4 corresponds to the difference in depth of each pixel. Therefore, as illustrated in FIGS. 10A to 10C, in the present embodiment, based on the background subtraction method, it is possible to extract a region where the background has changed in real space as a foreground region.
 より詳細には、図6Aの場面では、図10Aに例示されるように、人物の写る領域が前景領域として抽出される。次に、図6Bの場面では、図10Bに例示されるように、人物及び椅子の写る領域が一体となって前景領域として抽出される。そして、図6Cの場面では、人物の写る領域と椅子の写る領域とがそれぞれ別個の前景領域として抽出される。各撮影画像3a~3c及び背景画像4aがそれぞれ深度データを含んでいるため、本ステップS102では、このように実空間上で背景に変化の生じた領域を前景領域として抽出することができる。 More specifically, in the scene of FIG. 6A, as illustrated in FIG. 10A, an area in which a person is captured is extracted as a foreground area. Next, in the scene of FIG. 6B, as illustrated in FIG. 10B, the area where the person and the chair are captured is extracted as a foreground area. In the scene of FIG. 6C, the area where the person is photographed and the area where the chair is photographed are extracted as separate foreground areas. Since each of the captured images 3a to 3c and the background image 4a includes depth data, in this step S102, an area where the background has changed in real space can be extracted as a foreground area.
 (ステップS103)
 図5に戻り、次のステップS103では、制御部11は、移動物体検出部33として機能し、ステップS102で抽出された前景領域に写る対象物体のうち、カメラ2の画角内を移動する移動物体を当該前景領域から検出する。そして、移動物体の検出が完了すると、制御部11は、次のステップS104に処理を進める。
(Step S103)
Returning to FIG. 5, in the next step S <b> 103, the control unit 11 functions as the moving object detection unit 33, and moves to move within the angle of view of the camera 2 among the target objects captured in the foreground area extracted in step S <b> 102. An object is detected from the foreground region. Then, when the detection of the moving object is completed, the control unit 11 advances the processing to the next step S104.
 本実施形態では、例えば、制御部11は、所定の閾値以上の大きさを有する一塊の前景領域を一つの対象物体として認識する。この場合、制御部11は、図6A及び図6Bの場面では、図10A及び図10Bに例示されるように前景領域は一箇所に現れているため、前景領域に写る対象物体は1つであると認識する。一方、制御部11は、図6Cの場面では、図10Cに例示されるように前景領域は二箇所に離れて現れているため、前景領域に写る対象物体は2つであると認識する。ただし、前景領域に写る対象物体の数を認識する方法は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてもよい。 In the present embodiment, for example, the control unit 11 recognizes a block of foreground areas having a size equal to or larger than a predetermined threshold as one target object. In this case, in the scenes of FIGS. 6A and 6B, the control unit 11 has a single foreground object in the foreground area because the foreground area appears in one place as illustrated in FIGS. 10A and 10B. Recognize. On the other hand, in the scene of FIG. 6C, the control unit 11 recognizes that there are two target objects in the foreground area because the foreground area appears apart in two places as illustrated in FIG. 10C. However, the method for recognizing the number of target objects appearing in the foreground region is not limited to such an example, and may be appropriately selected according to the embodiment.
 そして、制御部11は、この前景領域の写る対象物体が実空間上で移動する物体であると判定される場合に、当該対象物体は移動物体であると認識する。例えば、制御部11は、図10A~図10Cに例示されるように、深度データを参照することで、前景領域内の各画素の深度を取得することができる。各画素の深度は、上記のとおり、各画素の実空間上の位置を示している。 The control unit 11 recognizes that the target object is a moving object when it is determined that the target object in the foreground region is an object moving in real space. For example, as illustrated in FIGS. 10A to 10C, the control unit 11 can acquire the depth of each pixel in the foreground region by referring to the depth data. As described above, the depth of each pixel indicates the position of each pixel in the real space.
 そのため、制御部11は、前景領域内の各画素の深度に基づいて、前景領域に写る対象物体の実空間上の状態を解析することができる。具体的に、制御部11は、前景領域内の各画素の深度に基づいて、前景領域の位置が実空間上で変動しているか否かを判定することができる。 Therefore, the control unit 11 can analyze the state of the target object in the foreground area in the real space based on the depth of each pixel in the foreground area. Specifically, the control unit 11 can determine whether or not the position of the foreground region varies in real space based on the depth of each pixel in the foreground region.
 そこで、制御部11は、前景領域の位置が実空間上で変動していると判定した場合に、当該前景領域に写る対象物体が実空間上で移動していると認定し、当該対象物体は移動物体であると認識してもよい。すなわち、この場合に、制御部11は、前景領域から移動物体を検出することができる。一方、制御部11は、前景領域の位置が実空間上で変動していない場合に、当該前景領域に写る対象物体は移動物体以外の物体(例えば、静止物体)であると認識してもよい。なお、このような前景領域の変動は、オプティカルフロー等に基づいて判定することもできる。 Therefore, when the control unit 11 determines that the position of the foreground region is fluctuating in the real space, the control unit 11 recognizes that the target object in the foreground region is moving in the real space, and the target object is You may recognize that it is a moving object. That is, in this case, the control unit 11 can detect a moving object from the foreground area. On the other hand, when the position of the foreground area has not changed in real space, the control unit 11 may recognize that the target object appearing in the foreground area is an object other than a moving object (for example, a stationary object). . Note that such a change in the foreground region can also be determined based on an optical flow or the like.
 また、例えば、制御部11は、次のように移動物体を認識してもよい。すなわち、カメラ2の画角内に移動物体が進入する際には、図6A及び図10Aに例示されるように、撮影画像3の周縁に前景領域が現れる。そのため、制御部11は、撮影画像3の周縁に前景領域が現れた場合に、当該前景領域に写る対象物体は移動物体であると認識し、移動物体の数をインクリメントしてもよい。 For example, the control unit 11 may recognize a moving object as follows. That is, when a moving object enters within the angle of view of the camera 2, a foreground region appears on the periphery of the captured image 3 as illustrated in FIGS. 6A and 10A. Therefore, when the foreground area appears on the periphery of the captured image 3, the control unit 11 may recognize that the target object appearing in the foreground area is a moving object and increment the number of moving objects.
 次に、制御部11は、継続的に取得される撮影画像3内において一度検出した移動物体を追跡(トラッキング)することで、撮影画像3内で移動物体を継続的に検出してもよい。このような追跡は、オプティカルフロー等に基づいて行うことができる。すなわち、図10A~図10Cに例示されるように、人物の写る前景領域は、一連の撮影画像3内で変動する。そのため、制御部11は、オプティカルフロー等に基づいてこの変動する前景領域を追跡することで、各撮影画像3内で表れる前景領域のうち人物の写る前景領域を特定してもよい。 Next, the control unit 11 may continuously detect the moving object in the captured image 3 by tracking (tracking) the moving object once detected in the continuously acquired captured image 3. Such tracking can be performed based on an optical flow or the like. That is, as illustrated in FIGS. 10A to 10C, the foreground area in which a person is photographed varies in a series of captured images 3. Therefore, the control unit 11 may identify a foreground area where a person is captured from among the foreground areas appearing in each captured image 3 by tracking the fluctuating foreground area based on an optical flow or the like.
 そして、カメラ2の画角外に移動物体が退出する際には、図6C及び図10Cに例示されるように、撮影画像3の周縁の方に前景領域が移動し、その後、当該前景領域が消滅する。そのため、制御部11は、追跡している前景領域が撮影画像3の周縁に移動して消滅した場合に、移動物体が画角外に退出したと認識し、移動物体の数をデクリメントしてもよい。これによって、制御部11は、一連で取得される撮影画像3内に写る移動物体の数を管理することができる。 When the moving object moves out of the angle of view of the camera 2, the foreground area moves toward the periphery of the captured image 3 as illustrated in FIGS. 6C and 10C, and then the foreground area Disappear. Therefore, when the foreground area being tracked moves to the periphery of the captured image 3 and disappears, the control unit 11 recognizes that the moving object has moved out of the angle of view, and decrements the number of moving objects. Good. Accordingly, the control unit 11 can manage the number of moving objects that appear in the captured image 3 acquired in series.
 制御部11は、例えば、以上のようにして移動物体を検出することができる。具体的には、制御部11は、図6A及び図6Bの場面では、図10A及び図10Bに例示される一塊の前景領域を移動物体であると認識する。また、制御部11は、図6Cの場面では、図10Cに例示される左側の前景領域を移動物体であると認識し、図10Cに例示される右側の前景領域を移動物体以外の物体であると認識する。 The control unit 11 can detect a moving object as described above, for example. Specifically, in the scenes of FIGS. 6A and 6B, the control unit 11 recognizes a group of foreground areas illustrated in FIGS. 10A and 10B as moving objects. Further, in the scene of FIG. 6C, the control unit 11 recognizes the left foreground region illustrated in FIG. 10C as a moving object, and the right foreground region illustrated in FIG. 10C is an object other than the moving object. Recognize.
 なお、移動物体を認識する方法は、これらの例に限定されなくてもよく、実施の形態に応じて適宜選択されてもよい。また、画像解析装置1の内部における各状態の認識方法は、このような例に限られなくてもよく、移動物体を検出している状態を認識可能であれば、実施の形態に応じて適宜設定されてよい。 Note that the method of recognizing a moving object is not limited to these examples, and may be appropriately selected according to the embodiment. In addition, the method for recognizing each state in the image analysis apparatus 1 is not limited to such an example. If the state in which the moving object is detected can be recognized, the method is appropriately determined according to the embodiment. May be set.
 (ステップS104)
 次のステップS104では、制御部11は、背景更新部34として機能し、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致するか否かを判定する。そして、制御部11は、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致しないと判定した場合には、次のステップS105に処理を進める。一方、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致すると判定した場合には、制御部11は、次のステップS105の処理を省略して、本動作例に係る処理を終了する。
(Step S104)
In the next step S104, the control unit 11 functions as the background update unit 34, and determines whether or not the number of moving objects detected in step S103 matches the number of target objects appearing in the foreground region. If the control unit 11 determines that the number of moving objects detected in step S103 does not match the number of target objects in the foreground area, the control unit 11 proceeds to the next step S105. On the other hand, if it is determined that the number of moving objects detected in step S103 matches the number of target objects that appear in the foreground area, the control unit 11 omits the process of the next step S105 and performs this operation example. This process is terminated.
 ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致するか否かを判定する方法は、実施の形態に応じて適宜設定されてもよい。例えば、制御部11は、移動物体以外の対象物体に対応する前景領域が存在しない場合、換言すると、全ての前景領域がそれぞれ移動物体に対応している場合に、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致すると判定することができる。一方、移動物体以外の対象物体に対応する前景領域が一箇所でも存在する場合に、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致しないと判定することができる。 The method for determining whether or not the number of moving objects detected in step S103 matches the number of target objects appearing in the foreground region may be appropriately set according to the embodiment. For example, when there is no foreground area corresponding to the target object other than the moving object, in other words, when all the foreground areas correspond to the moving objects, the control unit 11 detects the moving object detected in step S103. Can be determined to match the number of target objects in the foreground area. On the other hand, when there is at least one foreground area corresponding to the target object other than the moving object, it can be determined that the number of moving objects detected in step S103 does not match the number of target objects appearing in the foreground area. .
 具体的には、制御部11は、図6A及び図6Bの場面では、対象物体の数及び移動物体の数をそれぞれ1つと認識しているため、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致すると判定し、本動作例に係る処理を終了する。一方、制御部11は、図6Cの場面では、対象物体の数が2つであるのに対して移動物体の数は1つであると認識しているため、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致と一致しないと判定する。そして、制御部11は、次のステップS105に処理を進める。 Specifically, in the scenes of FIGS. 6A and 6B, the control unit 11 recognizes that the number of target objects and the number of moving objects are one each, and therefore the number of moving objects detected in step S103 is the foreground. It is determined that the number matches the number of target objects appearing in the region, and the processing according to this operation example is terminated. On the other hand, in the scene of FIG. 6C, the control unit 11 recognizes that the number of target objects is two while the number of moving objects is one, and thus the moving object detected in step S103. Is determined not to coincide with the number of target objects in the foreground area. And the control part 11 advances a process to following step S105.
 (ステップS105)
 次のステップS105では、制御部11は、背景更新部34として機能し、移動物体の写る領域を除いた対象領域について、取得した撮影画像3を用いて背景画像4を更新する。そして、本ステップS105により背景画像4の更新が完了すると、制御部11は、本動作例に係る処理を終了する。
(Step S105)
In the next step S105, the control unit 11 functions as the background update unit 34 and updates the background image 4 using the acquired captured image 3 for the target region excluding the region where the moving object is captured. Then, when the update of the background image 4 is completed in step S105, the control unit 11 ends the process according to this operation example.
 ここで、上記のとおり、図6A~図6Cに例示される各場面のうちの図6Cに例示される場面で、本ステップS105の処理が実行される。そこで、図6Cで例示される撮影画像3cを用いて、本ステップS105の処理の一例を説明する。 Here, as described above, the process of step S105 is executed in the scene illustrated in FIG. 6C among the scenes illustrated in FIGS. 6A to 6C. Therefore, an example of the process of step S105 will be described using the captured image 3c illustrated in FIG. 6C.
 まず、制御部11は、撮影画像3cにおいて、移動物体である人物の写る領域301を除いた領域から、背景画像4aの更新に利用する対象領域(以下、「更新領域」とも称する)を決定する。この更新領域を決定する方法は、実施の形態に応じて適宜選択可能である。ただし、更新領域は、移動物体以外の対象物体を写した前景領域(例えば、領域302)を含むように決定されるのが好ましい。 First, the control unit 11 determines a target area (hereinafter, also referred to as “update area”) used for updating the background image 4a from an area excluding the area 301 in which a person as a moving object is captured in the captured image 3c. . The method for determining the update area can be appropriately selected according to the embodiment. However, it is preferable that the update region is determined so as to include a foreground region (for example, region 302) in which a target object other than a moving object is captured.
 例えば、制御部11は、移動物体の写る領域(例えば、領域301)を除く全ての領域を更新領域として決定してもよい。また、例えば、制御部11は、移動物体の写る領域及びその領域の周囲所定の範囲を除く全ての領域を更新領域として決定してもよい。また、例えば、撮影画像3は、所定数のブロックに分割されていてもよい。そして、制御部11は、その所定数のブロックのうち移動物体の写る領域を含まないブロックを更新領域として決定してもよい。これらの方法によって、撮影画像3cでは、例えば、領域301を含まず、領域302を含む領域303が更新領域として決定される。 For example, the control unit 11 may determine all the regions except the region where the moving object is captured (for example, the region 301) as the update region. In addition, for example, the control unit 11 may determine all regions except the region where the moving object is captured and a predetermined range around the region as the update region. For example, the captured image 3 may be divided into a predetermined number of blocks. And the control part 11 may determine the block which does not contain the area | region where a moving object is reflected among the predetermined number of blocks as an update area | region. With these methods, in the captured image 3c, for example, the region 303 that does not include the region 301 but includes the region 302 is determined as the update region.
 次に、制御部11は、決定した更新領域(領域303)について、撮影画像3cを用いて背景画像4aを更新する。撮影画像3を用いて背景画像4を更新する方法は、実施の形態に応じて適宜設定可能である。例えば、制御部11は、領域303について、背景画像4aの各画素の画素値を撮影画像3cの各画素の画素値で置き換えることで、背景画像4aを更新してもよい。また、例えば、制御部11は、領域303について、背景画像4aの各画素の画素値を、撮影画像3cを取得した時点を含む所定時間の間に取得された複数の撮影画像3から算出される各画素の平均値に置き換えることで、背景画像4aを更新してもよい。これによって、制御部11は、図11に例示される新たな背景画像4bを生成する。 Next, the control unit 11 updates the background image 4a using the captured image 3c for the determined update region (region 303). The method of updating the background image 4 using the captured image 3 can be set as appropriate according to the embodiment. For example, for the region 303, the control unit 11 may update the background image 4a by replacing the pixel value of each pixel of the background image 4a with the pixel value of each pixel of the captured image 3c. For example, for the region 303, the control unit 11 calculates the pixel value of each pixel of the background image 4a from the plurality of captured images 3 acquired during a predetermined time including the time when the captured image 3c is acquired. The background image 4a may be updated by replacing the average value of each pixel. Thus, the control unit 11 generates a new background image 4b illustrated in FIG.
 図11は、本ステップS105の処理により更新された新たな背景画像4bを例示する。図11に例示される背景画像4bでは、元の位置から移動した椅子の写る領域は、図6Cに例示される撮影画像3cの領域302に含まれる各画素を用いて、図9に例示される背景画像4aから更新されている。そのため、これ以降に取得される撮影画像3では、本ステップS102の背景差分法に基づく前景領域の抽出処理を適用しても、当該椅子の写る領域は前景領域として抽出されなくなる。 FIG. 11 exemplifies a new background image 4b updated by the process of step S105. In the background image 4b illustrated in FIG. 11, the region where the chair moved from the original position is illustrated in FIG. 9 using each pixel included in the region 302 of the captured image 3c illustrated in FIG. 6C. Updated from the background image 4a. Therefore, in the captured image 3 acquired thereafter, even if the foreground region extraction process based on the background difference method in step S102 is applied, the region in which the chair appears is not extracted as the foreground region.
 本実施形態に係る画像解析装置1では、このようにして、ステップS103で検出された移動物体の数が前景領域に写る対象物体の数と一致しない場合に、移動物体の写る領域を除いた対象領域について、撮影画像3を用いて背景画像4が更新される。すなわち、移動物体以外の対象物体が写る前景領域が生じた場合に、その時点で取得された撮影画像3と元の背景画像4とを用いて、当該前景領域が抽出されないような新たな背景画像4が生成される。 In the image analysis apparatus 1 according to the present embodiment, in this way, when the number of moving objects detected in step S103 does not match the number of target objects appearing in the foreground area, the target excluding the area where the moving object appears For the region, the background image 4 is updated using the captured image 3. That is, when a foreground area in which a target object other than a moving object is captured, a new background image that does not extract the foreground area using the captured image 3 and the original background image 4 acquired at that time. 4 is generated.
 なお、制御部11は、新たに生成した背景画像4を記憶部12に格納する。このとき、制御部11は、元の背景画像4を記憶部12から削除してもよい、すなわち、記憶部12において元の背景画像4を新たな背景画像4に置き換えてもよい。また、制御部11は、元の背景画像4をそのまま記憶部12に残してもよい。元の背景画像4の処置は、実施の形態に応じて適宜選択可能である。 The control unit 11 stores the newly generated background image 4 in the storage unit 12. At this time, the control unit 11 may delete the original background image 4 from the storage unit 12, that is, may replace the original background image 4 with a new background image 4 in the storage unit 12. Further, the control unit 11 may leave the original background image 4 in the storage unit 12 as it is. The treatment of the original background image 4 can be appropriately selected according to the embodiment.
 <その他>
 (1)背景画像の更新
 なお、制御部11は、上記タイミングの他に、背景画像4を更新してもよい。例えば、制御部11は、上記ステップS103において、継続的に取得される撮影画像3内において一度検出した移動物体を追跡することで、撮影画像3内で移動物体を継続的に検出してもよい。そして、制御部11は、移動物体がカメラ2の画角外に移動することで、撮影画像3内に移動物体が検出されなくなった場合に、移動物体が検出されなくなった時点に取得した撮影画像3で背景画像4を更新してもよい。以下、図12を用いて、本更新処理について説明する。
<Others>
(1) Update of background image In addition to the said timing, the control part 11 may update the background image 4. FIG. For example, the control unit 11 may continuously detect the moving object in the captured image 3 by tracking the moving object once detected in the captured image 3 continuously acquired in step S103. . Then, when the moving object is not detected in the captured image 3 due to the moving object moving outside the angle of view of the camera 2, the control unit 11 captures the captured image acquired when the moving object is not detected. 3 may update the background image 4. Hereinafter, this update process will be described with reference to FIG.
 図12は、カメラ2の画角内に移動物体が存在しなくなった場面を例示する。上記ステップS103において、制御部11は、移動物体がカメラ2の画角内に進入した時に移動物体の数をインクリメントしてもよく、移動物体がカメラ2の画角外に退出した時に移動物体の数をデクリメントしてもよい。そして、図12に例示されるように、このデクリメントの際に移動物体の数が0になった場合、制御部11は、この時点で取得される撮影画像3で背景画像4全域を更新してもよい。 FIG. 12 illustrates a scene where a moving object no longer exists within the angle of view of the camera 2. In step S103, the control unit 11 may increment the number of moving objects when the moving object enters the angle of view of the camera 2, and when the moving object moves out of the angle of view of the camera 2, the control unit 11 You may decrement the number. Then, as illustrated in FIG. 12, when the number of moving objects becomes zero during this decrement, the control unit 11 updates the entire background image 4 with the captured image 3 acquired at this time. Also good.
 なお、背景画像4全域を更新する方法は実施の形態に応じて適宜選択可能である。例えば、制御部11は、移動物体が存在しなくなった時点で取得される撮影画像3を新たな背景画像4として記憶部12に格納してもよい。また、例えば、制御部11は、移動物体が存在しなくなった後、所定時間内に取得される撮影画像3を平均化することで新たな背景画像4を生成してもよい。 Note that the method of updating the entire background image 4 can be selected as appropriate according to the embodiment. For example, the control unit 11 may store the captured image 3 acquired when the moving object no longer exists in the storage unit 12 as a new background image 4. Further, for example, the control unit 11 may generate a new background image 4 by averaging the captured images 3 acquired within a predetermined time after the moving object no longer exists.
 当該方法によれば、カメラ2の画角内に移動物体が存在しなくなった場合に、その時点で取得される撮影画像3によって背景画像4を更新することができる。そのため、移動物体が背景に変化を生じさせても、その後に、移動物体の存在しない状態で、背景画像4の全域を一括で更新することができる。すなわち、移動物体がカメラ2の画角外に移動した後に、当該カメラ2の画角内に再度移動物体が進入した場合に、背景差分法によって当該再度進入した移動物体を適正に検出することができる。したがって、当該方法によれば、背景差分法において移動物体を適正に検出することが可能になる。 According to this method, when there is no moving object within the angle of view of the camera 2, the background image 4 can be updated with the captured image 3 acquired at that time. Therefore, even if the moving object causes a change in the background, the entire area of the background image 4 can be updated at a time in the absence of the moving object thereafter. That is, after a moving object moves outside the angle of view of the camera 2, when the moving object enters again within the angle of view of the camera 2, the moving object that has re-entered can be properly detected by the background subtraction method. it can. Therefore, according to the method, it is possible to appropriately detect the moving object in the background difference method.
 (2)複数の移動物体
 また、上記実施形態では、カメラ2の画角内に1つの移動物体が進入する例を説明した。しかしながら、カメラ2の画角内に進入する移動物体の数は、1つに限られる訳ではなく、複数であってもよい。複数の移動物体が進入した場合も、上記実施形態とほぼ同様に説明可能である。以下、図13A及び図13Bを用いて、複数の移動物体が進入した場合における制御部11の処理を説明する。
(2) Multiple Moving Objects In the above embodiment, an example in which one moving object enters within the angle of view of the camera 2 has been described. However, the number of moving objects entering the angle of view of the camera 2 is not limited to one and may be plural. The case where a plurality of moving objects enter can be explained in substantially the same manner as in the above embodiment. Hereinafter, the process of the control unit 11 when a plurality of moving objects enter will be described with reference to FIGS. 13A and 13B.
 図13Aは、カメラ2の画角内に二人の人物が固まって進入した場面を例示する。図13Bは、図13Aで例示される場面の後に、カメラ2の画角内に進入した二人の人物が互いに離れた場面を例示する。上記実施形態では、制御部11は、所定の閾値以上の大きさを有する一塊の前景領域を一つの対象物体として認識する。そのため、図13Aで例示される場面では、制御部11は、撮影画像3内には一つの移動物体が存在すると認識する。その後、図13Bで例示される場面において、制御部11は、撮影画像3内には二つの移動物体が存在すると認識する。 FIG. 13A exemplifies a scene in which two persons have entered into the angle of view of the camera 2 and have entered. FIG. 13B illustrates a scene in which two persons entering the angle of view of the camera 2 are separated from each other after the scene illustrated in FIG. 13A. In the above embodiment, the control unit 11 recognizes a group of foreground areas having a size equal to or larger than a predetermined threshold as one target object. Therefore, in the scene illustrated in FIG. 13A, the control unit 11 recognizes that one moving object exists in the captured image 3. Thereafter, in the scene illustrated in FIG. 13B, the control unit 11 recognizes that there are two moving objects in the captured image 3.
 すなわち、複数の移動物体がカメラ2の画角内に進入する場合には、制御部11が認識する状況と撮影画像3内の実際の状況とは乖離しうる。しかしながら、上記実施形態における処理によれば、それぞれの場面において、人物の写る領域を除いた領域で背景から改変が生じていない限り、ステップS103で検出された移動物体の数は前景領域に写る対象物体の数と一致する。そのため、制御部11が認識する状況と撮影画像3内の実際の状況とが乖離しても、制御部11は、特に問題なく上記動作例に係る処理を実行することができる。 That is, when a plurality of moving objects enter the angle of view of the camera 2, the situation recognized by the control unit 11 and the actual situation in the captured image 3 can be different. However, according to the processing in the above embodiment, in each scene, the number of moving objects detected in step S103 is an object to be reflected in the foreground area unless the background is altered in the area excluding the area where the person is captured. It matches the number of objects. Therefore, even if the situation recognized by the control unit 11 and the actual situation in the captured image 3 deviate, the control unit 11 can execute the process according to the above operation example without any problem.
 (作用・効果)
 以上のように、本実施形態に係る画像解析装置1は、移動物体の写る領域を除いた対象領域について、取得した撮影画像3を用いて背景画像4を更新する。より詳細には、本実施形態に係る画像解析装置1は、抽出される前景領域の数が撮影画像3内に写る移動物体の数よりも多い場合に、その時点で取得された撮影画像3と元の背景画像4とを用いて、当該移動物体以外の物体を写す前景領域が抽出されないような新たな背景画像4を生成する。
(Action / Effect)
As described above, the image analysis apparatus 1 according to the present embodiment updates the background image 4 using the acquired captured image 3 for the target region excluding the region where the moving object is captured. More specifically, when the number of foreground regions to be extracted is larger than the number of moving objects captured in the captured image 3, the image analysis apparatus 1 according to the present embodiment includes the captured image 3 acquired at that time. Using the original background image 4, a new background image 4 is generated so that a foreground region that captures an object other than the moving object is not extracted.
 そのため、本実施形態に係る画像解析装置1によれば、背景の少なくとも一部に変化が生じた場合に、その変化の生じた領域に関して、変化の生じた後に撮影された撮影画像3を用いて背景画像4を更新することができる。したがって、本実施形態によれば、背景差分法による処理において移動物体以外の物体を写す領域が前景領域として抽出されないようにすることができ、これによって、背景差分法に基づいて移動物体を適正に検出可能にすることができる。 Therefore, according to the image analysis apparatus 1 according to the present embodiment, when a change occurs in at least a part of the background, the photographed image 3 photographed after the change has occurred with respect to the changed region. The background image 4 can be updated. Therefore, according to the present embodiment, it is possible to prevent a region that captures an object other than a moving object from being extracted as a foreground region in the processing based on the background difference method, thereby appropriately moving a moving object based on the background difference method. It can be made detectable.
 また、上記実施形態では、取得される撮影画像3には、各画素の深度を示す深度データが含まれている。そのため、図10A~図10Cに例示されるように、この深度データを利用することで、前景領域の実空間上の位置を特定することができる。したがって、当該構成によれば、カメラ2の視点に依らず、前景領域に写る対象物体の実空間上の状態を解析し、当該解析の結果に基づいて、当該前景領域が移動物体に対応するか否かを判定することができる。よって、当該構成によれば、カメラ2の視点に依らず、背景差分法に基づく移動物体の検出を適正に行えるように、当該背景差分法に利用する背景画像を更新することができる。すなわち、カメラ2の視点の相違に頑強な背景差分法を提供することができる。 In the above embodiment, the acquired captured image 3 includes depth data indicating the depth of each pixel. Therefore, as illustrated in FIGS. 10A to 10C, the position of the foreground region in the real space can be specified by using this depth data. Therefore, according to the configuration, regardless of the viewpoint of the camera 2, the state of the target object in the foreground area in the real space is analyzed, and based on the result of the analysis, whether the foreground area corresponds to the moving object. It can be determined whether or not. Therefore, according to the configuration, the background image used for the background difference method can be updated so that the moving object based on the background difference method can be appropriately detected regardless of the viewpoint of the camera 2. That is, it is possible to provide a background difference method that is robust against differences in the viewpoint of the camera 2.
 具体的には、カメラ2側に移動物体が近づく又は遠ざかる移動を行った場合には、二次元画像では、当該移動物体の写る領域に大きな変化が生じないため、当該移動物体の移動を検出するのが難しい。一方、本実施形態によれば、深度に基づいて当該移動物体の移動を検出することができる。また、撮影画像内で移動物体が静止物体と重なっている場合、二次元画像ではこれらの物体を分離することは困難である。一方、本実施形態によれば、深度に基づいてそれぞれの物体の位置を特定することができるため、移動物体と静止物体とが離れている場合には、これらの物体を分離することができる。したがって、当該構成によれば、カメラ2の視点に依らず、背景差分法に利用する背景画像を更新することができる。 Specifically, when the moving object moves closer to or away from the camera 2 side, the movement of the moving object is detected because there is no significant change in the area where the moving object appears in the two-dimensional image. It ’s difficult. On the other hand, according to this embodiment, the movement of the moving object can be detected based on the depth. In addition, when a moving object overlaps a stationary object in a captured image, it is difficult to separate these objects in a two-dimensional image. On the other hand, according to this embodiment, since the position of each object can be specified based on the depth, when a moving object and a stationary object are separated, these objects can be separated. Therefore, according to this configuration, the background image used for the background subtraction method can be updated regardless of the viewpoint of the camera 2.
 なお、本実施形態に係る画像解析装置1はカメラ2により撮影された撮影画像3内で移動物体を検出することができる。そのため、本実施形態に係る画像解析装置1は、移動物体の検出を伴う様々なシステムに利用可能である。 Note that the image analysis apparatus 1 according to the present embodiment can detect a moving object in the captured image 3 captured by the camera 2. Therefore, the image analysis apparatus 1 according to the present embodiment can be used in various systems that involve detection of moving objects.
 例えば、本実施形態に係る画像解析装置1は、見守り対象者を移動物体として検出するシステムに利用することができる。ここで、本実施形態では、撮影画像3は深度データを含んでいるため、この深度データに基づいて、見守り対象者の実空間上の状態を解析することができる。そして制御部11は、見守り対象者に危険が迫っている状態であると解析した場合には、スピーカ14等を介して、見守り対象者に危険が迫っていることを知らせる報知を行ってもよい。 For example, the image analysis apparatus 1 according to the present embodiment can be used in a system that detects a watching target person as a moving object. Here, in this embodiment, since the captured image 3 includes depth data, it is possible to analyze the state of the person being watched over in real space based on the depth data. And when the control part 11 analyzes that it is in the state where danger is approaching a watching target person, you may alert | report that the monitoring target person is approaching danger via the speaker 14 grade | etc.,. .
 また、例えば、本実施形態に係る画像解析装置1は、建造物に進入する不審者を移動物体として検出するシステムに利用することができる。この場合、不審者の進入しうる経路にカメラ2が設置される。このとき、制御部11は、タッチパネルディスプレイ13上で、移動物体を他の対象物体と色分けして表示してもよい。これによって、当該建造物の管理者は、タッチパネルディスプレイ13に表示される撮影画像3の中から移動物体を瞬時に見分けることができ、不審者を容易に発見することができる。 Also, for example, the image analysis apparatus 1 according to the present embodiment can be used in a system that detects a suspicious person entering a building as a moving object. In this case, the camera 2 is installed on a route through which a suspicious person can enter. At this time, the control unit 11 may display the moving object on the touch panel display 13 while being color-coded with other target objects. As a result, the manager of the building can instantly recognize the moving object from the captured image 3 displayed on the touch panel display 13, and can easily find the suspicious person.
 §4 変形例
 以上、本発明の実施の形態を詳細に説明してきたが、前述までの説明はあらゆる点において本発明の例示に過ぎない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。
§4 Modifications Embodiments of the present invention have been described in detail above, but the above description is merely an illustration of the present invention in all respects. It goes without saying that various improvements and modifications can be made without departing from the scope of the present invention.
 例えば、上記実施形態では、カメラ2は、撮影画像3の各画素の深度を取得可能なように、深度センサ21を含んでいる。しかしながら、カメラ2は、このような例に限られなくてもよく、深度を取得可能に構成されなくてもよい。例えば、カメラ2は、RGB画像等の二次元画像を取得可能な公知の撮影装置であってもよい。この場合であっても、画像解析装置1は、上記と同様に、背景差分法に基づいて前景領域を抽出し、移動物体を検出し、背景画像4を更新することができる。 For example, in the above embodiment, the camera 2 includes the depth sensor 21 so that the depth of each pixel of the captured image 3 can be acquired. However, the camera 2 may not be limited to such an example, and may not be configured to be able to acquire the depth. For example, the camera 2 may be a known imaging device that can acquire a two-dimensional image such as an RGB image. Even in this case, the image analysis apparatus 1 can extract the foreground region based on the background difference method, detect the moving object, and update the background image 4 in the same manner as described above.
 1…画像解析装置、
 2…カメラ、21…深度センサ、
 3(3a~3c)…撮影画像、4(4a、4b)…背景画像、
 5…プログラム、6…記憶媒体、
11…制御部、12…記憶部、13…タッチパネルディスプレイ、
14…スピーカ、15…外部インタフェース、16…通信インタフェース、
17…ドライブ、
31…画像取得部、32…背景差分算出部、33…移動物体検出部、
34…背景更新部
1 ... Image analysis device,
2 ... Camera, 21 ... Depth sensor,
3 (3a-3c) ... taken image, 4 (4a, 4b) ... background image,
5 ... Program, 6 ... Storage medium,
11 ... Control unit, 12 ... Storage unit, 13 ... Touch panel display,
14 ... Speaker, 15 ... External interface, 16 ... Communication interface,
17 ... drive,
31 ... Image acquisition unit, 32 ... Background difference calculation unit, 33 ... Moving object detection unit,
34 ... Background update section

Claims (5)

  1.  撮影装置により撮影された撮影画像を取得する画像取得部と、
     背景差分法に基づいて、前記撮影画像の背景に設定された背景画像と前記取得した撮影画像との差分を算出することで、前記取得した撮影画像の前景領域を抽出する背景差分算出部と、
     抽出された前記前景領域に写る対象物体のうち、前記撮影装置の画角内を移動する移動物体を前記前景領域から検出する移動物体検出部と、
     検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致するか否かを判定し、検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致しないと判定した場合に、前記移動物体の写る領域を除いた対象領域について、前記取得した撮影画像を用いて前記背景画像を更新する背景更新部と、
    を備える、
    画像解析装置。
    An image acquisition unit for acquiring a photographed image photographed by the photographing device;
    Based on a background difference method, a background difference calculation unit that extracts a foreground region of the acquired captured image by calculating a difference between the background image set as the background of the captured image and the acquired captured image;
    A moving object detection unit that detects, from the foreground area, a moving object that moves within the angle of view of the imaging device among the extracted target objects that are reflected in the foreground area;
    It is determined whether or not the number of detected moving objects matches the number of target objects appearing in the foreground region, and if the number of detected moving objects does not match the number of target objects appearing in the foreground region A background update unit that updates the background image using the acquired captured image for the target region excluding the region where the moving object is captured,
    Comprising
    Image analysis device.
  2.  前記画像取得部は、前記撮影装置により撮影された撮影画像を継続的に取得し、
     前記移動物体検出部は、継続的に取得される前記撮影画像内において一度検出した前記移動物体を追跡することで、前記撮影画像内で前記移動物体を継続的に検出し、
     前記背景更新部は、前記移動物体が前記撮影装置の画角外に移動することで、前記撮影画像内に前記移動物体が検出されなくなった場合に、当該移動物体が検出されなくなった時点に取得した撮影画像で前記背景画像を更新する、
    請求項1に記載の画像解析装置。
    The image acquisition unit continuously acquires captured images captured by the imaging device,
    The moving object detection unit continuously detects the moving object in the captured image by tracking the moving object once detected in the captured image continuously acquired,
    The background update unit is acquired when the moving object is not detected when the moving object is not detected in the captured image due to the moving object moving outside the angle of view of the imaging device. Update the background image with the captured image,
    The image analysis apparatus according to claim 1.
  3.  前記画像取得部は、前記撮影画像内の各画素の深度を示す深度データを含む撮影画像を取得し、
     前記移動物体検出部は、前記深度データを参照することで得られる前記前景領域内の各画素の深度に基づいて、前記前景領域に写る前記対象物体の実空間上の状態を解析することで、前記前景領域から前記移動物体を検出する、
    請求項1又は2に記載の画像解析装置。
    The image acquisition unit acquires a captured image including depth data indicating the depth of each pixel in the captured image,
    The moving object detection unit, based on the depth of each pixel in the foreground region obtained by referring to the depth data, by analyzing the state in real space of the target object that appears in the foreground region, Detecting the moving object from the foreground region;
    The image analysis apparatus according to claim 1 or 2.
  4.  コンピュータが、
     撮影装置により撮影された撮影画像を取得するステップと、
     背景差分法に基づいて、前記撮影画像の背景に設定された背景画像と前記取得した撮影画像との差分を算出することで、前記取得した撮影画像の前景領域を抽出するステップと、
     抽出された前記前景領域に写る対象物体のうち、前記撮影装置の画角内を移動する移動物体を前記前景領域から検出するステップと、
     検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致するか否かを判定するステップと、
     検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致しないと判定した場合に、前記移動物体の写る領域を除いた対象領域について、前記取得した撮影画像を用いて前記背景画像を更新するステップと、
    を実行する画像解析方法。
    Computer
    Obtaining a photographed image photographed by the photographing device;
    Extracting a foreground region of the acquired captured image by calculating a difference between a background image set as a background of the captured image and the acquired captured image based on a background difference method;
    Detecting, from the foreground area, a moving object that moves within the angle of view of the imaging device among the extracted target objects in the foreground area;
    Determining whether the number of detected moving objects matches the number of target objects in the foreground region;
    When it is determined that the number of detected moving objects does not match the number of target objects appearing in the foreground area, the background is obtained using the acquired captured image with respect to the target area excluding the area where the moving object appears. Updating the image;
    Image analysis method to execute.
  5.  コンピュータに、
     撮影装置により撮影された撮影画像を取得するステップと、
     背景差分法に基づいて、前記撮影画像の背景に設定された背景画像と前記取得した撮影画像との差分を算出することで、前記取得した撮影画像の前景領域を抽出するステップと、
     抽出された前記前景領域に写る対象物体のうち、前記撮影装置の画角内を移動する移動物体を前記前景領域から検出するステップと、
     検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致するか否かを判定するステップと、
     検出された前記移動物体の数が前記前景領域に写る対象物体の数と一致しないと判定した場合に、前記移動物体の写る領域を除いた対象領域について、前記取得した撮影画像を用いて前記背景画像を更新するステップと、
    を実行させるための画像解析プログラム。
    On the computer,
    Obtaining a photographed image photographed by the photographing device;
    Extracting a foreground region of the acquired captured image by calculating a difference between a background image set as a background of the captured image and the acquired captured image based on a background difference method;
    Detecting, from the foreground area, a moving object that moves within the angle of view of the imaging device among the extracted target objects in the foreground area;
    Determining whether the number of detected moving objects matches the number of target objects in the foreground region;
    When it is determined that the number of detected moving objects does not match the number of target objects appearing in the foreground area, the background is obtained using the acquired captured image with respect to the target area excluding the area where the moving object appears. Updating the image;
    Image analysis program for executing
PCT/JP2015/085600 2015-03-04 2015-12-21 Image analysis device, image analysis method, and image analysis program WO2016139868A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017503327A JP6638723B2 (en) 2015-03-04 2015-12-21 Image analysis device, image analysis method, and image analysis program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015042785 2015-03-04
JP2015-042785 2015-03-04

Publications (1)

Publication Number Publication Date
WO2016139868A1 true WO2016139868A1 (en) 2016-09-09

Family

ID=56848900

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/085600 WO2016139868A1 (en) 2015-03-04 2015-12-21 Image analysis device, image analysis method, and image analysis program

Country Status (2)

Country Link
JP (1) JP6638723B2 (en)
WO (1) WO2016139868A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019016258A (en) * 2017-07-10 2019-01-31 株式会社日立製作所 Operation monitoring system and operation monitoring method
JP2019067129A (en) * 2017-09-29 2019-04-25 キヤノン株式会社 Image processing device, image processing system, image processing method, and program
CN110383295A (en) * 2017-03-14 2019-10-25 三菱电机株式会社 Image processing apparatus, image processing method and image processing program
CN112790711A (en) * 2020-12-31 2021-05-14 佛山市顺德区美的洗涤电器制造有限公司 Washing method and device for dish washing machine, dish washing machine and processor
US20210350547A1 (en) * 2018-11-26 2021-11-11 Sony Interactive Entertainment Inc. Learning apparatus, foreground region estimation apparatus, learning method, foreground region estimation method, and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06325157A (en) * 1993-05-13 1994-11-25 Matsushita Electric Ind Co Ltd Body recognizing device
JP2002230531A (en) * 2001-02-06 2002-08-16 Hitachi Kokusai Electric Inc Method of detecting invading object
JP2014041488A (en) * 2012-08-22 2014-03-06 Canon Inc Object detection device, control method therefor, program, and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06325157A (en) * 1993-05-13 1994-11-25 Matsushita Electric Ind Co Ltd Body recognizing device
JP2002230531A (en) * 2001-02-06 2002-08-16 Hitachi Kokusai Electric Inc Method of detecting invading object
JP2014041488A (en) * 2012-08-22 2014-03-06 Canon Inc Object detection device, control method therefor, program, and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110383295A (en) * 2017-03-14 2019-10-25 三菱电机株式会社 Image processing apparatus, image processing method and image processing program
CN110383295B (en) * 2017-03-14 2022-11-11 三菱电机株式会社 Image processing apparatus, image processing method, and computer-readable storage medium
JP2019016258A (en) * 2017-07-10 2019-01-31 株式会社日立製作所 Operation monitoring system and operation monitoring method
JP2019067129A (en) * 2017-09-29 2019-04-25 キヤノン株式会社 Image processing device, image processing system, image processing method, and program
JP7080614B2 (en) 2017-09-29 2022-06-06 キヤノン株式会社 Image processing equipment, image processing system, image processing method, and program
US20210350547A1 (en) * 2018-11-26 2021-11-11 Sony Interactive Entertainment Inc. Learning apparatus, foreground region estimation apparatus, learning method, foreground region estimation method, and program
CN112790711A (en) * 2020-12-31 2021-05-14 佛山市顺德区美的洗涤电器制造有限公司 Washing method and device for dish washing machine, dish washing machine and processor

Also Published As

Publication number Publication date
JP6638723B2 (en) 2020-01-29
JPWO2016139868A1 (en) 2017-12-14

Similar Documents

Publication Publication Date Title
JP6115335B2 (en) Information processing apparatus, information processing method, and program
WO2016139868A1 (en) Image analysis device, image analysis method, and image analysis program
JP5484184B2 (en) Image processing apparatus, image processing method, and program
US9576204B2 (en) System and method for automatic calculation of scene geometry in crowded video scenes
JP5754990B2 (en) Information processing apparatus, information processing method, and program
KR20110023472A (en) Apparatus and method for tracking object based on ptz camera using coordinate map
JP6780641B2 (en) Image analysis device, image analysis method, and image analysis program
US10346709B2 (en) Object detecting method and object detecting apparatus
EP3629570A2 (en) Image capturing apparatus and image recording method
WO2016208404A1 (en) Device and method for processing information, and program
WO2016031314A1 (en) Individual identification device, individual identification method, and individual identification program
JP6585668B2 (en) Object detection device
KR20160028875A (en) Method and system for dectecting run
JP2006041939A (en) Monitor device and monitor program
WO2016181672A1 (en) Image analysis device, image analysis method, and image analysis program
JP6737262B2 (en) Abnormal state detection device, abnormal state detection method, and abnormal state detection program
JP6645503B2 (en) Image analysis device, image analysis method, and image analysis program
JP2010113562A (en) Apparatus, method and program for detecting and tracking object
JP6607253B2 (en) Image analysis apparatus, image analysis method, and image analysis program
KR102050418B1 (en) Apparatus and method for alignment of images
JP6664078B2 (en) Three-dimensional intrusion detection system and three-dimensional intrusion detection method
JP6565468B2 (en) Respiration detection device, respiration detection method, and respiration detection program
JP6815859B2 (en) Traffic measuring device
JP4938065B2 (en) Image parameter adjusting apparatus, method and program

Legal Events

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

Ref document number: 15884034

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017503327

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15884034

Country of ref document: EP

Kind code of ref document: A1