Traffic statistics method and system based on image processing

By obtaining video data in the data processing system and determining the position and direction of the moving object, and determining whether there are related devices to obtain recognition results, the problem of low data processing efficiency caused by large traffic is solved, and efficient traffic statistics and stable system operation is achieved.

CN117710884BActive Publication Date: 2025-04-04QINGDAO HAIBO TECH INFORMATION SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311723402.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2025-04-04
Estimated Expiration
2043-12-15

AI Technical Summary

Technical Problem

In outdoor and other scenarios, due to the large flow of people, the data processing volume is large, which affects the processing efficiency and stable operation of the data processing system.

Method used

By obtaining video data, determine the position and movement direction of the moving object, determine whether there is an associated device, obtain the recognition result if it exists, and if it does not exist, facial recognition is performed to count the traffic.

Benefits of technology

It reduces the amount of data processing, improves data processing efficiency, ensures the stable operation of the processing system, and improves the accuracy of traffic statistics results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117710884B_ABST
    Figure CN117710884B_ABST
Patent Text Reader

Abstract

The present application relates to the field of head recognition technology, and in particular to a method and system for traffic statistics based on image processing, including: obtaining a first video collected by a first device in a first time period; determining first information and second information of each mobile object based on the first video; determining whether each mobile object has an associated second device based on the first information and the second information; in the case where the second device exists, obtaining the recognition result of the corresponding mobile object from the second device to obtain at least one first recognition information; in the case where the second device does not exist, performing face recognition on the mobile object to obtain at least one second recognition information; based on at least one first recognition information and at least one second recognition information, counting the flow of people in the monitoring area of ​​the first device to obtain a first statistical result. The technical solution provided by the present application can reduce the amount of data processing and improve the efficiency of data processing, thereby ensuring the safe and stable operation of the processing system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of head recognition, and in particular to a traffic statistics method and system based on image processing. Background Art

[0002] Head recognition is a biometric recognition method based on computer vision technology. It extracts identity information by analyzing facial images or pedestrian features, thereby achieving identity verification and identification. In related technologies, people can be separated from the background by extracting the head features or body features of pedestrians in the image, and the identity of pedestrians can be verified or the flow of people can be counted by comparing the features.

[0003] However, in the related art, for outdoor scenes, due to the large flow of people, the amount of data to be processed during flow statistics or head recognition is large, which affects the processing efficiency and stable operation of the data processing system. Summary of the invention

[0004] In order to solve the related technical problems, the embodiments of the present application provide a traffic statistics method and system based on image processing, which can reduce the data processing volume and improve the data processing efficiency, thereby ensuring the safe and stable operation of the processing system.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application provides a method for traffic statistics based on image processing, including:

[0007] Acquire a first video captured by a first device in a first time period; the first video includes at least one moving object;

[0008] Based on the first video, determine first information and second information of each moving object, wherein the first information represents the position of the moving object, and the second information represents the moving direction of the moving object;

[0009] For each mobile object, based on the first information and the second information, determine whether the mobile object has an associated second device; the second device is a device used to monitor the mobile object before the mobile object enters the monitoring range of the first device;

[0010] In the case where the second device exists, obtaining a recognition result of the corresponding mobile object from the second device to obtain at least one first recognition information;

[0011] In the absence of the second device, performing face recognition on the moving object to obtain at least one second identification information;

[0012] Based on the at least one first identification information and the at least one second identification information, the flow of people in the monitoring area of ​​the first device is counted to obtain a first statistical result.

[0013] In the above solution, determining the first information and the second information of each moving object based on the first video includes:

[0014] For each moving object, extract frames from the first video to obtain multiple frames of first images containing the moving object;

[0015] Based on the mapping relationship between the monitoring area of ​​the first device and the image output by the first device, determine the coordinates of the moving position in each frame of the first image to obtain first information;

[0016] Based on the time axis, selecting two first images at different times from the multiple first images;

[0017] Determine the optical flow field of the moving object based on the selected two frames of first images;

[0018] Based on the optical flow field, the moving direction of the moving object is determined to obtain second information.

[0019] In the above solution, the step of selecting two first images at different times from the multiple first images based on the time axis includes:

[0020] Based on the time axis, determining the difference between each first image frame and an adjacent first image frame in the plurality of first image frames, and obtaining a first similarity between each first image frame and an adjacent first image frame;

