Target object filtering method and device, equipment and storage medium

By utilizing the principles of pinhole imaging and similar triangles at the pixel level, combined with the pose information of the acquisition device, the pixel height of the object to be filtered is predicted, thus solving the accuracy problem caused by pixel height conversion error, achieving more accurate object filtering, and ensuring the reliability of security detection.

CN121725262APending Publication Date: 2026-03-24HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies are prone to introducing errors when converting pixel height to actual height, which leads to a decrease in the accuracy of object filtering in the area to be filtered, and makes it impossible to accurately identify and filter non-interesting targets.

Method used

By acquiring the region image of the area to be filtered, the actual pixel height and pixel coordinate information of the target object are determined. Using the principles of pinhole imaging and similar triangles, combined with the pose information of the acquisition device, the pixel height of the object to be filtered at the actual position corresponding to the pixel coordinate information is predicted, avoiding the accumulation of errors in converting pixel height to actual height, and filtering is performed directly at the pixel level.

Benefits of technology

It improves the accuracy of object filtering in the area to be filtered, avoids error accumulation, and can more accurately identify and filter non-interesting targets, thus ensuring the reliability of security detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121725262A_ABST
    Figure CN121725262A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a target object filtering method and device, equipment and a storage medium, relates to the technical field of image processing, and is used for providing a mode for filtering non-interested target objects in a to-be-filtered area. The method comprises the following steps: acquiring a region image of a to-be-filtered region through acquisition equipment; determining actual pixel height and pixel coordinate information of the target object in the regional image; determining a pixel height of an object to be filtered at an actual position corresponding to the pixel coordinate information as a pixel height to be filtered; and filtering the target object in the regional image under the condition that the to-be-filtered pixel height is matched with the actual pixel height.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, device, and storage medium for filtering target objects. Background Technology

[0002] Image acquisition equipment can detect objects in the filtering area in real time. When objects or behaviors that do not conform to predetermined rules appear in the image, the system can immediately send a prompt to alert managers or security personnel, enabling them to quickly become aware and react. This helps to promptly detect and address potential security threats, such as intruders and acts of sabotage, thereby protecting the safety of people and property.

[0003] However, in some application scenarios, there may be some objects in the area to be filtered that do not need to be alerted. In such cases, it is necessary to set targets that are not of interest in the area to be filtered. Then, during the real-time detection of objects in the area to be filtered, when a target of no interest is identified, it will be filtered without prompting for such objects. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for filtering target objects, which provides a way to filter target objects that are not of interest.

[0005] The first aspect of this application provides a method for filtering target objects, comprising: acquiring a region image of a region to be filtered using an acquisition device; determining the actual pixel height and pixel coordinate information of a target object within the region image; determining the pixel height of the target object at the actual position corresponding to the pixel coordinate information, and using it as the pixel height to be filtered; and filtering the target object in the region image when the pixel height to be filtered matches the actual pixel height.

[0006] As can be seen, the target object filtering method provided in this application does not convert the actual pixel height of the target object into its actual height when determining whether a target object in the image to be filtered needs to be filtered. Instead, it determines the theoretical pixel height to be filtered when the target object is at its actual position, and then determines whether to filter the target object in the region image based on the relationship between the pixel height to be filtered and the actual pixel height of the target object. Since each step of the calculation when converting pixel height to actual height may introduce errors, these errors may accumulate during the conversion process, leading to a decrease in the accuracy of the final result. The solution in this application, however, performs prediction and judgment at the pixel level, which avoids this problem of error accumulation and thus enables more accurate filtering of objects in the region to be filtered.

[0007] In conjunction with the first implementation of the first aspect, determining the pixel height of the object to be filtered at its actual position corresponding to the pixel coordinate information includes: determining the pixel distance between the target object and the center point of the image based on the pixel coordinate information and the coordinate information of the center point of the regional image; determining the field of view corresponding to the pixel distance; acquiring the tilt angle of the acquisition device relative to the horizontal direction, the installation height of the acquisition device, and the actual height of the object to be filtered; and determining the pixel height of the object to be filtered at its actual position corresponding to the pixel coordinate information based on the pinhole imaging principle and the similar triangle principle, using the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered.

[0008] Combining the second implementation method of the first aspect, the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information is determined by the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered. This includes: obtaining the calibrated pixel height of the center point of the image of the region where the object to be filtered is located; and determining the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information based on the pixel height to be filtered, the calibrated pixel height, the actual height and tilt angle of the object to be filtered, the field of view, and the installation height of the acquisition device.

[0009] Combining the third implementation method of the first aspect, the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information is determined by the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered. This includes: acquiring the focal length of the image of the acquisition area of ​​the acquisition device; and determining the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information based on the pixel height to be filtered, the actual height and tilt angle of the object to be filtered, the field of view, the installation height of the acquisition device, and the focal length.

[0010] In conjunction with the fourth implementation method of the first aspect, the calibrated pixel height includes an upper limit value and a lower limit value. Based on the pixel height to be filtered, the calibrated pixel height, the actual height and tilt angle of the object to be filtered, the field of view, and the installation height of the acquisition device, the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information is determined. This includes: determining the upper limit value of the pixel height corresponding to the upper limit value of the calibrated pixel height, and the lower limit value of the pixel height corresponding to the lower limit value of the calibrated pixel height, based on the upper limit value of the calibrated pixel height, the lower limit value of the calibrated pixel height, the actual height of the object to be filtered, the tilt angle, the field of view, and the installation height of the acquisition device. The pixel height to be filtered includes an upper limit value and a lower limit value. When the pixel height to be filtered and the actual pixel height match, the target object in the region image is filtered. Specifically, when the actual pixel height belongs to the pixel height range to be filtered, the target object in the region image is filtered, where the upper limit value of the pixel height range to be filtered is the upper limit value of the pixel height, and the lower limit value is the lower limit value of the pixel height.

[0011] In conjunction with the fifth implementation method of the first aspect, the upper limit and lower limit of the calibrated pixel height are determined as follows: Multiple pixel heights corresponding to the object to be filtered are obtained; these multiple pixel heights are either the pixel heights of the object to be filtered at multiple positions within the central region, or the pixel heights of the object to be filtered obtained from multiple measurements at the center point of the image; based on the multiple pixel heights and the actual height of the object to be filtered, the ratio of the multiple pixel heights to the actual height is determined; based on the ratio of the multiple pixel heights to the actual height, a confidence interval is determined for the ratio of the pixel height to the actual height at the center point of the image; based on the confidence interval for the ratio of the pixel height to the actual height and the actual height of the object to be filtered, the upper limit and lower limit of the calibrated pixel height are determined.

