Automatic recording method, device and equipment, storage medium and automatic recording system
By automatically calibrating the coordinates of the functional area bounding box by calculating geometric transformation parameters, the problem of area misalignment caused by camera pose shift was solved, reducing operation and maintenance costs and computing power consumption, and ensuring the stability and accuracy of the recording system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-27
AI Technical Summary
Existing automatic recording systems in sports venues suffer from misalignment of areas due to camera pose shifts, requiring frequent manual calibration, resulting in high maintenance costs and difficulty in ensuring stability. Meanwhile, traditional image stabilization technologies consume a lot of computing power and affect image quality.
By acquiring the feature differences between the current video stream of the vision acquisition device and the reference image, calculating the geometric transformation parameters, and automatically calibrating the coordinates of the functional area box, logical alignment at the software level is achieved, reducing the frequency of mechanical calibration, lowering maintenance costs, and avoiding real-time pixel resampling.
It enables automatic calibration when the camera shifts slightly, reduces maintenance costs, ensures the long-term stability and accuracy of the recording system, and improves the automation level and computing resource utilization efficiency of the recording system.
Smart Images

Figure CN121750806A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, in particular to the technical field of sports technology and computer vision. BACKGROUND
[0002] With the wide application of computer vision technology in the field of sports, motion capture, automatic recording and broadcasting and auxiliary training systems based on video analysis have become the standard configuration of professional venues and training bases. Such systems usually collect image data of athletes through cameras installed at specific positions in the venue, use image processing algorithms to detect key actions such as water entry, take-off and wall touch of the motion target in real time, and then trigger functions such as video storage, timing and scoring or technical statistics. SUMMARY
[0003] The present disclosure provides an automatic recording method, device, equipment, storage medium and automatic recording system.
[0004] According to an aspect of the present disclosure, an automatic recording method is provided, comprising: obtaining a current video stream collected by a visual collection device for a monitoring scene, and loading initial region configuration information of the monitoring scene; determining a geometric transformation parameter according to a feature difference between a reference image and a current calibration image of the monitoring scene; calibrating coordinates of a functional region frame contained in the initial region configuration information by using the geometric transformation parameter to obtain a calibrated functional region frame; detecting a target activity in the current video stream based on the calibrated functional region frame, and generating a recording record when a detection result meets a preset trigger condition.
[0005] According to another aspect of the present disclosure, an automatic recording device is provided, comprising: a data acquisition module configured to obtain a current video stream collected by a visual collection device for a monitoring scene, and load initial region configuration information of the monitoring scene; a calculation module configured to determine a geometric transformation parameter according to a feature difference between a reference image and a current calibration image of the monitoring scene; a calibration module configured to calibrate coordinates of a functional region frame contained in the initial region configuration information by using the geometric transformation parameter to obtain a calibrated functional region frame; a processing module configured to detect a target activity in the current video stream based on the calibrated functional region frame, and generate a recording record when a detection result meets a preset trigger condition.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory in communication with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of the embodiments of the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method according to any one of the embodiments of the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method according to any one of the embodiments of the present disclosure.
[0009] According to another aspect of the present disclosure, an automatic recording system is provided, comprising: a visual acquisition device configured to acquire a video stream of a monitoring scene; a computing device in communication with the visual acquisition device and configured to process the video stream; The computing device is configured with a hierarchical processing architecture, and the hierarchical processing architecture comprises: a sensor layer configured to drive the visual acquisition device and acquire the video stream; a detector layer configured to identify a moving target or a moving state from image data of the video stream and output a detection result; an interaction layer configured to receive a configuration instruction through a human-computer interaction interface and generate initial region configuration information comprising initial vertex coordinates of a functional region box; a trigger layer configured to execute the method provided in any one of the embodiments of the present disclosure, calibrate the initial region configuration information using the geometric transformation parameter, and generate a logical trigger event based on the calibrated functional region box; a signal layer configured to output a control signal for controlling video recording in response to the logical trigger event The technical solution of the present disclosure can reduce the frequency of mechanical calibration, reduce operation and maintenance costs, and ensure the long-term stability and accuracy of the recording system.
[0010] It should be understood that the contents described in this part are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0011] The accompanying drawings serve to better understand the present solution and do not constitute a limitation of the present disclosure. Among them: Figure 1is a flowchart of an automatic recording method according to an embodiment of the present disclosure; Figure 2 is a schematic diagram of a rings project trigger interaction interface according to an embodiment of the present disclosure; Figure 3 is a schematic diagram of a hierarchical architecture of an automatic recording system according to an embodiment of the present disclosure; Figure 4 is a flowchart of an automatic recording device according to an embodiment of the present disclosure; Figure 5 is a block diagram of an electronic device for implementing an automatic recording method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0012] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are included to provide a thorough understanding of embodiments of the present disclosure, and are taken along with the detailed description to explain various examples thereof. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, the descriptions set forth herein with respect to the particular embodiments described are not intended to limit the scope of the present disclosure, but merely to provide specific examples of an implementation of the present disclosure. Thus, other embodiments of the present disclosure can be derived from the detailed description and the drawings, with the understanding that the embodiments provided are illustrative of the present disclosure.
[0013] In a sports automatic recording system, a working mode of "fixed camera position + preset area" is usually adopted. When the system is deployed, an operator will manually draw a region of interest (ROI) or a trigger line in the image captured by the camera. During the operation of the system, the image acquisition device, the target detection algorithm and the business trigger logic are usually tightly integrated. When the detection algorithm identifies that a moving target enters a preset area and meets certain conditions (such as a confidence threshold), the system executes corresponding recording or analysis instructions.
[0014] For complex sports scenes, there are often various interference factors in the field, such as the movement of assistant coaches, the shielding of sports equipment, and the activities of personnel in non-competition areas. The current area configuration method focuses more on defining the "effective detection range", that is, specifying which area to search for targets. In order to filter interference, it usually relies on the classification ability of the detection algorithm itself, or by setting a simple shield to exclude specific pixel areas.
[0015] In addition, the camera is usually fixed on the wall, column or high beam of the venue by a mechanical support. In the long-term daily operation, the pose (position and attitude) of the camera will inevitably change slightly under the influence of environmental factors such as micro-vibration of the venue ground, thermal expansion and contraction of the building structure, aging of the equipment itself, and accidental slight touch during equipment maintenance. For a visual analysis system based on a fixed view angle, even a small angle of lens offset will cause the virtual region box previously drawn in the image coordinate system to be misaligned with the actual physical field position. This often requires maintenance personnel to manually recalibrate repeatedly, which is high in maintenance cost and difficult to ensure stability.
[0016] In related technologies, in order to solve the region misalignment problem caused by the camera offset, two maintenance methods are usually adopted: one is to rely on maintenance personnel to regularly patrol, and when the trigger accuracy is found to be decreased or the region is found to be obviously offset, the region box is manually redrawn and calibrated in the software interface; the other is to integrate electronic image stabilization (EIS) or image registration technology in the camera or front-end system, and the current image is forcibly corrected back to the reference view angle by cropping, rotating or perspective transformation on the real-time collected video stream image, so as to match the original region configuration.
[0017] To at least partially solve one or more of the above problems and other potential problems, embodiments of the present disclosure provide an automatic recording method. By using the technical solutions of the embodiments of the present disclosure, the frequency of mechanical calibration can be reduced, the operation and maintenance cost can be reduced, real-time pixel resampling of high-resolution video streams can be avoided, the algorithm consumption can be reduced, and the long-term stability and accuracy of the recording system can be ensured.
[0018] Figure 1 is a flowchart of an automatic recording method according to an embodiment of the present disclosure, as shown in Figure 1 The method comprises the following steps: S110, acquiring a current video stream collected by a visual acquisition device for a monitoring scene, and loading initial region configuration information of the monitoring scene.
[0019] In the embodiments of the present disclosure, the visual acquisition device can be an ordinary color camera, an event camera or a depth camera, etc. imaging device, which is usually installed at a fixed position of a sports venue or a monitoring area for continuous shooting of the monitoring scene (such as a swimming pool, a track, a gymnastics field, etc.). The current video stream refers to a sequence of continuous image frames output by the visual acquisition device in real time. The initial region configuration information is a set of pre-set parameter files (such as JSON or XML format), which is based on a reference image and contains the initial vertex coordinates of at least one functional region box. The functional region box can be understood as a virtual geometric region defined in the image coordinate system, which is used to express specific business logic, such as "detection area", "trigger area", etc.
[0020] S120, determine the geometric transformation parameter according to the feature difference between the reference image of the monitoring scene and the current calibration image.
[0021] The reference image is an interference-free background image collected at the initial deployment or when the camera state is confirmed to be stable. The current calibration image is the latest image frame extracted from the current video stream. Due to thermal expansion and contraction, slight shaking or external force touching, the current view angle may be slightly offset relative to the reference view angle. By comparing the feature difference between the two, the mathematical parameter describing the change in view angle, i.e. the geometric transformation parameter, is calculated. This parameter can quantitatively represent the translation, rotation or scaling change of the camera.
[0022] S130, calibrate the coordinates of the functional region frame contained in the initial region configuration information using the geometric transformation parameter to obtain the calibrated functional region frame.
[0023] The core of this step is to change the configuration (initial region configuration information) rather than the image. Traditional anti-shake technology usually performs pixel-level cropping or distortion on each frame of real-time video stream, which consumes huge computing resources and may reduce image quality. This solution keeps the video stream image unchanged, and instead uses the calculated geometric transformation parameter to perform matrix transformation on the vertex coordinates of the functional region frame stored in the initial region configuration information. For example, if the camera is offset to the left by 5 pixels, the coordinates of the functional region frame will be adjusted to the right by the corresponding distance through calculation, thereby logically aligning the region frame with the current actual scene to obtain the calibrated functional region frame.
[0024] S140, based on the calibrated functional region frame, perform target activity detection on the current video stream, and generate a recording record when the detection result meets the preset trigger condition.
[0025] The system analyzes the current video stream using the calibrated functional region frame. Target activity detection can use background difference, optical flow method or deep learning model (such as YOLO, OpenPose) to identify the position or posture of the moving target (such as the athlete). When the detected target state meets the preset trigger condition (e.g. entering the trigger region frame, completing a specific action), the system automatically generates a recording record. The recording record can be a video clip, an event log with a timestamp or structured data containing metadata. For example, the video clip can start when the moving target enters the trigger region frame, continue to record until the moving target leaves the trigger region frame, or continue for a preset duration.
[0026] According to the scheme of the embodiment of the present disclosure, by calculating the geometric transformation parameter and updating the region frame coordinates, the logical region in the software level can automatically follow and align the actual scene when the camera has a slight physical offset. This method does not need frequent mechanical calibration by manual operation, significantly reduces the operation and maintenance cost; at the same time, it avoids real-time pixel resampling of high-resolution video stream, greatly reduces the computing power consumption, and ensures the long-term stability and accuracy of the recording system.
[0027] In a possible implementation, S120 determines the geometric transformation parameter according to the feature difference between the reference image of the monitored scene and the current calibration image, and further includes the following steps: S121, respectively extracting the image feature points of the reference image and the current calibration image.
[0028] In the embodiment of the present disclosure, the image feature point refers to a key point with unique texture, corner or edge information in the image, which can remain stable under different viewing angles or illumination. SIFT (Scale Invariant Feature Transform), SURF (Speeded-Up Robust Features) or ORB algorithm can be used for extraction. The system scans the reference image and the current calibration image respectively, identifies a plurality of feature points and calculates the descriptor vectors thereof.
[0029] S122, matching the image feature points of the reference image and the image feature points of the current calibration image, and establishing a feature point pair set.
[0030] The Euclidean distance or Hamming distance of the descriptor vector is used to find the corresponding relationship between the feature points of the two images. In order to improve the accuracy, the nearest neighbor matching strategy can be used, and the false matching points can be removed by combining the ratio test. Finally, a set of feature point pairs is obtained, and each pair of points represents the same physical point in different coordinate positions in the two images.
[0031] S123, calculating a plane homography matrix from the reference image to the current calibration image based on the feature point pair set.
[0032] The plane homography matrix is a 3x3 matrix, which can describe the perspective transformation relationship between two planes. In the fixed position monitoring scene, the slight offset of the camera can be approximated as the projection transformation of the image plane. The RANSAC (Random Sample Consensus) algorithm can be used to iteratively select inliers from the feature point pair set and calculate the optimal homography matrix.
[0033] In the implementation process, based on the feature point pair set, a random sample consensus (RANSAC) method is used to calculate a plane homography transformation matrix H from the reference image to the current calibration image. In the homogeneous coordinate system, a point (x, y) in the reference image corresponds to a position (x', y') in the current calibration image, which satisfies the following linear transformation relationship: The transformed actual pixel coordinates (non-homogeneous coordinates) are obtained by normalization calculation: Through the calculation process, the system can obtain a matrix H describing the image plane perspective transformation relationship, which accurately quantifies the camera view angle offset.
[0034] S124, the plane homography matrix is used as a geometric transformation parameter.
[0035] The calculated homography matrix is determined as the final geometric transformation parameter, which is used for subsequent coordinate transformation operations.
[0036] According to the scheme of the embodiments of the present disclosure, through the matching of local feature points and the calculation of the homography matrix, the geometric transformation relationship between images can be accurately quantified. Compared with simple pixel difference, feature point matching has stronger robustness to light changes and local occlusion, and can accurately reflect the pose change of the camera, providing a mathematical basis for high-precision region frame calibration.
[0037] In a possible implementation, S130 calibrates the coordinates of the functional region frame contained in the initial region configuration information using the geometric transformation parameter, further comprising the following steps: S131, calculate the scaling factor and rotation angle of the plane homography matrix.
[0038] In the embodiments of the present disclosure, the plane homography matrix obtained by the foregoing steps is decomposed or analyzed, and the implicit geometric transformation component is extracted. The scaling factor reflects the magnification or reduction degree of the image, and the rotation angle reflects the rotation degree of the image around the optical axis.
[0039] S132, in the case that the scaling factor and the rotation angle are both in the corresponding tolerance interval, the initial vertex coordinates of the functional region frame are calibrated using the geometric transformation parameter.
[0040] In this step, in the fixed position scene, the offset of the camera is usually small. If the calculated scaling factor is too large (for example, more than 1.2) or the rotation angle is too large (for example, more than 10 degrees), it usually means that the feature matching is wrong (such as matching to a moving human body instead of the background) or the camera has a large displacement (such as being hit by a ball). At this time, if forced calibration is performed, it will cause the region box to be seriously misplaced. Therefore, a tolerance interval (for example, scaling 0.95-1.05, rotation ±5 degrees) is preset. Only when both parameters are within the range, the transformation matrix is considered to be reliable, and the matrix multiplication is performed on the vertex coordinates of the functional region box to complete the coordinate update.
[0041] In the specific implementation process, when the transformation matrix is determined to be reasonable (that is, the scaling factor and the rotation angle are within the tolerance interval), the system applies the transformation to all vertex coordinates of the five types of region boxes contained in the initial region configuration information by using the geometric transformation parameter (that is, the homography matrix H). Each functional region box (such as a rectangular box) can be represented as two points of the upper left corner and the lower right corner, or represented as a sequence of four vertices, and the new vertices are obtained through the homography transformation.
[0042] The system recalculates and generates the updated bounding box according to the transformed vertices. Through the above process, all detection region boxes, trigger region boxes, ignore region boxes, forbidden region boxes, and auxiliary analysis region boxes are transformed in one batch, so that a new configuration accurately aligned with the current camera view is obtained.
[0043] According to the scheme of the embodiments of the present disclosure, by introducing a parameter verification mechanism, false calibration caused by algorithm errors or abnormal working conditions is effectively prevented. It is ensured that the system only performs adaptive update within a reasonable fine-tuning range, avoids catastrophic drift in the automatic process, and improves safety and reliability.
[0044] In order to ensure the accuracy and timeliness of the calibration image, in one possible implementation manner, the method further includes the following steps: S150, monitoring whether the current system meets the preset automatic calibration trigger condition.
[0045] In the embodiments of the present disclosure, the automatic calibration trigger condition is a rule set to balance system performance and calibration frequency. The condition includes reaching a preset calibration time point (for example, when the venue is closed at 3 o'clock in the morning every day) or reaching a preset calibration running period (for example, calibrating once every 4 hours of running).
[0046] S160, in the case where the automatic calibration trigger condition is met, a frame of image is intercepted from the current video stream as a current calibration image.
[0047] When the condition is met, the system calls the video interface to capture a frame at the current time, caches it and marks it as the current calibration image, and then starts the feature matching and parameter calculation process.
[0048] According to the scheme of the embodiments of the present disclosure, a timing or periodic triggering mechanism is adopted to realize the automation of system operation and maintenance. This mechanism can not only correct the physical error accumulated over time in time, but also avoid complex feature matching calculation for each frame of video, thereby saving valuable computing resources while ensuring the long-term operation accuracy of the system.
[0049] In a possible implementation, the functional area frame includes at least one of a detection area frame, a trigger area frame, an ignore area frame, a forbidden area frame, and an auxiliary analysis area frame.
[0050] The detection area frame is used to limit the effective image range participating in target detection. For example, only the swimming pool area is framed, and the stand area is excluded, so that the system only processes the images in the frame to reduce the amount of calculation.
[0051] The trigger area frame is used to define the spatial range in which the trigger event takes effect. For example, a trigger frame is set in front of the diving platform and above the water surface, and when a person is detected entering the frame, it is considered that the take-off action starts, so that the take-off and water entry actions of the athlete are captured.
[0052] The ignore area frame is used to shield the interference area inside the detection area frame. For example, there is an electronic scoreboard in the detection area that is always flashing, which is easy to cause false detection, and an ignore frame can be used to cover it. The ignore area frame can also be the activity area of the coach, and whether the coach exists or how he moves in the ignore area frame will not affect the judgment of whether to record.
[0053] The forbidden area frame is used to specify the area in which the trigger event is prohibited. For example, a forbidden frame is set in the coach instruction area beside the competition area to prevent the actions of the coach from triggering recording by mistake. Or it is used to not record in the presence of the coach.
[0054] The auxiliary analysis area frame is used to provide spatial reference information in the data analysis stage after recording is completed. For example, the position of the finish line is marked, and this frame does not participate in real-time triggering, but is saved as metadata for the post-analysis software to calculate the time when the line is crossed.
[0055] In order to more intuitively illustrate the detection and triggering logic, the hanging ring movement scene shown in FIG. 1 is described in detail. Figure 2
[0056] In this scene, the system is pre-configured with the following five types of area frames: Detection region box (big rectangle): covers the rings, the athlete's movement space, and the area below the mats, excluding the venue background at the edges of the frame.
[0057] Trigger region boxes (two small rectangles): precisely frame the locations of the two rings.
[0058] Ignore region boxes (lower rectangles on both sides): cover the areas on both sides of the rings where assistant coaches usually stand to protect the athlete.
[0059] Prohibited region box (bottom rectangle): covers the area below the mats.
[0060] Based on the above configuration, the system performs the following specific processing flow: Image cropping and masking: After obtaining a frame of the current video stream, the system first crops the image using the calibrated detection region box, retaining only the rings and the surrounding movement area. Next, the system locates the positions of the two ignore region boxes. In actual competitions, assistant coaches often wave their arms or move to protect the athlete, which can easily be mistaken by the algorithm as the athlete. The system forces the pixel values in these two regions to be invalid (e.g., all black), completely eliminating the interfering actions of the coaches from the "field of view" of the detection algorithm.
[0061] Target detection and trigger determination: The cleaned image after the above processing is sent to the posture recognition algorithm. When the athlete jumps from below and grabs the rings with both hands, the algorithm recognizes that the athlete's hands or upper body have entered the calibrated trigger region boxes (i.e., the ring positions), and the system determines that the preliminary trigger condition is met, generating a pre-trigger signal.
[0062] Logical interception: At the same time as generating the pre-trigger signal, the system detects the bottom of the frame. Suppose at this time a staff member passes through the passage below the mats (i.e., within the prohibited region box), although the athlete may be preparing to move, in order to prevent the recording of irrelevant personnel's images or according to specific business rules (such as requiring the venue to be completely clear before recording), the system detects the presence of a moving target within the prohibited region box, immediately cutting off the pre-trigger signal and not starting recording. Only when there is no one in the prohibited area and the athlete's ring-grabbing action occurs, the system outputs the official recording control signal and starts recording the competition segment.
[0063] Through this combination of multiple region boxes, the protection actions of the coaches, the interference of passers-by, and the effective actions of the athlete can be accurately distinguished, greatly improving the level of automation and the success rate of recording.
[0064] According to the scheme of the embodiment of the present disclosure, a flexible scene description model is constructed by defining five types of functional area boxes with clear semantics. This multi-dimensional area definition method can finely express complex site business rules. By combining the use of different types of boxes, the problem of false detection and missed detection in a complex background can be effectively solved, and the business adaptability of the system is improved.
[0065] In a possible implementation, the functional area box includes a detection area box and a trigger area box. S140 performs target activity detection on the current video stream based on the calibrated functional area box, further including the following steps: S141, cropping the image frame of the current video stream using the calibrated detection area box to obtain a to-be-detected area.
[0066] The detection area box that has been corrected in coordinates is applied to cut out a region of interest (ROI) from the original image frame. This step excludes irrelevant backgrounds and generates smaller to-be-detected image data.
[0067] S142, identifying a moving target in the to-be-detected area.
[0068] A computer vision algorithm (such as background modeling or deep learning detection) is run on the cropped image to identify the position, bounding box, or skeleton key point of the moving target (such as an athlete).
[0069] S143, determining that a preset trigger condition is met when the moving target falls within the range of the trigger area box.
[0070] It is determined whether the spatial coordinates of the identified moving target overlap or contain the calibrated trigger area box. If the target enters the trigger box range, it is logically determined that the trigger condition is met, and recording is prepared.
[0071] According to the scheme of the embodiment of the present disclosure, the strategy of "cropping before detection" greatly reduces the input data amount of the algorithm and improves the processing speed. At the same time, logical judgment is made based on the calibrated area box, which ensures that the trigger logic always remains consistent with the actual position of the physical site. Even if the camera is offset, key events can still be accurately captured.
[0072] In a possible implementation, the initial area configuration information further includes an ignore area box. S140 performs target activity detection on the current video stream based on the calibrated functional area box, further including the following steps: S144, performing pixel shielding processing on the to-be-detected area using the calibrated ignore area box.
[0073] Before target recognition, the pixel values in the detection area image corresponding to the calibrated ignore area frame are modified to pure color (e.g. all black) or marked as invalid according to the position of the calibrated ignore area frame. In this way, the detection algorithm will not extract any features when processing this area, thus physically "ignoring" any changes in this area.
[0074] According to the scheme of the embodiments of the present disclosure, the influence of fixed interference sources (such as a waving flag and a flickering screen) is eliminated from the data source by pixel-level shielding processing. This method is more thorough and efficient than post-filtering detection results, and significantly reduces the false positive rate in a complex environment.
[0075] In a possible implementation, the initial area configuration information further includes a forbidden area frame. The forbidden area frame is used to intercept the generation of the recording record in the case that there is any moving target in the forbidden area frame.
[0076] In this step, when the preset trigger condition is met (for example, a person enters the trigger area), the system additionally checks whether there is a moving target in the calibrated forbidden area frame. If there is (for example, the coach stands in the forbidden area), the system will forcibly stop the recording process and not generate a video file.
[0077] According to the scheme of the embodiments of the present disclosure, the introduction of the forbidden area frame provides an advanced logic control of "veto". It effectively solves the problem of false triggering caused by the activities of non-competition personnel (such as referees and coaches), so that the automatic recording system can more intelligently understand the complex competition scene and only record the valid competition pictures or the pictures of the desired target object.
[0078] In a possible implementation, the function area frame further includes an auxiliary analysis area frame. The step of generating a recording record in S140 further includes the following steps: S145, recording image data in the detection area frame and the auxiliary analysis area frame from the current video stream.
[0079] The system encodes and saves the image frames containing the content of interest as a video file.
[0080] S146, obtaining position information of the auxiliary analysis area frame in the current video stream image coordinate system.
[0081] Calculating the vertex coordinates of the calibrated auxiliary analysis area frame. Since adaptive calibration is performed, these vertex coordinates correspond to the physical reference (such as the water level line) in the current picture.
[0082] S147, associating the position information as metadata to the recording record as spatial reference information.
[0083] The coordinate data is written into the header information of the video file, the subtitle track or the associated metadata file. When playing back later or using professional analysis software, the coordinates can be read to draw accurate reference lines on the video.
[0084] According to the scheme of the embodiment of the present disclosure, the accuracy of later data analysis is ensured by recording the position of the auxiliary region after dynamic calibration. Even if the camera is offset, the later analysis software can obtain a corrected spatial reference, thereby ensuring the accuracy of the calculation of motion parameters such as speed and distance.
[0085] In a possible implementation, the method further includes the following steps: S101, in response to a configuration operation, defining at least one functional region frame on the reference image.
[0086] This is the system initialization phase. The user draws a rectangle or other shape on the displayed reference image through the human-computer interaction interface and specifies the type (detection / trigger / ignore, etc.).
[0087] S102, saving the initial vertex coordinates of the functional region frame to form initial region configuration information.
[0088] The system records the coordinate position of the region frame drawn by the user on the reference image and saves it as a configuration file as reference data for subsequent calibration.
[0089] According to the scheme of the embodiment of the present disclosure, the use threshold of the system is reduced through the visual configuration method, and the user can complete complex scene definition without professional programming knowledge. The saved initial configuration provides a necessary reference for subsequent automated calibration.
[0090] In a possible implementation, the visual acquisition device is a fixedly installed camera. The geometric transformation parameter is used to represent the pose offset amount of the camera relative to the reference image acquisition time.
[0091] This embodiment specifies the physical premise of the technical scheme. The camera is fixedly installed, and the pose offset is a small unintended change (such as caused by vibration). The geometric transformation parameter (homography matrix) mathematically establishes the mapping relationship from the reference time image plane to the current time image plane.
[0092] According to the scheme of the embodiment of the present disclosure, the physical meaning of the calibration algorithm is specified, that is, the pose micro-motion of the camera is inversely deduced by calculating the two-dimensional transformation between images, so as to realize the compensation at the software level. This provides theoretical support for the technical route of “moving the configuration while keeping the image still”.
[0093] In order to more intuitively illustrate the working logic of the disclosed scheme in the actual application scenario, this embodiment takes the "indoor swimming pool automatic recording system" as an example, and describes in detail the actual operation process in the time sequence of system deployment configuration, daily maintenance (adaptive calibration), and real-time operation (recording triggering).
[0094] Step one: system deployment and initial configuration In the initial deployment or manual maintenance stage of the system, after the visual acquisition device (such as a fixed network camera) is installed, the system obtains a scene image without personnel interference as a reference image. The operation and maintenance personnel or users draw and configure the following functional area boxes on the reference image through the man-machine interface, forming the initial area configuration information: Detection area box: frame the area containing the pool lane, excluding the stands and aisles; Trigger area box: set in the water area below the diving platform edge, used to detect the jumping and diving action; Ignore area box: frame a piece of electronic billboard on the pool side (with light flicker interference); Inhibition area box: frame the lifeguard or coach seat area on the pool side; Auxiliary analysis area box: mark the water line position for later analysis of the water depth.
[0095] Step two: adaptive calibration of trigger area configuration (daily maintenance) After the system enters the unattended operation stage, it automatically executes the calibration process according to the preset period (for example, every day at 3 am) to correct the pose offset caused by device microseismic or thermal expansion and contraction: Environment detection and collection: The system monitors the current video stream and confirms that the screen is still and the lighting conditions meet the requirements, then intercepts a current calibration image.
[0096] Offset calculation: The system automatically compares the reference image and the current calibration image, and calculates the plane homography matrix (geometric transformation parameters) describing the geometric transformation relationship between the two. At this time, the system will check the scaling factor and rotation angle calculated, if it exceeds the reasonable threshold (such as the camera being hit hard), it will report an error and request manual intervention; if it is within the tolerance range, it will continue.
[0097] Coordinate update: The system uses the homography matrix to perform unified matrix transformation on the initial vertex coordinates of the above five types of functional area boxes, generating calibrated functional area boxes that are accurately aligned with the current calibration image. At this point, the logical coordinates of the configuration file have been automatically corrected according to the physical offset.
[0098] Step three: real-time video stream preprocessing (real-time operation) During the competition or training, the system processes the real-time input current video stream frame by frame based on the calibrated functional area box: Image cropping: According to the calibrated detection area box, the irrelevant background (such as the stands) in the original image is cropped, and only the swimming lane area is retained as the detection area.
[0099] Interference shielding: According to the calibrated ignore area box, the pixel value of the corresponding electronic billboard position in the detection area is forced to zero (or set to invalid), eliminating dynamic background interference.
[0100] Step four: target detection and logical judgment (real-time operation) Target recognition: The processed image is input into the computer vision algorithm to identify the position and state of the moving target (athlete).
[0101] Trigger judgment: The system determines whether the recognized athlete coordinates enter the calibrated trigger area box. If so, a pre-trigger signal is generated.
[0102] Veto judgment: The system further checks whether the target is located in the calibrated prohibited area box (for example, the coach walks on the sidelines). If so, it is determined as invalid trigger and interception recording; if not, it is confirmed that the trigger is valid, and an official recording signal is output.
[0103] Step five: recording generation and metadata association (result output) Video recording: In response to the recording signal, the system writes the cached video stream data into the storage medium to generate a video file of the current diving action.
[0104] Data association: The system obtains the coordinate information of the calibrated auxiliary analysis area box (water surface line) and writes it as metadata into the video file. When the user plays back the video for action analysis later, the software can accurately draw the water surface reference line on the video screen according to the metadata, assisting in judging the water entry effect. Even if the camera has a slight deviation from the initial installation position during recording, the reference line still accurately fits the actual water surface.
[0105] According to the scheme of the embodiments of the present disclosure, through the above whole process processing from system deployment, adaptive calibration to real-time recording, the following beneficial effects are achieved: 1. The problem of fixed camera detection failure due to physical offset is solved, and long-term stable operation at low cost is realized. In related technologies, when the fixed camera is slightly offset due to environmental microseismicity or thermal expansion and contraction, the pre-set region of interest (ROI) will be misaligned with the actual scene, leading to false detection or missed detection. Usually, on-site mechanical adjustment or remote redrawing of the region is required, which is very costly. The embodiment automatically compares the reference image with the current image at regular intervals, calculates the plane homography matrix and updates the coordinates of the five types of functional region frames, and uses a soft calibration strategy of "fixed image dynamic configuration" to automatically compensate for the physical offset error without human intervention, significantly reducing the system maintenance frequency and labor cost.
[0106] 2. The problem of picture quality loss and computing power waste caused by traditional electronic image stabilization technology is solved, and the high-precision requirement of sports motion analysis is ensured. Traditional electronic image stabilization technology usually aligns the picture by cutting or distorting the real-time video stream, which not only consumes a lot of real-time computing power, but also damages the pixel integrity of the original image, affecting subsequent motion detail analysis (such as water splash analysis). The embodiment only performs mathematical transformation on a few coordinate points in the configuration file without modifying the video stream image data, thus preserving the integrity of the original picture quality and greatly saving computing resources, ensuring the real-time operation performance of the system on edge computing devices.
[0107] 3. The false trigger problem caused by dynamic interference in complex sports scenes is solved, and the business accuracy of automatic recording is improved. Related technologies often rely on a single trigger region, which is difficult to deal with complex interference in the venue (such as flashing billboards and passing coaches). The embodiment builds a multi-dimensional anti-interference mechanism by detecting the cropping of the region frame, ignoring the pixel shielding of the region frame, and prohibiting the logical veto of the region frame. Through pixel-level shielding to eliminate environmental noise and logical-level veto to exclude non-target objects (such as coaches), a high trigger accuracy is achieved in complex dynamic environments.
[0108] 4. The problem of camera offset causing invalid reference benchmark for post-data analysis is solved, ensuring the spatial consistency of motion data analysis. In traditional solutions, if the camera moves, the static reference line (such as the water line) superimposed later will not be accurate, leading to analysis data errors. The embodiment adaptively calibrates the "auxiliary analysis region frame" and stores the calibrated coordinates as metadata associated with the video file, ensuring that regardless of the camera's slight movement, the reference line generated during playback will always be close to the actual physical reference, thus ensuring the accuracy and reliability of professional data analysis such as motion trajectory and water entry depth.
[0109] The target activity automatic recording method based on adaptive update of region frame provided by the present disclosure is not only suitable for sports scenes, but also suitable for outdoor security monitoring fields with extremely high false alarm rate requirements.
[0110] Scenario: In outdoor monitoring of substations, perimeter fences or important facilities, cameras are usually installed on high poles. Influenced by the sway of the pole body blown by strong wind, thermal expansion and contraction of the bracket caused by day and night temperature difference, etc., the shooting angle of the camera often shifts slightly. After setting the "intrusion detection box" in the traditional video analysis system, if the camera shifts, the originally set detection line may move from the "fence" to the "sidewalk", resulting in a large number of false alarms.
[0111] Implementation process: 1. Area configuration: Detection area box: frame the fence and the forbidden area inside the fence.
[0112] Trigger area box: set a virtual tripwire area along the top of the fence.
[0113] Ignore area box: frame the area of a tree swaying in the wind in the picture (tree leaves swaying is a common source of false alarms).
[0114] Prohibited area box: frame the public sidewalk area outside the fence (to prevent passers-by from triggering alarms).
[0115] 2. Adaptive calibration: The system is set to perform calibration every 10 hours or when it detects that the picture is shaking violently. The system obtains the current monitoring picture and performs feature matching with the reference background picture (containing fixed building features) collected when the system is deployed, and calculates the homography matrix. Assuming that the camera is deflected 2 degrees to the left due to strong wind, the system uses the calculated matrix to shift all the virtual boxes (tripwire, tree shielding area, sidewalk area) to the right by the corresponding distance.
[0116] 3. Business processing: Anti-interference: Since the ignore area box automatically aligns with the tree position as the camera shifts, no matter how the tree sways, this area is always shielded and will not trigger the motion detection.
[0117] Accurate alarm: Since the trigger area box automatically aligns with the fence position, only when a real intruder climbs over the fence will it accurately fall within the trigger area.
[0118] False alarm prevention: Since the prohibited area box always covers the sidewalk outside the fence, even if the camera shifts, the legal pedestrians on the sidewalk will not mistakenly enter the trigger area, or be detected and excluded by the logic rules in time.
[0119] Through the scheme of the embodiment, the security monitoring system can automatically compensate for physical disturbances at the hardware level in a harsh outdoor environment, and always maintain accurate fitting of the software-defined defense zone and the physical environment. This not only greatly reduces false positives and false negatives caused by camera displacement, but also eliminates the maintenance cost of engineers frequently climbing the tower to debug the camera.
[0120] The embodiment of the present disclosure also provides an automatic recording system, comprising: A visual acquisition device is configured to acquire a video stream of a monitoring scene.
[0121] The visual acquisition device can be a high-resolution network camera (IPC), a global shutter industrial camera, or a panoramic camera. The device is connected to the network through wired (such as network cable, optical fiber) or wireless (such as Wi-Fi, 5G) methods.
[0122] A computing device is communicatively connected to the visual acquisition device and configured to process the video stream.
[0123] The computing device can be an edge computing box or a cloud server, responsible for running core algorithms.
[0124] The computing device is configured to run the above-mentioned embodiments and execute core adaptive calibration and target detection algorithms.
[0125] Local deployment mode: the computing device can be an edge computing box (Edge Box), industrial computer, or high-performance personal computer deployed locally in the venue. This mode has low latency and is suitable for professional competition scenarios with extremely high real-time requirements.
[0126] Cloud deployment mode: the computing device can also be a cloud server or a cloud host cluster. The visual acquisition device pushes the video stream to the cloud through the Internet, and the cloud server cluster shares the high-concurrency image processing and matrix calculation tasks. This mode is suitable for unified management of multiple venues, reducing the deployment cost of local hardware.
[0127] The automatic recording system also includes a storage device configured to persistently store generated recording records (video clips), event logs, initial area configuration information, and historical data during the calibration process.
[0128] Local storage: the storage device can be a hard disk built-in the computing device, an external disk array, or a network attached storage (NAS) in a local area network.
[0129] Cloud storage: the storage device can also be an object storage service (OSS) or a cloud database provided by a cloud server. The recording clips generated by the system can be directly uploaded to the cloud, making it convenient for users to review, download, and share at any time and anywhere through a web page or a mobile App.
[0130] When the computing device or storage device is located in the cloud, the system further comprises a communication network device (such as a router, switch, 5G gateway) for ensuring high-bandwidth and low-latency data transmission between the visual acquisition device and the cloud server, and ensuring the real-time performance of video stream uploading and control signal issuing.
[0131] The computing device is configured with a layered processing architecture, such as Figure 3 As shown in the figure, the layered processing architecture includes: The sensor layer is used to drive the visual acquisition device and obtain the video stream.
[0132] This layer shields the driving differences of different camera manufacturers and provides a unified image data interface, such as providing time-synchronized raw image frames.
[0133] The detector layer is used to identify moving targets or motion states from the image data of the video stream and output detection results.
[0134] This layer encapsulates specific computer vision algorithms (such as background difference, deep learning detection) and only outputs standardized data such as target position and confidence, without exposing algorithm details.
[0135] The interaction layer is used to receive configuration instructions through a human-computer interaction interface and generate initial region configuration information containing initial vertex coordinates of the function region box.
[0136] This layer provides a visual UI for users to draw boxes on images, configure logic, and save configurations as files.
[0137] The trigger layer is used to execute the automatic recording method provided by any of the preceding embodiments, calibrate the initial region configuration information using geometric transformation parameters, and generate logical trigger events based on the calibrated function region box.
[0138] This layer is the core logic hub of the system, responsible for periodically calling calibration algorithms to update region box coordinates, and performing logical judgments (such as entering trigger zones and not entering prohibited zones) based on the output of the detector layer and the calibrated region box, and generating logical events such as "start recording" and "stop recording".
[0139] The signal layer is used to respond to logical trigger events and output control signals for controlling video recording.
[0140] This layer converts logical events into specific system instructions, such as driving hard disk to write video files and sending pulse signals to external scoring systems.
[0141] According to the scheme of the embodiment of the present disclosure, by constructing a five-layer hierarchical architecture, the high decoupling of system functions is realized. The sensor layer solves the hardware compatibility problem; the detector layer realizes the modular replacement of the algorithm; the interaction layer reduces the difficulty of user configuration; the trigger layer integrates the core adaptive calibration technology, ensuring the stability of long-term operation; and the signal layer provides a flexible output interface. Such architecture design makes the system have strong expansibility and maintainability, and can quickly adapt to different sports and hardware environments.
[0142] Figure 4 is a structural schematic diagram of an automatic recording device 400 provided according to an embodiment of the present disclosure. As shown in the figure, the device includes: Figure 4 a data acquisition module 401, configured to acquire a current video stream collected by a visual acquisition device for a monitoring scene, and load initial region configuration information of the monitoring scene; a calculation module 402, configured to determine a geometric transformation parameter according to a feature difference between a reference image and a current calibration image of the monitoring scene; a calibration module 403, configured to calibrate coordinates of a functional region frame contained in the initial region configuration information by using the geometric transformation parameter, to obtain a calibrated functional region frame; a processing module 404, configured to perform target activity detection on the current video stream based on the calibrated functional region frame, and generate a recording record when a detection result meets a preset trigger condition.
[0143] In a possible implementation manner, the calculation module 402 is configured to: extract image feature points of the reference image and the current calibration image respectively; match the image feature points of the reference image and the image feature points of the current calibration image, to establish a feature point pair set; calculate a plane homography matrix from the reference image to the current calibration image based on the feature point pair set; use the plane homography matrix as the geometric transformation parameter.
[0144] In a possible implementation manner, the calibration module 403 is configured to: calculate a scaling factor and a rotation angle of the plane homography matrix; in a case where the scaling factor and the rotation angle are both within a corresponding tolerance interval, perform coordinate calibration on initial vertex coordinates of the functional region frame by using the geometric transformation parameter.
[0145] In a possible implementation manner, the device further includes a trigger module, configured to: monitor whether the system currently meets a preset automatic calibration trigger condition; In the case of meeting the automatic calibration trigger condition, a frame image is intercepted from the current video stream as a current calibration image. The automatic calibration trigger condition comprises reaching a preset calibration time point or reaching a preset calibration running period.
[0146] In a possible implementation, the functional area frame comprises at least one of a detection area frame, a trigger area frame, an ignore area frame, a forbidden area frame and an auxiliary analysis area frame. The detection area frame is used to define an effective image range for target detection. The trigger area frame is used to define a spatial range in which a trigger event is effective. The ignore area frame is used to shield a disturbance area inside the detection area frame. The forbidden area frame is used to define an area in which a trigger event is prohibited. The auxiliary analysis area frame is used to provide spatial reference information in a data analysis stage after recording is completed.
[0147] In a possible implementation, the functional area frame comprises the detection area frame and the trigger area frame. The calibration module 403 is configured to: crop an image frame of the current video stream by using the calibrated detection area frame to obtain a to-be-detected area; identify a moving target in the to-be-detected area; determine that a preset trigger condition is met in the case that the moving target falls within a range of the trigger area frame.
[0148] In a possible implementation, the functional area frame further comprises the ignore area frame. The calibration module 403 is configured to: perform pixel shielding processing on the to-be-detected area by using the calibrated ignore area frame.
[0149] In a possible implementation, the initial area configuration information further comprises the forbidden area frame. The forbidden area frame is used to intercept generation of a recording record in the case that there is any moving target in the forbidden area frame.
[0150] In a possible implementation, the functional area frame further comprises the auxiliary analysis area frame. The processing module 404 is configured to: record image data in the detection area frame and the auxiliary analysis area frame from the current video stream; obtain position information of the auxiliary analysis area frame in a current video stream image coordinate system; associate the position information to the recording record as spatial reference information.
[0151] In a possible implementation, the apparatus further includes a configuration module configured to: define at least one functional area frame on the reference image in response to the configuration operation; save initial vertex coordinates of the functional area frame to form initial area configuration information.
[0152] In a possible implementation, the visual acquisition device is a fixedly installed camera; and the geometric transformation parameter is used to represent a pose offset amount of the camera relative to a reference image acquisition time.
[0153] The specific functions and examples of the modules and sub-modules of the apparatus of the embodiments of the present disclosure are described in the related description of the corresponding steps in the method embodiments, which will not be described here.
[0154] In the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0155] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0156] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0157] As shown in Figure 5 The device 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0158] A plurality of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0159] The computing unit 501 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs various methods and processes described above, such as the automatic recording method. For example, in some embodiments, the automatic recording method can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded onto the RAM 503 and executed by the computing unit 501, one or more steps of the automatic recording method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the automatic recording method by any other appropriate means, such as by means of firmware.
[0160] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0161] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package, or entirely on a remote machine or server.
[0162] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0163] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0164] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0165] The computer system can include clients and servers. This relationship can be. The servers are typically remote from the clients with the interactions between them occurring over a communication network. The relationship between client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The servers can be cloud servers, servers of a distributed system, or servers incorporating blockchain.
[0166] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without departing from the desired results of the technology disclosed in the present disclosure, and are not limited herein.
[0167] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the principles of the present disclosure. Any further modifications, equivalents, alternatives, and / or improvements made to the specific embodiments described above are intended to fall within the scope of the present disclosure.
Claims
1. An automatic recording method, comprising: Acquire the current video stream captured by the visual acquisition device for the monitoring scene, and load the initial area configuration information of the monitoring scene; Based on the feature differences between the baseline reference image and the current calibration image of the monitored scene, the geometric transformation parameters are determined; Using the geometric transformation parameters, the coordinates of the functional area boxes contained in the initial region configuration information are calibrated to obtain calibrated functional area boxes; Based on the calibrated functional area bounding box, target activity detection is performed on the current video stream, and a recording is generated when the detection result meets the preset triggering conditions.
2. The method according to claim 1, wherein, The step of determining geometric transformation parameters based on the feature differences between the baseline reference image and the current calibration image of the monitored scene includes: Extract image feature points from the reference image and the current calibration image respectively; The image feature points of the reference image are matched with the image feature points of the current calibration image to establish a set of feature point pairs; Based on the set of feature point pairs, calculate the planar homography matrix from the reference image to the current calibration image; The planar homography matrix is used as the geometric transformation parameter.
3. The method according to claim 2, wherein, The step of calibrating the coordinates of the functional region bounding boxes included in the initial region configuration information using the geometric transformation parameters includes: Calculate the scaling factor and rotation angle of the planar homography matrix; When both the scaling factor and the rotation angle are within their respective tolerance ranges, the initial vertex coordinates of the functional area box are calibrated using the geometric transformation parameters.
4. The method according to claim 1, further comprising: Monitor whether the system currently meets the preset automatic calibration trigger conditions; If the automatic calibration triggering condition is met, a frame is extracted from the current video stream as the current calibration image; The automatic calibration triggering conditions include reaching a preset calibration time point or reaching a preset calibration operation cycle.
5. The method according to any one of claims 1 to 4, wherein, The functional area box includes at least one of the detection area box, trigger area box, ignore area box, prohibit area box and auxiliary analysis area box; The detection region bounding box is used to define the effective image range for target detection; The trigger area frame is used to define the spatial range in which the trigger event takes effect; The ignored region box is used to shield the interference region within the detection region box; The prohibited area box is used to define the area where triggering events are prohibited; The auxiliary analysis area box is used to provide spatial reference information during the data analysis phase after recording is completed.
6. The method according to claim 1, wherein, The functional area box includes a detection area box and a trigger area box; The step of detecting target activity in the current video stream based on the calibrated functional region bounding box includes: The image frames of the current video stream are cropped using the calibrated detection region bounding box to obtain the region to be detected; Identify moving targets within the detection area; If the moving target falls within the range of the trigger area frame, it is determined that the preset trigger condition is met.
7. The method according to claim 6, wherein, The functional area box also includes an ignored area box; The step of detecting target activity in the current video stream based on the calibrated functional region bounding box includes: The pixel masking process is performed on the region to be detected using the calibrated ignore region box.
8. The method according to claim 6, wherein, The initial region configuration information also includes prohibited region boxes; The prohibited area box is used to intercept the generation of the recording if any moving target exists within the prohibited area box.
9. The method according to claim 1, wherein, The functional area box also includes an auxiliary analysis area box; The generation of the recording record includes: Record image data within the detection region box and the auxiliary analysis region box from the current video stream; Obtain the position information of the auxiliary analysis region bounding box in the current video stream image coordinate system; The location information is associated with the recording as metadata to serve as spatial reference information.
10. The method according to claim 1 or 5, further comprising: In response to a configuration operation, at least one functional region box is defined on a baseline reference image; Save the initial vertex coordinates of the functional area bounding box to form the initial area configuration information.
11. The method according to claim 1, wherein, The visual acquisition device is a fixedly installed camera; the geometric transformation parameters are used to characterize the pose offset of the camera relative to the reference image acquisition time.
12. An automatic recording device, comprising: The data acquisition module is used to acquire the current video stream collected by the visual acquisition device for the monitoring scene, and to load the initial area configuration information of the monitoring scene; The calculation module is used to determine the geometric transformation parameters based on the feature differences between the benchmark reference image and the current calibration image of the monitoring scene; The calibration module is used to calibrate the coordinates of the functional area box contained in the initial region configuration information using the geometric transformation parameters, so as to obtain the calibrated functional area box. The processing module is used to perform target activity detection on the current video stream based on the calibrated functional area bounding box, and generate a recording record when the detection result meets the preset triggering conditions.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-11.
15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-11.
16. An automatic recording system, comprising: Visual acquisition devices are used to acquire video streams from monitored scenes; A computing device, communicatively connected to the visual acquisition device, is used to execute the method of any one of claims 1-11 to automatically record the video stream; The computing device is configured with a hierarchical processing architecture, which includes: The sensor layer is used to drive the visual acquisition device and acquire the video stream; The detector layer is used to identify moving targets or motion states from the image data of the video stream and output the detection results; The interaction layer is used to receive configuration instructions through the human-computer interaction interface and generate initial region configuration information containing the initial vertex coordinates of the functional region box. A trigger layer is used to execute the method of any one of claims 1-11, calibrate the initial region configuration information using the geometric transformation parameters, and generate a logical trigger event based on the calibrated functional region box; The signal layer is used to respond to the logical triggering event and output control signals for controlling video recording.