[0021] Determine whether a first similarity between each first image and an adjacent frame is less than a preset similarity threshold, and if the first similarity is less than the preset similarity threshold, delete an image with an earlier extraction time from the first image and the adjacent frames to obtain a first image set;

[0022] Two first images with different extraction times are selected from the first image set.

[0023] In the above scheme, the method further includes:

[0024] Determine a first object and a second object from the at least one mobile object; the first object is a mobile object with first identification information, and the second object is a mobile object without first identification information;

[0025] For each first object, a person re-identification (ReID) process is performed on the first object in the first time period to obtain a re-identification result.

[0026] In the above solution, based on the at least one first identification information and the at least one second identification information, counting the flow of people in the monitoring area of ​​the first device to obtain a first statistical result includes:

[0027] Based on the at least one first identification information, the at least one second identification information and the re-identification result, the flow of people in the monitoring area of ​​the first device is counted to obtain a first statistical result.

[0028] In the above solution, based on the at least one first identification information, the at least one second identification information and the re-identification result, counting the flow of people in the monitoring area of ​​the first device to obtain the first statistical result includes:

[0029] Based on the first identification information and the second identification information, determine a flow identification result of the first device monitoring area to obtain a second statistical result;

[0030] Based on the re-identification result, data cleaning is performed on the repeatedly counted moving objects in the second statistical result to obtain a first statistical result.

[0031] In the above solution, for each first object, performing ReID processing on the first object in the first time period to obtain a re-identification result includes:

[0032] For each first object, generating a first window including the first object based on the first information of the first object;

[0033] Performing image segmentation on the image in the first window to obtain a second image;

[0034] performing feature extraction on the second image to obtain first feature information;

[0035] Based on the first feature information, ReID is performed on the first object to obtain a corresponding re-identification result.

[0036] In the above solution, before segmenting the image in the first window to obtain the second image, the method further includes:

[0037] Determining reference pixel information of the first object based on first identification information of the first object;

[0038] Determine to extract features from the image in the first window to obtain a second feature;

[0039] Based on the second feature, obtaining actual pixel information of the first object in the first window;

[0040] Determining whether a difference between the actual pixel information and the reference pixel information is lower than a preset pixel difference threshold;

[0041] When the difference is greater than or equal to the pixel difference threshold, image segmentation is performed on the image in the first window to obtain a second image.

[0042] In the above scheme, the method further comprises:

[0043] When the difference is lower than the pixel difference threshold, ReID is performed on the first object based on the second feature to obtain a corresponding re-identification result.

[0044] The embodiment of the present application also provides a traffic statistics system based on image processing, including:

[0045] An acquisition unit, configured to acquire a first video captured by a first device in a first time period; the first video includes at least one moving object;

[0046] A first determining unit, configured to determine first information and second information of each moving object based on the first video, wherein the first information represents a position of the moving object, and the second information represents a moving direction of the moving object;

[0047] A second determining unit is used to determine, for each mobile object, whether the mobile object has an associated second device based on the first information and the second information; the second device is a device used to monitor the mobile object before the mobile object enters the monitoring range of the first device;

[0048] a computing unit, configured to, when the second device exists, obtain a recognition result of the corresponding mobile object from the second device to obtain at least one first recognition information; or, when the second device does not exist, perform face recognition on the mobile object to obtain at least one second recognition information;

[0049] The processing unit is used to count the flow of people in the monitoring area of ​​the first device based on the at least one first identification information and the at least one second identification information to obtain a first statistical result.

[0050] The image processing-based traffic statistics method and system provided in the embodiment of the present application obtain a first video collected by a first device in a first time period; the first video includes at least one moving object; based on the first video, first information and second information of each moving object are determined; the first information represents the position of the moving object, and the second information represents the moving direction of the moving object; for each moving object, based on the first information and the second information, determine whether there is an associated second device for the moving object; the second device is a device used to monitor the moving object before the moving object enters the monitoring range of the first device; in the case of the presence of the second device, the recognition result of the corresponding mobile object is obtained from the second device to obtain at least one first recognition information; in the case of the absence of the second device, face recognition is performed on the mobile object to obtain at least one second recognition information; based on the at least one first recognition information and the at least one second recognition information, the flow of people in the monitoring area of ​​the first device is counted to obtain a first statistical result. The solution provided in the embodiment of the present application realizes "splicing" of the device collection range by associating different devices with the position of the mobile object, so that when other associated devices have already identified the mobile object at the position, its identification information can be directly obtained, avoiding repeated identification operations, reducing the data processing volume, improving data processing efficiency, and thus improving traffic statistics efficiency, and further reducing the computing pressure on the processing center due to processing large amounts of data, thereby ensuring the stable and reliable operation of the data processing center; further, since repeated statistics on the same object between different devices are taken into consideration, the problem of inaccurate traffic statistics results caused by repeated statistics can be reduced, thereby improving the accuracy and reliability of traffic statistics results. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a flow chart of a traffic statistics method based on image processing according to an embodiment of the present application;

