Target distinguishing method and device, electronic device, and storage medium
Patent Information
- Application Number
- CN202210142421.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-16
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-02-16
AI Technical Summary
[0003]为解决常规多相机形成的视野下的目标区分方案存在的计算量过大、耗时严重以及实施成本较高等问题,本发明一个或多个实施例提供了一种目标区分方法及装置、电子设备、存储介质,无需特征提取和匹配过程,从而极大地减少了目标区分所需的计算量,达到实时区分、降低对产品硬件的要求以及降低实施成本等多个技术目的
[0010]对于多相机视野下的目标区分问题,相比于常规依赖对每个相机采集的图像进行特征提取和匹配的方案,本发明彻底杜绝了需要大量运算资源支撑的特征提取和特征匹配的过程,而是通过图像中目标位置与相机原点位置形成的投影线(或投影线束)判断,具体利用由不同相机原点发出的投影线之间的位置关系判断多相机视野下的追踪的目标是否一致,以达到快速区分目标的目的,满足实时区分要求,降低了对产品硬件配置的要求以及减少了目标区分技术的实施成本,用户满意度非常高。
Smart Images

Figure CN116668850B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target tracking technology, and more specifically, it provides a target differentiation method and apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of artificial intelligence technology and the implementation of related application scenarios, target tracking technology has achieved mature development and application. As an important component of computer vision technology, target tracking technology has strong market demand and has received widespread attention in many fields such as intelligent monitoring. Those skilled in the art are constantly dedicated to optimizing and improving target tracking technology, and accurately distinguishing targets during the tracking process is crucial. Traditional solutions typically use multiple cameras to cover the target's field of view, extracting relevant target features from the images captured by each camera, and then using feature matching to determine whether the targets in different camera fields of view belong to the same target. For example, features of targets such as humans or vehicles can be obtained from images captured by multiple cameras, and then feature matching is performed based on the extracted features to distinguish or identify different targets. Although existing technologies can distinguish targets, in situations with high real-time requirements, the extraction and matching of target features from images captured by multiple cameras requires a large amount of computing resources, resulting in a time-consuming target differentiation process that cannot meet the requirements of real-time differentiation. Furthermore, it has high hardware resource requirements and high implementation costs. Summary of the Invention
[0003] To address the problems of excessive computation, time-consuming operation, and high implementation cost in conventional target differentiation schemes formed by multiple cameras, one or more embodiments of the present invention provide a target differentiation method, device, electronic device, and storage medium that eliminates the need for feature extraction and matching processes, thereby greatly reducing the computational load required for target differentiation and achieving multiple technical objectives such as real-time differentiation, reduced hardware requirements, and lower implementation costs.
[0004] To achieve the aforementioned technical objective, the present invention provides a target differentiation method, comprising: performing target detection on an acquired first image to determine a first target, and performing target detection on an acquired second image to determine a second target; wherein the first image is an image containing the first target captured by a first camera, and the second image is an image containing the second target captured by a second camera, the first camera and the second camera being used to capture the same area but at different spatial positions; selecting a preset number of first positions on the first target, and forming a preset number of first projection lines through the first positions and the origin of the first camera; selecting a preset number of second positions on the second target, and forming a preset number of second projection lines through the second positions and the origin of the second camera; the relative positions of the preset number of first positions on the first target are the same as the relative positions of the preset number of second positions on the second target; and determining whether the first target and the second target are the same target based on the positional relationship between the preset number of first projection lines and the preset number of second projection lines.
[0005] To achieve the above technical objectives, the present invention also provides a target differentiation device, which includes a target detection module, a projection determination module, and a target differentiation module. The target detection module is used to perform target detection on a first image to determine a first target, and to perform target detection on a second image to determine a second target. The first image is an image containing the first target captured by a first camera, and the second image is an image containing the second target captured by a second camera. The first camera and the second camera are used to capture the same area but at different spatial positions. The projection determination module is used to select a preset number of first positions on the first target and to form a preset number of first projection lines through the first positions and the origin of the first camera. The projection determination module is used to select a preset number of second positions on the second target and to form a preset number of second projection lines through the second positions and the origin of the second camera. The relative positions of the preset number of first positions on the first target are the same as the relative positions of the preset number of second positions on the second target. The target differentiation module is used to determine whether the first target and the second target are the same target based on the positional relationship between the first projection lines and the second projection lines.
[0006] To achieve the above-mentioned objectives, the present invention can also provide an electronic device including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor performs the steps of the target differentiation method described in any embodiment of the present invention.
[0007] To achieve the above-mentioned objectives, the present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the target differentiation method described in any embodiment of the present invention.
[0008] To achieve the above-mentioned technical objectives, the present invention can also provide a computer program product, which, when the instructions in the computer program product are executed by a processor, performs the steps of the target differentiation method described in any embodiment of the present invention.
[0009] The beneficial effects of this invention are as follows:
[0010] For the problem of target differentiation under multi-camera field of view, compared with conventional solutions that rely on feature extraction and matching of images acquired by each camera, this invention completely eliminates the feature extraction and matching process that requires a lot of computing resources. Instead, it judges the target position in the image by the projection line (or projection line bundle) formed by the target position and the camera origin position. Specifically, it uses the positional relationship between the projection lines emanating from different camera origins to determine whether the tracked target under multi-camera field of view is consistent, so as to achieve the purpose of quickly distinguishing targets, meet the requirements of real-time differentiation, reduce the requirements of product hardware configuration and reduce the implementation cost of target differentiation technology, and achieve very high user satisfaction. Attached Figure Description
[0011] Figure 1 A flowchart illustrating a target differentiation method according to one or more embodiments of the present invention is shown.
[0012] Figure 2 The diagram illustrates the working principle of target differentiation based on epipolar geometric constraints in one or more embodiments of the present invention.
[0013] Figure 3 The diagram illustrates the implementation process of human head target differentiation in one or more embodiments of the present invention.
[0014] Figure 4 This diagram illustrates the detection of a human head target using dual cameras in one or more embodiments of the present invention.
[0015] Figure 5 This diagram illustrates a detection box set on a human head image in one or more embodiments of the present invention.
[0016] Figure 6 A schematic diagram of the structural composition of a target differentiation device in one or more embodiments of the present invention is shown.
[0017] Figure 7 A schematic diagram of the internal structure of an electronic device according to one or more embodiments of the present invention is shown. Detailed Implementation
[0018] The following description, in conjunction with the accompanying drawings, provides a detailed explanation and illustration of the target differentiation method and apparatus, electronic device, and storage medium provided by the present invention.
[0019] like Figure 1 As shown, and can be combined Figure 2 , Figure 3 One or more embodiments of the present invention may provide a target differentiation method. This target differentiation method may specifically include, but is not limited to, at least one of the following steps, as detailed below.
[0020] Step 100: Target detection is performed on the acquired first image to determine a first target, and target detection is performed on the acquired second image to determine a second target. The first image is an image containing the first target captured by a first camera, and the second image is an image containing the second target captured by a second camera. The first and second cameras are used to capture the same area but are spatially different. For example, the shooting angle range of the first camera and the shooting angle range of the second camera may have a wholly or partially overlapping area, but this is not limited to this; the goal is to capture the same target. It should be understood that the number of the first and second cameras involved in this invention can be one each, or multiple. In practical application of the technical solution of this invention, three or more cameras help improve the accuracy of target differentiation. It should be understood that the target detection scheme for the first image and / or the second image in this invention can be selected from conventional techniques, such as, but not limited to, sliding window detection methods, selective search methods, region of interest segmentation and selection methods, fast feature extraction methods, candidate region network methods, single-shot target detection methods, etc. In fact, the target detection method is not limited to these; the goal is to achieve target detection. It should be noted that the first image and the second image involved in this invention are taken at the same time, or the time difference between the two is less than a preset value.
[0021] Step 200: Select a preset number of first positions on the first target, and form a preset number of first projection lines through the first positions and the origin of the first camera; select a preset number of second positions on the second target, and form a preset number of second projection lines through the second positions and the origin of the second camera; the relative positions of the preset number of first positions on the first target are the same as the relative positions of the preset number of second positions on the second target.
[0022] Combination Figure 2As shown, in order to describe the spatial information of the target, this embodiment of the invention projects the coordinates of a first position point P1 on a first image and a second position point P2 on a second image into a preset coordinate system using epipolar geometry constraints. A first projection line is formed using line C1P1, and a second projection line is formed using line C2P2. In one or more embodiments of the invention, the preset coordinate system can be a world coordinate system. It should be noted that the parameters of each camera are known (e.g., the camera's acquisition angle, intrinsic and extrinsic parameters, etc.), and the coordinates of the camera origin in the world coordinate system are preset. The projection line connecting the camera origin and the position point is calculated and determined based on the relative position of the position point on the image, the camera parameters, and the coordinates of the camera origin.
[0023] This invention embodiment constructs first projection information of a first target in a preset coordinate system using a first projection line, and constructs second projection information of a second target in the preset coordinate system using a second projection line. Combined with... Figure 2 As shown, based on the principle of epipolar geometry, in this embodiment, the first projection line is the projection information of the line connecting the origin C1 of the first camera and the first position point P1 on the first target in the preset coordinate system, and the second projection line is the projection information of the line connecting the origin C2 of the second camera and the second position point P2 on the second target in the preset coordinate system. For a target point O in the real world, it is imaged simultaneously in two cameras. In the first camera, it is imaged as P1, and in the second camera, it is imaged as P2. If the connecting point C1 and point P1 are extended, and the connecting point C2 and point P2 are extended, then the straight line C1P1 and the straight line C2P2 intersect at a point O, which is the target point in the world coordinate system. This is the epipolar geometry constraint method used in this invention to determine whether two target points in the world coordinate system are a single point.
[0024] like Figure 2 As shown, and can be combined Figure 4 , Figure 5 Specifically, this invention allows for the selection of a predetermined number of first positions on a first target, and the formation of a predetermined number of first projection lines through the first positions and the origin of a first camera; and the selection of a predetermined number of second positions on a second target, and the formation of a predetermined number of second projection lines through the second positions and the origin of a second camera. The relative positions of the predetermined number of first positions on the first target are the same as the relative positions of the predetermined number of second positions on the second target. Figure 4 The illustration shows two targets, specifically two human heads. For any target, images are taken by a first camera and a second camera respectively, and then the human head target is detected, i.e., the human head is detected; and corresponding projection lines are formed based on the camera origin C1, C2 and the position points on the target.
[0025] like Figure 3 As shown, and able to combine Figure 4 and Figure 5 In one or more embodiments of the present invention, selecting a preset number of first positions on a first target includes: forming a first detection box on the first target, uniformly dividing the first detection box into a plurality of first grids, and using the vertex position of each first grid as the first position. In another embodiment of the present invention, selecting a preset number of second positions on a second target includes: forming a second detection box on the second target, uniformly dividing the second detection box into a plurality of second grids, and using the vertex position of each second grid as the second position. Figure 5 As shown in the illustration, when this embodiment is used for human head differentiation, the detection box is divided into a 2×2 grid. Each grid contains nine non-repeating vertices, which can be, for example, (x1, y1), (x2, y2), (x3, y4), (x4, y4), (x5, y5), (x6, y6), (x7, y7), (x8, y8), and (x9, y9). However, this is not a limitation; the number of grids can be greater, as long as the technical objective of this invention is achieved. It should be understood that determining the first and second positions by dividing the detection box into grids is a preferred embodiment of this invention. The first and / or second positions involved in this invention can also be preset point positions, including but not limited to the positions of the eyes, nose, mouth, eyebrows, ears, etc., as long as the purpose of determining the first and second positions of this invention is achieved.
[0026] The target differentiation technology provided by this invention can improve differentiation accuracy through multi-point matching, and uniformly determine a preset number of position points by dividing the detection box into multiple grids, thereby matching and judging each position point accordingly. It has the advantages of improving calculation accuracy while avoiding increasing the amount of calculation that has no obvious effect, and achieves a significant improvement in the accuracy and precision of target differentiation under the premise of ensuring that the amount of calculation is acceptable.
[0027] Step 300: Determine whether the first target and the second target are the same target based on the positional relationship between a preset number of first projection lines and a preset number of second projection lines. Specifically, when applying the technical solution of this invention to the problem of head differentiation, in one or more embodiments of this invention, the first target and the second target can both be human heads. Therefore, this invention can provide a head matching technology solution based on head spatial positioning under multiple cameras, enabling the determination of whether the targets collected by multiple cameras are consistent, thereby achieving the purpose of head differentiation.
[0028] This invention abandons traditional feature extraction and matching algorithms that require massive computation. Instead, it employs a strategy of multi-camera imaging and matching based on target spatial information within each image, significantly reducing the computational load. This invention requires only a small amount of computation to achieve target differentiation, thus avoiding the problems of excessive computation and high time consumption in existing target differentiation technologies. This allows for real-time target differentiation, and the significant reduction in computational load lowers the hardware requirements for the product. This reduced hardware requirement helps lower implementation costs, resulting in very high user satisfaction.
[0029] like Figure 2 As shown, if two cameras capture the same target, theoretically, lines C1P1 and C2P2 will intersect at point O in the preset coordinate system. However, due to camera equipment errors, environmental factors, and other conditions, the calculated two lines often have slight offsets. Therefore, one or more embodiments of the present invention may include determining whether a first target and a second target are the same target based on the positional relationship between a preset number of first projection lines and a preset number of second projection lines: calculating the minimum distance between each first projection line and its corresponding second projection line, and determining the positional relationship between the preset number of first projection lines and the preset number of second projection lines based on the minimum distance to determine whether the first target and the second target are the same target. In the present invention, the correspondence between the first projection line and the second projection line means that the first position used to determine the first projection line corresponds to the second position used to determine the second projection line. The relative position of the first position on the first target is the same as the relative position of the second position on the second target. For example, if the first position is the top left corner of the detection box, the corresponding second position is also the top left corner of the detection box; or if the first position is the nose position of the first target, the corresponding second position is also the nose position of the second target. This embodiment determines the matching degree between the second target and the first target based on the minimum distance; it then determines whether the first target and the second target are the same target based on the matching degree. In this embodiment, the coordinates of point C1 and point C2 can be determined in three-dimensional space. To determine whether lines C1P1 and C2P2 will intersect at point O, this invention calculates the minimum distance between lines C1P1 and C2P2. If the minimum distance between lines C1P1 and C2P2 is less than a first threshold, they are considered to intersect; otherwise, they do not intersect.
[0030] like Figure 5 As shown, and can be combined Figure 4In this embodiment of the invention, the positional relationship between a preset number of first projection lines and a preset number of second projection lines is determined based on a minimum distance to determine whether a first target and a second target are the same target. This includes: determining the total number of projection line pairs with a minimum distance less than a first threshold, where each projection line pair is a pair formed by a first projection line and its corresponding second projection line; calculating the ratio of the total number of projection line pairs to a preset number, and using the ratio as the matching degree; and determining whether the first target and the second target are the same target based on the matching degree. The preset number can be multiple. The specific value of the first threshold in this embodiment can be reasonably set according to the actual application scenario, for example, it can be 10 centimeters, but it is not limited to this; in other embodiments, it can be other values (e.g., 5 millimeters). Figure 5 Taking the nine vertices in the model as an example, nine projection lines are formed in the world coordinate system. If the number of intersecting lines is greater than six, that is, the total number of projection line pairs with a minimum distance less than the first threshold is greater than six, and the ratio of the total number of projection line pairs to the preset number is greater than six / nine, then the first target and the second target are considered to be the same target.
[0031] Optionally, in one or more embodiments of the present invention, determining whether a first target and a second target are the same target includes: determining that the first target and the second target are the same target when the matching degree is greater than or equal to a second threshold, and determining that the first target and the second target are two different targets when the matching degree is less than the second threshold. The specific value of the second threshold in the embodiments of the present invention can be reasonably set according to actual needs, for example, 66%, but is not limited thereto. Furthermore, when the first target and the second target are the same target, the same identification number (ID) is assigned to the first target and the second target; when the first target and the second target are two different targets, different identification numbers (ID) are assigned to the first target and the second target.
[0032] Based on the above technical solution, this invention ultimately transforms the technical problem of whether the first target and the second target are the same target into a judgment of the degree of matching, realizing the specific quantification of the target differentiation problem, and has outstanding advantages such as high accuracy and high reliability. Compared with traditional feature acquisition and matching methods, this invention not only greatly reduces the amount of computation, but also makes the judgment criteria quantifiable, and the judgment result is less affected by external factors. Therefore, this invention has the advantage of better target differentiation effect.
[0033] like Figure 6 As shown, based on the same inventive concept as the target differentiation method, one or more embodiments of the present invention can provide a target differentiation device. This target differentiation device includes, but is not limited to, a target detection module 400, a projection determination module 500, and a target differentiation module 600, as detailed below.
[0034] The target detection module 400 is used to perform target detection on the acquired first image to determine the first target, and to perform target detection on the acquired second image to determine the second target; wherein the first image is an image containing the first target captured by the first camera, and the second image is an image containing the second target captured by the second camera, and the first camera and the second camera are used to capture the same area but in different spatial positions.
[0035] Optionally, when the present invention is used for human head tracking, the first target and the second target in the embodiments of the present invention can both be human heads.
[0036] The projection determination module 500 is used to select a preset number of first positions on the first target and to form a preset number of first projection lines through the first positions and the origin of the first camera; the projection determination module 500 is used to select a preset number of second positions on the second target and to form a preset number of second projection lines through the second positions and the origin of the second camera; the relative positions of the preset number of first positions on the first target are the same as the relative positions of the preset number of second positions on the second target.
[0037] Optionally, the projection determination module 500 in this embodiment of the invention can be used to form a first detection box on a first target, and to uniformly divide the first detection box into multiple first grids, and to use the vertex position of each first grid as a first position; the projection determination module 500 in this embodiment of the invention can be used to form a second detection box on a second target, and to uniformly divide the second detection box into multiple second grids, and to use the vertex position of each second grid as a second position.
[0038] The target differentiation module 600 is used to determine whether the first target and the second target are the same target based on the positional relationship between the first projection line and the second projection line.
[0039] Optionally, the target differentiation module 600 can be used to calculate the minimum distance between each first projection line and the corresponding second projection line; and to determine the positional relationship between a preset number of first projection lines and a preset number of second projection lines based on the minimum distance, so as to determine whether the first target and the second target are the same target.
[0040] Optionally, the target differentiation module 600 is used to determine the total number of projection line pairs with a minimum distance less than a first threshold, wherein the projection line pair is a projection line pair formed by a first projection line and a corresponding second projection line; the target differentiation module 600 is used to calculate the ratio of the total number of projection line pairs to a preset number, and use the ratio as the matching degree; wherein, the preset number can be multiple; the target differentiation module 600 is used to determine whether the first target and the second target are the same target based on the matching degree.
[0041] Optionally, in this embodiment of the invention, the target differentiation module 600 is used to determine that the first target and the second target are the same target based on the matching degree being greater than or equal to a second threshold, or the target differentiation module 600 is used to determine that the first target and the second target are two different targets based on the matching degree being less than a second threshold.
[0042] Optionally, the target differentiation module 600 is further configured to assign the same identification number to the first target and the second target if the first target and the second target are the same target; or to assign different identification numbers to the first target and the second target if the first target and the second target are two different targets.
[0043] like Figure 7 As shown, based on the same inventive concept as the target differentiation method, one or more embodiments of the present invention may also provide an electronic device, which may include a memory and a processor. The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor performs the steps of the target differentiation method in any embodiment of the present invention. The specific implementation process of the target differentiation method of the present invention has been described in detail in this specification and will not be repeated here.
[0044] like Figure 7 As shown, based on the same inventive concept as the target differentiation method, one or more embodiments of the present invention may also provide a storage medium storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause the one or more processors to perform the steps of the target differentiation method in any embodiment of the present invention. The specific implementation process of the target differentiation method has been described in detail in this specification and will not be repeated here.
[0045] Based on the same inventive concept as the target differentiation method, one or more embodiments of the present invention can also provide a computer program product, which, when executed by a processor, performs the steps of the target differentiation method described in any embodiment of the present invention. The specific implementation process of the steps of the target differentiation method has been described in detail in the present invention specification and will not be repeated here.
[0046] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections (electronic devices) having one or more wires, portable computer disks (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM, or flash memory), fiber optic devices, and compact disc read-only memory (CDROM). Furthermore, computer-readable storage media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0047] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0048] In the description of this specification, the references to terms such as "this embodiment," "an embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0049] Furthermore, 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. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0050] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and simple improvements made on the substantive content of the present invention should be included within the protection scope of the present invention.
Claims
1. A target differentiation method, characterized in that, include: Target detection is performed on the acquired first image to identify a first target, and target detection is performed on the acquired second image to identify a second target; wherein, the first image is an image containing the first target captured by a first camera, and the second image is an image containing the second target captured by a second camera, and the first camera and the second camera are used to capture the same area but are located in different spatial positions; A preset number of first positions are selected on the first target, and a preset number of first projection lines are formed through the first positions and the origin of the first camera; a preset number of second positions are selected on the second target, and a preset number of second projection lines are formed through the second positions and the origin of the second camera; the relative positions of the preset number of first positions on the first target are the same as the relative positions of the preset number of second positions on the second target. Determining whether the first target and the second target are the same target based on the positional relationship between the preset number of first projection lines and the preset number of second projection lines includes: calculating the minimum distance between each first projection line and its corresponding second projection line; if the minimum distance between the first projection line and its corresponding second projection line is less than a first threshold, then the two intersect; determining the total number of projection line pairs whose minimum distance is less than the first threshold, wherein each projection line pair is a projection line pair formed by a first projection line and its corresponding second projection line; calculating the ratio of the total number of projection line pairs to the preset number; using the ratio as the matching degree; and determining whether the first target and the second target are the same target based on the matching degree.
2. The target differentiation method according to claim 1, characterized in that, The step of selecting a preset number of first positions on the first target includes: forming a first detection box on the first target, dividing the first detection box evenly into multiple first grids, and using the vertex position of each first grid as the first position; The step of selecting a preset number of second positions on the second target includes: forming a second detection box on the second target, dividing the second detection box evenly into multiple second grids, and using the vertex position of each second grid as the second position.
3. The target differentiation method according to claim 1, characterized in that, The step of determining whether the first target and the second target are the same target based on the matching degree includes: When the matching degree is greater than or equal to the second threshold, the first target and the second target are determined to be the same target; when the matching degree is less than the second threshold, the first target and the second target are determined to be two different targets.
4. The target differentiation method according to claim 1 or 3, characterized in that, Also includes: When the first target and the second target are the same target, the same identity number is assigned to the first target and the second target. When the first target and the second target are two different targets, different identity numbers are assigned to the first target and the second target.
5. The target differentiation method according to claim 1, characterized in that, Both the first target and the second target are human heads.
6. A target differentiation device, characterized in that, include: The target detection module is used to perform target detection on the acquired first image to determine a first target, and to perform target detection on the acquired second image to determine a second target; wherein the first image is an image containing the first target captured by a first camera, and the second image is an image containing the second target captured by a second camera, and the first camera and the second camera are used to capture the same area but in different spatial positions; The projection determination module is used to select a preset number of first positions on the first target and to form a preset number of first projection lines through the first positions and the origin of the first camera; the projection determination module is used to select a preset number of second positions on the second target and to form a preset number of second projection lines through the second positions and the origin of the second camera; the relative positions of the preset number of first positions on the first target are the same as the relative positions of the preset number of second positions on the second target. The target differentiation module is used to determine whether the first target and the second target are the same target based on the positional relationship between the first projection line and the second projection line. Specifically, the target differentiation module is used to calculate the minimum distance between each first projection line and the corresponding second projection line. If the minimum distance between the first projection line and the corresponding second projection line is less than a first threshold, the two intersect. The target differentiation module is also used to determine the total number of projection line pairs whose minimum distance is less than the first threshold. Each projection line pair is a projection line pair formed by a first projection line and a corresponding second projection line. The target differentiation module is also used to calculate the ratio of the total number of projection line pairs to the preset number, and use the ratio as the matching degree to determine whether the first target and the second target are the same target.
7. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of the target differentiation method as described in any one of claims 1 to 5.
8. A storage medium storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by one or more processors, the one or more processors cause the one or more processors to perform the steps of the target differentiation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-camera personnel three-dimensional positioning and tracking system based on human skeleton detection
CN111028271A