Intelligent park anomaly identification method and system based on AI vision
Patent Information
- Application Number
- CN202610741772.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2046-05-27
AI Technical Summary
针对现有技术的不足,本发明提供了基于AI视觉的智慧园区异常识别方法及系统,解决了园区单目监控中图像平面区域框与真实地面边界不一致、目标接地点受阴影遮挡产生漂移、边界附近越界占用告警抖动的问题
(1)本发明,通过采集园区监控多源数据,并对原始图像、目标跟踪编号、地面采样点坐标、图像配置边界采样点像素坐标、目标实例掩膜、阴影掩膜和遮挡区域掩膜进行预处理,形成园区视觉证据数据库,进而实现了单目监控画面、地面边界、目标接地点和区域占用数据统一关联的效果,有效解决了现有技术中视频目标数据与地面边界数据分散导致越界判定依据不完整的问题。
Smart Images

Figure CN122368501B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart park security monitoring technology, specifically to a smart park anomaly identification method and system based on AI vision. Background Technology
[0002] With the advancement of smart park construction, park security management is gradually shifting from manual patrols and fixed access control to a combination of video perception, target recognition, trajectory tracking, and event alarms. Existing AI vision-based park anomaly identification methods typically use monocular cameras to collect video images of park entrances and exits, parking areas, fire lanes, electronic fence boundaries, and key passage areas. They then utilize target detection, target tracking, instance segmentation, and area rule configuration to identify events such as people crossing boundaries, vehicles being prohibited from parking, fire lane obstruction, personnel lingering, and abnormal entry.
[0003] For example, the invention patent with announcement number CN111680674B discloses a method for monitoring lobby personnel based on an integrated attention mechanism, including: acquiring multiple lobby images; inputting the multiple lobby images into a first part of a convolutional neural network to obtain a partial depth feature map; inputting the partial depth feature map into a self-integrated attention neural network of the convolutional neural network to obtain a partial depth attention map; inputting the partial depth feature map into a second part of the convolutional neural network to obtain a global depth feature map; fusing the partial depth attention map and the global depth feature map to obtain a final feature map; and performing image semantic segmentation based on the final feature map to obtain an image semantic segmentation result, wherein the image semantic segmentation result represents the monitoring result of the lobby, which can more accurately monitor the degree of personnel gathering in the lobby.
[0004] For example, the invention patent with announcement number CN110287826B discloses a video object detection method based on an attention mechanism, which relates to computer vision. It includes the following steps: Step S1, extracting candidate feature maps of the current time frame; Step S2, setting a fusion window in the past time period, calculating the Laplacian variance of each frame within the window, normalizing the variance as the weight of each frame within the window, weighted summing of the candidate feature maps of all frames within the window to obtain temporal features, and concatenating the candidate features of the current time frame with the temporal features to obtain the feature map to be detected; Step S3, using convolutional layers to extract feature maps of additional scales from the feature map to be detected; Step S4, using convolutional layers on feature maps of different scales to predict the target category and location, assigning different weights to frame features of different qualities in the past time period, making the fusion of temporal information more complete.
[0005] However, in actual park operations, targets near the boundary are often affected by shadows, occlusion, reflections, and changes in target posture. When a person's feet are obscured, the position of their feet is easily shifted; when a vehicle's tires are covered by shadows, the tire's contact area is easily widened; when the bottom of the target's outer frame is affected by the vibration of the detection frame, it may also deviate from the actual contact point. If the existing solution directly uses the bottom position of the target's outer frame as the contact point, it is easy to misjudge the image projection crossing the boundary as a real boundary crossing, and it is also easy to miss real line crossing, real intrusion, and fire lane occupation as activities outside the boundary. In addition, park alarms usually need to balance the accuracy of events and the efficiency of handling. If the boundary determination only relies on the pixel frame position in a single frame image, when the target moves near the boundary buffer zone, it is easy to cause problems such as multiple triggers of the same target, repeated alarm jumps, difficulty in locking evidence frames, and unstable event classification. Especially in scenarios where electronic fences, no-parking zones, and fire lanes overlap, it is difficult to distinguish between real boundary crossings, critical stops, and projection deviations based solely on the planar geometry of the image, which affects subsequent alarm confirmation, event evidence retention, and park duty handling.
[0006] Therefore, in order to address the above problems, there is an urgent need for a smart park anomaly identification method and system based on AI vision. Summary of the Invention
[0007] Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a smart park anomaly recognition method and system based on AI vision, which solves the problems of inconsistent image planar area bounding boxes with the actual ground boundary, drift caused by shadow occlusion of target grounding points, and alarm jitter due to boundary over-occupancy near the boundary in monocular monitoring of parks.
[0008] Technical solution
[0009] To achieve the above objectives, the present invention provides the following technical solution: an AI vision-based intelligent park anomaly identification method, comprising: S1, collecting multi-source data from park monitoring and performing preprocessing operations on the multi-source data; S2, performing boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width, and performing boundary mapping verification and normal compensation operations based on the boundary offset analysis results; S3, performing ground drift discrimination based on the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence, and performing ground point reselection and mask compensation operations based on the ground drift discrimination results; S4, performing boundary crossing confirmation by comprehensively considering the crossing depth, prohibited projection area, target ground projection total area, boundary neighborhood dwell time, entry direction marker, boundary offset value, and ground drift value, and performing alarm confirmation and boundary neighborhood tracking operations based on the boundary crossing confirmation results.
[0010] Further, the specific steps for collecting multi-source data from park monitoring are as follows: Collect multi-source data from park monitoring: Obtain camera number, installation height, pitch angle, azimuth angle, camera pixel focal length, principal point coordinates, radial distortion coefficient, tangential distortion coefficient, and calibration board corner pixel coordinates through camera installation calibration; Obtain ground sampling point coordinates, ground control point coordinates, boundary buffer width, road slope angle, and step edge height for electronic fences, no-parking zones, and fire lanes through actual ground measurements in the park; Obtain image configuration boundary sampling point pixel coordinates, image plane electronic fence vertex pixel coordinates, no-parking zone frame pixel coordinates, fire lane frame pixel coordinates, boundary number, area category, alarm service type, confirmation reference duration, and direction inside the no-entry area through the area configuration interface; Obtain frame number, frame timestamp, original image, target bounding box coordinates, target bounding center pixel coordinates, human foot key point pixel coordinates, vehicle tire ground contact area pixel coordinates, ground contact candidate point pixel coordinates, target instance mask, shadow mask, occlusion area mask, and target tracking number through monocular camera video stream.
[0011] Furthermore, the specific steps for preprocessing the multi-source data from the park monitoring system are as follows: Distortion correction is performed on the original images; frame timestamps are aligned; and adjacent frame targets are associated according to the target tracking number. Based on the pixel coordinates of key points on the human feet, the pixel coordinates of the vehicle tire ground contact area, the ordinate of candidate ground contact points, shadow masks, and occlusion area masks, candidate ground contact points are selected, and the ground edge clarity is calculated based on the pixel gradient of the candidate ground contact points' neighborhood. Ground projection of the target instance mask is completed based on the target instance mask and ground control point coordinates, yielding the target ground projection outline and the total target ground projection area. The tangential direction of the ground boundary is calculated based on the coordinates of adjacent ground sampling points, and the ground normal unit vector is obtained by combining it with the direction inside the restricted area. Based on the data obtained from camera installation and calibration, the coordinates of ground control points, and the pixel coordinates of image configuration boundary sampling points, an inverse perspective mapping model is constructed using the planar homography matrix inverse perspective transformation method, outputting the mapped ground coordinates and the target ground contact point ground coordinates. The grounding imaging depth distance is obtained by projecting the ground coordinates of the target grounding point along the main imaging direction; the grounding width is obtained by the distance between the left and right feet and the distance between the grounding areas of the left and right tires; and the grounding mask confidence is obtained by the grounding mask overlap ratio and the grounding edge clarity. The crossing depth and the restricted projection area are obtained based on the normal distance and overlap area between the boundary formed by the target ground projection outline and the ground sampling point coordinates. The dwell time in the boundary neighborhood is obtained by accumulating the associated frame durations of the same target tracking number within the boundary buffer zone. The target ground displacement direction is obtained by the difference between the ground coordinates of the target grounding point in adjacent frames under the same target tracking number, and the angle between the target ground displacement direction and the direction inside the restricted area is converted into the entry movement direction mark. The range method is used to normalize the numerical data. After storing the processed multi-source data of the park monitoring, a park visual evidence database is constructed, and an anomaly identification event table, a grounding stabilization record table, and a target grounding location table are constructed in the park visual evidence database.
[0012] Furthermore, the specific steps for boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width are as follows: obtain the mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width of the boundary sampling point configured in the j-th image; subtract the ground sampling point coordinates from the mapped ground coordinates to obtain the ground offset vector; perform a dot product between the ground offset vector and the ground normal unit vector and take the absolute value to obtain the normal misalignment distance; divide the normal misalignment distance by the sum of the boundary buffer width and a minimum positive number to obtain the boundary offset value of the boundary sampling point.
[0013] Furthermore, the specific steps for performing boundary mapping verification and normal compensation operations based on the boundary offset analysis results are as follows: By comparing the boundary offset value with the boundary offset threshold in real time, when the boundary offset value is less than the boundary offset threshold, the coordinates of the current ground sampling point are retained, and the corresponding boundary sampling point is written into the boundary mapping verification record; when the boundary offset value is greater than or equal to the boundary offset threshold, the boundary mapping correction strategy is adjusted, the image plane region box is stopped as the boundary for out-of-bounds judgment, the boundary sampling point where the normal misalignment occurs is located based on the boundary offset value, and normal compensation is performed on the mapped ground coordinates along the ground normal unit vector to align the corrected mapped ground coordinates with the ground sampling point coordinates. The mapped ground coordinates before correction, the mapped ground coordinates after correction, the ground sampling point coordinates, the ground normal unit vector, and the boundary offset value are written into the boundary correction record.
[0014] Furthermore, the specific steps for ground drift discrimination using the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence are as follows: Obtain the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence; Subtract the target's circumscribed center pixel coordinates from the ground candidate point pixel coordinates and take the absolute value to obtain the ground pixel longitudinal deviation; Multiply the ground pixel longitudinal deviation by the ground imaging depth distance and divide it by the camera pixel focal length and a very small positive number to obtain the ground ground deviation; Divide the ground ground deviation by the product of the ground width and the ground mask confidence and add a very small positive number to obtain the ground drift value.
[0015] Furthermore, the specific steps for performing ground point reselection and mask compensation operations based on the ground drift discrimination results are as follows: By comparing the ground drift value with the ground drift threshold in real time, when the ground drift value is less than the ground drift threshold, the target ground point ground coordinates corresponding to the vertical coordinates of the ground candidate pixel are used as the boundary judgment point, and the target tracking number, frame number, target ground point ground coordinates, and ground drift value are written into the target ground position table; when the ground drift value is greater than or equal to the ground drift threshold, the ground point reselection and mask compensation strategy is adjusted, and the position corresponding to the vertical coordinates of the target's outer center pixel is no longer used as the target ground point ground coordinates, but only the vertical coordinates of the target's outer center pixel are used. As a reference for calculating ground drift value, the ground coordinates of the target ground point are converted using the midpoint of the key points of the left and right feet for human targets, and the ground coordinates of the target ground point are converted using the midpoint of the ground contact area of the left and right tires for vehicle targets. Ground candidate points that fall within the shadow mask range, overlap the occlusion area, or whose ground edge clarity does not reach the ground edge threshold are eliminated. Among the remaining ground candidate points, the point with the highest ground mask confidence is selected as the corrected target ground point ground coordinates, and the ground drift value is recalculated. If the recalculated ground drift value is still greater than or equal to the ground drift threshold, the target is written into the ground stabilization record table, and the output is paused until the subsequent boundary occupancy confirmation step.
[0016] Furthermore, the specific steps for confirming boundary crossing based on the comprehensive factors of crossing depth, prohibited projection area, total target ground projection area, boundary neighborhood dwell time, entry direction marker, boundary offset value, and ground drift value are as follows: Obtain the crossing depth, boundary buffer width, prohibited projection area, total target ground projection area, boundary neighborhood dwell time, confirmation reference time, entry direction marker, boundary offset value, and ground drift value of the i-th target; divide the crossing depth by the sum of the boundary buffer width and the smallest positive number to obtain the crossing depth occupancy item; divide the prohibited projection area by the sum of the total target ground projection area and the smallest positive number to obtain the area occupancy item; add the crossing depth occupancy item and the area occupancy item, multiply by the ratio of the boundary neighborhood dwell time to the confirmation reference time, and multiply by the constant one and the entry direction marker to obtain the boundary crossing occupancy evidence value; divide the boundary crossing occupancy evidence value by the sum of the constant one, the boundary offset value, and the ground drift value to obtain the target's boundary crossing occupancy value.
[0017] Further, the specific steps for performing alarm confirmation and boundary neighborhood tracking operations based on the boundary crossing confirmation result are as follows: By comparing the boundary crossing occupancy value with the boundary crossing confirmation threshold in real time, when the boundary crossing occupancy value is greater than or equal to the boundary crossing confirmation threshold, the boundary number corresponding to the current target and the nearest boundary sampling point are locked, the boundary crossing confirmation frame is retained as the main evidence frame, and the f frames before and b frames after the boundary crossing confirmation frame are extracted to form an evidence frame group; if all evidence frames in the evidence frame group point to the same boundary number, and the crossing depth and the prohibited projection area maintain the boundary crossing occupancy relationship, then the current target event is confirmed to be established, the current target event is written into the anomaly identification event table, and marked as a real boundary crossing event, a prohibited parking event, and a fire lane occupancy event according to the alarm service type, and an alarm command is generated; the main evidence frame, evidence frame group, boundary offset value, ground drift value, and boundary crossing occupancy are then used to establish the boundary crossing event. The value is associated and written to the anomaly identification event table; when the out-of-bounds occupancy value is less than the out-of-bounds confirmation threshold, the dwell time in the boundary neighborhood, the depth of crossing the line, and the area occupied by the prohibited projection continue to be recorded; if the out-of-bounds occupancy value of the same target alternates between being not less than the out-of-bounds confirmation threshold and being less than the out-of-bounds confirmation threshold in n adjacent frames near the same boundary number, then the event numbers of adjacent frames are merged, the same boundary number and the same target tracking number are locked, a candidate evidence frame group is obtained, the frame with the largest out-of-bounds occupancy value is retained as the main evidence frame, and the out-of-bounds occupancy value is recalculated based on the latest dwell time in the boundary neighborhood, the maximum depth of crossing the line, and the maximum area occupied by the prohibited projection; when the recalculated out-of-bounds occupancy value is greater than or equal to the out-of-bounds confirmation threshold, the candidate evidence frame group is transferred to the alarm confirmation strategy; when the recalculated out-of-bounds occupancy value is less than the out-of-bounds confirmation threshold, only the boundary neighborhood tracking record is retained.
[0018] Furthermore, a second aspect of the present invention provides an AI-based vision-based smart park anomaly identification system, applying an AI-based vision-based smart park anomaly identification method, including: a park visual data acquisition and preprocessing module, used to acquire multi-source data from park monitoring and perform preprocessing operations on the multi-source data; a ground boundary projection offset correction module, used to perform boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width, and perform boundary mapping verification and normal compensation operations based on the boundary offset analysis results; and target grounding position drift discrimination. The first module is used to determine ground drift by using the target's circumscribed center pixel coordinates, ground candidate pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence. Based on the ground drift determination results, it performs ground point reselection and mask compensation operations. The second module is used to confirm boundary over-boundary occupancy by comprehensively considering the over-boundary depth, prohibited projection area, target ground projection total area, boundary neighborhood dwell time, entry direction marking, boundary offset value, and ground drift value. Based on the boundary over-boundary occupancy confirmation results, it performs alarm confirmation and boundary neighborhood tracking operations.
[0019] The present invention has the following beneficial effects: (1) This invention collects multi-source data from park monitoring and preprocesses the original image, target tracking number, ground sampling point coordinates, image configuration boundary sampling point pixel coordinates, target instance mask, shadow mask and occlusion area mask to form a park visual evidence database. This achieves the effect of unified association between monocular monitoring screen, ground boundary, target grounding point and area occupancy data, effectively solving the problem of incomplete boundary judgment basis caused by the dispersion of video target data and ground boundary data in the prior art.
[0020] (2) In this invention, boundary offset analysis is performed by mapping ground coordinates, ground sampling point coordinates, ground normal unit vector and boundary buffer width, and boundary mapping verification and normal compensation operation are performed based on the boundary offset value, thereby achieving the effect of aligning the image configuration boundary with the real ground boundary, effectively solving the problem of false alarms and false alarms caused by the deviation of the image planar region box from the real ground boundary in the prior art.
[0021] (3) In this invention, ground drift is determined by the target outer center pixel ordinate, ground candidate pixel ordinate, ground imaging depth distance, camera pixel focal length, ground width and ground mask confidence, and ground point reselection and mask compensation operation is performed based on the ground drift value, thereby achieving the effect of ground coordinate correction of the target ground point, effectively solving the problem of inaccurate ground point estimation caused by shadow occlusion and bottom deviation of the outer frame in the prior art.
[0022] (4) This invention uses boundary confirmation frames, evidence frame groups, boundary neighborhood tracking records and boundary occupancy value recalculation to merge and confirm the boundary states of the same target near the same boundary number, thereby achieving the effect of stable output of abnormal identification events and effectively solving the problem of the same target being split into multiple alarm records within the boundary buffer zone in the prior art.
[0023] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0024] Figure 1 This is a flowchart of the AI vision-based smart park anomaly identification method of the present invention; Figure 2 This is a structural diagram of the AI vision-based smart park anomaly recognition system of the present invention; Figure 3 This is a comparative analysis chart showing the variation of the accuracy of grounding location estimation of the monitoring target in the park as a function of distance. Figure 4 This is a comparative analysis diagram of the temporal evolution of the identification of boundary crossing anomalies in the park according to the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Please see Figures 1-4 This invention provides a technical solution: an AI vision-based smart park anomaly identification method, comprising: S1, collecting multi-source data from park monitoring and preprocessing the multi-source data; S2, performing boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width, and performing boundary mapping verification and normal compensation operations based on the boundary offset analysis results; S3, performing ground drift discrimination based on the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence, and performing ground point reselection and mask compensation operations based on the ground drift discrimination results; S4, performing boundary crossing confirmation by comprehensively considering the crossing depth, prohibited projection area, target ground projection total area, boundary neighborhood dwell time, entry direction marker, boundary offset value, and ground drift value, and performing alarm confirmation and boundary neighborhood tracking operations based on the boundary crossing confirmation results.
[0027] Specifically, the steps for collecting multi-source data from park surveillance are as follows: Collect multi-source data from park surveillance: Obtain the camera number, installation height, pitch angle, azimuth angle, camera pixel focal length, principal point coordinates, radial distortion coefficient, tangential distortion coefficient, and calibration board corner pixel coordinates through camera installation and calibration. During camera installation and calibration, place the calibration board within the coverage area of ground control points near electronic fences, no-parking zones, and fire lanes, and capture calibration images including the calibration board corner points and ground control points. Calculate the camera pixel focal length, principal point coordinates, radial distortion coefficient, and tangential distortion coefficient based on the calibration board corner pixel coordinates, and bind the camera number with the installation height, pitch angle, and azimuth angle; through... Ground measurements were conducted to obtain the coordinates of ground sampling points, ground control points, boundary buffer widths, road slope angles, and step edge heights for the electronic fence, no-parking zones, and fire lanes. During the ground measurements, ground sampling points were selected along the edges of the electronic fence, no-parking zones, and fire lanes, and their coordinates were measured. Ground control points were also selected at the intersections of paving stones, the endpoints of the lane lines, the corners of the no-parking zones, and the endpoints of the step edges, establishing a pairing relationship between the coordinates of the ground control points and the corresponding pixels in the image. The pixel coordinates of the image configuration boundary sampling points, the pixel coordinates of the electronic fence vertices, the pixel coordinates of the no-parking zone frames, the pixel coordinates of the fire lane frames, the boundary number, and the area configuration were obtained through the region configuration interface. The system configures the image configuration boundary sampling point pixel coordinates and ground sampling point coordinates in the area configuration interface according to the boundary number, specifying the category, alarm service type, confirmation reference duration, and inner direction of the restricted area. This ensures that electronic fences, no-parking zones, and fire lanes have a correspondence between image points and ground points under the same boundary number. The system acquires frame number, frame timestamp, original image, target bounding box coordinates, target bounding center pixel coordinates, human foot keypoint pixel coordinates, vehicle tire ground contact area pixel coordinates, ground contact candidate point pixel coordinates, target instance mask, shadow mask, occlusion area mask, and target tracking number from the monocular camera video stream. When constructing the inverse perspective mapping model, the system reads the paired ground... Using the coordinates of the control points and their corresponding pixels, at least four sets of non-collinear point pairs are selected to construct the plane homography matrix constraint equation. The initial plane homography matrix is solved using normalized direct linear transformation. Point pairs with errors exceeding the reprojection error threshold are eliminated using reprojection error, and the remaining point pairs are used to resolve the plane homography matrix, resulting in an inverse perspective mapping model from image pixel coordinates to ground coordinates. The pixel coordinates of the image configuration boundary sampling points are input into the inverse perspective mapping model to obtain the mapped ground coordinates. The ground candidate points corresponding to the ordinates of the ground candidate point pixels are input into the inverse perspective mapping model to obtain the ground coordinates of the target ground point. This provides a data foundation for subsequent boundary offset analysis, ground drift discrimination, and occupancy / boundary violation confirmation.
[0028] In this implementation plan, multi-source monitoring data of the park is acquired through camera installation and calibration, on-site ground measurement, area configuration interface, and monocular camera video stream. A correspondence is established between the pixel coordinates of the calibration board corner points, ground control points, image configuration boundary sampling points, ground sampling points, and grounding candidate points. This allows electronic fences, no-parking zones, fire lanes, and target grounding points in the image plane to be converted into mapped ground coordinates and target grounding point ground coordinates in the ground space. Through inverse perspective transformation of the planar homography matrix and reprojection error filtering, boundary mapping deviations caused by camera pitch angle, lens distortion, road slope angle, and step edge height are reduced. This provides the ground normal unit vector, boundary buffer width, and mapped ground coordinates as a basis for subsequent boundary offset analysis. Furthermore, it provides the target circumscribed center pixel coordinates, grounding candidate point pixel coordinates, grounding imaging depth distance, grounding width, and grounding mask confidence for grounding drift discrimination. This provides a unified data source for determining the depth of crossing the boundary, the area occupied by the prohibited projection, the total area of the target ground projection, the duration of stay in the boundary neighborhood, and the direction of movement marking in the boundary crossing confirmation process.
[0029] Specifically, the preprocessing steps for multi-source data from park monitoring are as follows: Distortion correction is performed on the original images; frame timestamps are aligned; and adjacent frame targets are associated according to the target tracking number. Based on the pixel coordinates of key points on the human feet, the pixel coordinates of the vehicle tire ground contact area, the ordinate of candidate ground contact points, shadow masks, and occlusion area masks, candidate ground contact points are selected, and the ground edge clarity is calculated based on the pixel gradient of the candidate ground contact points' neighborhood. Ground projection of the target instance mask is completed based on the target instance mask and ground control point coordinates, yielding the target ground projection outline and the total target ground projection area. The tangential direction of the ground boundary is calculated based on the coordinates of adjacent ground sampling points, and the ground normal unit vector is obtained by combining it with the direction inside the restricted area. Based on the data obtained from camera installation calibration, ground control point coordinates, and image configuration boundary sampling point pixel coordinates, an inverse perspective mapping model is constructed using the planar homography matrix inverse perspective transformation method, outputting the mapped ground coordinates and the target ground contact point ground coordinates. The target ground contact point ground coordinates are transformed to the camera coordinate system, and the depth component of the target ground contact point in the ray direction from the camera optical center to the image principal point is taken as... The grounding imaging depth distance is calculated as follows: The pixel coordinates of key points on the left and right feet of the human body are converted to ground coordinates using an inverse perspective mapping model, and the ground distance is measured. Similarly, the pixel coordinates of the grounding areas of the left and right tires of the vehicle are converted to ground coordinates using the same model, and the ground distance is measured. This measured ground distance is used as the grounding width. The grounding mask confidence level is obtained based on the grounding mask overlap ratio and grounding edge clarity. The crossing depth and prohibited projection area are obtained based on the normal distance and overlap area between the boundary formed by the target ground projection contour and the ground sampling point coordinates. The boundary neighborhood dwell time is accumulated based on the associated frame durations within the boundary buffer zone for the same target tracking number. The target ground displacement direction is obtained based on the difference in ground coordinates of the target grounding points in adjacent frames under the same target tracking number, and the angle between the target ground displacement direction and the direction inside the prohibited area is converted into an entry movement direction marker. The range method is used to normalize the numerical data. After storing the processed multi-source data from the park monitoring system, a park visual evidence database is constructed, and an anomaly identification event table, a grounding stabilization record table, and a target grounding location table are built within this database.
[0030] In this implementation scheme, by uniformly preprocessing the original image, frame timestamp, target tracking number, grounding candidate point, target instance mask, ground sampling point coordinates, and image configuration boundary sampling point pixel coordinates, a correspondence is established between the target position, grounding position, region boundary in the image domain and the ground coordinate domain. This yields the mapped ground coordinates, target grounding point ground coordinates, grounding imaging depth distance, grounding width, grounding mask confidence, target ground projection contour, target ground projection total area, crossing depth, prohibited projection occupied area, boundary neighborhood dwell time, and entry movement direction marker. This provides a unified data foundation for subsequent boundary offset analysis, grounding drift discrimination, and occupancy cross-boundary confirmation, reducing the boundary position deviation and grounding point identification deviation caused by simply relying on the image planar region box.
[0031] Specifically, the steps for boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width are as follows: Obtain the mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width of the j-th image configuration boundary sampling point, and establish a correspondence between sampling points according to boundary numbers, ensuring that the image configuration boundary sampling points and the real ground boundary sampling points participate in the calculation under the same ground coordinate reference; subtract the ground sampling point coordinates from the mapped ground coordinates to obtain the ground offset vector, which is used to characterize the ground position deviation of the image planar region box relative to the real ground boundary after inverse perspective mapping; and perform ground offset analysis on the ground... The offset vector is multiplied by the ground normal unit vector and the absolute value is taken to obtain the normal misalignment distance, which weakens the slip deviation along the boundary direction and highlights the inner and outer offsets that affect the boundary crossing judgment. The normal misalignment distance is divided by the sum of the boundary buffer width and the smallest positive number to obtain the boundary offset value of the boundary sampling point. This allows the boundary offsets under different camera angles, different boundary lengths, different electronic fences, no-parking zones and fire lanes to be compared on a uniform scale. The boundary offset value is used to monitor changes in camera installation posture, inverse perspective mapping error and ground boundary configuration drift in real time, and provides a judgment basis for subsequent boundary mapping verification and normal compensation operations.
[0032] The specific formula for calculating the boundary offset value is as follows: ; In the formula, This represents the boundary offset value of the j-th boundary sampling point, reflecting the degree of normal misalignment of the image configuration boundary relative to the real ground boundary after ground mapping; This represents the ground coordinates obtained by inverse perspective mapping of the j-th image configuration boundary sampling point, reflecting the restored position of the image plane electronic fence, no-stopping zone box, or fire lane box on the real ground. This represents the coordinates of the j-th ground sampling point, reflecting the actual boundary location of the electronic fence, no-parking zone, or fire lane obtained from the survey. Represents the ground normal unit vector at the j-th real ground boundary sampling point, reflecting the normal discrimination criterion for the inner and outer directions of the boundary; This represents the boundary buffer width corresponding to the j-th boundary sampling point, reflecting the permissible ground buffer scale at the boundaries of electronic fences, no-parking zones, or fire lanes; It represents a very small positive number and reflects the denominator correction basis in ratio calculation.
[0033] In this implementation, the deviation between the mapped ground coordinates and the ground sampling point coordinates is projected onto the direction of the ground normal unit vector, and scaled using the boundary buffer width to form a comparable boundary offset value. This allows the misalignment between the inner and outer sides of the image plane region box and the real ground boundary to be quantified and recorded. The boundary offset value can be used to identify boundary offsets caused by camera pose changes, inverse perspective mapping errors, and ground boundary configuration deviations. It also provides input for boundary mapping verification, normal compensation, and occupancy over-boundary confirmation, thereby reducing false alarms caused by targets crossing boundaries only in image projection, as well as missed alarms caused by targets pressing on the real ground but the image region box not triggering the detection.
[0034] Specifically, the steps for performing boundary mapping verification and normal compensation operations based on the boundary offset analysis results are as follows: By comparing the boundary offset value with the boundary offset threshold in real time, when the boundary offset value is less than the boundary offset threshold, the current ground sampling point coordinates are retained, and the corresponding boundary sampling point is written into the boundary mapping verification record. The boundary mapping verification record synchronously saves the boundary number, region category, mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, boundary buffer width, and boundary offset value, which are used to mark that the normal misalignment between the current image configuration boundary and the ground sampling point coordinates is within the allowable range; when the boundary offset value is not less than the boundary offset threshold, the boundary mapping correction strategy is adjusted, and the use of the electronic fence boundary formed by the vertex pixel coordinates of the image plane electronic fence, the no-parking area boundary formed by the pixel coordinates of the no-parking area box, and the fire lane boundary formed by the pixel coordinates of the fire lane box is stopped as... The boundary for determining boundary crossings has been changed to the actual boundaries of the electronic fence, no-parking zone, and fire lane corresponding to the coordinates of the ground sampling points. The boundary sampling points where normal misalignment occurs are located based on the boundary offset values. The normal compensation distance is obtained by multiplying the boundary offset value by the boundary buffer width. The compensation direction is determined by combining the dot product of the mapped ground coordinates (minus the ground sampling point coordinates) and the ground normal unit vector. Normal compensation is performed on the mapped ground coordinates along the ground normal unit vector to align the corrected mapped ground coordinates with the ground sampling point coordinates in the normal direction. The mapped ground coordinates before correction, the mapped ground coordinates after correction, the ground sampling point coordinates, the ground normal unit vector, the boundary buffer width, the normal compensation distance, the boundary number, the area category, and the boundary offset value are written into the boundary correction record to provide the corrected boundary basis for subsequent boundary crossing depth, no-entry projection area, and boundary crossing occupancy value.
[0035] In this implementation, the deviation between the target's outer center pixel coordinate and the ground candidate point pixel coordinate is determined by the ground drift value. When the ground drift value is less than the ground drift threshold, the target ground point ground coordinate is retained for boundary violation determination. When the ground drift value is greater than or equal to the ground drift threshold, the target's outer center pixel coordinate is reduced to the reference value, and the target ground point ground coordinate is reselected by the midpoint of the left and right foot key points, the center point of the left and right tire ground area, the shadow mask, the occlusion area mask, the ground edge clarity, and the ground mask confidence, so that ground candidate points affected by shadows, occlusion, and detection frame offset are excluded. If the recalculated ground drift value still does not meet the ground drift threshold, the target enters the ground stabilization record table and the output is paused until the subsequent boundary violation confirmation step. This ensures that the boundary violation confirmation step only receives the target ground point ground coordinates with clear sources, reliable masks, and stable positions, reducing false boundary violations and missed line violations caused by the bottom of the target's outer frame mistakenly replacing the real ground point.
[0036] Specifically, the steps for ground drift discrimination using the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence level are as follows: Obtain the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence level. The ground imaging depth distance represents the depth component along the ray direction from the camera's optical center to the image's principal point after the ground coordinates of the target ground point are transformed to the camera coordinate system; it is used to characterize the magnification degree of the shooting distance affecting the longitudinal deviation of the same pixel when converted to the ground scale. The ground width represents the ground distance between key points of the left and right feet of a human body after inverse perspective mapping, and the ground distance between the ground contact areas of the left and right tires of a vehicle after inverse perspective mapping; it is used to characterize the target ground scale reference. The absolute value of the difference between the target's circumscribed center pixel coordinates and the ground candidate point pixel coordinates is used to obtain the ground pixel coordinates. Longitudinal deviation; multiplying the longitudinal deviation of the ground pixel by the ground imaging depth distance, and then dividing by the sum of the camera pixel focal length and a very small positive number, yields the ground ground deviation. This ground ground deviation represents the ground position deviation formed after the image's longitudinal ground point deviation is converted to a monocular imaging scale. Dividing the ground ground deviation by the product of the ground width and the ground mask confidence, and then adding a very small positive number, yields the ground drift value. The ground width is used to normalize the ground deviation of targets at different scales, and the ground mask confidence is used to constrain the ground point instability caused by shadow masks, occlusion area masks, and ground edge sharpness. As the ground ground deviation increases, the ground drift value increases. As the ground width increases, the impact of the same amplitude ground ground deviation on the ground drift value weakens. When the ground mask confidence decreases, the ground drift value increases and triggers ground point reselection and mask compensation operations, thereby reducing the false detection sensitivity caused by shadows, occlusion, and the offset of the target's outer center pixel's ordinate. Figure 3The figure shows a comparative analysis of the accuracy of grounding position estimation of the park monitoring target provided in this application embodiment as a function of distance. The horizontal axis represents the distance between the target and the camera, and the vertical axis represents the grounding deviation. As can be seen from the curves in the figure, the grounding deviation of the traditional method increases rapidly and linearly with increasing distance, exceeding 100 cm at a distance of 50 meters, with a corresponding grounding drift value exceeding 1.00, which cannot meet the accuracy requirements for boundary crossing identification. In contrast, the grounding deviation of this solution increases slowly with increasing distance, with a deviation of only about 22 cm at a distance of 50 meters, and a corresponding grounding drift value of about 0.22, which remains within an acceptable error range. This figure visually demonstrates that the target grounding position drift discrimination module of this application, by introducing foot key points and tire grounding area extraction, grounding drift value quantification evaluation, and grounding point reselection compensation strategy, can significantly reduce the estimation error of the target grounding position in monocular visual monitoring. It effectively solves the problem of excessive long-distance error caused by the traditional method of using the bottom of the outer frame as the grounding point, provides an accurate positional basis for subsequent boundary over-boundary occupancy confirmation, reduces false alarms and missed alarms caused by grounding position drift from the source, and comprehensively improves the overall reliability and stability of the park monitoring anomaly identification system.
[0037] The specific formula for calculating the ground drift value is as follows: ; In the formula, This represents the ground drift value of the i-th target, reflecting the ground scale error introduced when the center of the bottom edge of the outer frame replaces the actual grounding point; The ordinate of the outer center pixel of the i-th target is represented, reflecting the grounding substitution position of the bottom of the detection box in the image plane; The ordinate of the pixel of the i-th target grounding candidate point reflects the candidate position of the actual grounding point of the target in the image plane; This represents the ground imaging depth distance, reflecting the distance reference when the pixel longitudinal deviation is converted into ground-scale deviation; It represents the focal length of the camera pixels, reflecting the conversion relationship between pixel scale and ground scale; This represents the grounding width of the i-th target, reflecting the stride of a human's two feet or the grounding width of a vehicle's tires; This represents the confidence level of the grounding mask for the i-th target, reflecting the reliability of the extraction results for key foot points or tire grounding areas; It represents a very small positive number and reflects the denominator correction basis in ratio calculation.
[0038] In this implementation, the ground deviation is calculated by combining the difference between the target's outer center pixel ordinate and the ground candidate pixel ordinate, along with the ground imaging depth distance and camera pixel focal length. Then, the ground deviation is scaled and constrained using the ground width and ground mask confidence level to form a ground drift value. This allows the ground point pixel deviation, imaging distance magnification, target ground scale, and mask confidence level to jointly participate in the ground reliability judgment. When the ground candidate point is affected by shadow masks, occluded area masks, and unclear ground edges, the decrease in ground mask confidence level will amplify the ground drift value, thereby triggering ground point reselection and mask compensation operations, thus reducing out-of-bounds misjudgments caused by the target's outer center pixel ordinate offset.
[0039] Specifically, the steps for performing ground point reselection and mask compensation based on the ground drift discrimination result are as follows: By comparing the ground drift value with the ground drift threshold in real time, when the ground drift value is less than the ground drift threshold, the ground coordinates of the target ground point corresponding to the vertical coordinate of the ground candidate pixel are used as the boundary judgment point, and the target tracking number, frame number, ground coordinates of the target ground point, vertical coordinates of the ground candidate pixel, ground mask confidence, and ground drift value are written into the target ground location table, so that the ground location source, ground confidence, and frame-level judgment criteria form a corresponding relationship; when the ground drift value is greater than or equal to the ground drift threshold, the ground point reselection and mask compensation strategy is adjusted, and the position corresponding to the vertical coordinate of the target outer center pixel is no longer used as the ground coordinate of the target ground point, but only the vertical coordinate of the target outer center pixel is used as the reference in the calculation of the ground drift value, so as to avoid the bottom of the target outer frame being directly involved in the boundary judgment after being affected by shadow mask, occlusion area mask, and detection frame jitter; for human targets, the key points of the left and right feet are used instead. The ground coordinates of the target ground point are converted from point to point. For vehicle targets, the ground coordinates of the target ground point are converted from the center point of the ground contact area of the left and right tires. The ground candidate points are checked to see if they are located in the actual contact area of the target, based on the bottom edge position of the target instance mask. Ground candidate points that fall within the shadow mask range, overlap with the occlusion area, or whose ground edge clarity does not meet the ground edge threshold are eliminated. Ground candidate points that are not affected by shadow occlusion and whose ground edge clarity meets the requirements are retained. Among the remaining ground candidate points, the point with the highest ground mask confidence is selected as the corrected target ground point ground coordinates. The ground drift value is recalculated. The corrected target ground point ground coordinates, ground mask confidence, and recalculated ground drift value are written into the target ground position table. If the recalculated ground drift value is still greater than or equal to the ground drift threshold, the target is written into the ground stabilization record table. The target tracking number, frame number, target instance mask, shadow mask, occlusion area mask, and ground drift value are retained. Output is paused until the subsequent occupancy over-limit confirmation step.
[0040] In this implementation, the deviation between the target's outer center pixel coordinate and the ground candidate point pixel coordinate is determined by the ground drift value. When the ground drift value is less than the ground drift threshold, the target ground point ground coordinate is retained for boundary violation determination. When the ground drift value is greater than or equal to the ground drift threshold, the target's outer center pixel coordinate is reduced to the reference value, and the target ground point ground coordinate is reselected by the midpoint of the left and right foot key points, the center point of the left and right tire ground area, the shadow mask, the occlusion area mask, the ground edge clarity, and the ground mask confidence, so that ground candidate points affected by shadows, occlusion, and detection frame offset are excluded. If the recalculated ground drift value still does not meet the ground drift threshold, the target enters the ground stabilization record table and the output is paused until the subsequent boundary violation confirmation step. This ensures that the boundary violation confirmation step only receives the target ground point ground coordinates with clear sources, reliable masks, and stable positions, reducing false boundary violations and missed line violations caused by the bottom of the target's outer frame mistakenly replacing the real ground point.
[0041] Specifically, the steps for confirming boundary crossing based on the crossing depth, restricted projection area, total target ground projection area, dwell time in the boundary neighborhood, entry direction marker, boundary offset value, and ground drift value are as follows: Obtain the crossing depth, boundary buffer width, restricted projection area, total target ground projection area, dwell time in the boundary neighborhood, confirmation reference duration, entry direction marker, boundary offset value, and ground drift value for the i-th target; wherein, the entry direction marker is formed by the intersection of the target ground displacement direction and the direction within the restricted area. The angle is determined as follows: when the target ground displacement direction points towards the inside of the restricted area and the included angle is less than the direction confirmation angle, the entry movement direction marker is set to one; when the target ground displacement direction deviates from the inside of the restricted area and the included angle is not less than the direction confirmation angle, the entry movement direction marker is set to zero. The crossing depth is divided by the sum of the boundary buffer width and the smallest positive number to obtain the crossing depth occupancy item. The restricted area projection area is divided by the sum of the total target ground projection area and the smallest positive number to obtain the area occupancy item. The crossing depth occupancy item and the area occupancy item are added together and then multiplied by the edge... The proportion of the dwell time in the boundary neighborhood to the confirmation reference time is multiplied by a constant and the sum of the entry direction marker to obtain the boundary occupancy evidence value. The aforementioned boundary depth occupancy item, area occupancy item, proportion of the dwell time in the boundary neighborhood to the confirmation reference time, entry direction marker, boundary offset value, and ground drift value are all processed in a dimensionless form, allowing distances, areas, durations, and markers at different scales to be integrated under the same boundary occupancy confirmation caliber. The boundary occupancy evidence value is divided by the sum of the constant, boundary offset value, and ground drift value to obtain the target... The target's out-of-bounds occupancy value includes a boundary offset value to suppress boundary errors caused by the deviation of the mapped ground coordinates from the ground sampling point coordinates, and a ground drift value to suppress grounding point errors caused by the deviation of the target's outer center pixel's vertical coordinates from the grounding candidate pixel's vertical coordinates. This ensures that the out-of-bounds occupancy value, based on the occupancy evidence provided by the crossing depth, prohibited projection area, boundary neighborhood dwell time, and entry direction marking, deducts the error effects introduced by boundary mapping drift and grounding position drift, and outputs the out-of-bounds occupancy value to the subsequent alarm confirmation and evidence frame group verification steps.
[0042] The specific formula for calculating the out-of-bounds occupancy value is as follows: ; In the formula, This represents the boundary occupancy value of the i-th target, reflecting the degree of anomaly confirmation formed by the target's boundary crossing depth on the real ground boundary, the area occupied by the restricted area, the cross-frame dwell state, and the direction of movement into the restricted area; This represents the depth of the i-th target crossing the line, reflecting the normal distance after the target's ground position crosses the real ground boundary; it is zero when it does not cross the real ground boundary. This represents the boundary buffer width corresponding to the boundary sampling point closest to the i-th target, reflecting the service buffer scale of the current target's associated boundary; This represents the area occupied by the i-th restricted area projection, reflecting the area of the target mask located inside the electronic fence, inside the no-stopping area, or inside the fire lane after being mapped by the ground. This represents the total ground projection area of the i-th target, reflecting the total area occupied by the target mask after ground mapping; This represents the dwell time of the i-th target in the boundary neighborhood, reflecting the duration of the target's associated tracking within the boundary buffer zone; This indicates the confirmation reference duration, reflecting the reference time length required for cross-frame confirmation; This represents the entry direction marker of the i-th target. It is set to one when the target's movement direction points to the inside of the restricted area, and to zero when the target's movement direction moves away from the inside of the restricted area. This represents the boundary offset value of the boundary sampling point closest to the i-th target, reflecting the mapping error of the boundary associated with the current target; This represents the ground drift value of the i-th target, reflecting the current target ground position estimation error; It represents a very small positive number and reflects the denominator correction basis in ratio calculation.
[0043] Table 1 shows the parameters and results for identifying boundary crossing anomalies in this embodiment. In the first scenario, the crossing depth is 0.00, the boundary buffer width is 0.50, the prohibited projection area is 0.00, the total target ground projection area is 0.80, the boundary neighborhood dwell time is 0.00, the confirmation reference time is 3.00, the entry direction marker is 0, the boundary offset value is 0.12, and the ground drift value is 0.08. The calculated boundary crossing value is 0.00. In the second scenario, the crossing depth is 0.15, the boundary buffer width is 0.50, the prohibited projection area is 0.12, the total target ground projection area is 0.80, the boundary neighborhood dwell time is 2.50, the confirmation reference time is 3.00, the entry direction marker is 0, the boundary offset value is 0.15, and the ground drift value is 0.10. The calculated boundary crossing value is 0.16. The third scenario has a boundary crossing depth of 0.32, a boundary buffer width of 0.50, a prohibited projection area of 0.48, a target ground projection area of 0.80, a boundary neighborhood dwell time of 3.50, a confirmation reference time of 3.00, an entry direction marker of 1, a boundary offset of 0.12, and a ground drift of 0.08. The calculated boundary crossing value is 1.15. The fourth scenario has a boundary crossing depth of 0.20, a boundary buffer width of 0.50, a prohibited projection area of 0.20, a target ground projection area of 0.80, a boundary neighborhood dwell time of 0.50, a confirmation reference time of 3.00, an entry direction marker of 1, a boundary offset of 0.15, and a ground drift of 0.10. The calculated boundary crossing value is 0.15.
[0044] Table 1. Parameters and Results for Identifying Boundary Crossing Anomalies in the Park
[0045] like Figure 4 As shown, this is a temporal evolution comparison and analysis diagram of the park boundary crossing anomaly identification provided in this application embodiment. The horizontal axis represents the frame number, and the vertical axis represents the boundary crossing occupancy value. The diagram includes the change curve of this scheme, the judgment curve of the traditional method, and the boundary crossing confirmation threshold baseline, and divides it into two major feature intervals: hovering near the boundary and actual boundary crossing. (Referring to Table 1 and...) Figure 4As can be seen, the boundary occupancy value in the first scenario is 0.00, corresponding to the normal state where the target walks normally outside the boundary without any boundary crossing behavior; the boundary occupancy value in the second scenario is 0.16, corresponding to the anti-false alarm state where the target lingers near the boundary and traditional methods frequently issue false alarms but do not trigger alarms; the boundary occupancy value in the third scenario reaches 1.15, corresponding to the accurate identification state where the target actually crosses the boundary and alarms are triggered stably; the boundary occupancy value in the fourth scenario is 0.15, corresponding to the anti-jitter state where the target briefly crosses the boundary and then leaves immediately without generating false alarms. In summary, when the target is lingering near the boundary, the judgment result of traditional methods frequently jumps and there is obvious alarm jitter problem, while the boundary occupancy value of this solution is always maintained at a low level, not reaching the alarm judgment condition, and has good anti-false alarm capability; after the target enters the actual boundary crossing area, the boundary occupancy value of this solution rises steadily and exceeds the boundary crossing confirmation threshold, which can accurately lock the actual intrusion behavior; after the target leaves the boundary crossing area, the boundary occupancy value falls back steadily and synchronously, without any delayed false triggering phenomenon. Table 1 intuitively quantifies the correspondence between key parameters such as boundary crossing depth, prohibited projection area, boundary neighborhood dwell time, boundary offset value, and ground drift value and boundary crossing occupancy value under different working conditions. It clearly shows the law that the degree of boundary crossing occupancy changes positively with the intrusion feature parameter and negatively with the position error parameter. It fully verifies that the boundary crossing state quantified by multi-feature fusion in this application can effectively avoid the false alarms, missed alarms, and alarm jitter defects that are prone to occur in traditional monocular vision park boundary crossing recognition. It provides reliable data support and theoretical basis for park abnormal event identification, alarm command generation, and refined security management, and significantly improves the stability and judgment accuracy of park boundary crossing recognition.
[0046] In this implementation plan, the depth of crossing the line, the area occupied by the restricted area projection, the total area of the target ground projection, the duration of stay in the boundary neighborhood, and the direction of movement marking in the entry area are all incorporated into the same dimensionless confirmation caliber. This forms a boundary crossing evidence value that can reflect the true boundary of the target's occupancy. Furthermore, the boundary offset value and ground drift value are used to suppress false alarm factors caused by the deviation of the mapped ground coordinates and the deviation of the target ground coordinates. This ensures that the boundary crossing value not only reflects the depth, area, stay, and direction of the target entering the restricted area, but also reduces the interference caused by calibration drift, shadow occlusion, and ground candidate point offset. In this way, it provides a stable judgment basis for subsequent alarm confirmation, boundary neighborhood tracking, and evidence frame group verification.
[0047] Specifically, the steps for performing alarm confirmation and boundary neighborhood tracking based on the boundary crossing confirmation result are as follows: By comparing the boundary crossing occupancy value with the boundary crossing confirmation threshold in real time, when the boundary crossing occupancy value is not less than the boundary crossing confirmation threshold, the boundary number corresponding to the current target and the nearest boundary sampling point are locked. The boundary crossing confirmation frame is retained as the main evidence frame. F frames before and b frames after the boundary crossing confirmation frame are extracted to form an evidence frame group, where f represents the number of forward frames used to review the boundary crossing formation process before the boundary crossing confirmation frame, and b represents the number of backward frames used to verify the occupancy maintenance status after the boundary crossing confirmation frame. If all evidence frames in the evidence frame group point to the same boundary number, and the crossing depth and the prohibited projection area maintain the boundary crossing occupancy relationship, then the current target event is confirmed. The current target event is written into the anomaly identification event table and marked as a real boundary crossing event, a prohibited parking event, or a fire lane occupancy event according to the alarm service type, and an alarm command is generated. The main evidence frame, evidence frame group, and boundary... Offset values, ground drift values, and out-of-bounds occupancy values are associated and written into the anomaly identification event table. When the out-of-bounds occupancy value is less than the out-of-bounds confirmation threshold, the dwell time in the boundary neighborhood, the depth of crossing the line, and the area occupied by the prohibited projection are recorded. If, within n adjacent frames near the same boundary number, the out-of-bounds occupancy value of the same target alternates between being not less than the out-of-bounds confirmation threshold and being less than the out-of-bounds confirmation threshold, the event numbers of adjacent frames are merged, where n represents the number of adjacent frames used to identify the boundary jitter state of the same target. The same boundary number and the same target tracking number are locked, and candidate evidence frame groups are supplemented. The frame with the largest out-of-bounds occupancy value is retained as the main evidence frame, and the out-of-bounds occupancy value is recalculated based on the latest dwell time in the boundary neighborhood, the maximum depth of crossing the line, and the maximum area occupied by the prohibited projection. When the recalculated out-of-bounds occupancy value is not less than the out-of-bounds confirmation threshold, the candidate evidence frame group is transferred to the alarm confirmation strategy. When the recalculated out-of-bounds occupancy value is less than the out-of-bounds confirmation threshold, only the boundary neighborhood tracking record is retained.
[0048] In this implementation scheme, by comparing the boundary occupancy value with the boundary occupancy confirmation threshold, targets that meet the confirmation conditions are locked to the same boundary number and the nearest boundary sampling point. An evidence frame group is formed using the main evidence frame, the number of forward frames, and the number of backward frames to verify the relationship between the boundary crossing depth and the area occupied by the prohibited projection, thereby transforming single-frame boundary crossing judgment into cross-frame evidence confirmation. For targets that do not meet the confirmation conditions but show judgment fluctuations near the same boundary number, adjacent frame event numbers are merged, candidate evidence frame groups are supplemented, and the frame with the largest boundary occupancy value is selected as the main evidence frame. The boundary occupancy value is recalculated based on the boundary neighborhood dwell time, the maximum boundary crossing depth, and the maximum area occupied by the prohibited projection, so that real boundary crossing events can enter the alarm confirmation strategy, and boundary jitter events only retain boundary neighborhood tracking records, thereby reducing the situation where the same target is split into multiple alarm records within the boundary buffer zone.
[0049] Specifically, this embodiment provides an AI vision-based smart park anomaly recognition system, applied to an AI vision-based smart park anomaly recognition method. It includes: a park visual data acquisition and preprocessing module, used to acquire multi-source data from park monitoring and preprocess the data to form a unified data source covering camera installation calibration, park ground measurements, area configuration interfaces, and monocular camera video streams. This module associates and organizes the original image, target bounding box coordinates, target bounding center pixel coordinates, human foot key point pixel coordinates, vehicle tire ground contact area pixel coordinates, ground contact candidate point pixel coordinates, target instance mask, shadow mask, occlusion area mask, and target tracking number, providing basic data for subsequent boundary offset analysis, ground drift discrimination, and occupancy / crossing-boundary confirmation; and a ground boundary projection offset correction module, used to perform boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width. This module identifies the degree of normal misalignment of the image configuration boundary relative to the ground sampling point coordinates after ground mapping, and performs boundary mapping verification and normal compensation operations based on the boundary offset analysis results, ensuring that electronic fences, no-parking zones, and fire protection zones are properly aligned. The decision boundary of the channel shifts from the image planar region bounding box to ground coordinate constraints; the target ground position drift discrimination module is used to perform ground drift discrimination using the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence. It determines the ground scale error caused when the target's circumscribed center pixel coordinates are used to replace the ground candidate point pixel coordinates. Based on the ground drift discrimination results, it performs ground point reselection and mask compensation operations, eliminating ground candidate points affected by shadow masks, occluded area masks, and unclear ground edges, and outputs a full-size... The target grounding point ground coordinates meet the grounding stability requirements; the boundary crossing occupancy confirmation module is used to comprehensively confirm occupancy based on the crossing depth, prohibited projection area, total target ground projection area, boundary neighborhood dwell time, entry direction marking, boundary offset value and ground drift value. It incorporates boundary mapping error and grounding position error into the boundary crossing event judgment process. Based on the occupancy crossing confirmation results, it performs alarm confirmation and boundary neighborhood tracking operations, confirms real boundary crossing events, prohibited parking events, and fire lane occupancy events, and retains tracking records for boundary neighborhood targets that do not meet the confirmation conditions.
[0050] In this implementation plan, a unified data foundation is formed through the park visual data acquisition and preprocessing module. The ground boundary projection offset correction module incorporates the normal misalignment between the image plane region box and the coordinates of the ground sampling point into the boundary verification. The target grounding position drift discrimination module eliminates grounding candidate points affected by shadow masks and occluded area masks. Finally, the boundary over-boundary occupancy confirmation module integrates the over-boundary depth, the area occupied by the prohibited projection, the dwell time in the boundary neighborhood, the movement direction mark of entering the area, the boundary offset value, and the grounding drift value to complete the occupancy over-boundary confirmation. This makes the abnormal identification of electronic fences, no-parking areas, and fire lanes no longer solely dependent on the image plane region box and the vertical coordinate of the target's outer center pixel. This reduces false alarms of projection crossing the boundary but the actual ground not crossing the boundary, as well as false alarms of actual entry into the boundary but the image plane not triggering the detection.
[0051] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0052] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A smart park anomaly identification method based on AI vision, characterized in that, Includes the following steps: S1 collects multi-source monitoring data from the park and performs preprocessing operations on the multi-source monitoring data from the park. S2 performs boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector and boundary buffer width, and performs boundary mapping verification and normal compensation operations based on the boundary offset analysis results. S3 performs ground drift discrimination by using the target's external center pixel coordinates, ground candidate pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence. Based on the ground drift discrimination results, it performs ground point reselection and mask compensation operations. S4, comprehensively considers the crossing depth, the area occupied by the prohibited projection, the total area of the target ground projection, the dwell time in the boundary neighborhood, the movement direction mark in the area, the boundary offset value and the ground drift value to confirm the occupation and crossing of the boundary. Based on the occupation and crossing of the boundary confirmation result, alarm confirmation and boundary neighborhood tracking operations are performed. The specific steps for boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width are as follows: Obtain the mapped ground coordinates, ground sampling point coordinates, ground normal unit vector, and boundary buffer width of the j-th image configuration boundary sampling point; Subtracting the ground sampling point coordinates from the mapped ground coordinates yields the ground offset vector; multiplying the ground offset vector by the ground normal unit vector and taking the absolute value yields the normal misalignment distance; dividing the normal misalignment distance by the sum of the boundary buffer width and the smallest positive number yields the boundary offset value of the boundary sampling point. The specific steps for determining ground drift using the target's circumscribed center pixel coordinates, ground candidate point pixel coordinates, ground imaging depth distance, camera pixel focal length, ground width, and ground mask confidence level are as follows: Obtain the target's circumcenter pixel coordinates, grounding candidate pixel coordinates, grounding imaging depth distance, camera pixel focal length, grounding width, and grounding mask confidence level; The vertical deviation of the ground pixel is obtained by subtracting the vertical coordinate of the target's outer center pixel from the vertical coordinate of the ground candidate pixel and taking the absolute value. The vertical deviation of the ground pixel is multiplied by the ground imaging depth distance and then divided by the sum of the camera pixel focal length and a very small positive number to obtain the ground ground deviation. The ground ground deviation is divided by the product of the ground width and the ground mask confidence and then added to the value of a very small positive number to obtain the ground drift value.
2. The AI vision-based smart park anomaly identification method according to claim 1, characterized in that: The specific steps for collecting multi-source data from park monitoring are as follows: Collect multi-source data from park surveillance: Obtain camera number, installation height, pitch angle, azimuth angle, camera pixel focal length, principal point coordinates, radial distortion coefficient, tangential distortion coefficient, and calibration board corner pixel coordinates through camera installation calibration; obtain ground sampling point coordinates, ground control point coordinates, boundary buffer width, road slope angle, and step edge height through ground measurements of the park's electronic fence, no-parking zone, and fire lanes; obtain image configuration boundary sampling point pixel coordinates, image plane electronic fence vertex pixel coordinates, no-parking zone frame pixel coordinates, fire lane frame pixel coordinates, boundary number, area category, alarm service type, confirmation reference duration, and direction inside the no-entry area through the area configuration interface; obtain frame number, frame timestamp, original image, target bounding box coordinates, target bounding center pixel coordinates, human foot key point pixel coordinates, vehicle tire ground contact area pixel coordinates, ground contact candidate point pixel coordinates, target instance mask, shadow mask, occlusion area mask, and target tracking number through monocular camera video stream.
3. The AI vision-based smart park anomaly identification method according to claim 1, characterized in that: The specific steps for preprocessing the multi-source data from the park monitoring system are as follows: Distortion correction is performed on the original image, frame timestamps are aligned, and targets in adjacent frames are associated with the target tracking number. Based on the pixel coordinates of key points of human feet, pixel coordinates of vehicle tire ground contact area, pixel ordinates of ground contact candidate points, shadow mask and occlusion area mask, ground contact candidate points are selected, and ground contact edge sharpness is calculated according to the pixel gradient of the neighboring pixels of the ground contact candidate points. Based on the target instance mask and ground control point coordinates, ground projection of the target instance mask is completed, obtaining the target ground projection outline and the total target ground projection area. The tangential direction of the ground boundary is calculated based on the coordinates of adjacent ground sampling points, and the ground normal unit vector is obtained by combining it with the direction inside the restricted area. Based on the data obtained from camera installation and calibration, ground control point coordinates, and image configuration boundary sampling point pixel coordinates, an inverse perspective mapping model is constructed using the planar homography matrix inverse perspective transformation method, outputting the mapped ground coordinates and the target grounding point ground coordinates. The grounding imaging depth distance is obtained by projecting the target grounding point ground coordinates along the main imaging direction. The grounding width is obtained according to the distance between the left and right feet and the distance between the left and right tire grounding areas. The grounding depth distance is obtained according to the grounding mask overlap ratio and the grounding edge sharpness. The confidence level of the ground mask is determined; the crossing depth and the area occupied by the restricted projection are obtained based on the normal distance and overlap area between the boundary formed by the target ground projection outline and the coordinates of the ground sampling points; the dwell time in the boundary neighborhood is obtained by accumulating the associated frame durations within the boundary buffer zone for the same target tracking number; the target ground displacement direction is obtained by the difference in ground coordinates of the target grounding point in adjacent frames under the same target tracking number, and the angle between the target ground displacement direction and the direction inside the restricted area is converted into the entry movement direction mark; the range method is used to normalize the numerical data; the processed multi-source data of the park monitoring is stored to construct a park visual evidence database, and an anomaly identification event table, a grounding stabilization record table, and a target grounding location table are constructed in the park visual evidence database.
4. The AI vision-based smart park anomaly identification method according to claim 1, characterized in that: The specific steps for performing boundary mapping verification and normal compensation operations based on the boundary offset analysis results are as follows: By comparing the boundary offset value with the boundary offset threshold in real time, when the boundary offset value is less than the boundary offset threshold, the coordinates of the current ground sampling point are retained and the corresponding boundary sampling point is written into the boundary mapping verification record. When the boundary offset value is greater than or equal to the boundary offset threshold, the boundary mapping correction strategy is adjusted. The image planar region box is stopped as the boundary for determining the boundary. The boundary sampling point where the normal is misaligned is located based on the boundary offset value. Normal compensation is performed on the mapped ground coordinates along the ground normal unit vector to align the corrected mapped ground coordinates with the ground sampling point coordinates. The mapped ground coordinates before correction, the mapped ground coordinates after correction, the ground sampling point coordinates, the ground normal unit vector, and the boundary offset value are written into the boundary correction record.
5. The AI vision-based smart park anomaly identification method according to claim 1, characterized in that: The specific steps for performing ground point reselection and mask compensation operations based on the ground drift discrimination result are as follows: By comparing the ground drift value with the ground drift threshold in real time, when the ground drift value is less than the ground drift threshold, the ground coordinates of the target ground point corresponding to the vertical coordinate of the ground candidate point pixel are used as the boundary judgment point, and the target tracking number, frame number, ground coordinates of the target ground point and the ground drift value are written into the target ground position table. When the ground drift value is greater than or equal to the ground drift threshold, the ground point reselection and mask compensation strategy is adjusted. The position corresponding to the vertical coordinate of the target's outer center pixel is no longer used as the ground coordinate of the target's ground point. Instead, only the vertical coordinate of the target's outer center pixel is used as the reference in the calculation of the ground drift value. For human targets, the midpoint of the key points of the left and right feet is used to convert the ground coordinate of the target's ground point. For vehicle targets, the center point of the ground area of the left and right tires is used to convert the ground coordinate of the target's ground point. Ground candidate points that fall into the shadow mask range, overlap the occlusion area, or whose ground edge clarity does not reach the ground edge threshold are eliminated. The point with the highest confidence level of the grounding mask among the remaining grounding candidate points is selected as the corrected target grounding point ground coordinates, and the grounding drift value is recalculated. If the recalculated ground drift value is still greater than or equal to the ground drift threshold, the target is written into the ground stabilization record table, and the output is paused until the subsequent over-boundary confirmation step.
6. The AI vision-based smart park anomaly identification method according to claim 1, characterized in that: The specific steps for confirming boundary crossing based on the comprehensive crossing depth, prohibited projection area, total target ground projection area, dwell time in the boundary neighborhood, entry direction marking, boundary offset value, and ground drift value are as follows: Obtain the following parameters for the i-th target: crossing depth, boundary buffer width, prohibited projection area, total ground projection area of the target, dwell time in the boundary neighborhood, confirmation reference time, entry direction mark, boundary offset value, and ground drift value. Divide the crossing depth by the sum of the boundary buffer width and the smallest positive number to obtain the crossing depth occupancy item; divide the prohibited projection area by the sum of the total target ground projection area and the smallest positive number to obtain the area occupancy item; add the crossing depth occupancy item and the area occupancy item, multiply by the ratio of the boundary neighborhood dwell time to the confirmation reference time, and multiply by the sum of constant one and the entry direction mark to obtain the boundary occupancy evidence value; divide the boundary occupancy evidence value by the sum of constant one, the boundary offset value, and the ground drift value to obtain the target boundary occupancy value.
7. The AI vision-based smart park anomaly identification method according to claim 1, characterized in that: The specific steps for performing alarm confirmation and boundary neighborhood tracking operations based on the boundary occupancy confirmation result are as follows: By comparing the boundary occupancy value with the boundary confirmation threshold in real time, when the boundary occupancy value is greater than or equal to the boundary confirmation threshold, the boundary number corresponding to the current target and the nearest boundary sampling point are locked. The boundary confirmation frame is retained as the main evidence frame, and f frames before and b frames after the boundary confirmation frame are extracted to form an evidence frame group. If all evidence frames in the evidence frame group point to the same boundary number, and the boundary occupancy relationship is maintained between the boundary occupancy depth and the prohibited projection area, the current target event is confirmed to be established. The current target event is written into the anomaly identification event table and marked as a real boundary occupancy event, a prohibited parking event, and a fire lane occupancy event according to the alarm service type, and an alarm command is generated. Write the main evidence frame, evidence frame group, boundary offset value, ground drift value, and out-of-bounds occupancy value into the anomaly identification event table; When the out-of-bounds occupancy value is less than the out-of-bounds confirmation threshold, continue to record the dwell time in the boundary neighborhood, the depth of crossing the line, and the area occupied by the prohibited projection. If, within n adjacent frames near the same boundary number, the out-of-bounds occupancy value of the same target alternates between being not less than the out-of-bounds confirmation threshold and being less than the out-of-bounds confirmation threshold, then merge the event numbers of adjacent frames, lock the same boundary number and the same target tracking number, supplement the candidate evidence frame group, retain the frame with the largest out-of-bounds occupancy value as the main evidence frame, and recalculate the out-of-bounds occupancy value based on the latest dwell time in the boundary neighborhood, the maximum depth of crossing the line, and the maximum area occupied by the prohibited projection. When the recalculated out-of-bounds occupancy value is greater than or equal to the out-of-bounds confirmation threshold, the candidate evidence frame group is transferred to the alarm confirmation strategy. When the recalculated out-of-bounds occupancy value is less than the out-of-bounds confirmation threshold, only the boundary neighborhood tracking record is retained.
8. An AI-based vision-based smart park anomaly detection system, applied to the AI-based vision-based smart park anomaly detection method according to any one of claims 1-7, characterized in that, include: The park visual data acquisition and preprocessing module is used to acquire multi-source data from park monitoring and to perform preprocessing operations on the multi-source data from park monitoring. The ground boundary projection offset correction module is used to perform boundary offset analysis based on mapped ground coordinates, ground sampling point coordinates, ground normal unit vector and boundary buffer width, and to perform boundary mapping verification and normal compensation operations based on the boundary offset analysis results. The target grounding position drift discrimination module is used to discriminate grounding drift by using the target's external center pixel coordinates, grounding candidate point pixel coordinates, grounding imaging depth distance, camera pixel focal length, grounding width, and grounding mask confidence. Based on the grounding drift discrimination results, it performs grounding point reselection and mask compensation operations. The boundary crossing occupancy confirmation module is used to confirm occupancy based on the comprehensive factors of the crossing depth, the area occupied by the prohibited projection, the total area of the target ground projection, the dwell time in the boundary neighborhood, the movement direction mark in the area, the boundary offset value and the ground drift value. Based on the occupancy crossing confirmation result, alarm confirmation and boundary neighborhood tracking operations are performed.
Citation Information
Patent Citations
A video object detection method based on attention mechanism
CN110287826B
A method for monitoring lobby personnel based on a self-integrated attention mechanism
CN111680674B
Smart park safety management method and system based on AI visual identification
CN120339947A
Map quality intelligent auditing method based on big data
CN122045887A