[0052] Figure 2 A schematic diagram of a flow chart of determining first information and second information in a traffic statistics method based on image processing in an embodiment of the present application;

[0053] Figure 3 This is a schematic diagram of an image segmentation result in a traffic statistics method based on image processing in an embodiment of the present application;

[0054] Figure 4 This is another schematic diagram of an image segmentation result in the traffic statistics method based on image processing in an embodiment of the present application;

[0055] Figure 5 This is a schematic diagram of the structure of a traffic statistics system based on image processing according to an embodiment of the present application. DETAILED DESCRIPTION

[0056] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0057] Head recognition is an important technology used in smart city management to predict mass events. It can count the current crowd density in real time and fully grasp its changing patterns, issue early warnings in a timely manner, greatly reduce labor costs, and effectively improve managers' monitoring and analysis capabilities.

[0058] In the related art, for outdoor areas or areas with dense human traffic, due to the large flow of people, feature extraction and identification of each object in the collection area will bring huge computing pressure, which not only affects the recognition and statistical efficiency, but also affects the stability of the processing system; at the same time, due to the mobility of mobile objects, and each collection device can only cover a certain area, there may be overlapping areas between different devices. In this way, in the process of mobile objects moving, different devices may have problems of repeated calculation and statistics, which not only affects the processing efficiency, but also greatly affects the accuracy of the calculation results.

[0059] Based on this, in various embodiments of the present application, by utilizing the position of the mobile object to associate different devices, the "splicing" of the device collection range is achieved, so that when other associated devices have already identified the mobile object at that position, its identification information can be directly obtained, avoiding repeated identification operations, reducing the amount of data processing, and improving data processing efficiency, thereby improving traffic statistics efficiency, and further reducing the computing pressure on the processing center due to processing large amounts of data, thereby ensuring the stable and reliable operation of the data processing center; further, since repeated statistics on the same object between different devices are taken into consideration, the problem of inaccurate traffic statistics results caused by repeated statistics can be reduced, and the accuracy and reliability of traffic statistics results can be improved.

[0060] The embodiment of the present application provides a traffic statistics method based on image processing, which is applied to a traffic statistics system based on image processing, and can be specifically applied to electronic devices with processing capabilities such as servers, computers, and smart terminals, such as Figure 1 As shown, the method includes:

[0061] Step 101: Acquire a first video captured by a first device in a first time period; the first video includes at least one moving object;

[0062] Step 102: Based on the first video, determine first information and second information of each moving object; the first information represents the position of the moving object, and the second information represents the moving direction of the moving object;

[0063] Step 103: for each mobile object, based on the first information and the second information, determine whether the mobile object has an associated second device; the second device is a device used to monitor the mobile object before the mobile object enters the monitoring range of the first device;

[0064] Step 104: if the second device exists, obtain a recognition result of the corresponding mobile object from the second device to obtain at least one first recognition information;

[0065] Step 105: In the absence of the second device, performing face recognition on the moving object to obtain at least one second identification information;

[0066] Step 106: Based on the at least one first identification information and the at least one second identification information, count the flow of people in the monitoring area of ​​the first device to obtain a first statistical result.

[0067] In actual application, the first device can be a mobile terminal, a camera, a surveillance camera, etc.; the first video collected by the first device in the first time period can be video data of a preset time period shot by the first device. Specifically, each day can be divided into different time periods, and video data can be collected according to the pre-divided time periods.

[0068] In actual application, after acquiring the first video, the actual coordinate position of the object can be determined according to the position of the moving object in each frame of the video.

[0069] In practical applications, after acquiring the first video, the optical flow field of each moving object when moving can be determined based on feature comparison between different frames in the video, thereby calculating the moving direction of the moving object.

