Position determination method, gate control method and device
By collecting and comparing depth image features, the location of the target object is determined, which solves the problem of inaccurate gate control caused by camera viewing angle deviation and achieves more accurate gate control.
Patent Information
- Application Number
- CN202411519593.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2044-10-29
AI Technical Summary
In existing technologies, due to issues with the camera's viewing angle or installation location, the judgment of the passenger or object's position based on the image may deviate from the actual physical location, affecting the gate's distance judgment and causing unnecessary door opening and closing that interferes with passenger passage.
Acquire depth images to be identified, extract target depth features, compare them with preset static depth features, determine the target motion region and pixel region, and determine the position of the target object based on pixel position information.
It improves the accuracy of target location information, ensures the accuracy of gate control, and reduces unnecessary interference from opening and closing doors.
Smart Images

Figure CN119048604B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of computer vision, in particular to a position determination method and a gate control method. The present specification also relates to a position determination apparatus and a gate control apparatus, a computing device, a computer-readable storage medium, and a computer program product. BACKGROUND
[0002] Currently, scene recognition in public places using machine vision has become a popular research field. More and more researchers begin to try to apply deep learning, computer vision and other technologies to intelligent transportation, security monitoring and other fields. In urban rail transit, the passage judgment of the gate is an important application. For example, in a gate passage scene, a passenger needs to be authorized by card before entering the station. After authorization, the gate door opens, and the gate door automatically closes after the passenger passes through.
[0003] In the current practical application, it is generally realized by judging a series of infrared opposite transmission sensors installed on the inside of the gate to assist the diffuse reflection sensor, which can sense the entering and leaving state of the personnel and control the opening and closing action of the gate at the appropriate time. Some new intelligent gates replace the traditional infrared sensor scheme with machine vision technology because the camera has a larger field of view and richer scene information, which can realize more content recognition to judge the passenger passage state. However, due to the camera angle or installation position problem, the position judgment of the passenger or object based on the image picture often deviates from the position of the passenger or object in the actual physical space, thereby affecting the judgment of the gate distance, so that the passenger position information given by the camera image combined with the machine vision algorithm may have a large deviation, which will interfere with the judgment of the passenger passage to a certain extent, causing unnecessary opening and closing of the door to affect the normal passage of the passenger. SUMMARY
[0004] Therefore, the embodiments of the present specification provide a position determination method and a gate control method. One or more embodiments of the present specification also relate to a position determination apparatus and a gate control apparatus, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects in the prior art.
[0005] According to a first aspect of the embodiments of the present specification, a position determination method is provided, comprising:
[0006] acquiring a preset static depth feature;
[0007] extracting a target depth feature of the to-be-recognized depth image;
[0008] In a case where the target depth feature does not match the preset static depth feature, a target motion region of a target object in the to-be-identified depth image is determined, and a target pixel region is extracted in the target motion region;
[0009] According to pixel position information of each target pixel point in the target pixel region, target position information of the target object is determined.
[0010] According to a second aspect of an embodiment of the present specification, a position determination apparatus is provided, including:
[0011] A collection module is configured to collect a to-be-identified depth image and acquire a preset static depth feature;
[0012] A feature extraction module is configured to extract a target depth feature of the to-be-identified depth image;
[0013] A region extraction module is configured to, in a case where the target depth feature does not match the preset static depth feature, determine a target motion region of a target object in the to-be-identified depth image, and extract a target pixel region in the target motion region;
[0014] A determination module is configured to determine target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
[0015] According to a third aspect of an embodiment of the present specification, a gate control method is provided, including:
[0016] A gate control request sent by a target gate is received;
[0017] In response to the gate control request, a to-be-identified depth image corresponding to the target gate is collected, and a preset static depth feature is acquired;
[0018] A target depth feature of the to-be-identified depth image is extracted;
[0019] In a case where the target depth feature does not match the preset static depth feature, a target motion region of a target object in the to-be-identified depth image is determined, and a target pixel region is extracted in the target motion region;
[0020] According to pixel position information of each target pixel point in the target pixel region, target position information of the target object is determined.
[0021] A gate control instruction is generated based on the target position information, and the gate control instruction is sent to the target gate.
[0022] According to a fourth aspect of an embodiment of the present specification, a gate control apparatus is provided, including:
[0023] a receiving module configured to receive a gate control request sent by a target gate;
[0024] a responding module configured to, in response to the gate control request, collect a to-be-identified depth image corresponding to the target gate, and obtain a preset static depth feature;
[0025] a first extracting module configured to extract a target depth feature of the to-be-identified depth image;
[0026] a second extracting module configured to, in a case where the target depth feature is inconsistent with the preset static depth feature, determine a target motion region of a target object in the to-be-identified depth image, and extract a target pixel region in the target motion region;
[0027] an information determining module configured to determine target position information of the target object according to pixel position information of each target pixel point in the target pixel region;
[0028] a sending module configured to generate a gate control instruction based on the target position information, and send the gate control instruction to the target gate.
[0029] According to a fifth aspect of an embodiment of the present specification, a computing device is provided, comprising:
[0030] a memory and a processor;
[0031] The memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, which realize the steps of the above position determining method or gate control method when executed by the processor.
[0032] According to a sixth aspect of an embodiment of the present specification, a computer readable storage medium is provided, which stores computer programs / instructions, which realize the steps of the above position determining method or gate control method when executed by the processor.
[0033] According to a seventh aspect of an embodiment of the present specification, a computer program product is provided, comprising computer programs / instructions, which realize the steps of the above position determining method or gate control method when executed by the processor.
[0034] An embodiment of the present specification realizes that whether the target object exists in the to-be-identified depth image is determined by collecting the to-be-identified depth image, extracting the target depth feature in the to-be-identified depth image, and comparing the target depth feature with the preset static depth feature. In the case that the target depth feature is inconsistent with the preset static depth feature, it is determined that the target object exists in the to-be-identified depth image, and the target motion region of the target object is determined in the to-be-identified depth image. For further determination of the position information of the target object, the target pixel region can be extracted in the target motion region, so as to determine the target position information of the target object according to the pixel position information of each pixel point in the target pixel region, and improve the accuracy of determining the target position information of the target object. The passing state of the target object can also be accurately judged in the subsequent process according to the determined target position information. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 is an application scenario of a position determination method provided by an embodiment of the present specification;
[0036] Figure 2 is a flowchart of a position determination method provided by an embodiment of the present specification;
[0037] Figure 3 is a schematic diagram of extracting a target pixel region provided by an embodiment of the present specification;
[0038] Figure 4 is another schematic diagram of extracting a target pixel region provided by an embodiment of the present specification;
[0039] Figure 5 is still another schematic diagram of extracting a target pixel region provided by an embodiment of the present specification;
[0040] Figure 6 is a schematic diagram of determining a target extraction direction provided by an embodiment of the present specification;
[0041] Figure 7 is a processing process flowchart of a position determination method provided by an embodiment of the present specification;
[0042] Figure 8 is a structural schematic diagram of a position determination apparatus provided by an embodiment of the present specification;
[0043] Figure 9 is a flowchart of a gate control method provided by an embodiment of the present specification;
[0044] Figure 10 is an interaction schematic diagram of a gate control method provided by an embodiment of the present specification;
[0045] Figure 11 is a structural schematic diagram of a gate control device provided by one embodiment of the present specification.
[0046] Figure 12 is a structural block diagram of a computing device provided by one embodiment of the present specification. DETAILED DESCRIPTION
[0047] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. However, the present specification can be practiced without the specific details, other than in the examples, and it can be apparent to those skilled in the art that the present specification can be practiced without the specific details. In other instances, well-known methods, procedures, components, and networks have not been described in detail so as not to unnecessarily obscure aspects of the present specification.
[0048] The terminology used in one or more embodiments of the present specification is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present specification. As used in one or more embodiments of the present specification and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0049] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used only to distinguish one from another. For example, without departing from the scope of one or more embodiments of the present specification, first can be termed second, and similarly, second can be termed first. The word "if" as used herein means "when" or "upon" or "in response to a determination" depending on the context.
[0050] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present specification are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0051] First, the terms involved in one or more embodiments of the present specification are explained.
[0052] Structured light camera: a 3D imaging device based on the principle of active stereo vision, which uses structured light technology to obtain the three-dimensional geometric information of an object.
[0053] RGB image: A method of representing color images, based on the combination of three color channels: red, green, and blue. In an RGB image, the color of each pixel is determined by the intensity values of these three channels, with each channel typically ranging from 0 to 255. In digital image processing and computer graphics, RGB image data is usually organized into a three-dimensional array, where two dimensions represent the width and height of the image, and the third dimension represents the red, green, and blue color channels.
[0054] In current practical applications, this is generally achieved by using a series of infrared through-beam sensors, supplemented by diffuse reflection sensors, installed inside the turnstile. These sensors can detect the entry and exit of people and control the opening and closing of the turnstiles as appropriate. Some newer smart turnstiles use machine vision technology to replace traditional infrared sensors. Cameras have a wider field of view and richer scene information, enabling them to recognize more content and determine passenger passage status. However, due to the camera's angle of view or installation location, the judgment of passenger or object position based on the image often deviates from the actual physical location of the passenger or object. This affects the judgment of the turnstile distance, potentially leading to significant discrepancies between the passenger position information provided by the camera image and the machine vision algorithm. This can interfere with the judgment of passenger passage, causing unnecessary door opening and closing and affecting normal passenger flow.
[0055] This specification provides a method for determining a location and a method for controlling a gate. This specification also relates to a device for determining a location and a device for controlling a gate, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0056] See Figure 1 , Figure 1 A schematic diagram illustrating an application scenario of a location determination method according to an embodiment of this specification is shown. Figure 1 The following example illustrates the subway travel scenario. Figure 1 As shown, passengers need to swipe their cards to pass through the subway turnstiles to ride the subway. During the process of passengers swiping their cards to pass through the turnstiles, the system needs to accurately determine the passenger's position in order to open or close the turnstiles based on the passenger's position, so that the passenger can pass through the turnstiles smoothly.
[0057] In the location determination method provided in this specification, depth images of the turnstile during actual operation, i.e., while passengers are continuously passing through the turnstile, can be acquired, and target depth features can be extracted from the depth images. Since passengers do not pass through the turnstile at all times during actual operation, the acquired depth images will contain both images with and without passengers. To determine whether passengers are passing through the acquired depth images, depth images can be acquired beforehand when no one is passing through the turnstile, and static depth features can be extracted from these images. By comparing the static depth features with the target depth features, if the comparison results are inconsistent, it indicates that passengers are passing through the depth images acquired during turnstile operation. Furthermore, based on the extracted target depth features, the target movement area of the passenger can be determined within the depth images. To further determine the passenger's location information during the passage through the turnstile, the target pixel area can be extracted from the passenger's target movement area. The passenger's target location information can be determined based on the target pixel area, thereby determining the passenger's specific location during the passage through the turnstile, and thus determining whether the turnstile needs to be opened or closed.
[0058] In one embodiment provided in this specification, feature extraction is performed on the acquired depth image to be identified, and the extracted target depth features are compared with pre-generated static depth features to determine whether a passenger exists in the acquired depth image to be identified. If so, the target motion region of the passenger in the depth image to be identified can be further determined. By extracting the target pixel region in the target motion region, the specific location information of the passenger can be determined, improving the accuracy of determining the passenger's location information, and further determining the passenger's passage status in the turnstile based on the passenger's location information.
[0059] It should be noted that the above subway passage scenario is only used as an example to explain the location determination method. The location determination method is not limited to the subway passage scenario, but can also be applied to other location determination scenarios, such as access control scenarios, automatic door passage scenarios, etc.
[0060] See Figure 2 , Figure 2 A flowchart of a location determination method according to an embodiment of this specification is shown, specifically including the following steps:
[0061] Step 202: Acquire the depth image to be identified and obtain the preset static depth features.
[0062] In practical applications, more and more scenarios or technical fields need to locate a person or other moving object to determine the corresponding position information of the person or other moving object, for example, a subway passing scenario, an access control passing scenario, an automatic door passing scenario, and the like. In the subway passing scenario, the position information of a passenger needs to be determined to determine whether the passenger passes through a subway gate and further determine whether the subway gate needs to be opened or closed. In the access control passing scenario, the position information of a user needs to be determined to determine whether the user passes through an access control gate and further determine whether the access control gate needs to be opened or closed. In the automatic door passing scenario, the position information of a user needs to be determined to determine whether the user passes through an automatic door and further determine whether the automatic door needs to be opened for the user to enter or determine whether the user leaves to close the automatic door.
[0063] In one or more embodiments provided in the specification, a depth image to be recognized can be acquired, and a depth feature of the depth image to be recognized is extracted. In a subsequent process, the depth image to be recognized is analyzed and processed according to the depth feature extracted from the depth image to be recognized, and the position information of a user contained in the depth image to be recognized is determined.
[0064] The depth image to be recognized refers to a depth image of a device to be recognized acquired in a running process of the device to be recognized. The device to be recognized refers to a device that a user needs to pass through, for example, a subway gate, an access control gate, an automatic door, and the like. In practical applications, the depth image to be recognized can be acquired by using a structured light camera. The structured light camera is internally provided with an image sensor, an image processor, and the like.
[0065] In current practical applications, due to the angle of view and the installation position of a camera, the position of a user or an object is determined based on an acquired image, and the determination result often deviates from the actual position of the user or the object in the actual physical space, thereby affecting the accuracy of determining the position information of the user or the object.
[0066] Therefore, in the specification, a structured light camera used to acquire a depth image to be recognized is installed above a device to be recognized, so that the structured light camera and the device to be recognized installed on the ground are in a vertically installed state. Thus, when acquiring the depth image to be recognized, the structured light camera can vertically irradiate downward and acquire the depth image to be recognized of the device to be recognized. Therefore, the depth image to be recognized acquired by the structured light camera is a top view of the device to be recognized or a user.
[0067] Further, the structured light camera is arranged in the visual access unit, and an embedded host is also arranged in the visual access unit. The embedded host is built-in with a driver of the structured light camera, an access logic program and a network device. The driver of the structured light camera can be used to view and call a to-be-identified depth image collected by the structured light camera, and input the to-be-identified depth image to the access logic program for subsequent processing of the to-be-identified depth image. The network device is used to communicate with a to-be-identified device, and can also send a processing result processed by the access logic program to the to-be-identified device.
[0068] The preset static depth feature refers to a depth feature extracted from a static depth image. The static depth image refers to a depth image collected when no user or other moving object accesses the to-be-identified device.
[0069] In a specific embodiment provided in the specification, the preset static depth feature is obtained, including:
[0070] At least two static depth images are collected;
[0071] Static depth values of static pixel points in each static depth image are obtained;
[0072] The preset static depth feature of each static pixel point is determined according to the static depth value of each static pixel point.
[0073] After the to-be-identified depth image is collected, to determine whether the to-be-identified depth image collected contains a user or other moving object, a depth feature corresponding to the to-be-identified device in a state of no access by a person, i.e., a preset static depth feature, can be obtained, so as to compare the depth feature extracted from the to-be-identified depth image with the preset static depth image after subsequent extraction of the depth feature from the to-be-identified depth image, thereby determining whether the to-be-identified depth image contains a user or other moving object.
[0074] The static pixel point refers to a pixel point in the static depth image. The static depth value is a depth value of each static pixel point in the static image.
[0075] Specifically, at least two static depth images are collected by the structured light camera, and static depth values of static pixel points in the collected static depth images are obtained. The preset static depth feature of each static pixel point is determined according to the static depth value of each static pixel point. Further, a specific implementation method of determining the preset static depth feature according to the static depth value of each static pixel point is described.
[0076] In a specific embodiment provided in the specification, the preset static depth feature of each static pixel point is determined according to the static depth value of each static pixel point, including:
[0077] determining a target static pixel point in a target static depth image, and a target static depth value of the target static pixel point, wherein the target static depth image is any one of the at least two static depth images, and the target static pixel point is any static pixel point in the target static depth image;
[0078] determining a reference static pixel point in a reference static depth image, and a reference static depth value of the reference static pixel point, wherein the reference static depth image is a static depth image other than the target static depth image among the at least two static depth images, and the pixel position of the reference static pixel point in the reference static depth image is the same as the pixel position of the target static pixel point in the target static depth image;
[0079] calculating a target static mean value feature of the target static pixel point according to the target static depth value and the reference static depth value;
[0080] calculating a target static variance feature of the target static pixel point according to the target static depth value, the reference static depth value and the target static mean value feature;
[0081] determining the target static mean value feature and the target static variance feature as the preset static depth feature of the target static pixel point.
[0082] In the target static depth image, a target static pixel point is determined, and a target static depth value of the target static pixel point is determined, wherein the target static depth image is any one of the at least two static depth images, and the target static pixel point is any static pixel point in the target static depth image.
[0083] Take the collected static depth images as static depth image P1, static depth image P2, static depth image P3, and static depth image P4, for example. Determine the target static depth image P1 as the target static depth image, and the static depth image P2, the static depth image P3, and the static depth image P4 are all reference static depth images of the target static depth image P1. In the target static depth image P1, determine the target static pixel point i1, and according to the pixel position of the target static pixel point i1, determine the reference static pixel points i2, i3, and i4 corresponding to the target static pixel point i1 at the same pixel position in the reference static depth image P2, the reference static depth image P3, and the reference static depth image P4, respectively.
[0084] The target static mean feature refers to the depth mean feature between the target static depth value of the target static pixel point and the reference static depth value of each reference static pixel point. For details, see the following formula 1:
[0085] Formula 1
[0086] Wherein, is the target static mean feature; is the number of static depth images; is the target static depth value, and each reference static depth value, that is, the depth value of the static pixel point at the same pixel position as the target static pixel point in each static depth image.
[0087] After obtaining the target static depth value of the target static pixel point and the reference static depth value of each reference static pixel point, the target static mean feature can be calculated according to the above formula 1.
[0088] The target static variance feature refers to the variance feature between the target static depth value of the target static pixel point and the reference static depth value of each reference static pixel point. For details, see the following formula 2:
[0089] Formula 2
[0090] Wherein, is the target static variance feature.
[0091] After obtaining the target static depth value of the target static pixel point, the reference static depth value of each reference static pixel point, and the target static mean feature, the target static variance feature can be calculated according to the above formula 2.
[0092] After obtaining the target static mean feature and the target static variance feature, the target static mean feature and the target static variance feature are used as the preset static depth feature of the target static pixel point.
[0093] To improve the accuracy of subsequent identification of whether there is a user or other moving object in the to-be-identified depth image, feature comparison can also be performed on the adjacent pixels around the target static pixel point. Therefore, the depth features of the adjacent pixels around the target static pixel point can also be determined and determined as the preset static depth features of the target static pixel point.
[0094] Based on this, in a specific embodiment provided in the present specification, the method further comprises:
[0095] Based on the preset neighborhood range, determining target adjacent pixels of the target static pixel point in the target static depth image;
[0096] Obtaining target adjacent static mean features of each target adjacent pixel, and calculating a target static adjacent feature of the target static pixel point according to each target adjacent static mean feature;
[0097] The target static adjacent feature is determined as the preset static depth feature of the target static pixel point.
[0098] The preset neighborhood range refers to a neighborhood range preset for determining the target adjacent pixel. The target adjacent pixel refers to a surrounding adjacent pixel of the target static pixel point determined based on the preset neighborhood range. For example, if the preset neighborhood range is 5x5, the target adjacent pixel of the target static pixel point is an adjacent pixel within the neighborhood range of 5x5 of the target static pixel point.
[0099] The target adjacent static mean feature refers to a depth mean feature of the target adjacent pixel. The target static adjacent feature refers to a depth mean feature between the target adjacent static mean features of each target adjacent pixel. It can be obtained by solving the mean value between the target adjacent static mean features of each target adjacent pixel. The target static adjacent feature can be represented as After obtaining the target static adjacent feature, the target static adjacent feature is also determined as the preset static depth feature of the target static pixel point.
[0100] It should be noted that in actual application, the preset static depth feature can be directly obtained and used. The preset static depth feature is obtained by offline processing of the visual traffic unit, and does not need to be generated in real time after collecting the to-be-identified depth image.
[0101] In one or more embodiments provided in the present specification, by pre-acquiring multiple static depth images and extracting depth features in each static depth image, the preset static depth features corresponding to each static pixel point can be obtained, and the accumulation of preset static depth feature data is realized. In the subsequent feature comparison process, the reliability of feature comparison is improved.
[0102] Step 204: extracting a target depth feature of the to-be-identified depth image.
[0103] After the to-be-identified depth image of the to-be-identified device and the preset static depth image are collected, the target depth feature can be extracted from the to-be-identified depth image, and the subsequent feature comparison between the target depth feature and the preset static depth feature can be performed.
[0104] The target depth feature is a depth feature extracted from the to-be-identified depth image. The specific implementation process of extracting the target depth feature of the to-be-identified depth image is as follows:
[0105] In a specific embodiment provided in the present specification, the target depth feature of the to-be-identified depth image is extracted, including:
[0106] Obtaining a to-be-identified depth value of each to-be-identified pixel point in the to-be-identified depth image;
[0107] Based on a preset neighborhood range, determining a to-be-identified neighboring pixel point of a to-be-processed pixel point in the to-be-identified depth image, wherein the to-be-processed pixel point is any one of the to-be-identified pixel points in the to-be-identified depth image;
[0108] According to the to-be-identified neighboring depth values of the to-be-identified neighboring pixel points, calculating a to-be-processed neighboring feature of the to-be-processed pixel point;
[0109] Determining the to-be-identified depth values of the to-be-identified pixel points and the to-be-processed neighboring features of the to-be-identified pixel points as the target depth feature of the to-be-identified depth image.
[0110] The to-be-identified pixel point refers to a pixel point in the to-be-identified depth image. The to-be-identified depth value refers to the depth value of the to-be-identified pixel point. The to-be-processed pixel point refers to any one of the to-be-identified pixel points in the to-be-identified depth image. The to-be-identified neighboring pixel point refers to a surrounding neighboring pixel point of the to-be-processed pixel point determined based on the preset neighborhood range. The to-be-identified neighboring depth value refers to the depth value of the to-be-identified neighboring pixel point. The to-be-processed neighboring feature refers to a depth mean value feature between the to-be-identified neighboring depth values of the to-be-identified neighboring pixel points.
[0111] Specifically, after a to-be-identified depth image is collected, a to-be-identified depth value of each to-be-identified pixel point in the to-be-identified depth image is obtained, a to-be-processed pixel point, a to-be-processed neighboring pixel point of the to-be-processed pixel point, and a to-be-processed neighboring depth value of each to-be-identified neighboring pixel point are determined in the to-be-identified depth image according to a preset neighborhood range. A depth mean value feature between the to-be-processed neighboring depth values of each to-be-identified neighboring pixel point, i.e., a to-be-processed neighboring feature, is calculated according to the to-be-processed neighboring depth values of each to-be-identified neighboring pixel point. The to-be-identified depth value of each to-be-identified pixel point and the to-be-processed neighboring feature of each to-be-identified pixel point obtained by calculation are determined as a target depth feature of the to-be-identified depth image.
[0112] Further, after the target depth feature of the to-be-identified depth image is extracted, the target depth feature is compared with a preset static depth feature to determine whether a user or other moving object exists in the to-be-identified depth image.
[0113] In a specific embodiment provided in the present specification, the comparison between the target depth feature and the preset static depth feature is inconsistent, including:
[0114] According to a first preset comparison condition, the target depth feature is compared with the preset static depth feature to obtain a first feature comparison result;
[0115] According to a second preset comparison condition, the target depth feature is compared with the preset static depth feature to obtain a second feature comparison result;
[0116] In a case where the first feature comparison result does not satisfy the first preset comparison condition or the second feature comparison result does not satisfy the second preset comparison condition, it is determined that the comparison between the target depth feature and the preset static depth feature is inconsistent.
[0117] The first preset comparison condition is used to determine whether the to-be-identified depth value of each to-be-identified pixel point in the to-be-identified depth image changes, and the second preset comparison condition is used to determine whether the to-be-processed neighboring feature of the to-be-identified neighboring pixel point corresponding to each to-be-identified pixel point in the to-be-identified depth image changes. The first feature comparison result is obtained by comparing the target depth feature with the preset static depth feature based on the first preset comparison condition, and the second feature comparison result is obtained by comparing the target depth feature with the preset static depth feature based on the second preset comparison condition.
[0118] Specifically, the target depth feature is compared with the preset static depth feature based on the first preset comparison condition and the second preset comparison condition respectively to obtain corresponding first feature comparison result and second feature comparison result. If the first feature comparison result does not satisfy the first preset comparison condition, or the second feature comparison result does not satisfy the second preset comparison condition, it is considered that the target depth feature and the preset static depth feature are inconsistent. In the case that the target depth feature and the preset static depth feature are inconsistent, it can be determined that the user or other moving object exists in the to-be-identified depth image, and the position information of the user or other moving object existing in the to-be-identified depth image needs to be determined. The implementation mode of comparing the target depth feature with the preset static depth feature and obtaining the first feature comparison result and the second feature comparison result is described in detail below.
[0119] In a specific embodiment provided in the present specification, according to the first preset comparison condition, the target depth feature is compared with the preset static depth feature to obtain the first feature comparison result, which includes:
[0120] A target to-be-identified pixel point in the to-be-identified depth image and a target to-be-identified depth value of the target to-be-identified pixel point are determined, wherein the pixel position of the target to-be-identified pixel point in the to-be-identified depth image is the same as the pixel position of the target static pixel point in the target static depth image;
[0121] According to the target static mean feature and the target static variance feature, a target depth feature interval of the target to-be-identified pixel point is determined;
[0122] It is judged whether the target to-be-identified depth value is located in the target depth feature interval, and a target first feature comparison result of the target to-be-identified pixel point is generated;
[0123] A new target to-be-identified pixel point in the to-be-identified depth image and a target to-be-identified depth value of the new target to-be-identified pixel point are determined, and the step of determining the target depth feature interval of the target to-be-identified pixel point according to the target static mean feature and the target static variance feature is continued to be executed until the to-be-identified pixel points in the to-be-identified depth image are traversed, and the first feature comparison result of the to-be-identified depth image is generated.
[0124] The target to-be-identified pixel point is any one of the to-be-identified pixel points in the to-be-identified depth image, and the pixel position of the target to-be-identified pixel point in the to-be-identified depth image is the same as the pixel position of the target static pixel point in the target static depth image. The target to-be-identified depth value is the depth value of the target to-be-identified pixel point. The target depth feature interval is a feature interval used to measure whether the target to-be-identified depth value of the target to-be-identified pixel point changes. In actual application, the target depth feature interval can be obtained offline by the visual traffic unit after the target static mean feature and the target static variance feature are determined, or can be obtained in real time after the to-be-identified depth image is collected. The manner of obtaining the target depth feature interval can be determined according to actual application, which is not limited in the specification.
[0125] Specifically, the target to-be-identified pixel point is determined in the to-be-identified depth image, and the target to-be-identified depth value of the target to-be-identified pixel point is obtained. According to the target static mean feature and the target static variance feature, the target depth feature interval used to measure whether the target to-be-identified depth value of the target to-be-identified pixel point changes is determined. It is judged whether the target to-be-identified depth value of the target to-be-identified pixel point is located in the target depth feature interval, and a target first feature comparison result corresponding to the target to-be-identified pixel point is generated. The target depth feature interval can be specifically represented as If the target first feature comparison result is that the target to-be-identified depth value of the target to-be-identified pixel point is located in the target depth feature interval, it indicates that the target first feature comparison result satisfies the first preset comparison condition. If the target first feature comparison result is that the target to-be-identified depth value of the target to-be-identified pixel point is not located in the target depth feature interval, it indicates that the target first feature comparison result does not satisfy the first preset comparison condition.
[0126] After obtaining the target first feature comparison result of the target to-be-identified pixel point, a new target to-be-identified pixel point and the target to-be-identified depth value of the new target to-be-identified pixel point are determined again in the to-be-identified depth image, and the feature comparison is continued based on the above method to obtain a new feature comparison result, until the traversal of each to-be-identified pixel point in the to-be-identified depth image is completed. Based on the feature comparison results of each to-be-identified pixel point, a first feature comparison result corresponding to the to-be-identified depth image can be obtained.
[0127] Further, in a specific embodiment provided in the specification, according to the second preset comparison condition, the target depth feature and the preset static depth feature are compared to obtain a second feature comparison result, which includes:
[0128] determining a target to-be-identified pixel point in the to-be-identified depth image, and a target to-be-processed neighboring feature of the target to-be-identified pixel point, wherein a pixel position of the target to-be-identified pixel point in the to-be-identified depth image is the same as a pixel position of the target static pixel point in the target static depth image;
[0129] calculating a target neighboring feature difference of the target to-be-identified pixel point according to the target to-be-processed neighboring feature and the target static neighboring feature;
[0130] judging whether the target neighboring feature difference reaches a preset neighboring feature difference, and generating a target second feature comparison result of the target to-be-identified pixel point;
[0131] determining a new target to-be-identified pixel point in the to-be-identified depth image, and a target to-be-processed neighboring feature of the new target to-be-identified pixel point, and continuing to perform the step of calculating a target neighboring feature difference of the target to-be-identified pixel point according to the target to-be-processed neighboring feature and the target static neighboring feature until the to-be-identified pixel points in the to-be-identified depth image are traversed, and a second feature comparison result of the to-be-identified depth image is generated.
[0132] wherein the target to-be-processed neighboring feature is a to-be-processed neighboring feature of the target to-be-identified pixel point, the target neighboring feature difference refers to an actual feature difference between the target to-be-processed neighboring feature and the target static neighboring feature, and the preset neighboring feature difference refers to a feature difference between the target to-be-processed neighboring feature and the target static neighboring feature, which is used to measure whether the target to-be-processed neighboring feature and the target static neighboring feature are consistent.
[0133] Specifically, a target to-be-identified pixel point is determined in a to-be-identified depth image, a target to-be-processed neighboring feature of the target to-be-identified pixel point is obtained, a target neighboring feature difference of the target to-be-identified pixel point is calculated according to the target to-be-processed neighboring feature and a target static neighboring feature, it is judged whether the target neighboring feature difference reaches a preset neighboring feature difference, and a target second feature comparison result corresponding to the target to-be-identified pixel point is generated. If the target second feature comparison result is that the target neighboring feature difference reaches the preset neighboring feature difference, it is indicated that the target second feature comparison result does not satisfy a second preset comparison condition, and if the target second feature comparison result is that the target neighboring feature difference does not reach the preset neighboring feature difference, it is indicated that the target second feature comparison result satisfies the second preset comparison condition.
[0134] For example, if the preset adjacent feature difference is 10%, it is determined whether the target adjacent feature difference reaches 10%, and a target second feature comparison result corresponding to the target pixel point to be identified is generated. If the target second feature comparison result is that the target adjacent feature difference reaches 10%, that is, the target adjacent feature difference has exceeded 10%, it is indicated that the target second feature comparison result does not satisfy the second preset comparison condition. If the target second feature comparison result is that the target adjacent feature difference does not reach 10%, that is, the target adjacent feature difference is within 10%, it is indicated that the target second feature comparison result satisfies the second preset comparison condition.
[0135] After obtaining the target second feature comparison result of the target pixel point to be identified, a new target pixel point to be identified and a target adjacent feature to be processed of the new target pixel point to be identified are determined in the depth image to be identified, and feature comparison is continued based on the above method to obtain a new feature comparison result, until the traversal of each pixel point to be identified in the depth image to be identified is completed. Based on the feature comparison results of each pixel point to be identified, a second feature comparison result corresponding to the depth image to be identified can be obtained.
[0136] In one or more embodiments provided in the specification, after the depth image to be identified is collected, a target depth feature in the depth image to be identified is extracted, and feature comparison is performed between the target depth feature and a preset static depth feature. Thus, it can be determined whether a user or other moving object exists in the depth image to be identified, so as to determine the position information of the user or other moving object in the case that the user or other moving object exists in the depth image to be identified.
[0137] Step 206: In the case that the target depth feature and the preset static depth feature are inconsistent, a target motion region of a target object in the depth image to be identified is determined, and a target pixel region is extracted in the target motion region.
[0138] In the case that the target depth feature and the preset static depth feature are inconsistent, that is, the first feature comparison result of the depth image to be identified does not satisfy the first preset comparison condition, or the second feature comparison result of the depth image to be identified does not satisfy the second preset comparison condition, or both the first feature comparison result and the second feature comparison result do not satisfy the first preset comparison condition and the second preset comparison condition, it is indicated that the target object exists in the depth image to be identified, and the target object in the depth image to be identified needs to be positioned to determine the target position information of the target object.
[0139] The target object refers to a user or other moving object contained in the to-be-identified depth image. The target position information is position information of the target object. The target motion region refers to a pixel region formed by to-be-identified pixel points that do not meet the first preset comparison condition or do not meet the second preset comparison condition in the to-be-identified depth image, that is, an occupied region of the target object in the to-be-identified depth image. The target pixel region is used to measure whether the target object has entered or left the region where the to-be-identified device is located.
[0140] Specifically, in the case where the target depth feature does not match the preset static depth feature, a target motion region of the target object in the to-be-identified depth image is determined, and a target pixel region is further extracted in the target motion region, so that the target position information of the target object is determined according to the extracted target pixel region in a subsequent process.
[0141] Correspondingly, in another specific embodiment provided in the specification, the method further includes:
[0142] In the case where the first feature comparison result meets the first preset comparison condition and the second feature comparison result meets the second preset comparison condition, it is determined that the target depth feature matches the preset static depth feature, and that there is no target object in the to-be-identified depth image.
[0143] If the target depth feature is compared with the preset static depth feature, it is determined that the first feature comparison result of the to-be-identified depth image meets the first preset comparison condition, and the second feature comparison result also meets the second preset comparison condition, it can be determined that the target depth feature of the to-be-identified depth image matches the preset static depth feature, indicating that there is no target object in the to-be-identified depth feature image. At this time, there is no need to perform the subsequent step of determining the target position information of the target object.
[0144] The following specifically explains and describes the implementation of determining the target motion region of the target object and extracting the target pixel region in the target motion region.
[0145] In a specific embodiment provided in the specification, determining the target motion region of the target object in the to-be-identified depth image includes:
[0146] Screening a to-be-identified motion pixel point set in the to-be-identified depth image;
[0147] According to the to-be-identified motion pixel point set, a target motion region of the target object is determined in the to-be-identified depth image.
[0148] The set of to-be-identified motion pixels is a set composed of a plurality of to-be-identified motion pixels. The to-be-identified motion pixel is used to constitute a target motion region, and specifically refers to a pixel point in the to-be-identified depth image whose depth feature does not match the preset static depth feature.
[0149] Specifically, in the case that the target depth feature of the to-be-identified depth image does not match the preset static depth feature, the pixel points in the to-be-identified depth image whose depth feature does not match the preset static depth feature are screened, the screened pixel points are determined as to-be-identified motion pixels, and after the screening is completed, the set of to-be-identified motion pixels composed of a plurality of to-be-identified motion pixels is obtained. The plurality of to-be-identified motion pixels in the set of to-be-identified motion pixels form a pixel region in the to-be-identified depth image. Since the depth feature of the to-be-identified motion pixel does not match the preset static depth feature, that is, the depth feature of the to-be-identified motion pixel changes relative to the preset static depth feature, it can be judged that this change is caused by the target object existing in the to-be-identified depth image, and therefore the pixel region composed of the set of to-be-identified motion pixels is determined as the target motion region of the target object, that is, the region occupied by the target object in the to-be-identified depth image.
[0150] Further, as described above, the comparison of the target depth feature of the to-be-identified depth image and the preset static depth feature can be realized according to the first preset comparison condition and the second preset comparison condition. Based on this, the to-be-identified motion pixels can be screened in the to-be-identified depth image according to the first feature comparison result corresponding to the first preset comparison condition and the second feature comparison result corresponding to the second preset comparison condition. According to the first feature comparison result and the second feature comparison result, the to-be-identified motion pixels that do not satisfy the first preset comparison condition and the to-be-identified motion pixels that do not satisfy the second preset comparison condition can be screened from the to-be-identified pixels in the to-be-identified depth image, and the screened to-be-identified motion pixels are determined as to-be-identified motion pixels.
[0151] By traversing each to-be-identified pixel in the to-be-identified depth image for feature comparison, a plurality of to-be-identified motion pixels whose feature comparison is inconsistent can be screened from the to-be-identified pixels, and then the target motion region of the target object can be determined according to the screened to-be-identified motion pixels, which can improve the accuracy of determining the target motion region.
[0152] In actual applications, there is often a situation that a user has not completely passed through a to-be-identified device (for example, a subway gate) but a door of the to-be-identified device (for example, a door of the subway gate) is about to be closed or has been closed. This situation is usually caused by an error in determining the position of the user. Therefore, in the position determination method provided in the specification, after the target motion region of the target object is determined, the target pixel region can be further extracted in the target motion region on the basis of the target motion region, so as to improve the accuracy of determining the target position information of the target object and facilitate more accurate determination of the passing state of the target object.
[0153] In the subway passing scenario, the access control passing scenario, or the automatic door passing scenario, if the user has not entered the to-be-identified device (that is, the subway gate, the access control gate, the automatic door, etc.), whether the user has entered the to-be-identified device can be measured according to the front side region of the body of the user; if the user is about to leave the to-be-identified device, whether the user has left the to-be-identified device can be measured according to the back side region of the body of the user. Therefore, after the target motion region of the target object is determined, the front side region or the back side region of the body of the target object, that is, the target pixel region, needs to be further determined. In order to improve the processing efficiency of extracting the target pixel region, the target pixel region can be extracted in the target motion region of the target object in combination with the color image corresponding to the target object.
[0154] In a specific embodiment provided in the specification, the target pixel region is extracted in the target motion region, including:
[0155] obtaining a target detection frame of the target object;
[0156] determining a target boundary pixel point in the target motion region according to the target detection frame and a preset region line;
[0157] determining a target pixel coordinate interval according to a target pixel coordinate of the target boundary pixel point and a preset width;
[0158] screening a target pixel point in the target motion region according to the target pixel coordinate interval, and extracting a target pixel region based on each target pixel point.
[0159] The preset region line is a region line pre-set in the to-be-identified device and is used for assisting in judging the passing state of the target object in the to-be-identified device. The preset region line specifically includes an entering region line and a leaving region line. The entering region line can be used to identify whether the target object has entered the region where the to-be-identified device is located, and the leaving region line can be used to identify whether the target object has left the region where the to-be-identified device is located. The target boundary pixel point is a pixel point located on the boundary of the target pixel region. The number of target boundary pixel points can be one or more, and the number of target boundary pixel points is specifically determined according to actual application conditions. The target pixel coordinate is specifically a pixel coordinate of the target boundary pixel point. The preset width is a width pre-set for determining a target pixel coordinate interval. The target pixel coordinate interval is used for screening target pixel points in the target motion region and is specifically a pixel horizontal coordinate interval of the target pixel region. The target pixel point is a pixel point constituting the target pixel region in the target motion region.
[0160] Specifically, a color image corresponding to the target object can be collected, a target detection frame of the target object is obtained by performing target detection on the color image, after the target detection frame of the target object is obtained, a target boundary pixel point is determined in the target motion region according to the target detection frame and the preset region line of the to-be-identified device, and a target pixel coordinate interval is determined according to the target pixel coordinate of the target boundary pixel point and the preset width. Specifically, the target pixel coordinate interval can be determined according to the target pixel horizontal coordinate of the target boundary pixel point and the preset width. For example, the target pixel horizontal coordinate of the target boundary pixel point is u r (the target boundary pixel point is located on the right boundary of the target pixel region, that is, the target pixel horizontal coordinate is the maximum value in the numerical value), and the preset width is w, then the target pixel coordinate interval can be determined as [u r -w, u r ]; for another example, the target pixel horizontal coordinate of the target boundary pixel point is u l (the target boundary pixel point is located on the left boundary of the target pixel region, that is, the target pixel horizontal coordinate is the minimum value in the numerical value), and the preset width is w, then the target pixel coordinate interval can be determined as [u l , u l +w]. In the target motion region, a to-be-identified motion pixel point with a pixel horizontal coordinate located in the target pixel coordinate interval is screened, and the screened to-be-identified motion pixel point is determined as a target pixel point, and a pixel region formed by the target pixel points is determined as a target pixel region.
[0161] Further, in a specific embodiment provided in the specification, the target detection frame of the target object is obtained, including:
[0162] A to-be-identified color image corresponding to the to-be-identified depth image is collected.
[0163] perform target detection on the target object based on the to-be-identified color image, to generate a target detection result of the target object;
[0164] According to the target detection result, a target detection frame of the target object is obtained.
[0165] In this specification, the to-be-identified depth image is collected by a structured light camera. In actual application, the structured light camera can also be used to collect a color image, for example, an RGB image. Based on this, when the to-be-identified depth image is collected based on the structured light camera, the to-be-identified color image can also be collected synchronously.
[0166] The to-be-identified color image refers to a color image of the to-be-identified device collected during the running process of the to-be-identified device, and the to-be-identified depth image and the to-be-identified color image have been aligned in time and space. The target detection result is the detection result generated by performing target detection on the target object in the to-be-identified color image.
[0167] Specifically, based on the structured light camera collecting the to-be-identified depth image, the to-be-identified color image corresponding to the to-be-identified depth image is collected. In the to-be-identified color image, target detection is performed on the target object. In the case that the target object exists in the to-be-identified color image, a target detection result of the target object is generated, and a target detection frame in the target detection result is obtained. After obtaining the target detection frame of the target object, the target detection frame can be used to extract a target pixel region in the target motion region.
[0168] The to-be-identified depth image and the to-be-identified color image of the target object are synchronously collected by using the structured light camera. The target motion region is determined based on the to-be-identified depth image, and the target detection frame is determined based on the to-be-identified color image, so as to extract the target pixel region in the target motion region according to the target detection frame.
[0169] To improve the accuracy of extracting the target pixel region, a target boundary pixel point on a boundary of the target pixel region can be determined according to the target detection frame and a preset region line. On the basis of determining the target boundary pixel point, a target pixel region with the target boundary pixel point as a boundary is further determined. Further, the target boundary pixel point is determined in the following manner:
[0170] In a specific embodiment provided in this specification, the target boundary pixel point in the target motion region is determined according to the target detection frame and the preset region line, including:
[0171] According to the target detection frame and the preset region line, a target extraction direction of the target motion region is determined.
[0172] According to the target extraction direction and the motion pixel coordinates of each motion pixel point in the target motion region, an initial boundary pixel point is determined;
[0173] According to the width information of the target detection frame and a preset search threshold, a pixel point search interval is determined.
[0174] In a case where the initial boundary pixel point is located in the pixel point search interval, the initial boundary pixel point is determined as a target boundary pixel point.
[0175] In a case where the initial boundary pixel point is not located in the pixel point search interval, a target boundary pixel point is selected in the pixel point search interval.
[0176] In the position determination method provided in the present specification, the target pixel region is used to measure whether the target object has entered or left the area where the to-be-identified device is located. Whether the target object has entered the area where the to-be-identified device is located can be measured according to the front side region of the user's body, and whether the target object has left the area where the to-be-identified device is located can be measured according to the back side region of the user's body. That is, before the target pixel region is extracted, the relative position of the target object relative to the to-be-identified device at this time needs to be determined to determine the extraction direction for extracting the target pixel region.
[0177] Wherein, the target extraction direction refers to the extraction direction for extracting the target pixel region, and specifically includes a first extraction direction and a second extraction direction. The first extraction direction is specifically the extraction direction when the target object has not entered the to-be-identified device, and the second extraction direction is specifically the extraction direction when the target object has left the to-be-identified device. The initial boundary pixel point refers to a pixel point located on the boundary of the target motion region. The preset search threshold refers to a search threshold preset for determining the pixel point search interval, which can be understood as the width proportion of the target detection frame, for example, the preset search threshold can be set to 20%, 25%, etc. The pixel point search interval is used to determine the initial boundary pixel point or to search for the initial boundary pixel point.
[0178] Specifically, according to the target detection frame and the preset region line, a target extraction direction of the target motion region is determined as a first extraction direction or a second extraction direction, according to the target extraction direction and the motion pixel coordinates of each motion pixel point in the target motion region, an initial boundary pixel point in the target motion region is determined, and specifically, according to the target extraction direction, the motion pixel point with the maximum or minimum motion pixel horizontal coordinate value is determined as the initial boundary pixel point. According to the width information of the target detection frame and the preset search threshold, a pixel point search interval is determined, for example, the width information of the target detection frame is 200, and the preset search threshold is 20%, so the width of the pixel point search interval can be determined as 200*20%=40, and the length of the pixel point search interval is the same as the length information of the target detection frame, so that the pixel point search interval can be determined according to the length and width of the pixel point search interval. After the pixel point search interval is determined, it is judged whether the initial boundary pixel point is located in the pixel point search interval, if the initial boundary pixel point is located in the pixel point search interval, the initial boundary pixel point can be determined as the target boundary pixel point, if the initial boundary pixel point is not located in the pixel point search interval, the target boundary pixel point needs to be determined in the pixel point search interval according to the motion pixel horizontal coordinates of each motion pixel point, that is, in the pixel point search interval, the motion pixel point with the maximum or minimum motion pixel horizontal coordinate value is determined as the target boundary pixel point.
[0179] Further, the accompanying drawings are combined with the Figure 3 , the accompanying drawings are combined with the Figure 4 , and the accompanying drawings are combined with the Figure 5 respectively to explain and describe the process of extracting the target pixel region. Figure 3 , Figure 4 and Figure 5 are schematic diagrams of extracting the target pixel region in the first extraction direction of the target motion region. Referring to Figure 3 , Figure 3 shows a schematic diagram of extracting the target pixel region according to an embodiment of the present specification. As shown in Figure 3 , the irregular circular region in Figure 3 is the target motion region of the target object, Figure 3 is the target detection frame of the target object. In the case where the target extraction direction is the first extraction direction, among the motion pixel points in the target motion region, the motion pixel point with the maximum motion pixel horizontal coordinate value is determined as the initial boundary pixel point (not shown in Figure 3 ), and according to the width of the target detection frame and the preset search threshold, and the length of the target detection frame, the pixel point search interval is determined, that is, the region formed by the dashed rectangular frame shown in Figure 3 . As shown in Figure 3It can be known that the initial boundary pixel point is located in the pixel point search interval, and thus the initial boundary pixel point can be determined as the target boundary pixel point. A target pixel coordinate interval is determined according to the target pixel abscissa of the target boundary pixel point and the preset width. In each to-be-identified motion pixel point of the target motion region, a to-be-identified motion pixel point with a pixel abscissa located in the target pixel coordinate interval is screened, and the screened to-be-identified motion pixel point is determined as a target pixel point. A pixel region formed by each target pixel point is determined as a target pixel region (i.e., the target pixel region shown in FIG. 8). Figure 4
[0180] Further, referring to Figure 4 , Figure 4 , another schematic diagram for extracting a target pixel region according to an embodiment of the present specification is shown. As shown in Figure 4 ,the irregular circular region in FIG. 9 is a target motion region of a target object, Figure 4 the solid rectangular frame in FIG. 9 is a target detection frame of the target object. In a case where the target extraction direction is the first extraction direction, in each motion pixel point of the target motion region, a motion pixel point with a motion pixel abscissa being a maximum value in a numerical value is determined as an initial boundary pixel point (not shown in FIG. 9), and a pixel point search interval is determined according to a width of the target detection frame and a preset search threshold value, and a length of the target detection frame, that is, a region formed by a dashed rectangular frame shown in Figure 4 . It can be known that the initial boundary pixel point is not located in the pixel point search interval, and thus a target boundary pixel point needs to be determined in the pixel point search interval according to a motion pixel abscissa of each motion pixel point in the target motion region. Specifically, in the pixel point search interval, a motion pixel point with a motion pixel abscissa being a maximum value in a numerical value is determined as the target boundary pixel point (the target boundary pixel point is located at an overlapping position of a right boundary of the target pixel region shown in FIG. 9 and a right boundary of the pixel point search interval). A target pixel coordinate interval is determined according to a target pixel abscissa of the target boundary pixel point and the preset width. In each to-be-identified motion pixel point of the target motion region, a to-be-identified motion pixel point with a pixel abscissa located in the target pixel coordinate interval is screened, and the screened to-be-identified motion pixel point is determined as a target pixel point. A pixel region formed by each target pixel point is determined as a target pixel region (i.e., the target pixel region shown in FIG. 9). Figure 4 Figure 4 Figure 4 Figure 5 Figure 5
[0181] Further, the target motion region can also be completely located in the target detection frame, referring to Figure 5 , Figure 5 , still another schematic diagram for extracting a target pixel region according to an embodiment of the present specification is shown. As shown inFigure 5 As shown, Figure 5 The irregular circular area in the diagram represents the target motion area of the target object. Figure 5 The solid-line rectangle in the image represents the target detection bounding box. With the target extraction direction determined as the first extraction direction, among the moving pixels in the target's motion region, the moving pixel whose x-coordinate is the largest numerically is selected as the initial boundary pixel. Figure 5 (Not shown in the image) Based on the width of the target detection box, the preset search threshold, and the length of the target detection box, the pixel search interval is determined, which is as follows: Figure 6 The area defined by the dashed rectangle shown in the image. Figure 6 It is known that the initial boundary pixels are located within the pixel search interval; therefore, the initial boundary pixels can be determined as the target boundary pixels. Based on the target pixel's horizontal coordinate and the preset width, the target pixel coordinate interval is determined. Among the moving pixels to be identified in the target motion region, those whose horizontal coordinates fall within the target pixel coordinate interval are selected and designated as target pixels. The pixel region formed by these target pixels is then defined as the target pixel region (i.e., as shown in the image). Figure 6 The target pixel region shown in the figure.
[0182] The above describes different cases of extracting target pixel regions in the target motion region when the target extraction direction is the first extraction direction. However, the position determination method provided in this specification also includes different cases of extracting target pixel regions in the target motion region when the target extraction direction is the second extraction direction. The specific implementation is similar to that of the first extraction direction, and will not be repeated here. The following further explains the target extraction direction for determining the target motion region.
[0183] In one specific embodiment provided in this specification, the preset area line includes an entry area line and an exit area line;
[0184] Determining the target extraction direction of the target motion region based on the target detection box and the preset region line includes:
[0185] Obtain the target three-dimensional position information of the target detection box and the preset three-dimensional position information of the preset region line;
[0186] In the target three-dimensional position information, the first three-dimensional abscissa of the first boundary and the second three-dimensional abscissa of the second boundary of the target detection box are determined, wherein the first three-dimensional abscissa is greater than the second three-dimensional abscissa;
[0187] In the preset three-dimensional position information, the entry three-dimensional abscissa of the entry area line and the exit three-dimensional abscissa of the exit area line are determined;
[0188] In a case that the first three-dimensional horizontal coordinate is less than the entering three-dimensional horizontal coordinate, a target extraction direction of the target motion region is determined as a first extraction direction.
[0189] In a case that the second three-dimensional horizontal coordinate is greater than the leaving three-dimensional horizontal coordinate, the target extraction direction of the target motion region is determined as a second extraction direction.
[0190] The first boundary refers to a right boundary of the target detection frame; the second boundary refers to a left boundary of the target detection frame; the left and right boundaries of the target detection frame are determined based on a passing direction of the to-be-identified device, and in actual application, the right boundary of the target detection frame is a boundary corresponding to a front of the target object in passing; the left boundary of the target detection frame is a boundary corresponding to a rear of the target object in passing. The first three-dimensional horizontal coordinate refers to a three-dimensional horizontal coordinate of the first boundary; the second three-dimensional horizontal coordinate refers to a three-dimensional horizontal coordinate of the second boundary. The entering three-dimensional horizontal coordinate refers to a three-dimensional horizontal coordinate of the entering region line; the leaving three-dimensional horizontal coordinate refers to a three-dimensional horizontal coordinate of the leaving region line.
[0191] Specifically, after the target motion region and the target detection frame of the target object are determined, target three-dimensional position information of the target three-dimensional detection frame and preset three-dimensional position information of a preset region line are obtained. In the target three-dimensional position information, a first three-dimensional horizontal coordinate of a first boundary of the target detection frame and a second three-dimensional horizontal coordinate of a second boundary of the target detection frame are determined; in the preset three-dimensional position information, an entering three-dimensional horizontal coordinate of the entering region line and a leaving three-dimensional horizontal coordinate of the leaving region line are determined. If the first three-dimensional horizontal coordinate of the first boundary is less than the entering three-dimensional horizontal coordinate of the entering region line, it indicates that the first boundary of the target detection frame is located on the left side of the entering region line, and the target object has not yet entered the entering region line, and at this time, the target extraction direction of the target motion region can be determined as the first extraction direction; if the second three-dimensional horizontal coordinate of the second boundary is greater than the leaving three-dimensional horizontal coordinate of the leaving region line, it indicates that the second boundary of the target detection frame is located on the right side of the leaving region line, and the target object has already left the leaving region line, and at this time, the target extraction direction of the target motion region can be determined as the second extraction direction.
[0192] Further, referring to Figure 6 , Figure 6 a schematic diagram for determining a target extraction direction is shown according to one embodiment of the present specification. As Figure 7 shown, taking a subway passing scene as an example for illustration, target three-dimensional position information of a target detection frame and preset three-dimensional position information of a preset region line are obtained. When a passenger is about to enter a subway gate (as Figure 7In the target three-dimensional position information of the target detection frame, a first three-dimensional horizontal coordinate of a first boundary of the target detection frame and an entering three-dimensional horizontal coordinate of the entering area line are determined. When the first three-dimensional horizontal coordinate is less than the entering three-dimensional horizontal coordinate, that is, the target detection frame is located on the left side of the entering area line, the target extraction direction of the target motion area is determined as the first extraction direction.
[0193] When the passenger has left the subway gate (as shown in the right half of the schematic diagram), a second three-dimensional horizontal coordinate of a second boundary of the target detection frame in the target three-dimensional position information of the target detection frame and a leaving three-dimensional horizontal coordinate of the leaving area line are determined. When the second three-dimensional horizontal coordinate is greater than the leaving three-dimensional horizontal coordinate, that is, the target detection frame is located on the right side of the leaving area line, the target extraction direction of the target motion area is determined as the second extraction direction. Figure 8
[0194] The position determination method provided in the specification can determine that there is a target object in the to-be-recognized depth image when the target depth feature does not match the preset static depth feature after the target depth feature is extracted from the to-be-recognized depth image. At this time, the target motion area can be further processed in combination with the to-be-recognized color image corresponding to the to-be-recognized depth image to extract a target pixel area in the target motion area, so as to combine the to-be-recognized depth image and the to-be-recognized color image. On the basis of accurately determining the target motion area and the target pixel area of the target object, the calculation demand is not increased, and the sufficient use of the calculation resource is ensured.
[0195] Step 208: determining target position information of the target object according to pixel position information of each target pixel point in the target pixel area.
[0196] After the target pixel area is extracted in the target motion area, the target position information of the target object can be determined according to the pixel position information of each target pixel point in the target pixel area.
[0197] In a specific embodiment provided in the specification, the target position information of the target object is determined according to the pixel position information of each target pixel point in the target pixel area, including:
[0198] In the target depth feature, a target depth value of each target pixel point is determined;
[0199] Based on the target depth value of each target pixel point, the pixel position information of each target pixel point is converted into three-dimensional position information;
[0200] According to the three-dimensional position information of each target pixel point, the target position information of the target object is determined.
[0201] Since the position information of each target pixel in the obtained target pixel region is pixel position information after the target pixel region is determined, the pixel position information of each target pixel in the target pixel region needs to be projected to a three-dimensional space to realize coordinate conversion of the pixel position information, so as to obtain the target position information of the target object in the physical space.
[0202] Specifically, the target depth value of each target pixel can be determined in the extracted target depth feature, and the pixel position information of each target pixel is converted in a three-dimensional space in combination with the target depth value of each target pixel and the pixel position information of each target pixel. According to the converted three-dimensional position information, the target position information of the target object is determined. The conversion process of the pixel position information of the target pixel can be referred to formulas 3 and 4 as follows:
[0203] Formula 3
[0204] Wherein, x is the three-dimensional horizontal coordinate of the converted three-dimensional position information; u is the pixel horizontal coordinate in the pixel position information; z is the target depth value of the target pixel; is the intrinsic parameter of the structured light camera.
[0205] Formula 4
[0206] Wherein, y is the three-dimensional vertical coordinate of the converted three-dimensional position information; is the intrinsic parameter of the structured light camera.
[0207] Specifically, according to the above formulas 3 and 4, the horizontal coordinate and the vertical coordinate corresponding to the converted three-dimensional position information of the pixel position information can be calculated and obtained, and the target depth value of the target pixel is taken as the vertical coordinate in the converted three-dimensional position information. Then, the three-dimensional position information of each converted target pixel, i.e. the target position information of the target object, can be obtained.
[0208] In actual application, after the target position information of the target object is determined, the passing state of the target object in the device to be identified can be determined according to the target position information of the target object, specifically as follows:
[0209] In a specific embodiment provided in the present specification, after the target position information of the target object is determined, the method further comprises:
[0210] Obtaining the preset three-dimensional position information of the preset region line;
[0211] Comparing the target position information and the preset three-dimensional position information to generate a position comparison result;
[0212] According to the position comparison result, the passing state of the target object is determined.
[0213] Specifically, after determining the target position information of the target object, the target position information of the target object is compared with the preset three-dimensional position information of the preset region line, so that a position comparison result between the target object and the preset region line is obtained, and then the passing state of the target object is determined according to the position comparison result between the target object and the preset region line. More specifically, in the process of comparing the target position information of the target object with the preset three-dimensional position information of the preset region line, the position information with the minimum or maximum value in the numerical value in the target position information of the target object can be selected as the reference position information of the target object along the passing direction of the to-be-identified device, and the reference position information is compared with the entering three-dimensional position information of the entering region line or the leaving three-dimensional position information of the leaving region line.
[0214] For example, the reference position information of the target object has a horizontal coordinate smaller than the entering three-dimensional horizontal coordinate of the entering region line, and it can be determined that the target object has not entered the entering region line, that is, the target object is in the passing state of not entering the to-be-identified device; for another example, the reference position information of the target object has a horizontal coordinate greater than the entering three-dimensional horizontal coordinate of the entering region line and smaller than the leaving three-dimensional horizontal coordinate of the leaving region line, and it can be determined that the target object has entered the entering region line and has not left the leaving region line, that is, the target object is in the passing state of passing through the to-be-identified device; for another example, the reference position information of the target object has a horizontal coordinate greater than the leaving three-dimensional horizontal coordinate of the leaving region line, and it can be determined that the target object has left the leaving region line, that is, the target object is in the passing state of leaving the to-be-identified device, that is, the target object has completed the passing of the to-be-identified device.
[0215] In an embodiment provided in the specification, after determining the target position information of the target object, the passing state of the target object relative to the to-be-identified device can be further determined according to the target position information of the target object, so that the target position information and the passing state of the target object are accurately determined in various application scenarios, and the user's passing experience of the to-be-identified device is improved on the basis of improving the accuracy of determining the target position information and the passing state of the target object.
[0216] The position determination method provided in the specification comprises: collecting a to-be-identified depth image and obtaining preset static depth features; extracting target depth features of the to-be-identified depth image; in the case that the target depth features and the preset static depth features are inconsistent, determining a target motion region of a target object in the to-be-identified depth image, and extracting a target pixel region in the target motion region; and determining target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
[0217] The one or more embodiments of the specification achieve that by collecting a to-be-identified depth image and extracting a target depth feature in the to-be-identified depth image, the target depth feature is compared with a preset static depth feature to determine whether a target object exists in the to-be-identified depth image. After determining that the target object exists in the to-be-identified depth image, the to-be-identified depth image is combined with a to-be-identified color image corresponding to the to-be-identified depth image, and a target pixel region is extracted in a target motion region, so as to accurately determine the target motion region and the target pixel region of the target object without increasing the amount of calculation demand and ensuring sufficient use of computing resources. After determining the target position information of the target object, the target position information of the target object is determined, and the passing state of the target object relative to the to-be-identified device is determined. By knowing the passing state of the target object in the to-be-identified device, the control of the to-be-identified device is accurately determined.
[0218] The following description is made with reference to the accompanying drawings Figure 8 The position determination method provided in the specification is further described by taking the application of the position determination method in the subway gate passing scene as an example. Wherein, Figure 9 A process flow diagram of a position determination method provided by an embodiment of the specification is shown, which specifically includes the following steps:
[0219] Step 702: obtaining a preset static mean feature, a preset static variance feature, and a preset static adjacent feature.
[0220] Step 704: determining a target depth feature interval of a target static pixel point according to a target static mean feature of the target static pixel point and a target static variance feature of the target static pixel point.
[0221] Specifically, the preset static mean feature, the preset static variance feature, and the preset static adjacent feature are all determined in advance. After determining the preset static mean feature and the preset static variance feature, the target depth feature interval can be further determined. The preset static mean feature, the preset static variance feature, and the preset static adjacent feature, and the target depth feature interval can all be directly obtained and used in the actual operation of the subway gate, without the need to be calculated and determined every time.
[0222] Step 706: collecting a to-be-identified depth image and a to-be-identified color image for the subway gate.
[0223] Step 708: obtaining a depth value of each to-be-identified pixel point in the to-be-identified depth image.
[0224] Step 710: determining a to-be-identified adjacent pixel point of a to-be-processed pixel point in the to-be-identified depth image based on a preset neighborhood range, wherein the to-be-processed pixel point is any one of the to-be-identified pixel points in the to-be-identified depth image.
[0225] Step 712: calculating the to-be-processed neighboring features of the to-be-processed pixel point according to the depth values of the to-be-identified neighboring pixel points.
[0226] Step 714: determining the depth values of the to-be-identified pixel points and the to-be-processed neighboring features of the to-be-identified pixel points as the target depth features of the to-be-identified depth image.
[0227] Step 716: judging whether the depth value of the to-be-processed pixel point is located in the target depth feature interval, and generating a target first feature comparison result of the to-be-processed pixel point.
[0228] Step 718: determining a new to-be-processed pixel point in the to-be-identified depth image and a depth value of the new to-be-processed pixel point, and continuing to execute Step 716 until the to-be-identified pixel points in the to-be-identified depth image are traversed, and a first feature comparison result of the to-be-identified depth image is generated.
[0229] Step 720: calculating a target neighboring feature difference of the to-be-processed pixel point according to the to-be-processed neighboring features and the target static neighboring features.
[0230] Step 722: judging whether the target neighboring feature difference reaches a preset neighboring feature difference, and generating a target second feature comparison result of the to-be-processed pixel point.
[0231] Step 724: determining a new to-be-processed pixel point in the to-be-identified depth image and to-be-processed neighboring features of the new to-be-processed pixel point, and continuing to execute Step of calculating a target neighboring feature difference of the to-be-processed pixel point according to the to-be-processed neighboring features and the target static neighboring features until the to-be-identified pixel points in the to-be-identified depth image are traversed, and a second feature comparison result of the to-be-identified depth image is generated.
[0232] Step 726: in the case that the first feature comparison result does not satisfy a first preset comparison condition or the second feature comparison result does not satisfy a second preset comparison condition, determining that the target depth features and the preset static depth features are inconsistent in comparison, and continuing to execute Step 730.
[0233] Step 728: in the case that the first feature comparison result satisfies the first preset comparison condition and the second feature comparison result satisfies the second preset comparison condition, determining that the target depth features and the preset static depth features are consistent in comparison, and determining that there is no target object in the to-be-identified depth image.
[0234] Step 730: filtering a set of to-be-recognized motion pixels in the to-be-recognized depth image according to the first feature comparison result and the second feature comparison result, and determining a target motion region of the target object in the to-be-recognized depth image according to the set of to-be-recognized motion pixels.
[0235] Step 732: performing target detection on the target object based on the to-be-recognized color image to generate a target detection result of the target object, and obtaining a target detection frame of the target object according to the target detection result.
[0236] Step 734: determining a target extraction direction of the target motion region according to the target detection frame and a preset region line of the subway gate, and determining an initial boundary pixel point according to the target extraction direction and a motion pixel coordinate of each motion pixel point in the target motion region.
[0237] Step 736: determining a pixel point search interval according to width information of the target detection frame and a preset search threshold.
[0238] Step 738: determining the initial boundary pixel point as a target boundary pixel point in a case where the initial boundary pixel point is located in the pixel point search interval, and selecting a target boundary pixel point in the pixel point search interval in a case where the initial boundary pixel point is not located in the pixel point search interval.
[0239] Step 740: determining a target pixel coordinate interval according to a target pixel coordinate of the target boundary pixel point and a preset width.
[0240] Step 742: filtering a target pixel point in the target motion region according to the target pixel coordinate interval, and extracting a target pixel region based on each target pixel point.
[0241] Step 744: determining a target depth value of each target pixel point in the target depth feature, converting pixel position information of each target pixel point into three-dimensional position information based on the target depth value of each target pixel point, and determining target position information of the target object according to the three-dimensional position information of each target pixel point.
[0242] Step 746: obtaining preset three-dimensional position information of the preset region line, comparing the target position information and the preset three-dimensional position information to generate a position comparison result, and judging a passing state of the target object in the subway gate according to the position comparison result.
[0243] An embodiment of the present specification realizes that a depth image is combined with a color image, target position information of a target object in a subway gate is determined, and a passing state of the target object relative to the subway gate is judged according to the determined target position information, so as to obtain the passing state of the target object in the subway gate, which is beneficial to subsequent control of the subway gate, improves the positioning accuracy of the target object, and also improves the control accuracy of the subway gate.
[0244] Corresponding to the method embodiments, the present specification also provides position determination device embodiments, Figure 9 A structure schematic diagram of a position determination device provided by an embodiment of the present specification is shown. As shown in the figure, Figure 10 The device comprises:
[0245] The acquisition module 802 is configured to acquire a to-be-identified depth image and obtain a preset static depth feature;
[0246] The feature extraction module 804 is configured to extract a target depth feature of the to-be-identified depth image;
[0247] The region extraction module 806 is configured to, in a case where the target depth feature does not match the preset static depth feature, determine a target motion region of a target object in the to-be-identified depth image, and extract a target pixel region in the target motion region;
[0248] The determination module 808 is configured to determine target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
[0249] Optionally, the acquisition module 802 is further configured to:
[0250] acquire at least two static depth images;
[0251] obtain a static depth value of each static pixel point in each static depth image;
[0252] determine a preset static depth feature of each static pixel point according to the static depth value of each static pixel point.
[0253] Optionally, the acquisition module 802 is further configured to:
[0254] determine a target static pixel point and a target static depth value of the target static pixel point in a target static depth image, wherein the target static depth image is any one of the at least two static depth images, and the target static pixel point is any static pixel point in the target static depth image;
[0255] determining a reference static pixel point in a reference static depth image, and a reference static depth value of the reference static pixel point, wherein the reference static depth image is a static depth image other than the target static depth image among the at least two static depth images, and a pixel position of the reference static pixel point in the reference static depth image is the same as a pixel position of the target static pixel point in the target static depth image;
[0256] calculating a target static mean value feature of the target static pixel point according to the target static depth value and the reference static depth value;
[0257] calculating a target static variance feature of the target static pixel point according to the target static depth value, the reference static depth value and the target static mean value feature;
[0258] determining the target static mean value feature and the target static variance feature as the preset static depth feature of the target static pixel point.
[0259] Optionally, the device further comprises a neighboring feature calculation module configured to:
[0260] determining target neighboring pixel points of the target static pixel point in the target static depth image based on a preset neighborhood range;
[0261] obtaining target neighboring static mean value features of each target neighboring pixel point, and calculating a target static neighboring feature of the target static pixel point according to the target neighboring static mean value features;
[0262] determining the target static neighboring feature as the preset static depth feature of the target static pixel point.
[0263] Optionally, the feature extraction module 804 is further configured to:
[0264] obtaining a to-be-recognized depth value of each to-be-recognized pixel point in the to-be-recognized depth image;
[0265] determining to-be-recognized neighboring pixel points of a to-be-processed pixel point in the to-be-recognized depth image based on a preset neighborhood range, wherein the to-be-processed pixel point is any one of the to-be-recognized pixel points in the to-be-recognized depth image;
[0266] calculating a to-be-processed neighboring feature of the to-be-processed pixel point according to to-be-recognized neighboring depth values of each to-be-recognized neighboring pixel point;
[0267] determining the to-be-recognized depth values of each to-be-recognized pixel point and the to-be-processed neighboring features of each to-be-recognized pixel point as target depth features of the to-be-recognized depth image.
[0268] Optionally, the apparatus further comprises a first comparison module configured to:
[0269] compare the target depth feature with the preset static depth feature according to a first preset comparison condition, to obtain a first feature comparison result;
[0270] compare the target depth feature with the preset static depth feature according to a second preset comparison condition, to obtain a second feature comparison result;
[0271] in a case where the first feature comparison result does not satisfy the first preset comparison condition or the second feature comparison result does not satisfy the second preset comparison condition, determine that the target depth feature and the preset static depth feature are inconsistent.
[0272] Optionally, the first comparison module is further configured to:
[0273] determine a target to-be-recognized pixel point in the to-be-recognized depth image and a target to-be-recognized depth value of the target to-be-recognized pixel point, wherein a pixel position of the target to-be-recognized pixel point in the to-be-recognized depth image is the same as a pixel position of the target static pixel point in the target static depth image;
[0274] determine a target depth feature interval of the target to-be-recognized pixel point according to the target static mean feature and the target static variance feature;
[0275] determine whether the target to-be-recognized depth value is located in the target depth feature interval, to generate a target first feature comparison result of the target to-be-recognized pixel point;
[0276] determine a new target to-be-recognized pixel point in the to-be-recognized depth image and a target to-be-recognized depth value of the new target to-be-recognized pixel point, and continue to perform the step of determining a target depth feature interval of the target to-be-recognized pixel point according to the target static mean feature and the target static variance feature, until to-be-recognized pixel points in the to-be-recognized depth image are traversed, to generate a first feature comparison result of the to-be-recognized depth image.
[0277] Optionally, the first comparison module is further configured to:
[0278] determine a target to-be-recognized pixel point in the to-be-recognized depth image and a target to-be-processed adjacent feature of the target to-be-recognized pixel point, wherein a pixel position of the target to-be-recognized pixel point in the to-be-recognized depth image is the same as a pixel position of the target static pixel point in the target static depth image;
[0279] According to the target to-be-processed neighboring feature and the target static neighboring feature, a target neighboring feature difference of the target to-be-identified pixel point is calculated;
[0280] It is judged whether the target neighboring feature difference reaches a preset neighboring feature difference, and a target second feature comparison result of the target to-be-identified pixel point is generated;
[0281] In the to-be-identified depth image, a new target to-be-identified pixel point and a target to-be-processed neighboring feature of the new target to-be-identified pixel point are determined, and the step of calculating the target neighboring feature difference of the target to-be-identified pixel point according to the target to-be-processed neighboring feature and the target static neighboring feature is continuously executed until the to-be-identified pixel points in the to-be-identified depth image are iterated, and a second feature comparison result of the to-be-identified depth image is generated.
[0282] Optionally, the device further comprises a second comparison module configured to:
[0283] In a case where the first feature comparison result satisfies the first preset comparison condition and the second feature comparison result satisfies the second preset comparison condition, it is determined that the target depth feature is compared with the preset static depth feature, and there is no target object in the to-be-identified depth image.
[0284] Optionally, the region extraction module 806 is further configured to:
[0285] A to-be-identified moving pixel point set is screened in the to-be-identified depth image;
[0286] According to the to-be-identified moving pixel point set, a target motion region of the target object is determined in the to-be-identified depth image.
[0287] Optionally, the region extraction module 806 is further configured to:
[0288] A target detection frame of the target object is obtained;
[0289] According to the target detection frame and a preset region line, a target boundary pixel point in the target motion region is determined;
[0290] According to a target pixel coordinate of the target boundary pixel point and a preset width, a target pixel coordinate interval is determined;
[0291] According to the target pixel coordinate interval, a target pixel point in the target motion region is screened, and a target pixel region is extracted based on each target pixel point.
[0292] Optionally, the region extraction module 806 is further configured to:
[0293] acquire a to-be-identified color image corresponding to the to-be-identified depth image;
[0294] perform target detection on the target object based on the to-be-identified color image, to generate a target detection result of the target object;
[0295] obtain a target detection frame of the target object according to the target detection result.
[0296] Optionally, the region extraction module 806 is further configured to:
[0297] determine a target extraction direction of the target motion region according to the target detection frame and the preset region line;
[0298] determine an initial boundary pixel point according to the target extraction direction and a motion pixel coordinate of each motion pixel point in the target motion region;
[0299] determine a pixel point search interval according to width information of the target detection frame and a preset search threshold;
[0300] determine the initial boundary pixel point as a target boundary pixel point in a case where the initial boundary pixel point is located in the pixel point search interval;
[0301] select a target boundary pixel point in the pixel point search interval in a case where the initial boundary pixel point is not located in the pixel point search interval.
[0302] Optionally, the preset region line includes an entering region line and a leaving region line.
[0303] The region extraction module 806 is further configured to:
[0304] obtain target three-dimensional position information of the target detection frame and preset three-dimensional position information of the preset region line;
[0305] determine a first three-dimensional horizontal coordinate of a first boundary of the target detection frame and a second three-dimensional horizontal coordinate of a second boundary in the target three-dimensional position information, where the first three-dimensional horizontal coordinate is greater than the second three-dimensional horizontal coordinate;
[0306] determine an entering three-dimensional horizontal coordinate of the entering region line and a leaving three-dimensional horizontal coordinate of the leaving region line in the preset three-dimensional position information;
[0307] determine the target extraction direction of the target motion region as a first extraction direction in a case where the first three-dimensional horizontal coordinate is less than the entering three-dimensional horizontal coordinate;
[0308] In a case that the second three-dimensional horizontal coordinate is greater than the leaving three-dimensional horizontal coordinate, a target extraction direction of the target motion region is determined as a second extraction direction.
[0309] Optionally, the determining module 808 is further configured to:
[0310] In the target depth feature, a target depth value of each target pixel point is determined.
[0311] Based on the target depth value of each target pixel point, pixel position information of each target pixel point is converted into three-dimensional position information.
[0312] According to the three-dimensional position information of each target pixel point, target position information of the target object is determined.
[0313] Optionally, the apparatus further includes a state determining module configured to:
[0314] Pre-set three-dimensional position information of a pre-set region line is acquired.
[0315] The target position information and the pre-set three-dimensional position information are compared to generate a position comparison result.
[0316] According to the position comparison result, a passing state of the target object is determined.
[0317] The position determining apparatus provided in the specification includes: a collecting module configured to collect a to-be-identified depth image and acquire a pre-set static depth feature; a feature extracting module configured to extract a target depth feature of the to-be-identified depth image; a region extracting module configured to, in a case that the target depth feature and the pre-set static depth feature are inconsistent, determine a target motion region of a target object in the to-be-identified depth image and extract a target pixel region in the target motion region; and a determining module configured to determine target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
[0318] The one or more embodiments of the specification achieve that a target depth image is collected, a target depth feature in the target depth image is extracted, the target depth feature is compared with a preset static depth feature, and it is determined whether a target object exists in the target depth image. After it is determined that the target object exists in the target depth image, the target depth image is combined with a target color image corresponding to the target depth image, a target pixel region is extracted in a target motion region, and on the basis of accurately determining the target motion region and the target pixel region of the target object, the calculation demand is not increased, and the sufficient use of the calculation resource is ensured. After the target position information of the target object is determined, the passing state of the target object relative to the target device is determined according to the target position information of the target object, the control on the target device is accurately determined by knowing the passing state of the target object in the target device.
[0319] The above is a schematic scheme of the position determination apparatus of the embodiment. It should be noted that the technical scheme of the position determination apparatus and the technical scheme of the position determination method described above belong to the same concept, and the details of the technical scheme of the position determination apparatus that are not described in detail can be referred to the description of the technical scheme of the position determination method.
[0320] Referring to Figure 10 , Figure 10 A flowchart of a gate control method according to an embodiment of the specification is shown, which specifically includes the following steps:
[0321] Step 902: receiving a gate control request sent by a target gate.
[0322] The target gate refers to the gate that generates the gate control request. The gate control request refers to a request for requesting to open or close the gate door.
[0323] In actual application, before passing through the target gate, the user needs to swipe the card on the target gate to request to open the gate door of the target gate. At this time, the target gate generates a gate control request for requesting to open the gate door in response to the card swiping signal of the user, and sends the gate control request to the visual access unit. The visual access unit receives the gate control request sent by the target gate. Correspondingly, in actual application, after the target gate door is opened, a feedback signal of the gate door opening success is also generated, and a gate control request for requesting to close the gate door is generated based on the feedback signal, and the gate control request is sent to the visual access unit. The visual access unit receives the gate control request sent by the target gate.
[0324] Step 904: in response to the gate control request, collecting a target depth image corresponding to the target gate, and obtaining a preset static depth feature.
[0325] Step 906: extracting a target depth feature of the to-be-identified depth image.
[0326] Step 908: in a case where the target depth feature does not match the preset static depth feature, determining a target motion region of a target object in the to-be-identified depth image, and extracting a target pixel region in the target motion region.
[0327] Step 910: determining target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
[0328] Step 912: generating a gate control instruction based on the target position information, and sending the gate control instruction to the target gate.
[0329] The gate control instruction refers to a control instruction for opening or closing a target gate door.
[0330] After the visual access unit receives the gate control request sent by the target gate, the visual access unit responds to the gate control request, executes the above position determination method to determine the target position information of the target object, generates a gate control instruction based on the target position information of the target object, and sends the generated gate control instruction to the target gate, so that the target gate executes the operation of opening or closing the gate door in response to the gate control instruction.
[0331] Referring to Figure 11 , Figure 11 An interaction schematic diagram of a gate control method according to one embodiment of the present specification is shown. As shown in FIG. 9, the gate control method includes the following steps. Figure 12As shown, the visual access unit is composed of a structured light camera and an embedded host computer, and a network device is arranged in the embedded host computer. Specifically, after receiving the card swiping signal of the user, the gate machine generates a gate machine control request for requesting to open the gate machine door, and sends the gate machine control request to the visual access unit. The visual access unit receives the gate machine control request sent by the gate machine based on the network device, determines the target position information of the user (i.e. the target object) by executing the above-mentioned position determination method, generates a gate machine control instruction for opening the gate machine door according to the target position information of the user, and sends the gate machine control instruction for opening the gate machine door to the gate machine. After receiving the gate machine control instruction for opening the gate machine door, the gate machine opens the gate machine door for the user to pass through the gate machine door. Further, after opening the gate machine door, the gate machine generates a feedback signal indicating that the gate machine door is successfully opened, generates a gate machine control request for requesting to close the gate machine door based on the feedback signal, and sends the gate machine control request for requesting to close the gate machine door to the visual access unit. After receiving the gate machine control request for requesting to close the gate machine door, the visual access unit again determines the new target position information of the user by executing the above-mentioned position determination method, determines whether the user has left the gate machine according to the new target position information of the user, and after determining that the user has left the gate machine, generates a gate machine control instruction for closing the gate machine door, and sends the gate machine control instruction for closing the gate machine door to the gate machine. After receiving the gate machine control instruction for closing the gate machine door, the gate machine performs the operation of closing the gate machine door.
[0332] The gate machine control method provided by the present specification can determine the target position information of the target object, judge the access state of the target object relative to the target gate machine according to the target position information of the target object, accurately determine and implement the control of the target gate machine by knowing the access state of the target object in the target gate machine, improve the accuracy of controlling the target gate machine, and improve the user experience.
[0333] Corresponding to the above-mentioned method embodiments, the present specification also provides gate machine control device embodiments, Figure 12 A structural schematic diagram of a gate machine control device provided by one embodiment of the present specification is shown. As shown in the figure, Figure 12 The device comprises:
[0334] The receiving module 1102 is configured to receive the gate machine control request sent by the target gate machine;
[0335] The response module 1104 is configured to, in response to the gate machine control request, collect the to-be-identified depth image corresponding to the target gate machine, and obtain the preset static depth feature;
[0336] The first extraction module 1106 is configured to extract the target depth feature of the to-be-identified depth image;
[0337] The second extraction module 1108 is configured to determine a target motion region of the target object in the to-be-identified depth image in a case where the target depth feature does not match the preset static depth feature, and extract a target pixel region in the target motion region;
[0338] The information determination module 1110 is configured to determine target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
[0339] The sending module 1112 is configured to generate a gate control instruction based on the target position information, and send the gate control instruction to the target gate.
[0340] The gate control device provided by the present specification can determine the passing state of the target object relative to the target gate according to the target position information of the target object after determining the target position information of the target object, accurately determine and implement the control of the target gate by knowing the passing state of the target object in the target gate, improve the accuracy of the control of the target gate, and improve the user experience.
[0341] The above is a schematic scheme of the gate control device of the present embodiment. It should be noted that the technical scheme of the gate control device belongs to the same concept as the technical scheme of the gate control method described above, and the details of the technical scheme of the gate control device that are not described in detail can be referred to the description of the technical scheme of the gate control method.
[0342] A structural block diagram of a computing device 1200 according to an embodiment of the present specification is shown. The components of the computing device 1200 include but are not limited to a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 through a bus 1230, and a database 1250 is used to save data.
[0343] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of networks such as the Internet. The access device 1240 can include one or more of any type of network interface (for example, a network interface card (NIC)) such as a wired or wireless network interface, a Global System for Mobile (GSM) network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, a Wi-Fi interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, or the like.
[0344] In one embodiment of the present specification, the above-mentioned components of the computing device 1200 and other components not shown in the present specification can be connected to each other through a bus, for example. It should be understood that the above-mentioned components of the computing device 1200 can be connected to each other through a bus, for example. The computing device structure diagram shown is merely for the purpose of example, and is not a limitation on the scope of the present specification. Those skilled in the art can add or replace other components as needed.
[0345] The computing device 1200 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1200 can also be a mobile or stationary server.
[0346] The processor 1220 executes the computer program / instructions to implement the steps of the position determination method or the gate control method.
[0347] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the position determination method or the gate control method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the position determination method or the gate control method.
[0348] An embodiment of the present specification further provides a computer readable storage medium storing computer programs / instructions, which, when executed by a processor, implement the steps of the position determination method or the gate control method as described above.
[0349] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the position determination method or the gate control method belong to the same concept, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the position determination method or the gate control method.
[0350] An embodiment of the present specification further provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the position determination method or the gate control method as described above.
[0351] The above is a schematic scheme of the computer program product of the embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the position determination method or the gate control method belong to the same concept, and the details of the technical scheme of the computer program product that are not described in detail can be referred to the description of the technical scheme of the position determination method or the gate control method.
[0352] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps in a claim can be performed in an order other than the order in which the acts or steps are recited and still accomplish the desired results. Also, the process depicted in the accompanying figures does not necessarily require the particular order shown, or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0353] The computer program / instructions can include a computer program code, which can be in a form of source code, object code, executable file, or some intermediate form etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc.
[0354] It should be noted that, for the foregoing method embodiments, in order to facilitate description, they are all expressed as a combination of a series of actions, but those skilled in the art should know that the present specification is not limited by the order of the described actions, because according to the present specification, certain steps can be performed in other orders or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present specification.
[0355] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0356] The preferred embodiments of the present specification disclosed above are only used to help explain the present specification. The alternative embodiments do not describe all the details and limit the present invention to the specific embodiments described. Obviously, according to the content of the present specification, many modifications and changes can be made. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present specification, so that those skilled in the art can well understand and use the present specification. The present specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method of position determination, characterized by, The method comprises: collecting a to-be-identified depth image and obtaining a preset static depth feature, wherein the to-be-identified depth image is an overhead view of a to-be-identified device or user obtained based on a structured light camera; extracting a target depth feature of the to-be-identified depth image, wherein the target depth feature is determined according to a to-be-identified depth value of each to-be-identified pixel point in the to-be-identified depth image and a to-be-processed adjacent feature of each to-be-identified pixel point, and the to-be-processed adjacent feature refers to a depth mean value feature between to-be-identified adjacent depth values of each to-be-identified adjacent pixel point; in a case where the target depth feature is inconsistent with the preset static depth feature, determining a target motion region of a target object in the to-be-identified depth image, and extracting a target pixel region in the target motion region; determining target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
2. The method of claim 1, wherein, Obtaining a preset static depth feature comprises: collecting at least two static depth images; obtaining a static depth value of each static pixel point in each static depth image; determining a preset static depth feature of each static pixel point according to the static depth value of each static pixel point.
3. The method of claim 2, wherein, Determining a preset static depth feature of each static pixel point according to a static depth value of each static pixel point comprises: determining a target static pixel point and a target static depth value of the target static pixel point in a target static depth image, wherein the target static depth image is any one of the at least two static depth images, and the target static pixel point is any static pixel point in the target static depth image; determining a reference static pixel point and a reference static depth value of the reference static pixel point in a reference static depth image, wherein the reference static depth image is a static depth image other than the target static depth image among the at least two static depth images, and a pixel position of the reference static pixel point in the reference static depth image is the same as a pixel position of the target static pixel point in the target static depth image; calculating a target static mean value feature of the target static pixel point according to the target static depth value and the reference static depth value; calculating a target static variance feature of the target static pixel point according to the target static depth value, the reference static depth value and the target static mean value feature; determining the target static mean value feature and the target static variance feature as the preset static depth feature of the target static pixel point.
4. The method of claim 3, wherein, The method further comprises: determining a target adjacent pixel point of the target static pixel point in the target static depth image based on a preset neighborhood range; obtaining a target adjacent static mean value feature of each target adjacent pixel point and calculating a target static adjacent feature of the target static pixel point according to each target adjacent static mean value feature; determining the target static adjacent feature as the preset static depth feature of the target static pixel point.
5. The method of claim 1, wherein, Extracting a target depth feature of the to-be-identified depth image comprises: obtaining a to-be-identified depth value of each to-be-identified pixel point in the to-be-identified depth image; Determine, based on a preset neighborhood range, a to-be-identified neighboring pixel point of a to-be-processed pixel point in the to-be-identified depth image, wherein the to-be-processed pixel point is any one of each to-be-identified pixel point in the to-be-identified depth image; Calculate a to-be-processed neighboring feature of the to-be-processed pixel point according to a to-be-identified neighboring depth value of each to-be-identified neighboring pixel point; Determine the to-be-identified depth value of each to-be-identified pixel point and the to-be-processed neighboring feature of each to-be-identified pixel point as a target depth feature of the to-be-identified depth image.
6. The method of claim 1, wherein, The target depth feature is inconsistent with the preset static depth feature in comparison, including: According to a first preset comparison condition, comparing the target depth feature with the preset static depth feature to obtain a first feature comparison result; According to a second preset comparison condition, comparing the target depth feature with the preset static depth feature to obtain a second feature comparison result; In the case that the first feature comparison result does not satisfy the first preset comparison condition, or the second feature comparison result does not satisfy the second preset comparison condition, it is determined that the target depth feature is inconsistent with the preset static depth feature in comparison.
7. The method of claim 3, wherein, According to a first preset comparison condition, comparing the target depth feature with the preset static depth feature to obtain a first feature comparison result, including: Determine a target to-be-identified pixel point in the to-be-identified depth image, and a target to-be-identified depth value of the target to-be-identified pixel point, wherein the pixel position of the target to-be-identified pixel point in the to-be-identified depth image is the same as the pixel position of the target static pixel point in the target static depth image; According to the target static mean feature and the target static variance feature, determine a target depth feature interval of the target to-be-identified pixel point; Determine whether the target to-be-identified depth value is located in the target depth feature interval, and generate a target first feature comparison result of the target to-be-identified pixel point; Determine a new target to-be-identified pixel point in the to-be-identified depth image, and a target to-be-identified depth value of the new target to-be-identified pixel point, and continue to execute the step of determining a target depth feature interval of the target to-be-identified pixel point according to the target static mean feature and the target static variance feature, until the to-be-identified pixel points in the to-be-identified depth image are traversed, and a first feature comparison result of the to-be-identified depth image is generated.
8. The method of claim 4, wherein, According to a second preset comparison condition, comparing the target depth feature with the preset static depth feature to obtain a second feature comparison result, including: Determine a target to-be-identified pixel point in the to-be-identified depth image, and a target to-be-processed neighboring feature of the target to-be-identified pixel point, wherein the pixel position of the target to-be-identified pixel point in the to-be-identified depth image is the same as the pixel position of the target static pixel point in the target static depth image; According to the target to-be-processed neighboring feature and the target static neighboring feature, calculate a target neighboring feature difference of the target to-be-identified pixel point; Determine whether the target neighboring feature difference reaches a preset neighboring feature difference, and generate a target second feature comparison result of the target to-be-identified pixel point; A new target pixel point to be identified in the to-be-identified depth image is determined, and a target to-be-processed neighboring feature of the new target pixel point to be identified is determined, and the step of calculating a target neighboring feature difference of the target pixel point to be identified according to the target to-be-processed neighboring feature and the target static neighboring feature is continuously performed until the to-be-identified pixel points in the to-be-identified depth image are iterated, and a second feature comparison result of the to-be-identified depth image is generated.
9. The method of claim 6, wherein, The method further comprises: In a case where the first feature comparison result satisfies the first preset comparison condition and the second feature comparison result satisfies the second preset comparison condition, it is determined that the target depth feature is consistent with the preset static depth feature, and there is no target object in the to-be-identified depth image.
10. The method of claim 1, wherein, Determining a target motion region of the target object in the to-be-identified depth image comprises: Screening a to-be-identified motion pixel point set in the to-be-identified depth image; According to the to-be-identified motion pixel point set, a target motion region of the target object is determined in the to-be-identified depth image.
11. The method of claim 1, wherein, Extracting a target pixel region in the target motion region comprises: Obtaining a target detection frame of the target object; According to the target detection frame and a preset region line, a target boundary pixel point in the target motion region is determined; According to a target pixel coordinate of the target boundary pixel point and a preset width, a target pixel coordinate interval is determined; According to the target pixel coordinate interval, a target pixel point in the target motion region is screened, and a target pixel region is extracted based on each target pixel point.
12. The method of claim 11, wherein, Obtaining a target detection frame of the target object comprises: Collecting a to-be-identified color image corresponding to the to-be-identified depth image; Based on the to-be-identified color image, target detection is performed on the target object, and a target detection result of the target object is generated; According to the target detection result, a target detection frame of the target object is obtained.
13. The method of claim 11, wherein, According to the target detection frame and a preset region line, a target boundary pixel point in the target motion region is determined, comprising: According to the target detection frame and the preset region line, a target extraction direction of the target motion region is determined; According to the target extraction direction and a motion pixel coordinate of each motion pixel point in the target motion region, an initial boundary pixel point is determined; According to width information of the target detection frame and a preset search threshold, a pixel point search interval is determined; In a case where the initial boundary pixel point is located in the pixel point search interval, the initial boundary pixel point is determined as a target boundary pixel point; In a case where the initial boundary pixel point is not located in the pixel point search interval, a target boundary pixel point is selected in the pixel point search interval.
14. The method of claim 13, wherein, The preset region line comprises an entering region line and a leaving region line; According to the target detection frame and the preset region line, a target extraction direction of the target motion region is determined, comprising: Target three-dimensional position information of the target detection frame and preset three-dimensional position information of the preset region line are obtained; In the target three-dimensional position information, a first three-dimensional horizontal coordinate of a first boundary of the target detection frame and a second three-dimensional horizontal coordinate of a second boundary are determined, wherein the first three-dimensional horizontal coordinate is greater than the second three-dimensional horizontal coordinate; In the preset three-dimensional position information, an entering three-dimensional horizontal coordinate of the entering area line and an exiting three-dimensional horizontal coordinate of the exiting area line are determined; In a case where the first three-dimensional horizontal coordinate is less than the entering three-dimensional horizontal coordinate, a target extraction direction of the target motion area is determined as a first extraction direction; In a case where the second three-dimensional horizontal coordinate is greater than the exiting three-dimensional horizontal coordinate, the target extraction direction of the target motion area is determined as a second extraction direction.
15. The method of claim 1, wherein, According to the pixel position information of each target pixel point in the target pixel area, target position information of the target object is determined, including: In the target depth feature, a target depth value of each target pixel point is determined; Based on the target depth value of each target pixel point, the pixel position information of each target pixel point is converted into three-dimensional position information; According to the three-dimensional position information of each target pixel point, the target position information of the target object is determined.
16. The method of claim 15, wherein, After the target position information of the target object is determined, the method further includes: acquiring preset three-dimensional position information of a preset area line; comparing the target position information and the preset three-dimensional position information to generate a position comparison result; judging a passing state of the target object according to the position comparison result.
17. A gate control method characterized by comprising: including: receiving a gate control request sent by a target gate; in response to the gate control request, collecting a to-be-identified depth image corresponding to the target gate, and acquiring a preset static depth feature, wherein the to-be-identified depth image is an overhead view of a to-be-identified device or user obtained based on a structured light camera; extracting a target depth feature of the to-be-identified depth image, wherein a target depth feature value is determined according to a to-be-identified depth value of each to-be-identified pixel point in the to-be-identified depth image and a to-be-processed adjacent feature of each to-be-identified pixel point, and the to-be-processed adjacent feature refers to a depth mean feature between to-be-identified adjacent depth values of each to-be-identified adjacent pixel point; in a case where the target depth feature and the preset static depth feature are inconsistent, determining a target motion area of a target object in the to-be-identified depth image, and extracting a target pixel area in the target motion area; determining target position information of the target object according to pixel position information of each target pixel point in the target pixel area; generating a gate control instruction based on the target position information, and sending the gate control instruction to the target gate.
18. A position determining apparatus, characterized by including: a collection module configured to collect a to-be-identified depth image and acquire a preset static depth feature, wherein the to-be-identified depth image is an overhead view of a to-be-identified device or user obtained based on a structured light camera; The feature extraction module is configured to extract target depth features of the to-be-recognized depth image, wherein a target depth feature value is determined according to a to-be-recognized depth value of each to-be-recognized pixel point in the to-be-recognized depth image and a to-be-processed adjacent feature of each to-be-recognized pixel point, and the to-be-processed adjacent feature refers to a depth mean value feature between to-be-recognized adjacent depth values of each to-be-recognized adjacent pixel point. The region extraction module is configured to, in a case where the target depth features are inconsistent with the preset static depth features, determine a target motion region of a target object in the to-be-recognized depth image, and extract a target pixel region in the target motion region. The determination module is configured to determine target position information of the target object according to pixel position information of each target pixel point in the target pixel region.
19. A gate control device, characterized by Comprising: The receiving module is configured to receive a gate control request sent by a target gate; The response module is configured to, in response to the gate control request, collect a to-be-recognized depth image corresponding to the target gate, and obtain a preset static depth feature, wherein the to-be-recognized depth image is an overhead view of a to-be-recognized device or user obtained based on a structured light camera; The first extraction module is configured to extract target depth features of the to-be-recognized depth image, wherein a target depth feature value is determined according to a to-be-recognized depth value of each to-be-recognized pixel point in the to-be-recognized depth image and a to-be-processed adjacent feature of each to-be-recognized pixel point, and the to-be-processed adjacent feature refers to a depth mean value feature between to-be-recognized adjacent depth values of each to-be-recognized adjacent pixel point. The second extraction module is configured to, in a case where the target depth features are inconsistent with the preset static depth features, determine a target motion region of a target object in the to-be-recognized depth image, and extract a target pixel region in the target motion region. The information determination module is configured to determine target position information of the target object according to pixel position information of each target pixel point in the target pixel region. The sending module is configured to generate a gate control instruction based on the target position information, and send the gate control instruction to the target gate.
20. A computing device comprising: a memory and a processor; the memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, characterized in that the computer programs / instructions, when executed by the processor, implement the steps of the method of any one of claims 1-17.
21. A computer readable storage medium storing computer programs / instructions, characterized in that, The computer programs / instructions, when executed by the processor, implement the steps of the method of any one of claims 1-17.
22. A computer program product comprising computer programs / instructions, characterized in that, The computer programs / instructions, when executed by the processor, implement the steps of the method of any one of claims 1-17.
Citation Information
Patent Citations
Object state detection system for gate passage and gate comprising same
CN213091903U