[0012] Combining the sixth implementation method of the first aspect, based on the ratio of multiple pixel heights to the actual height, the confidence interval of the ratio of pixel height to actual height at the center point of the image is determined, including: determining the mean and variance of the ratio of multiple pixel heights to the actual height; based on the mean and variance of the ratio of multiple pixel heights to the actual height, the 3σ principle of normal distribution is used to determine the confidence interval of the ratio of pixel height to actual height at the center point of the image.

[0013] In conjunction with the seventh implementation method of the first aspect, the field of view corresponding to the pixel distance is determined, including: obtaining the focal length of the acquisition device and the relationship function between the pixel height and distortion of the acquisition device; determining the distortion-corrected target pixel distance based on the relationship function between the pixel distance and the pixel height and distortion; and determining the field of view corresponding to the target pixel distance.

[0014] A second aspect of this application provides a target object filtering device, comprising: an acquisition module for acquiring a region image of a region to be filtered through an acquisition device; a determination module for determining the actual pixel height and pixel coordinate information of a target object within the region image; a prediction module for predicting the pixel height to be filtered when the target object is at the actual position corresponding to the pixel coordinate information, based on the actual height of the target object and the pose information of the acquisition device; and a filtering module for filtering the target object in the region image when the pixel height to be filtered matches the actual pixel height.

[0015] A third aspect of this application provides an electronic device, including: one or more processors; one or more memories; wherein the one or more memories are used to store computer program code, the computer program code including computer instructions, which, when executed by the one or more processors, cause the electronic device to perform the target object filtering method provided in the first aspect and its possible implementations.

[0016] A fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions that, when executed on a computer, cause the computer to perform the target object filtering method provided in the first aspect and its possible implementations.

[0017] A fifth aspect of this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the target object filtering method provided in the first aspect and its possible implementations.

[0018] The beneficial effects described in aspects two through five can be referred to the analysis of the beneficial effects in aspect one, and will not be repeated here. Attached Figure Description

[0019] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of the present invention and do not constitute a limitation on the technical solutions of the present invention.

[0020] Figure 1 This is a schematic diagram of the structure of a filtering system for a target object provided in an embodiment of this application;

[0021] Figure 2 A method flow for filtering target objects provided in this application embodiment Figure 1 ;

[0022] Figure 3 A schematic diagram of a region image provided in an embodiment of this application;

[0023] Figure 4 This is a schematic diagram of the installation location of a data acquisition device provided in an embodiment of this application;

[0024] Figure 5 A method flow for filtering target objects provided in this application embodiment Figure 2 ;

[0025] Figure 6 A schematic diagram of an imaging principle provided in an embodiment of this application;

[0026] Figure 7 A method flow for filtering target objects provided in this application embodiment Figure 3 ;

[0027] Figure 8 A schematic diagram illustrating the 3σ principle of a normal distribution provided in an embodiment of this application;

[0028] Figure 9 A schematic diagram of the structure of a filtering device for a target object provided in an embodiment of this application;

[0029] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0031] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0032] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "connected" and "linked" should be interpreted broadly, for example, as a fixed connection, a detachable connection, or an integral connection. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, when describing pipelines, the terms "connected" and "linked" as used in this application have the meaning of establishing electrical connection. The specific meaning needs to be understood in conjunction with the context.

[0033] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0034] Image acquisition equipment can detect objects in the filtering area in real time. When objects or behaviors that do not conform to predetermined rules appear in the image, the system can immediately send a prompt to alert managers or security personnel, enabling them to quickly become aware and react. This helps to promptly detect and address potential security threats, such as intruders and acts of sabotage, thereby protecting the safety of people and property.

[0035] Understandably, in commercial, transportation, and residential areas, the alert function of image acquisition equipment can effectively prevent crime and accidents. For example, inside a residence, the presence of people in the image can determine the presence of intruders, and an alert can be issued if an intruder is detected, thus ensuring the safety of people and property.

[0036] However, in some application scenarios, there may be objects in the area to be filtered that do not require notification. For example, in the above example, the homeowner entering the house does not require notification. Therefore, when applying this method, it is necessary to define the targets of no interest in the area to be filtered, and then identify the image of the area to be filtered. When a non-interesting target is identified, it is filtered out without providing any notification.

[0037] The solution of related technologies is usually to detect the region image of the area to be filtered, determine the pixel height of the object in the region to be filtered by the obtained rectangular detection box, and determine the actual height of the object according to the conversion relationship between pixel height and actual height. Then, the actual height of the target is compared with a pre-set size filtering range. If the actual height is within the size filtering range, filtering is performed, that is, no prompt message is issued; if it is not within the size filtering range, filtering is not performed, and a prompt message is issued to remind the user.

[0038] However, the conversion relationship between pixel height and actual height is usually determined based on simplified geometric models or empirical formulas, which have limited applicability in complex scenes. For example, changes in lighting conditions can affect image brightness and contrast, thus impacting the accuracy of object detection and height calculation. Furthermore, parameters such as the focal length and pixel size of the acquisition device used in the calculation process may deviate from the actual values, leading to inaccurate conversion results and consequently, an inability to accurately filter objects in the target area.

[0039] Based on this, embodiments of this application provide a method for filtering target objects. This method involves acquiring a region image of the area to be filtered using a data acquisition device; then determining the actual pixel height and pixel coordinates of the target object within the region image. The pixel height of the object to be filtered at its actual position corresponding to the pixel coordinates is determined as the pixel height to be filtered; that is, the theoretical pixel height of the object to be filtered at the actual position corresponding to the target object is determined. If the pixel height to be filtered matches the actual pixel height, it indicates that the actual height of the object to be filtered is similar to the actual height of the target object, and the target object is the object that needs to be filtered. Therefore, the target object in the region image is filtered, avoiding alerts for the target object in the region to be filtered.