[0070] Based on this, Figure 2 As shown, in one embodiment, determining the first information and the second information of each moving object based on the first video may include:

[0071] Step 201: for each moving object, extract frames from the first video to obtain multiple frames of first images containing the moving object;

[0072] Step 202: based on the mapping relationship between the monitoring area of ​​the first device and the output image of the first device, determine the coordinates of the moving position in each frame of the first image to obtain first information;

[0073] Step 203: Based on the time axis, select two first images at different times from the multiple first images;

[0074] Step 204: determining the optical flow field of the moving object based on the selected two frames of first images;

[0075] Step 205: Determine the moving direction of the moving object based on the optical flow field to obtain second information.

[0076] In actual application, since the moving direction of a mobile object between the coverage areas of two adjacent devices may be from the current area to another area, or from another area to the current area, by judging the direction of movement, it is possible to more accurately judge the area that the mobile object has passed through, thereby more quickly determining from which device to obtain the object's identification information.

[0077] It should be noted that steps 201 to 202 are the process of determining the first information, and steps 203 to 205 are the process of determining the second information. The first information may be determined before the second information is determined, or after the second information is determined, or it may be determined simultaneously with the second information. The embodiment of the present application does not limit this.

[0078] In practical applications, for multiple frames of images extracted from a video stream, there may be a high degree of similarity between adjacent frames, which will not only cause a waste of computing and storage resources, but also may affect the accuracy of the optical flow field calculation results.

[0079] Based on this, in one embodiment, selecting two first images at different times from the multiple first images based on the time axis includes:

[0080] Based on the time axis, determining the difference between each first image frame and an adjacent first image frame in the plurality of first image frames, and obtaining a first similarity between each first image frame and an adjacent first image frame;

[0081] Determine whether a first similarity between each first image and an adjacent frame is less than a preset similarity threshold, and if the first similarity is less than the preset similarity threshold, delete an image with an earlier extraction time from the first image and the adjacent frames to obtain a first image set;

[0082] Two first images with different extraction times are selected from the first image set.

[0083] Here, since the images with higher similarity height are deleted, the calculation and storage for the extracted first image can be reduced, and at the same time, the accuracy of the optical flow field calculation result is further improved, thereby improving the accuracy of the motion direction estimation result.

[0084] In practical applications, in order to further reduce the amount of data processing for head recognition, the identified objects can be tracked and identified.

[0085] Based on this, in one embodiment, the method may further include:

[0086] Determine a first object and a second object from the at least one mobile object; the first object is a mobile object with first identification information, and the second object is a mobile object without first identification information;

[0087] For each first object, ReID processing is performed on the first object in the first time period to obtain a re-identification result.

[0088] Here, through ReID processing, the identified objects can be further tracked and identified, avoiding the problem of large data calculation volume caused by repeated identification, reducing data processing pressure and improving data processing efficiency.

[0089] In actual applications, due to the mobility of the crowd and the overlap of collection areas between different devices, using only device recognition results for traffic statistics will lead to duplicate statistics, which not only increases the amount of data processing and reduces data processing efficiency, but also reduces the accuracy of statistical results.

[0090] Based on this, in one embodiment, based on the at least one first identification information and the at least one second identification information, counting the flow of people in the monitoring area of ​​the first device to obtain a first statistical result includes:

[0091] Based on the at least one first identification information, the at least one second identification information and the re-identification result, the flow of people in the monitoring area of ​​the first device is counted to obtain a first statistical result.

[0092] In practical applications, due to the introduction of re-identification results, it is possible to filter out repeated statistical data in different identification information caused by the flow of the same object, thereby improving the accuracy of the statistical results.

[0093] In one embodiment, the counting of the flow of people in the monitoring area of ​​the first device based on the at least one first identification information, the at least one second identification information and the re-identification result to obtain the first statistical result may include:

[0094] Based on the first identification information and the second identification information, determine a flow identification result of the first device monitoring area to obtain a second statistical result;

[0095] Based on the re-identification result, data cleaning is performed on the repeatedly counted moving objects in the second statistical result to obtain a first statistical result.

[0096] In actual application, within a first time period, the moving objects in images captured at different times can be counted to obtain a second statistical result, which includes moving objects identified through recognition processing and moving objects determined by obtaining recognition information from other devices. The re-identification result can be used to clean the repeated statistical data in the second statistical result, thereby improving the accuracy of the statistical result.

