Detecting when people pass through a doorway
By using door masks generated from calibration images to remove the door's contribution from detection images, the method improves the accuracy of people detection systems, addressing the challenges of door interference and privacy concerns.
Patent Information
- Application Number
- PCT/EP2024/079803
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-23
- Filing Date
- 2024-10-22
- Publication Date
- 2025-05-01
AI Technical Summary
Existing people detection systems face challenges in accurately distinguishing when a person passes through a doorway, especially due to the contribution of the door in the detection image, which can lead to reduced accuracy and privacy concerns with high-resolution cameras.
The method involves a calibration phase where images are captured for various door angles to generate door masks, which are stored in a data structure. During detection, the appropriate door mask is applied to the detection image to mask out the door's contribution, improving accuracy by averaging depth values and applying an offset to aggressively mask out objects.
This approach significantly enhances the accuracy of people detection by effectively removing the door's influence from the images, thereby improving the reliability of people counting and movement tracking.
Smart Images

Figure EP2024079803_01052025_PF_FP_ABST
Abstract
Description
DETECTING WHEN PEOPLE PASS THROUGH A DOORWAYTECHNICAL FIELD
[0001] The present disclosure relates to the field of people detection and in particular to detecting when people pass through a doorway when applying a door mask to mask out contribution of a door in a detection image.BACKGROUND
[0002] People detectors can be used in many different environments. For instance, people detectors can be used to detect flows of people e.g. in a theme park or a shopping centre. People detectors can also be used to count people in a certain space, such as commercial or residential properties, which can then be used to control Heat, Ventilation and Air Conditioning (HVAC) or for keeping track of the number of people in a certain space, e.g. for fire protection purposes or office utilisation metrics.
[0003] There are people detectors that provide good accuracy, e.g. based on high- resolution digital cameras, but these are quite costly and require significant amount of power to run. Additionally, high resolution digital cameras where individuals can be identified may also raise privacy concerns.
[0004] While there are simpler image sensors of low resolution, such sensor may not always be accurate enough to correctly distinguish when a person passes through the door.SUMMARY
[0005] One object is to improve accuracy of image-based people detection.
[0006] In some aspects, the embodiments described herein relate to a method for detecting when people pass through a doorway of a door by which a people detector is installed. The method is performed by the people detector. The method comprises: in a calibration phase, performing the following: obtaining a calibration door angle from a door angle sensor, indicating an angle of opening of the door; obtaining a calibration image from an image sensor, the calibration image comprising a representation of the door for the calibration door angle; repeating the obtaining a calibration the door angleand obtaining the calibration image for a plurality of values of the calibration door angles; generating a data structure comprising a plurality of angle values, respectively associated with door masks, wherein each door mask is obtained based on one or more of the calibration images. The method further comprises, and in a detection phase, performing the following: obtaining a detection door angle from the door angle sensor, indicating an angle of opening of the door; obtaining a detection image from the image sensor; obtaining, from the data structure, based on the detection door angle, a detection door mask; applying the detection door mask to the detection image, to obtain a masked image; and performing people detection based on the masked image. Each one of the calibration image and the detection image comprises a pixel array, wherein each pixel comprises a depth value indicating a distance to a surface from the image sensor for that pixel. The generating a data structure comprises, for each pixel in the door mask, calculating its depth value based on averaging corresponding pixels in a plurality of calibration images for calibration door angles within an angle range from the angle value.
[0007] In some aspects, the embodiments described herein relate to that the generating a data structure comprises, for each pixel in the door mask, calculating its depth value based on the averaging of corresponding pixels and applying an offset to more aggressively mask out any object.
[0008] In some aspects, the embodiments described herein relate to that the offset is calculated as a variation indicator of the corresponding pixels multiplied by a constant.
[0009] In some aspects, the embodiments described herein relate to that the variation indictor is a standard deviation.
[0010] In some aspects, the embodiments described herein relate to that the obtaining the detection door mask comprises determining that the detection door angle is between two angle values in the data structure and generating the detection door mask by, for each pixel in the detection door mask, interpolating between door masks in the data structure corresponding to the two angle values.[oon] In some aspects, the embodiments described herein relate to a people detector for detecting when people pass through a doorway of a door by which the people detector is installed, the people detector comprising: processing circuitry; and memory circuitry storing instructions that, when executed by the processing circuitry, cause the people detector to: in a calibration phase, executing instructions to: obtain a calibration door angle from a door angle sensor, indicating an angle of opening of the door; obtain a calibration image from an image sensor, the calibration image comprising a representation of the door for the calibration door angle, repeat the instructions to obtain a calibration the door angle and to obtain the calibration image for a plurality of values of the calibration door angles; generate a data structure comprising a plurality of angle values, respectively associated with door masks, wherein each door mask is obtained based on one or more of the calibration images; and in a detection phase, executing instructions to: obtain a detection door angle from the door angle sensor, indicating an angle of opening of the door; obtain a detection image from the image sensor; obtain, from the data structure, based on the detection door angle, a detection door mask; apply the detection door mask to the detection image, to obtain a masked image; and perform people detection based on the masked image. Each one of the calibration image and the detection image comprises a pixel array, wherein each pixel comprises a depth value indicating a distance to a surface from the image sensor for that pixel. The instructions to generate a data structure comprise instructions that, when executed by the processing circuitry, cause the people detector to, for each pixel in the door mask, calculate its depth value based on averaging corresponding pixels in a plurality of calibration images for calibration door angles within an angle range from the angle value.
[0012] In some aspects, the embodiments described herein relate to that the instructions to generate a data structure comprise instructions that, when executed by the processing circuitry, cause the people detector to, for each pixel in the door mask, calculate its depth value based on the averaging of corresponding pixels and applying an offset to more aggressively mask out any object.
[0013] In some aspects, the embodiments described herein relate to that the offset is calculated as a variation indicator of the corresponding pixels multiplied by a constant.
[0014] In some aspects, the embodiments described herein relate to that the variation indictor is a standard deviation.
[0015] In some aspects, the embodiments described herein relate to that the instructions to obtain the detection door mask comprise instructions that, when executed by the processing circuitry, cause the people detector to determine that the detection door angle is between two angle values in the data structure and generate the detection door mask by, for each pixel in the detection door mask, interpolating between door masks in the data structure corresponding to the two angle values.
[0016] In some aspects, the embodiments described herein relate to a computer program for detecting when people pass through a doorway of a door by which a people detector is installed, the computer program comprising computer program code which, when executed on a people detector causes the people detector to: in a calibration phase, executing instructions to: obtain a calibration door angle from a door angle sensor, indicating an angle of opening of the door; obtain a calibration image from an image sensor, the calibration image comprising a representation of the door for the calibration door angle, repeat the instructions to obtain a calibration the door angle and to obtain the calibration image for a plurality of values of the calibration door angles; generate a data structure comprising a plurality of angle values, respectively associated with door masks, wherein each door mask is obtained based on one or more of the calibration images; and in a detection phase, executing instructions to: obtain a detection door angle from the door angle sensor, indicating an angle of opening of the door; obtain a detection image from the image sensor; obtain, from the data structure, based on the detection door angle, a detection door mask; apply the detection door mask to the detection image, to obtain a masked image; and perform people detection based on the masked image. Each one of the calibration image and the detection image comprises a pixel array, wherein each pixel comprises a depth value indicating a distance to a surface from the image sensor (20) for that pixel. The program code to generate a data structure comprises program code to, for each pixel in the door mask, calculate its depth value based on averaging corresponding pixels in a plurality of calibration images for calibration door angles within an angle range from the angle value
[0017] In some aspects, the embodiments described herein relate to a computer program product comprising the computer program and a computer readable means comprising non-transitory memory in which the computer program is stored.
[0018] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a / an / the element, apparatus, component, means, step, etc." are to be interpreted openly as referring to at least one instance of the element, apparatus, component, means, step, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated.BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Aspects and embodiments are now described, by way of example, with reference to the accompanying drawings, in which:
[0020] Fig 1 is a schematic diagram illustrating an environment in which embodiments presented herein can be applied;
[0021] Figs 2A-B are schematic diagrams illustrating a situation when the door contributes to the image;
[0022] Fig 3 is a flow chart illustrating embodiments of methods for detecting when people pass through a doorway of a door by which a people detector is installed;
[0023] Fig 4 is a schematic diagram illustrating components of the people detector ofFig 1; and
[0024] Fig 5 shows one example of a computer program product 90 comprising computer readable means.DETAILED DESCRIPTION
[0025] The aspects of the present disclosure will now be described more fully hereinafter with reference to the accompanying drawings, in which certain embodiments of the invention are shown. These aspects may, however, be embodied inmany different forms and should not be construed as limiting; rather, these embodiments are provided by way of example so that this disclosure will be thorough and complete, and to fully convey the scope of all aspects of invention to those skilled in the art. Like numbers refer to like elements throughout the description.
[0026] Embodiments presented herein provide improvements in how to detect people passing through a doorway using image detection, by removing contribution by a door in the captured images. Specifically, in a calibration phase, calibration images are captured for a wide range of door angles. The calibration images are used to generate door masks, that are stored in a data structure for various angle values (of the door opening). During detection, a detection door angle is measured, and used to get an appropriate door mask. The door mask is then applied to a captured detection image, to reduce or even eliminate any influence on the door in the image that is used for people counting. This greatly improves accuracy in people detection. More details of this solution is presented below.
[0027] Fig 1 is a schematic diagram illustrating an environment in which embodiments presented herein can be applied. Access between a first physical space 14 and a second physical space 16 is restricted by a door 15. The door 15 is provided in a doorway 5 between the first physical space 14 and a second physical space 16. The doorway 5 and the door are provided in a surrounding structure 17 such as a wall, fence, etc. In order to control access in either or both direction between the physical spaces 14, 16 a lock device 13 can be provided to selectively unlock and lock the door 15. The angle of opening of the door 15 is be detected by a door angle sensor 18.
[0028] The door angle sensor 18 can be provided in the door frame (as shown), in the door 15, using sections in both the door frame and the door, in hinges, in a door closer or in a door opener. The door sensor 18 can detect an angle of opening of the door 15 in any suitable manner e.g. using a magnetometer and magnet, magnetic rotary position sensor, using electrical resistance, using impedance, using visual sensing or using an accelerometer and / or gyro.
[0029] A people detector 1 is installed by the door 15, in this case in the doorway 5.The people detector 1 can be a separate device, or it can be installed in a door closer,door opener, in an electronic lock, in a credential reader or an EAC (Electronic Access Control) button for unlocking or opening the door. The people detector 1 comprises an image sensor n which is directed in its orientation to detect any people passing through the doorway 5. For instance, the image sensor 11 can be mounted above the doorway 5, for providing top view images of the doorway and its immediate surroundings (see e.g. Figs 2A-B). The people detector 1 can detect when someone enters the first physical space 14 from the second physical space 16 and vice versa.
[0030] The image sensor 11 can e.g. be based on capturing images of the space by the doorway in two dimensions (2D) or three dimensions (3D), e.g. based on Time-of-Flight (ToF) detection, visual imaging (i.e. a camera), infrared detection, thermal detection, lidar, radar, etc. It is to be noted that the term ‘image’ is to be interpreted broadly as any captured representation of the local physical environment. Hence, the image can be represented as a 2D array of pixels, a 2D array of pixels with depth data added for each pixel, a point cloud (in 3D space), a set of polygons in 3D space, etc.
[0031] According to embodiment presented herein, the door 15 is masked out prior to performing the people detection. In this way, the passing person 7 can be detected with greater accuracy, since a passing person 7 is the main object in the image when the door has been masked out. It is to be noted that a single image can be sufficient to identify a person. Nevertheless, a series of multiple images can also be used to increase accuracy and detect movement direction.
[0032] Using a stream of multiple images from the image sensor 11, the people detector 1 is thus capable of detecting when a person 7 moves from the first physical space 14 to the second physical space 16 (and vice versa). The number of people passing through can also be detected. This can be utilised when an intruder attempts to enter a restricted physical space by passing right after a person with legitimate access, a procedure which is also known as piggybacking or tailgating.
[0033] The detection of a person 7, and optionally a direction of movement, is recorded by the people detector 1 and the people detector 1 can optionally communicate this information to an external device 8. The external device 8 can be an alarm system, abuilding automation system or any other suitable device. The external device 8 can be at the same site as the people detector i or it can be remotely located.
[0034] The external device 8 can use the people detection information to determine e.g. how many people are in the first physical space 14 and / or the second physical space 16. This information can be used by the external device 8 e.g. to control ventilation, heating, cooling and / or lighting. Moreover, this information can be used for office utilisation metrics, e.g. enabling personnel to plan when to go to the office (rather than working from home) when utilisation is low. Alternatively or additionally, the people detection information can be used if an emergency occurs, to know where people are located and how many people there are to evacuate. Alternatively or additionally, this information can be used for people flow statistics, e.g. for theme parks, public transport stations, and shops.
[0035] When there is only one doorway to a physical space (e.g. a room, office or home), the people detector 1 can thus be used count how many people are in the physical space at any point in time. When there are multiple doorways to a physical space, each doorway can be provided with a people detector. This enables the external device to keep track of the number of people in the physical space by detecting each time someone enters or exits through any of the doorways.
[0036] A physical space (for which the number of people is kept track of) can be any type of space where people can be present. Hence, the physical space can be any one or more of a room, a set of rooms (e.g. an office), a home, a shop, an arena, a theme park, a section of an outside space, or any other commercial, public or residential space.
[0037] Figs 2A-B are schematic diagrams illustrating a situation when the door 15 contributes to the image.
[0038] In Fig 2A, a perspective top view is illustrated where the door 15 is shown in a semi-opened position. The view is a perspective top view, looking downwards from the top of the doorway 5. Hence, the door blade of the door 15 occupies a large section of the top left The surrounding structure 17 can be seen both in the top middle (where the door15 is mounted) and the bottom middle. In Fig 2A it is illustrated the view from the image sensor 11, but without the limitations due to resolution, etc.
[0039] Looking now to Fig 2B, it is shown a captured image 20 corresponding to the perspective top view of Fig 2 A. The captured image 20 represents an image captured by the image sensor 11 in the form of an 8x8 ToF sensor, i.e. 64 pixels, when the image sensor 11 is mounted above the doorway 5. For each pixel, the shading indicates a distance from the sensor to the nearest object in that pixel. For simplicity, there is only one shading is shown in Fig 2B. It is to be noted that, although not illustrated in Fig 2B, the actual image can have multiple depth values.
[0040] Looking at both Fig 2A and Fig 2B, it can be seen how both the door 15 and the surrounding structure 17 contributes to pixels in the image 20. It can also be noted that pixels in the top left of the image 20 are blocked by the door and are thus also near the image sensor. Hence these pixels on the top left are also shaded as being close to the image sensor. As explained in further detail below, for this purpose, door masks are created in a calibration phase, which are subsequently used in a detection phase to mask out the door, as well as the surrounding structure 17.
[0041] Fig 3 is a flow chart illustrating embodiments of methods for detecting when people pass through a doorway 5 of a door 15 by which a people detector 1 is installed. The method is performed by the people detector 1. First, steps of a calibration phase 38 is described.
[0042] In an obtain calibration door angle step 40, the people detector 1 obtains a calibration door angle from a door angle sensor 18, indicating an angle of opening of the door 15.
[0043] In an obtain calibration image step 42, the people detector 1 obtains a calibration image from an image sensor 11, the calibration image comprising a representation of the door 15 for the calibration door angle.
[0044] The calibration image comprises a pixel array. In one embodiment, each pixel comprises a depth value indicating a distance to a surface from the image sensor 11 forthat pixel, e.g. obtained using from the image sensor n implemented using a time-of- flight sensor.
[0045] Possible values for each pixel in the calibration image vary widely. For instance, the full range of possible values of the pixel in the image (from the image capturing device) can be reflected in the calibration image. In another extreme, each pixel in the image is passed through a binary threshold filter, such that values on one side of the threshold is 1 and on the other side of the threshold is o. The same filter is then applied for detection images captured in the obtain detection image step 50 (see below).
[0046] In a conditional repeat step 44, the people detector 1 determines whether to repeat the calibration for more values of the calibration door angles to improve the base for determining door masks (see the generate masks step 46 below). The calibration can be repeated for a plurality of values of calibration door angles, i.e. for many door angles between the door being fully closed and fully open. Since the calibration is performed only once or rarely, it is not a large inconvenience if the calibration procedure takes some time to perform. For instance, the calibration can be performed for every degree, or even every fraction of a degree, e.g. every 0.1 degrees, of the door between fully open and fully closed. When it is determined to repeat, the method returns to the obtain calibration angle step 40. In this case, the angle of the door opening has changed prior to reperforming the obtain calibration door angle step 40. When it is determined not to repeat, the method proceeds to a generate masks step 46.
[0047] In a generate masks step 46, the people detector 1 generates a data structure comprising a plurality of angle values. Each angle value in the data structure is associated with a door mask. Each door mask is obtained based on one or more of the calibration images.
[0048] The generating of the data structure comprises, for each pixel in each door mask, calculating its depth value based on averaging corresponding pixels in a plurality of calibration images for calibration door angles within an angle range from the angle value. In other words, for a certain angle value of a door mask, a set of a plurality of calibration images are collected, e.g. within +- n degrees from the angle value. Thedepth value of each pixel (e.g. x yd in the door mask is then calculated as an average of the depth values from the corresponding pixels (e.g. x yd from each one of the calibration images in the set. This calculation is then performed for each pixel in the door mask. It is noted that all calibration images and the door mask have the same dimensions in terms of columns and rows of pixels. This provides a door mask that is more stable and of a higher quality.
[0049] In one embodiment, for each pixel in the door mask, its depth value is calculated not only based on the averaging of corresponding pixels, but also by applying an offset to more aggressively mask out any object. The result, when the door mask is applied, is that the door is more aggressively masked out, to reduce the risk of any impact of a door when people counting is performed, e.g. if imaging data is inaccurate, e.g. due to noise. In one embodiment, the offset is calculated as a variation indicator (e.g. standard deviation) of the corresponding pixels, multiplied by a constant. By using the variation indicator, when there is a lot of variation between the pixels in the set of calibration images, the mask is more aggressive (masking out more). This covers the situation if e.g. if one or more calibration images for some reason missed detection of the door, or the contribution of the door for a particular pixel is low in some calibration images. By creating the mask with some margin, the door can be removed from images captured in operation with greater certainty. For the detection process, it is beneficial to be overly aggressive in the mask determination, since any missed masking could result in the system incorrectly determining that a person is present.
[0050] It is to be noted that the door masks that are obtained not only mask the door, but also any static objects that maybe present across the calibration images (e.g. the surrounding structure 17), since such static objects would also contribute to the calibration images.
[0051] After the calibration phase 38 is done, the people detector 1 can be used for people detection, and a detection phase 39 starts.
[0052] In an obtain detection door angle step 48, the people detector 1 obtains a detection door angle from the door angle sensor 18, indicating an angle of opening of the door 15.
[0053] In an obtain detection image step 50, the people detector 1 obtains a detection image from the image sensor 11. The detection image comprises a pixel array. The image sensor 11 is the same as the one used during calibration. Hence, the detection image is of the same format as the calibration image.
[0054] In an obtain detection door mask step 52, the people detector 1 obtains, from the data structure a detection door mask based on the detection door angle. For instance, the door mask can be obtained, from the data structure, that is associated with the angle value that is closest to the detection door angle.
[0055] In one embodiment, when it is determined that the detection door angle is between two angle values in the data structure, the detection door mask is generated using interpolation. More specifically, the detection door mask is then generated by, for each pixel in the detection door mask, interpolating between two door masks in the data structure corresponding to the two angle values that are closest on either side to the detection door angle. The two door masks can contribute with different weights depending on how close the detection door angle is to the respective angle values corresponding to the two door masks.
[0056] In an apply detection door mask step 54, the people detector 1 applies the detection door mask to the detection image, to obtain a masked image. This can e.g. be done by, per pixel, subtracting the depth values of the mask from the pixel values in the detection image.
[0057] In a perform people detection step 56, the people detector 1 performs people detection based on the masked image. It is to be noted that the people detection can occur based on a sequence of multiple masked images, tracking movement of any person passing through the door. A person in the image can e.g. be determined based on depth values of pixels indicating that an object is near the image source 11. Since the door and any static objects are removed using the mask, only remaining (i.e. not the door) dynamic objects contribute to depth values indicating the presence of an object above the floor.
[0058] The detection phase can be repeated an arbitrary number of times for multiple occasions of detection.
[0059] Using the embodiments presented herein, the door contribution to images from the image sensor are masked out. Using the door masks of the data structure from the calibration phase, it is provided a reliable way to remove door contribution from detection images. This greatly increases accuracy in people detection.
[0060] Fig 4 is a schematic diagram illustrating components of the people detector 1 of Fig 1. Processing circuitry 60 is provided using any combination of one or more of a suitable central processing unit (CPU), graphics processing unit (GPU), multiprocessor, neural processing unit (NPU), microcontroller, digital signal processor (DSP), etc., capable of executing software instructions 67 stored in memory circuitry 64, which can thus be a computer program product. The processing circuitry 60 could alternatively be implemented using an application specific integrated circuit (ASIC), field programmable gate array (FPGA), etc. The processing circuitry 60 can be configured to execute the method described with reference to Fig 3 above.
[0061] The memory circuitry 64 can be any combination of random-access memory (RAM) and / or read-only memory (ROM). The memory circuitry 64 also comprises non- transitory persistent storage, which, for example, can be any single one or combination of magnetic memory, optical memory, solid-state memory or even remotely mounted memory.
[0062] A data memory 66 is also provided for reading and / or storing data during execution of software instructions in the processing circuitry 60. The data memory 66 can be any combination of RAM and / or ROM and / or any other non-transitory persistent storage, e.g. for storing the data structure with calibration data.
[0063] The people detector 1 further comprises an 1 / O interface 62 for communicating with external and / or internal entities. Optionally, the I / O interface 62 also includes a user interface.
[0064] The people detector 1 further comprises an I / O interface 62 for communicating with external and / or internal entities. The I / O interface 62 comprises connections to the image sensor 11 and the door angle sensor 18.
[0065] Other components of the people detector 1 are omitted in order not to obscure the concepts presented herein.
[0066] Fig 5 shows one example of a computer program product 90 comprising computer readable means. On this computer readable means, a computer program 91 can be stored in a non-transitory memory. The computer program can cause processing circuitry to execute a method according to embodiments described herein. In this example, the computer program product 90 is in the form of a removable solid-state memory, e.g. a Universal Serial Bus (USB) drive. As explained above, the computer program product could also be embodied in a memory of a device, such as the computer program product 64 of Fig 4. While the computer program 91 is here schematically shown as a section of the removable solid-state memory, the computer program can be stored in any way which is suitable for the computer program product, such as another type of removable solid-state memory, or an optical disc, such as a CD (compact disc), a DVD (digital versatile disc) or a Blu-Ray disc.
[0067] The aspects of the present disclosure have mainly been described above with reference to a few embodiments. However, as is readily appreciated by a person skilled in the art, other embodiments than the ones disclosed above are equally possible within the scope of the invention, as defined by the appended patent claims. Thus, while various aspects and embodiments have been disclosed herein, other aspects and embodiments will be apparent to those skilled in the art. The various aspects and embodiments disclosed herein are for purposes of illustration and are not intended to be limiting, with the true scope being indicated by the following claims.
Claims
CLAIMS i. A method for detecting when people pass through a doorway (5) of a door (15) by which a people detector (1) is installed, the method being performed by the people detector (1), the method comprising: in a calibration phase (38), performing the following: obtaining (40) a calibration door angle from a door angle sensor (18), indicating an angle of opening of the door (15); obtaining (42) a calibration image from an image sensor (11), the calibration image comprising a representation of the door (15) for the calibration door angle; repeating (44) the obtaining (40) a calibration the door angle and obtaining (42) the calibration image for a plurality of values of the calibration door angles; generating (46) a data structure comprising a plurality of angle values, respectively associated with door masks, wherein each door mask is obtained based on one or more of the calibration images; and in a detection phase (39), performing the following: obtaining (48) a detection door angle from the door angle sensor (18), indicating an angle of opening of the door (15); obtaining (50) a detection image from the image sensor (11); obtaining (52), from the data structure, based on the detection door angle, a detection door mask; applying (54) the detection door mask to the detection image, to obtain a masked image; and performing (56) people detection based on the masked image; wherein each one of the calibration image and the detection image comprises a pixel array, wherein each pixel comprises a depth value indicating a distance to a surface from the image sensor (11) for that pixel; and the generating (46) a data structure comprises, for each pixel in the door mask, calculating its depth value based on averaging corresponding pixels in a plurality of calibration images for calibration door angles within an angle range from the angle value.
2. The method according to claim i, wherein the generating (46) a data structure comprises, for each pixel in the door mask, calculating its depth value based on the averaging of corresponding pixels and applying an offset to more aggressively mask out any object.
3. The method according to claim 2, wherein the offset is calculated as a variation indicator of the corresponding pixels multiplied by a constant.
4. The method according to claim 3, wherein the variation indictor is a standard deviation.
5. The method according to any one of the preceding claims, wherein the obtaining (52) the detection door mask comprises determining that the detection door angle is between two angle values in the data structure and generating the detection door mask by, for each pixel in the detection door mask, interpolating between door masks in the data structure corresponding to the two angle values.
6. A people detector (1) for detecting when people pass through a doorway (5) of a door (15) by which the people detector (1) is installed, the people detector (1) comprising: processing circuitry (60); and memory circuitry (64) storing instructions (67) that, when executed by the processing circuitry, cause the people detector (1) to: in a calibration phase (38), executing instructions to: obtain a calibration door angle from a door angle sensor (18), indicating an angle of opening of the door (15); obtain a calibration image from an image sensor (11), the calibration image comprising a representation of the door (15) for the calibration door angle; repeat the instructions to obtain a calibration the door angle and to obtain the calibration image for a plurality of values of the calibration door angles; generate a data structure comprising a plurality of angle values, respectively associated with door masks, wherein each door mask is obtained based on one or more of the calibration images; and in a detection phase (39), executing instructions to: obtain a detection door angle from the door angle sensor (18), indicating an angleof opening of the door (15); obtain a detection image from the image sensor (11); obtain, from the data structure, based on the detection door angle, a detection door mask; apply the detection door mask to the detection image, to obtain a masked image; and perform people detection based on the masked image; wherein each one of the calibration image and the detection image comprises a pixel array, wherein each pixel comprises a depth value indicating a distance to a surface from the image sensor (20) for that pixel; and the instructions to generate a data structure comprise instructions (67) that, when executed by the processing circuitry, cause the people detector (1) to, for each pixel in the door mask, calculate its depth value based on averaging corresponding pixels in a plurality of calibration images for calibration door angles within an angle range from the angle value.
7. The method according to claim 6, wherein the instructions to generate a data structure comprise instructions (67) that, when executed by the processing circuitry, cause the people detector (1) to, for each pixel in the door mask, calculate its depth value based on the averaging of corresponding pixels and applying an offset to more aggressively mask out any object.
8. The method according to claim 7, wherein the offset is calculated as a variation indicator of the corresponding pixels multiplied by a constant.
9. The method according to claim 8, wherein the variation indictor is a standard deviation.
10. The method according to any one of claims 6 to 9, wherein the instructions to obtain the detection door mask comprise instructions (67) that, when executed by the processing circuitry, cause the people detector (1) to determine that the detection door angle is between two angle values in the data structure and generate the detection door mask by, for each pixel in the detection door mask, interpolating between door masks in the data structure corresponding to the two angle values.
11. A computer program (67, 91) for detecting when people pass through a doorway (5) of a door (15) by which a people detector (1) is installed, the computer program comprising computer program code which, when executed on a people detector (1) causes the people detector (1) to: in a calibration phase (38), executing instructions to: obtain a calibration door angle from a door angle sensor (18), indicating an angle of opening of the door (15); obtain a calibration image from an image sensor (11), the calibration image comprising a representation of the door (15) for the calibration door angle; repeat the instructions to obtain a calibration the door angle and to obtain the calibration image for a plurality of values of the calibration door angles; generate a data structure comprising a plurality of angle values, respectively associated with door masks, wherein each door mask is obtained based on one or more of the calibration images; and in a detection phase (39), executing instructions to: obtain a detection door angle from the door angle sensor (18), indicating an angle of opening of the door (15); obtain a detection image from the image sensor (11); obtain, from the data structure, based on the detection door angle, a detection door mask; apply the detection door mask to the detection image, to obtain a masked image; and perform people detection based on the masked image; wherein each one of the calibration image and the detection image comprises a pixel array, wherein each pixel comprises a depth value indicating a distance to a surface from the image sensor (20) for that pixel; and the program code to generate a data structure comprises program code to, for each pixel in the door mask, calculate its depth value based on averaging corresponding pixels in a plurality of calibration images for calibration door angles within an angle range from the angle value.
12. A computer program product (64, 90) comprising a computer program according to claim 11 and a computer readable means comprising non-transitory memory in which the computer program is stored.
Citation Information
Patent Citations
Background information generation device and object detection device
JP2014127131A
People detector
WO2022175395A1