[0040] As can be seen, the target object filtering method provided in this application does not convert the actual pixel height of the target object into its actual height when determining whether a target object in the image to be filtered needs to be filtered. Instead, it determines the theoretical pixel height to be filtered when the target object is at its actual position, and then determines whether to filter the target object in the region image based on the relationship between the pixel height to be filtered and the actual pixel height. Since each step of the calculation when converting pixel height to actual height may introduce errors, these errors may accumulate during the conversion process, leading to a decrease in the accuracy of the final result. The solution in this application, however, performs prediction and judgment at the pixel level, which avoids this problem of error accumulation and thus enables more accurate filtering of objects in the region to be filtered.

[0041] It should be understood that the target object filtering method provided in this application embodiment can be applied to a target object filtering system. Please refer to... Figure 1 The target object filtering system 10 may include a data acquisition device 100 and a detection device 200. The data acquisition device 100 and the detection device 200 may be connected via a wired network or a wireless network.

[0042] The acquisition device 100 can be a digital camera, industrial camera, webcam or camcorder or other device with image acquisition function. It is set in the area to be filtered and is used to acquire regional images or videos (multi-frame regional images) of the area to be filtered.

[0043] In some embodiments, after acquiring a region image of the area to be filtered, the acquisition device is further configured to identify whether a target object exists in the region image through a detection algorithm, and if a detection box corresponding to a target object is identified, the actual pixel height and pixel coordinate information of the target object are determined based on the detection box and sent to the detection device 200, so that the detection device 200 can predict the pixel height to be filtered when the target object is at the actual position corresponding to the pixel coordinate information based on the actual pixel height and pixel coordinate information of the target object, and filter the target object in the region image when the pixel height to be filtered matches the actual pixel height.

[0044] In other embodiments, after acquiring the area image, the acquisition device can directly send it to the detection device 200. The detection device uses a detection algorithm to identify the target object in the area image and then determines whether the target object needs to be filtered.

[0045] The detection device 200 in this application embodiment can be an electronic device such as a personal computer (PC), laptop computer, mobile device, tablet computer, or laptop computer. This application embodiment does not limit the specific form of the electronic device. Alternatively, the detection device 200 can be a single server or a server cluster composed of multiple servers. In some implementations, the server cluster can be a distributed cluster server. This application embodiment does not impose any restrictions in this regard.

[0046] It should be understood that the target object filtering method provided in the embodiments of this application can be applied to... Figure 1 The detection device 200 is part of the filtering system for the target object shown. Please refer to [link / reference]. Figure 2 The target object filtering method provided in this application includes the following steps:

[0047] S201. Obtain the area image of the region to be filtered through the acquisition device.

[0048] It is understood that the acquisition device is positioned in the area to be filtered and is used to acquire regional images or videos of the area to be filtered. In some embodiments, the acquisition device can also be used to perform region detection on the acquired regional images, detect whether a target object has entered the area to be filtered, and if a target object has entered the area to be filtered, send the corresponding regional image to the detection device for detection.

[0049] In other embodiments, the acquisition device is only used to send the acquired area image to the detection device, which detects the area image to determine whether a target object exists in the area image.

[0050] It should be understood that staff can pre-set the categories of target objects to be detected, and the acquisition or detection equipment can determine that the target object has been detected after detecting an object of the corresponding category.

[0051] For example, only people in the area to be filtered can be detected. After the acquisition device or detection device detects that a person has entered the area to be detected, the detection device determines whether the person is an object that needs to be filtered. If so, no reminder is given; otherwise, a reminder message is issued.

[0052] S202. Determine the actual pixel height and pixel coordinate information of the target object within the region image.

[0053] When a target object is detected within a region image, the pixel coordinates of the target object can be determined based on its position in the region image, and the actual pixel height of the target object can be determined based on the number of pixels it occupies in the region image.

[0054] As a feasible implementation method, the acquisition or detection device can detect a target object in the region image. When a target object is detected in the region image of the area to be filtered, the acquisition or detection device will detect the detection box corresponding to the target object, and then record a set of pixel statistics (x, y, w, h) for the target object. Here, x and y represent the bottom pixel coordinates of the detection box of the target object (pixel coordinate information), w represents the imaging width of the target object in the region image, and h represents the actual pixel height of the target object in the region image.

[0055] For example, please refer to Figure 3 The detection bounding box obtained by the acquisition or detection device for the target object in the regional image is as follows: Figure 3 As shown in the dashed box, the detection device can then determine the actual pixel height and pixel coordinate information of the target object based on the position of the detection box.

[0056] S203. Determine the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information, and use it as the pixel height to be filtered.

[0057] It should be understood that the object to be filtered is a pre-set object with a height that is the height required for filtering. For example, suppose we need to filter people who are 1.7m tall. Then the height of the object to be filtered is 1.7m. We need to determine the pixel height of the 1.7m tall object when it is at the actual position corresponding to the pixel coordinate information, and use it as the pixel height to be filtered.

[0058] It should be noted that the objects to be filtered and the target objects can be the same or different. For example, they can both be people, or they can be people or preset markers. This application embodiment does not limit this.

[0059] As a feasible approach, the actual height range to be filtered can be pre-defined, meaning target objects within this range are filtered. The upper limit of the actual height range for the target object to be filtered, when it is located at its corresponding pixel coordinate position, can be determined; similarly, the lower limit of the actual height range for the target object to be filtered, when it is located at its corresponding pixel coordinate position, can be determined. This yields the target object's pixel height range, and by comparing the target object's actual pixel height with the target object's pixel height range, it can be determined whether filtering is necessary.

[0060] In some embodiments, the object to be filtered can be pre-positioned at multiple actual locations within the region to be filtered, and the pixel height corresponding to each actual location can be determined, thereby obtaining the correspondence between the actual location and pixel height of the object to be filtered within the region to be filtered. In this way, when determining the pixel height to be filtered, the pixel height of the object to be filtered when it is at the actual location corresponding to the pixel coordinate information can be determined based on the pre-determined correspondence between the actual location and pixel height.

[0061] In other embodiments, the distance between the acquisition device and the object is one of the key factors determining the pixel height of the object in the image. According to the pinhole imaging principle, when the distance between the acquisition device (such as a camera) and the object changes, the size of the object's projection in the image also changes accordingly. The closer the distance, the more pixels the object occupies in the image, and the higher the pixel height; the farther the distance, the lower the pixel height. Furthermore, the distance between the acquisition device and the object is also related to the pose information of the acquisition device, which directly affects the distance between the acquisition device and the object.