[0097] In practical applications, in order to improve the accuracy of ReID, the image to be compared can be segmented, and different segmented areas can be used for refined comparison.

[0098] Based on this, in one embodiment, for each first object, performing ReID processing on the first object in the first time period to obtain a re-identification result may include:

[0099] For each first object, generating a first window including the first object based on the first information of the first object;

[0100] Performing image segmentation on the image in the first window to obtain a second image;

[0101] performing feature extraction on the second image to obtain first feature information;

[0102] Based on the first feature information, ReID is performed on the first object to obtain a corresponding re-identification result.

[0103] In practical application, the image in the first window is segmented to obtain the second image; the image in the first window may be segmented into a plurality of second images, specifically, three second images.

[0104] In practical applications, different second images obtained by segmenting the same moving object can be independent parts, for example Figure 3 As shown, according to the image pixel position, the image is divided into six independent regions from top to bottom, and the six regions do not overlap with each other. For example, Figure 4 As shown, according to the characteristics of body parts, the human body image is segmented into three parts: head, upper body and lower body, and there are overlapping parts between the three parts.

[0105] In actual application, based on the first feature information, ReID is performed on the first object. The first feature information of each second image can be extracted, and the reference image used for comparison is also segmented according to the same segmentation standard, so that the second image corresponds to the segmented reference image one by one. In the ReID implementation process, each second image is feature-matched with the corresponding reference image, and the final re-identification result is determined based on the comparison results of all second images.

[0106] In practical applications, in order to further reduce the amount of calculation, fuzzy comparison can be performed first.

[0107] Based on this, in one embodiment, before performing image segmentation on the image in the first window to obtain the second image, the method may further include:

[0108] Determining reference pixel information of the first object based on first identification information of the first object;

[0109] Determine to extract features from the image in the first window to obtain a second feature;

[0110] Based on the second feature, obtaining actual pixel information of the first object in the first window;

[0111] Determining whether a difference between the actual pixel information and the reference pixel information is lower than a preset pixel difference threshold;

[0112] When the difference is greater than or equal to the pixel difference threshold, image segmentation is performed on the image in the first window to obtain a second image.

[0113] In practical applications, the difference between pixels can be used to determine the color difference of moving objects at the same position in different images. By associating the positions of the moving objects, fuzzy comparison of the same moving object in different images can be achieved.

[0114] Furthermore, in one embodiment, the method may further include:

[0115] When the difference is lower than the pixel difference threshold, ReID is performed on the first object based on the second feature to obtain a corresponding re-identification result.

[0116] In summary, the traffic statistics method based on image processing provided in the embodiment of the present application, by using the position of the mobile object to associate different devices, realizes the "splicing" of the device collection range, so that when other associated devices have identified the mobile object at the position, its identification information can be directly obtained, avoiding repeated identification operations, reducing the data processing volume, improving data processing efficiency, and thus improving traffic statistics efficiency, and further reducing the computing pressure on the processing center due to processing a large amount of data, ensuring the stable and reliable operation of the data processing center; further, since repeated statistics for the same object between different devices are taken into account, the problem of inaccurate traffic statistics results caused by repeated statistics can be reduced, and the accuracy and reliability of the traffic statistics results can be improved.

[0117] In order to implement the traffic statistics method based on image processing of the present application, the embodiment of the present application also provides a traffic statistics system based on image processing, which is arranged on an electronic device, such as Figure 5 As shown, the system includes:

[0118] An acquisition unit 501 is configured to acquire a first video captured by a first device in a first time period; the first video includes at least one moving object;

[0119] A first determining unit 502 is used to determine first information and second information of each moving object based on the first video, wherein the first information represents the position of the moving object, and the second information represents the moving direction of the moving object;

[0120] A second determining unit 503 is used to determine, for each mobile object, whether the mobile object has an associated second device based on the first information and the second information; the second device is a device used to monitor the mobile object before the mobile object enters the monitoring range of the first device;

[0121] The computing unit 504 is configured to obtain, when the second device exists, a recognition result of the corresponding mobile object from the second device to obtain at least one first recognition information; or, when the second device does not exist, perform face recognition on the mobile object to obtain at least one second recognition information;