[0062] Therefore, as a feasible approach, the height of the pixel to be filtered can be predicted based on parameters such as the actual height of the object to be filtered and the pose information of the acquisition device when the object is at the actual position corresponding to the pixel coordinate information.

[0063] It should be understood that the pose information of the acquisition device may include the tilt angle of the acquisition device relative to the horizontal plane and the installation height of the acquisition device.

[0064] For example, please refer to Figure 4 The tilt angle of the data acquisition device relative to the horizontal plane is called... Figure 4 As shown by the median angle θ, the installation height of the data acquisition device is... Figure 4 As shown in H.

[0065] As a feasible approach, tilt sensors can be installed in the data acquisition equipment to measure the tilt angle of the equipment relative to the horizontal direction. Tilt sensors are sensors capable of measuring the tilt angle of an object and are widely used in various applications requiring angle measurement, such as industrial automation, robotics, drones, automobiles, building monitoring, and agricultural equipment. Tilt sensors typically operate based on different principles, including gravity sensing (such as accelerometers), liquid conductivity, capacitive sensing, and magnetoresistive effects. These sensors can sense the tilt angle of the equipment relative to the Earth's gravitational field or a preset reference surface and convert this physical quantity into an electrical signal or other form of output signal for subsequent processing and display.

[0066] Furthermore, based on the actual height of the object to be filtered and the pose information of the acquisition device, the height of the pixel to be filtered when the object is at the actual position corresponding to the pixel coordinate information is predicted. It is understandable that, with the pose information of the acquisition device fixed, there is a certain correspondence between the three-dimensional world coordinates in the actual area to be filtered and the two-dimensional image coordinates in the area image. Therefore, based on this correspondence and the pinhole imaging principle, the height of the pixel to be filtered when the object is at the actual position corresponding to the pixel coordinate information can be predicted.

[0067] S204. If the height of the pixel to be filtered matches the actual pixel height, filter the target object in the region image.

[0068] If the height of the pixel to be filtered matches the actual pixel height, it indicates that the actual height of the object to be filtered is similar to the actual height of the target object. The target object is the object that needs to be filtered, and thus the target object in the region image is filtered to avoid alerting the target object in the region to be filtered.

[0069] As can be seen, the target object filtering method provided in this application does not convert the actual pixel height of the target object into its actual height when determining whether a target object in the image to be filtered needs to be filtered. Instead, it determines the theoretical pixel height to be filtered when the target object is at its actual position, and then determines whether to filter the target object in the region image based on the relationship between the pixel height to be filtered and the actual pixel height. Since each step of the calculation when converting pixel height to actual height may introduce errors, these errors may accumulate during the conversion process, leading to a decrease in the accuracy of the final result. The solution in this application, however, performs prediction and judgment at the pixel level, which avoids this problem of error accumulation and thus enables more accurate filtering of objects in the region to be filtered.

[0070] In some embodiments, image processing and analysis often require selecting a reference point to simplify calculations or improve algorithm consistency. The center point of a region image is a natural choice due to its unique location within the image (typically the geometric center). The coordinates of the center point are typically half the width and half the height of the image. As a stable reference point, the center point can be used to measure or compare the positions of other objects in the image.

[0071] As one feasible approach, please refer to Figure 5 S203 can be specifically implemented as follows:

[0072] S501. Based on pixel coordinate information and the coordinate information of the center point of the image in the region, determine the pixel distance between the target object and the center point of the image.

[0073] It is understandable that the center point of the image is a fixed reference point in the regional image, usually the geometric center of the image. With the pose information of the acquisition device fixed, the actual coordinates of the center point are also fixed. Therefore, the center point can be used as a reference point to measure or compare the position of the target object in the image, thus obtaining the pixel distance between the target object and the center point.

[0074] S502, Determine the field of view corresponding to the pixel distance.

[0075] In some embodiments, distortion, as an inherent characteristic of the optical system, causes the shape of the image to be distorted relative to the object itself. When capturing images using an acquisition device, distortion causes straight lines in the image to bend at the edges, thus affecting the accurate measurement of the field of view. Therefore, when determining the field of view corresponding to pixel distances, the impact of the acquisition device's distortion on pixel distances needs to be considered.

[0076] As a feasible approach, one can obtain the focal length of the acquisition device and the relationship function between the pixel height and distortion of the acquisition device; then, based on the relationship function between pixel distance and pixel height and distortion, determine the target pixel distance after distortion correction; and finally, determine the field of view corresponding to the target pixel distance.

[0077] It is understandable that distortion leads to uneven pixel distribution in an image, causing errors in the field of view or object size calculated directly based on pixel distances in an uncorrected image. Therefore, the solution in this application corrects distortion through a distortion function relating pixel height and distortion, which can restore the original positional relationship of pixels in the image, thereby more accurately determining the pixel distance of the target object and improving the accuracy of subsequent measurements or calculations.

[0078] In other embodiments, pixel size refers to the physical size of each pixel on the camera sensor, which determines the smallest detail the camera can resolve. With a fixed sensor size, focal length is related to the field of view of a single pixel. A longer focal length results in a smaller field of view for a single pixel; a shorter focal length results in a larger field of view for a single pixel. Therefore, the field of view of a single pixel can be determined based on the lens focal length and pixel size of the acquisition device, thereby determining the field of view corresponding to the pixel distance.

[0079] Specifically, as a feasible implementation method, the field of view of a single pixel can be determined by the following formula (1), and then the field of view corresponding to the pixel distance can be determined by the following formula (2):

[0080]

[0081] α=iFOV*Δy Formula (2)

[0082] Where iFOV is the field of view angle of a single pixel, arctan() is the arctangent function used to convert the ratio of pixel size to focal length into an angle, de lat is the pixel size, f is the focal length, α is the field of view angle corresponding to the pixel distance, and Δy is the pixel distance.

[0083] S503. Obtain the tilt angle of the acquisition device relative to the horizontal direction, the installation height of the acquisition device, and the actual height of the object to be filtered.

[0084] The tilt angle of the acquisition device relative to the horizontal direction can be measured by the tilt sensor built into the acquisition device, calculated by the installation height of the acquisition device and the horizontal distance between the center point of the image and the acquisition device, or measured by various angle measuring devices. This application embodiment does not limit this.

[0085] The installation height of the data collection device and the actual height of the object to be filtered can be measured using a length / height measuring tool; this application does not impose any limitations on this.

[0086] It should be understood that the embodiments of this application do not limit the execution order of S501 and S503. In practical applications, it can be determined whether S501 or S503 is executed first or simultaneously, depending on the requirements.

[0087] S504. Based on the principles of pinhole imaging and similar triangles, the pixel height of the object to be filtered is determined by the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered, when the object is at the actual position corresponding to the pixel coordinate information.

[0088] It should be understood that the pinhole imaging principle is a fundamental principle in optics. It describes the phenomenon that when light passes through a small hole, an inverted real image is formed on the other side. When light originates from a point light source and passes through a small hole, the light rays travel in a straight line. After passing through the pinhole, these rays form an inverted real image on the other side of the pinhole. The size of the image depends on the distance from the light source to the pinhole (object distance) and the distance from the pinhole to the imaging plane (image distance). Increasing the object distance or decreasing the image distance will make the image smaller; conversely, decreasing the object distance will make the image larger.

[0089] The principle of similar triangles is a fundamental principle in geometry. It states that if the three sides of two triangles are proportional, then the two triangles are similar. Furthermore, corresponding angles of similar triangles are equal.

[0090] In pinhole imaging, the light source, the pinhole, and the imaging plane can form a triangle, and the image of the light source, the pinhole, and a point on the imaging plane can also form a triangle; these two triangles are similar. Furthermore, by utilizing the properties of similar triangles, the relationship between the image size and the object distance and image distance can be derived.

[0091] For example, please refer to Figure 6 , Figure 6 Point O represents the location of the acquisition device, point O1 represents the center point of the image, A represents the actual position of the target object, Ht represents the actual height of the object to be filtered, H represents the installation height of the acquisition device, α represents the field of view angle corresponding to the distance between the actual position of the target object and the center point of the image, and θ represents the tilt angle of the acquisition device, that is, the tilt angle of OO1 relative to the horizontal plane. According to the principle of pinhole imaging, the phase height of Ht at point C after pinhole imaging is h1.

[0092] To facilitate the application of the principle of similar triangles, perpendicular lines are drawn from the actual position A of the target object and the vertex B of the actual height of the object to be filtered at point A to OO1 (shown by the dashed lines in the diagram), intersecting OO1 at points C and D respectively. According to the principle of similar triangles, the triangle formed by line segment h1 + △h and point O is similar to △OBC, and the triangle formed by line segment h1 and point O is similar to △OAD. Therefore, the length of line segment h1 can be calculated using the shapes of similar triangles, thus obtaining the height of the pixel to be filtered when the object to be filtered is at its actual position corresponding to the pixel coordinate information.

[0093] In some embodiments, please continue reading Figure 6 As can be seen from the camera imaging principle, Figure 6In this context, f represents the focal length of the acquisition device. Based on this, the focal length of the acquisition device when acquiring the image of the area can be obtained. Then, the height of the pixel to be filtered can be determined according to the height of the pixel to be filtered, the actual height of the object to be filtered, the field of view, the installation height and tilt angle of the acquisition device, and the focal length.

[0094] Specifically, as a feasible way to achieve this, such as Figure 6 As shown, draw a perpendicular line from point A to BC, dividing BC into Ht1 and Ht2, such that AD equals Ht2. Then, based on the similarity relationship between the triangle formed by line segment h1 + △h and point O and △OBC, establish the following formula (3):

[0095]

[0096] It should be understood that the length of OA can be obtained from the trigonometric function corresponding to ∠OAO1 and the installation height H of the data acquisition device, where ∠OAO1 = θ - α. Substituting OA into the above formula, we can obtain the following formula (4):

[0097]

[0098] Furthermore, based on the triangle principle, we can obtain the following formula (5):

[0099]

[0100] Combining formulas (4) and (5) above, we can see that h1 can be calculated using the following formula (6):

[0101]

[0102] It should be understood that in formula (6), h1 is the height of the pixel to be filtered, Ht is the actual height of the object to be filtered, θ is the tilt angle, α is the field of view, H is the installation height of the acquisition device, and f is the focal length.

[0103] As can be seen from the above embodiments, the solution provided by this application can calculate the height of the pixel to be filtered when the object to be filtered is at the actual position of the target object by combining parameters such as the focal length of the acquisition device, the actual height of the object to be filtered, the tilt angle of the camera, the field of view, and the installation height of the acquisition device, without the need for additional calibration operations. The calculation process is relatively simple and the height of the pixel to be filtered can be calculated relatively easily, which is convenient for subsequent use.

[0104] In other embodiments, the focal length of the acquisition device may have some errors due to lens limitations or environmental factors. For example, the lens and camera body may expand and contract with temperature changes, causing the lens focal length to change. Alternatively, the acquisition device may be subjected to vibration and impact during use, causing slight displacement of internal lens components, thus affecting the accuracy of the focal length. Therefore, to avoid inaccurate calculations of the pixel height to be filtered due to errors in the focal length of the acquisition device, the technical solution provided in this application can also calculate the pixel height to be filtered through calibration.

[0105] As a feasible approach, before calculating the height of the pixel to be filtered, the object to be filtered can be calibrated at the center point of the image to obtain the calibrated pixel height of the object to be filtered at the center point of the image. Then, based on the height of the pixel to be filtered, the calibrated pixel height, the actual height and tilt angle of the object to be filtered, the field of view, and the installation height of the acquisition device, the height of the pixel to be filtered can be determined.

[0106] Specifically, based on the principle of pinhole imaging, the relationship of similar triangles, and the characteristic that the image becomes smaller the farther away the target is, the imaging triangle relationship corresponding to the object to be filtered at the center point of the image can be obtained as shown in the following formula (7):

[0107]

[0108] Where h is the calibrated pixel height of the object to be filtered at the center point of the image, Ht is the actual height of the object to be filtered, θ is the tilt angle, f is the focal length of the acquisition device, and OO1 is the distance between the acquisition device and the center point of the image.