[0122] The processing unit 505 is used to count the flow of people in the monitoring area of ​​the first device based on the at least one first identification information and the at least one second identification information to obtain a first statistical result.

[0123] In one embodiment, the first determining unit 502 may be specifically configured to:

[0124] For each moving object, extract frames from the first video to obtain multiple frames of first images containing the moving object;

[0125] Based on the mapping relationship between the monitoring area of ​​the first device and the image output by the first device, determine the coordinates of the moving position in each frame of the first image to obtain first information;

[0126] Based on the time axis, selecting two first images at different times from the multiple first images;

[0127] Determine the optical flow field of the moving object based on the selected two frames of first images;

[0128] Based on the optical flow field, the moving direction of the moving object is determined to obtain second information.

[0129] In one embodiment, the first determining unit 502 may be specifically configured to:

[0130] Based on the time axis, determining the difference between each first image frame and an adjacent first image frame in the plurality of first image frames, and obtaining a first similarity between each first image frame and an adjacent first image frame;

[0131] Determine whether a first similarity between each first image and an adjacent frame is less than a preset similarity threshold, and if the first similarity is less than the preset similarity threshold, delete an image with an earlier extraction time from the first image and the adjacent frames to obtain a first image set;

[0132] Two first images with different extraction times are selected from the first image set.

[0133] In one embodiment, the processing unit 505 may also be used to:

[0134] Determine a first object and a second object from the at least one mobile object; the first object is a mobile object with first identification information, and the second object is a mobile object without first identification information;

[0135] For each first object, a pedestrian re-identification ReID process is performed on the first object in the first time period to obtain a re-identification result.

[0136] In one embodiment, the processing unit 505 may be specifically configured to:

[0137] Based on the at least one first identification information, the at least one second identification information and the re-identification result, the flow of people in the monitoring area of ​​the first device is counted to obtain a first statistical result.

[0138] In one embodiment, the processing unit 505 may be specifically configured to:

[0139] Based on the first identification information and the second identification information, determine a flow identification result of the first device monitoring area to obtain a second statistical result;

[0140] Based on the re-identification result, data cleaning is performed on the repeatedly counted moving objects in the second statistical result to obtain a first statistical result.

[0141] In one embodiment, the processing unit 505 may be specifically used for:

[0142] For each first object, generating a first window including the first object based on the first information of the first object;

[0143] Performing image segmentation on the image in the first window to obtain a second image;

[0144] performing feature extraction on the second image to obtain first feature information;

[0145] Based on the first feature information, ReID is performed on the first object to obtain a corresponding re-identification result.

[0146] In one embodiment, before performing image segmentation on the image in the first window to obtain the second image, the processing unit 505 may also be used to:

[0147] Determining reference pixel information of the first object based on first identification information of the first object;

[0148] Determine to extract features from the image in the first window to obtain a second feature;

[0149] Based on the second feature, obtaining actual pixel information of the first object in the first window;

[0150] Determining whether a difference between the actual pixel information and the reference pixel information is lower than a preset pixel difference threshold;

[0151] When the difference is greater than or equal to the pixel difference threshold, image segmentation is performed on the image in the first window to obtain a second image.

[0152] In one embodiment, the processing unit 505 may also be used to:

[0153] When the difference is lower than the pixel difference threshold, ReID is performed on the first object based on the second feature to obtain a corresponding re-identification result.

[0154] It should be noted that: the image processing-based traffic statistics system provided in the above embodiment only uses the division of the above program modules as an example when performing the image processing-based traffic statistics method. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the image processing-based traffic statistics system provided in the above embodiment and the image processing-based traffic statistics method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0155] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0156] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0157] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A traffic statistics method based on image processing, characterized in that: include: Acquire a first video captured by a first device in a first time period; The first video includes at least one moving object; Based on the first video, determining first information and second information of each moving object; The first information represents the position of the mobile object, and the second information represents the moving direction of the mobile object; For each mobile object, determining whether the mobile object has an associated second device based on the first information and the second information; The second device is a device used to monitor the moving object before the moving object enters the monitoring range of the first device; In the case where the second device exists, obtaining a recognition result of the corresponding mobile object from the second device to obtain at least one first recognition information; In the absence of the second device, performing face recognition on the moving object to obtain at least one second identification information; Based on the at least one first identification information and the at least one second identification information, the flow of people in the monitoring area of ​​the first device is counted to obtain a first statistical result.