[0109] From the above formula (7), we can see that: Combining formulas (4) and (5) in the above embodiments, the relationship between h and h1 can be obtained as shown in formula (8) below:

[0110]

[0111] Simplifying the above formula (8), we can obtain the following formula (9):

[0112]

[0113] Where h1 is the height of the pixel to be filtered, h is the calibrated pixel height, Ht is the actual height of the object to be filtered, θ is the tilt angle, α is the field of view angle, and H is the installation height of the acquisition device.

[0114] It should be understood that in practical applications, the above formulas (8), (9), or modified formulas (8) and (9) can be used to calculate the height h1 of the pixel to be filtered. This application embodiment does not limit this.

[0115] As can be seen, the solution provided in this embodiment obtains the calibrated pixel height of the object to be filtered at the center point of the image, and then calculates the height of the pixel to be filtered using parameters such as the calibrated pixel height and the actual height of the object to be filtered, instead of calculating the height of the pixel to be filtered using the focal length of the acquisition device. This avoids the problem of inaccurate calculation of the height of the pixel to be filtered due to focal length errors, and thus ensures the accuracy of the height of the pixel to be filtered.

[0116] In some embodiments, while the acquisition device should theoretically maintain consistent pixel height when acquiring images of objects at the same height, in reality, various factors can cause inconsistencies in pixel height. For example, variations in lighting conditions can affect pixel height consistency. Uneven lighting on the object's surface can lead to different exposures when the camera captures images, thus affecting pixel brightness and height. Camera performance and stability are also crucial factors affecting pixel height consistency. Camera malfunctions or performance fluctuations during acquisition can result in unstable image quality, further impacting pixel height consistency.

[0117] Therefore, in order to avoid the inability to accurately identify the object to be filtered due to pixel height errors, multiple calibrations can be performed when calibrating the object to be filtered to improve accuracy, thereby obtaining the pixel height range of the object to be filtered at the center point of the image. That is, the calibrated pixel height in this application can include an upper limit value and a lower limit value of the calibrated pixel height.

[0118] Based on this, as a feasible implementation method, when determining the height of the pixel to be filtered using the calibrated pixel height and other parameters, the upper limit of the calibrated pixel height and other parameters can be used to determine the upper limit of the pixel to be filtered, and the lower limit of the calibrated pixel height and other parameters can be used to determine the lower limit of the pixel to be filtered, thereby obtaining the pixel height range as [upper limit of pixel height to be filtered, lower limit of pixel height to be filtered].

[0119] In this way, S204 can be specifically implemented as follows: when the actual pixel height is within the range of pixel height to be filtered, the target object in the region image is filtered.

[0120] Understandably, the calibrated upper and lower limits of pixel height represent the error fluctuation range of pixel height when the object to be filtered is at the center of the image. Therefore, the upper and lower limits of the pixel height to be filtered, determined based on these calibrated upper and lower limits, characterize the error fluctuation range when the object to be filtered is at the actual position of the target object. In other words, the resulting pixel height range to be filtered is influenced by various factors. Therefore, filtering based on the actual pixel height of the target object and the pixel height range to be filtered, along with a reasonable fault-tolerance mechanism to ensure correct identification of the object, enhances the robustness and stability of the system.

[0121] In some embodiments, the error fluctuation range of the pixel height of the object to be filtered can be determined by obtaining the pixel height of the object at the center point of the image multiple times, that is, determining the upper limit value and the lower limit value of the pixel height.

[0122] As one feasible approach, please refer to Figure 7 The upper and lower limits of pixel height can be determined as follows:

[0123] S701, Obtain the height of multiple pixels corresponding to the object to be filtered.

[0124] Among them, multiple pixel heights are the pixel heights of the object to be filtered when it is in multiple positions in the central region, or multiple pixel heights are the pixel heights of the object to be filtered when it is in the center point of the image, measured multiple times.

[0125] In other words, as one feasible approach, the object to be filtered can be placed at multiple positions within the central region corresponding to the center point of the image, and the pixel height corresponding to each position can be obtained. Another feasible approach is to place the object to be filtered at the center point of the image and perform multiple measurements to obtain multiple pixel heights.

[0126] S702. Based on multiple pixel heights and the actual height of the object to be filtered, determine the ratio of multiple pixel heights to the actual height.

[0127] Understandably, in practical applications, the actual height of the object being filtered may vary due to changes in several factors. For example, when the object being filtered is a human body, the weight of the body exerts a compressive effect due to gravity. When a person is standing, blood flow to the lower limbs is compressed, causing a slight decrease in overall height. During sleep, the body shape changes, resulting in a slight increase in height. Furthermore, throughout the day, the shape of the bones may change due to human activity and posture. For instance, prolonged standing or sitting can cause bone curvature, resulting in a slight decrease in height.

[0128] Therefore, in order to avoid the influence of slight changes in the actual height of the object to be filtered on the pixel height, the actual height of the object to be filtered can be obtained once for each calibration. Then, based on the pixel height obtained from the calibration and the obtained actual height, multiple ratios of pixel height to actual height can be determined.

[0129] In other words, the pixel height is normalized by using the actual height of the object to be filtered. Normalization can eliminate the influence of changes in the actual height, which can reduce numerical errors in the calculation process and improve calculation accuracy.

[0130] S703. Based on the ratios of multiple pixel heights to the actual height, determine the confidence interval of the ratio of pixel height to actual height at the center point of the image.

[0131] In some embodiments, the 3σ principle of the normal distribution can be used to determine the confidence interval of the ratio of the pixel height corresponding to the center point of the image to the actual height. The 3σ principle of the normal distribution, also known as the 68-95-99.7 rule or empirical rule, is an important principle in statistics describing the distribution characteristics of normally distributed data. This principle is based on the symmetry and central tendency of the normal distribution curve, combined with... Figure 8 As shown, the 3σ principle of the normal distribution is as follows:

[0132] 1σ range: In a normal distribution, almost all (approximately 68.27%) of the data values ​​fall within a range of one standard deviation (σ) from the mean (μ), i.e., (μ-σ, μ+σ).

[0133] 2σ range: Approximately 95.45% of the data values ​​fall within two standard deviations from the mean, i.e., (μ-2σ, μ+2σ).

[0134] 3σ range: Approximately 99.73% of the data values ​​fall within three standard deviations from the mean, i.e., (μ-3σ, μ+3σ).

[0135] In other words, most normally distributed data are concentrated around the mean, and the frequency of data occurrence gradually decreases as the distance from the mean increases. Specifically, the farther away from the mean, the lower the probability of the data occurring. The 3σ principle provides a quantitative standard, namely that almost all data (99.73%) fall within three standard deviations from the mean.

[0136] Therefore, as a feasible approach, when determining the confidence interval, one can first determine the mean μ and variance σ of the ratios of multiple pixel heights to the actual heights. 2 Furthermore, based on the mean and variance of the ratios of multiple pixel heights to the actual height, the 3σ principle of the normal distribution is used to determine the confidence interval for the ratio of pixel height to actual height at the center point of the image. That is, the standard deviation [μ+3σ, μ-3σ] of the mean of the ratios of multiple pixel heights to the actual height is selected as the confidence interval.

[0137] Alternatively, the difference between the mean and X times the standard deviation can be used as the lower limit, and the sum of the mean and X times the standard deviation can be used as the upper limit to obtain the confidence interval. Here, X is a natural number, and X is not 3. For example, X can be 1, 2, or 4, etc., and this embodiment does not impose any restrictions on this.

[0138] S704. Based on the confidence interval of the ratio of pixel height to actual height and the actual height of the object to be filtered, determine the upper limit value and the lower limit value of pixel height.

[0139] After obtaining the confidence interval of the ratio of pixel height to actual height, the upper limit and lower limit of pixel height can be determined based on the actual height of the object to be filtered.

[0140] Specifically, as a feasible approach, the actual height of the object to be filtered can be multiplied by the upper and lower limits of the confidence interval to obtain the upper and lower limits of the pixel height.

[0141] As can be seen, the solution provided in this embodiment, by measuring the height of multiple pixels, can more accurately determine the pixel height range of the object to be filtered, helping to avoid the random errors that may arise from relying solely on the height of a single pixel. Noise, lighting variations, and other interference factors in the image can affect the accuracy of a single pixel height. By considering multiple pixel height data, these interferences can be resisted more effectively, improving the robustness of the algorithm.

[0142] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0143] This application also provides a filtering device for a target object, such as... Figure 9 As shown, the filtering device 90 for the target object includes: an acquisition module 91, a determination module 92, and a filtering module 93.

[0144] The acquisition module 91 is used to acquire a region image of the area to be filtered through an acquisition device; the determination module 92 is used to determine the actual pixel height and pixel coordinate information of the target object in the region image; the determination module 92 is also used to determine the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information, as the pixel height to be filtered; the filtering module 93 is used to filter the target object in the region image when the pixel height to be filtered and the actual pixel height match.

[0145] In some embodiments, the determining module 92 is specifically used to: determine the pixel distance between the target object and the center point of the image based on pixel coordinate information and the coordinate information of the center point of the image region; determine the field of view corresponding to the pixel distance; acquire the tilt angle of the acquisition device relative to the horizontal direction, the installation height of the acquisition device, and the actual height of the object to be filtered; and, based on the pinhole imaging principle and the similar triangle principle, determine the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information by means of the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered.

[0146] In some embodiments, the determining module 92 is specifically used to obtain the calibrated pixel height of the center point of the area image where the object to be filtered is located; and to determine the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information based on the pixel height to be filtered, the calibrated pixel height, the actual height and tilt angle of the object to be filtered, the field of view, and the installation height of the acquisition device.

[0147] In some embodiments, the determining module 92 is specifically used to obtain the focal length of the image of the acquisition area when the acquisition device acquires it; and to determine the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information based on the pixel height to be filtered, the actual height and tilt angle of the object to be filtered, the field of view, the installation height of the acquisition device, and the focal length.

[0148] In some embodiments, the calibrated pixel height includes an upper limit value and a lower limit value of the calibrated pixel height; the determining module 92 is specifically used to determine the upper limit value of the pixel height corresponding to the upper limit value of the calibrated pixel height and the lower limit value of the pixel height corresponding to the lower limit value of the calibrated pixel height based on the upper limit value of the calibrated pixel height, the lower limit value of the calibrated pixel height, the calibrated pixel height, the actual height of the object to be filtered, the tilt angle, the field of view, and the installation height of the acquisition device; the pixel height to be filtered includes the upper limit value of the pixel height and the lower limit value of the pixel height.

[0149] The filtering module 93 is specifically used to filter target objects in the region image when the actual pixel height is within the range of pixel height to be filtered. The upper limit of the range of pixel height to be filtered is the upper limit value of the pixel height, and the lower limit value is the lower limit value of the pixel height.

[0150] In some embodiments, the upper and lower limits of the calibrated pixel height are determined as follows: multiple pixel heights corresponding to the object to be filtered are obtained; the multiple pixel heights are the pixel heights of the object to be filtered when it is at multiple positions in the central region, or the multiple pixel heights are the pixel heights of the object to be filtered measured multiple times at the center point of the image; based on the multiple pixel heights and the actual height of the object to be filtered, the ratio of the multiple pixel heights to the actual height is determined; based on the ratio of the multiple pixel heights to the actual height, a confidence interval is determined for the ratio of the pixel height to the actual height at the center point of the image; based on the confidence interval for the ratio of the pixel height to the actual height and the actual height of the object to be filtered, the upper and lower limits of the calibrated pixel height are determined.

[0151] In some embodiments, determining a confidence interval for the ratio of pixel height to actual height at the center point of the image based on the ratios of multiple pixel heights to actual height includes: determining the mean and variance of the ratios of multiple pixel heights to actual height; and determining the confidence interval for the ratio of pixel height to actual height at the center point of the image based on the mean and variance of the ratios of multiple pixel heights to actual height using the 3σ principle of normal distribution.

[0152] In some embodiments, the determining module 92 is specifically used to: obtain the focal length of the acquisition device and the relationship function between the pixel height and distortion of the acquisition device; determine the distortion-corrected target pixel distance based on the relationship function between pixel distance and pixel height and distortion; and determine the field of view corresponding to the target pixel distance.