2. The method according to claim 1, characterized in that The determining, based on the first video, the first information and the second information of each moving object comprises: For each moving object, extract frames from the first video to obtain multiple frames of first images containing the moving object; Based on the mapping relationship between the monitoring area of ​​the first device and the image output by the first device, determine the coordinates of the moving object in each frame of the first image to obtain first information; Based on the time axis, selecting two first images at different times from the multiple first images; Determine the optical flow field of the moving object based on the selected two frames of first images; Based on the optical flow field, the moving direction of the moving object is determined to obtain second information.

3. The method according to claim 2, characterized in that The selecting two first images at different times from the multiple first images based on the time axis includes: Based on the time axis, determining the difference between each first image frame and an adjacent first image frame in the plurality of first image frames, and obtaining a first similarity between each first image frame and an adjacent first image frame; Determine whether a first similarity between each first image and an adjacent frame is less than a preset similarity threshold, and if the first similarity is less than the preset similarity threshold, delete an image with an earlier extraction time from the first image and the adjacent frames to obtain a first image set; Two first images with different extraction times are selected from the first image set.

4. The method according to claim 1, characterized in that The method further comprises: Determine a first object and a second object from the at least one mobile object; the first object is a mobile object with first identification information, and the second object is a mobile object without first identification information; For each first object, a pedestrian re-identification ReID process is performed on the first object in the first time period to obtain a re-identification result.

5. The method according to claim 4, characterized in that The step of counting the flow of people in the monitoring area of ​​the first device based on the at least one first identification information and the at least one second identification information to obtain a first statistical result includes: Based on the at least one first identification information, the at least one second identification information and the re-identification result, the flow of people in the monitoring area of ​​the first device is counted to obtain a first statistical result.

6. The method according to claim 5, characterized in that Based on the at least one first identification information, the at least one second identification information and the re-identification result, counting the flow of people in the monitoring area of ​​the first device to obtain a first statistical result includes: Based on the first identification information and the second identification information, determine a flow identification result of the first device monitoring area to obtain a second statistical result; Based on the re-identification result, data cleaning is performed on the repeatedly counted moving objects in the second statistical result to obtain a first statistical result.

7. The method according to any one of claims 4 to 6, characterized in that The performing ReID processing on each first object in the first time period to obtain a re-identification result includes: For each first object, generating a first window including the first object based on the first information of the first object; Performing image segmentation on the image in the first window to obtain a second image; performing feature extraction on the second image to obtain first feature information; Based on the first feature information, ReID is performed on the first object to obtain a corresponding re-identification result.

8. The method according to claim 7, characterized in that Before performing image segmentation on the image in the first window to obtain the second image, the method further includes: Determining reference pixel information of the first object based on first identification information of the first object; Extracting features of the image in the first window to obtain a second feature; Based on the second feature, obtaining actual pixel information of the first object in the first window; Determining whether a difference between the actual pixel information and the reference pixel information is lower than a preset pixel difference threshold; When the difference is greater than or equal to the pixel difference threshold, image segmentation is performed on the image in the first window to obtain a second image.

9. The method according to claim 8, characterized in that The method further comprises: When the difference is lower than the pixel difference threshold, ReID is performed on the first object based on the second feature to obtain a corresponding re-identification result.

10. A traffic statistics system based on image processing, characterized in that: include: An acquisition unit, configured to acquire a first video captured by a first device in a first time period; The first video includes at least one moving object; A first determining unit, configured to determine first information and second information of each moving object based on the first video; The first information represents the position of the mobile object, and the second information represents the moving direction of the mobile object; A second determining unit, configured to determine, for each mobile object, whether the mobile object has an associated second device based on the first information and the second information; The second device is a device used to monitor the moving object before the moving object enters the monitoring range of the first device; a computing unit, configured to obtain, when the second device exists, a recognition result of the corresponding mobile object from the second device to obtain at least one first recognition information; Alternatively, in the absence of the second device, performing face recognition on the moving object to obtain at least one second identification information; The processing unit is used to count the flow of people in the monitoring area of ​​the first device based on the at least one first identification information and the at least one second identification information to obtain a first statistical result.

Citation Information

Patent Citations

  • Cross-camera suspicious pedestrian target tracking system for rail transit panoramic monitoring

    CN106709436A

  • Quantity statistical method, system and device based on video identification

    CN106940789A