[0153] This application also provides an electronic device; please refer to [link / reference]. Figure 10 The electronic device 201 includes: one or more memories 121, one or more processors 122, a communication bus 123, and a communication interface 124. The processors 122 are connected to the memories 121 via the communication bus 123. The one or more memories 121 are used to store computer program code, which includes computer instructions. When the one or more processors 122 execute the computer instructions, the electronic device 201 performs the target object filtering method provided in the above embodiments.

[0154] Optionally, the memory 121 may be a non-transitory computer-readable storage medium, such as read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc., and the embodiments of this application do not impose any limitations on this.

[0155] The processor 122 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof, and the embodiments of this application do not impose any limitations on this.

[0156] The communication bus 123 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 123 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 It is represented by a single thick line, but this does not mean that there is only one bus or one type of communication bus.

[0157] Communication interface 124 uses any transceiver-like device for communicating with other devices or communication networks, such as control systems, radio access networks (RAN), wireless local area networks (WLAN), etc.

[0158] This application also provides a computer program product comprising one or more instructions, which are stored in the memory of a computer device and executed by a processor to complete the various processes described in the above embodiments.

[0159] This application also provides a computer-readable storage medium including computer-executable instructions that, when executed on a computer, cause the computer to perform the target object filtering method provided in the above embodiments.

[0160] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0161] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0162] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0163] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0164] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0165] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for filtering target objects, characterized in that, include: The region image of the area to be filtered is acquired using an acquisition device; Determine the actual pixel height and pixel coordinate information of the target object within the image region; Determine the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information, and use it as the pixel height to be filtered. When the height of the pixel to be filtered matches the actual pixel height, the target object in the region image is filtered.

2. The method according to claim 1, characterized in that, Determining the pixel height of the object to be filtered at its actual position corresponding to the pixel coordinate information includes: Based on the pixel coordinate information and the coordinate information of the center point of the image area, the pixel distance between the target object and the center point of the image is determined; Determine the field of view corresponding to the pixel distance; The tilt angle of the acquisition device relative to the horizontal direction, the installation height of the acquisition device, and the actual height of the object to be filtered are obtained. Based on the principles of pinhole imaging and similar triangles, the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information is determined by the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered.

3. The method according to claim 2, characterized in that, Determining the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information, based on the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered, includes: Obtain the calibrated pixel height of the center point of the image of the region containing the object to be filtered; Based on the height of the pixel to be filtered, the calibrated pixel height, the actual height and tilt angle of the object to be filtered, the field of view, and the installation height of the acquisition device, the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information is determined.

4. The method according to claim 2, characterized in that, Determining the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information, based on the field of view, the installation height and tilt angle of the acquisition device, and the actual height of the object to be filtered, includes: Obtain the focal length of the acquisition device when acquiring the image of the region; Based on the height of the pixel to be filtered, the actual height and tilt angle of the object to be filtered, the field of view, the installation height of the acquisition device, and the focal length, the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information is determined.

5. The method according to claim 3, characterized in that, The calibrated pixel height includes an upper limit value and a lower limit value. The step of determining the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information, based on the pixel height to be filtered, the calibrated pixel height, the actual height and tilt angle of the object to be filtered, the field of view, and the installation height of the acquisition device, includes: Based on the calibrated upper limit pixel height, the calibrated lower limit pixel height, the calibrated pixel height, the actual height of the object to be filtered, the tilt angle, the field of view, and the installation height of the acquisition device, determine the upper limit pixel height corresponding to the calibrated upper limit pixel height and the lower limit pixel height corresponding to the calibrated lower limit pixel height; the height of the pixel to be filtered includes the upper limit pixel height and the lower limit pixel height. When the height of the pixel to be filtered matches the actual pixel height, the target object in the region image is filtered, specifically as follows: When the actual pixel height falls within the range of pixel heights to be filtered, the target object in the region image is filtered. The upper limit of the range of pixel heights to be filtered is the upper limit value of the pixel height, and the lower limit value is the lower limit value of the pixel height.

6. The method according to claim 5, characterized in that, The upper limit value and the lower limit value of the calibrated pixel height are determined in the following manner: Obtain multiple pixel heights corresponding to the object to be filtered; the multiple pixel heights are the pixel heights of the object to be filtered when it is in multiple positions in the central region, or the multiple pixel heights are the pixel heights of the object to be filtered when it is in the center point of the image, measured multiple times; Based on the multiple pixel heights and the actual height of the object to be filtered, determine the ratio of the multiple pixel heights to the actual height; Based on the ratio of the multiple pixel heights to the actual height, a confidence interval for the ratio of the pixel height to the actual height at the center point of the image is determined; Based on the confidence interval of the ratio of pixel height to actual height and the actual height of the object to be filtered, the upper limit value of the calibrated pixel height and the lower limit value of the calibrated pixel height are determined.

7. The method according to claim 6, characterized in that, Determining the confidence interval for the ratio of pixel height to actual height at the center point of the image based on the ratio of the plurality of pixel heights to the actual height includes: Determine the mean and variance of the ratios of the plurality of pixel heights to the actual heights; Based on the mean and variance of the ratios of the multiple pixel heights to the actual heights, the confidence interval of the ratio of the pixel height to the actual height at the center point of the image is determined using the 3σ principle of the normal distribution.

8. The method according to claim 2, characterized in that, Determining the field of view corresponding to the pixel distance includes: Obtain the focal length of the acquisition device, and the relationship function between the pixel height and distortion of the acquisition device; Based on the relationship function between the pixel distance and the pixel height and distortion, the target pixel distance after distortion correction is determined; Determine the field of view angle corresponding to the target pixel distance.

9. A filtering device for a target object, characterized in that, include: The acquisition module is used to acquire a region image of the area to be filtered through an acquisition device; The determination module is used to determine the actual pixel height and pixel coordinate information of the target object within the region image; The determining module is further configured to determine the pixel height of the object to be filtered when it is at the actual position corresponding to the pixel coordinate information, and use it as the pixel height to be filtered; A filtering module is used to filter target objects in the region image when the height of the pixel to be filtered matches the actual pixel height.

10. An electronic device, characterized in that, include: One or more processors; one or more memories; The one or more memories are used to store computer program code, which includes computer instructions that, when executed by the one or more processors, cause the electronic device to perform the target object filtering method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed on a computer, cause the computer to perform the target object filtering method as described in any one of claims 1 to 8.