Security camera photographing image transmission method and system
By employing a partitioning mechanism based on inter-frame pixel differences and a dynamic transmission strategy, the problem of distinguishing between critical and background areas in security camera image transmission is solved. This enables efficient detection of dynamic targets and redundant backup of critical content, improving the stability and network adaptability of image transmission, and making it suitable for security image transmission in complex environments.
Patent Information
- Application Number
- CN202510556693.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-04-29
AI Technical Summary
Existing security camera image transmission methods fail to effectively distinguish between critical areas and background areas in dynamic monitoring scenarios, making it difficult to guarantee the stability and integrity of image information transmission. Furthermore, they lack the ability to analyze and provide feedback on the dynamic characteristics of image structure in real time, making it difficult to flexibly adapt to the challenges of image content changes and network status fluctuations in complex environments.
A partitioning mechanism based on inter-frame pixel differences is adopted to divide image frames into differential image blocks and background image blocks. High-priority image datasets are generated by embedding markers through moving target detection. Combined with the periodic compression strategy of background reference frames, redundant fragments are dynamically generated. The transmission priority is adjusted according to the network status to achieve redundant backup and priority transmission of critical content.
It significantly improves the efficiency of moving target detection, reduces data transmission load, enhances the integrity of image content and network adaptability, ensures data continuity and stability under weak network conditions, and improves the real-time performance and accuracy of image transmission.
Smart Images

Figure CN120434357B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image transmission technology, and more specifically, to a method and system for transmitting photographic images taken by a security camera. Background Technology
[0002] With the continuous development of computer vision and intelligent monitoring technologies, camera-based image acquisition and analysis systems are widely used in urban security, intelligent transportation, and industrial monitoring. Traditional security cameras typically use fixed time intervals to continuously sample the environment and transmit the images or video streams completely to backend servers for analysis or storage. However, in actual deployment, monitoring networks often face factors such as bandwidth limitations, link fluctuations, and differences in equipment performance, leading to problems such as packet loss, latency, and blurry images during image transmission, severely affecting the real-time performance and accuracy of image recognition and event response. To alleviate network congestion, some technologies have introduced image compression and delay caching mechanisms, or adopted inter-frame differential technology to reduce the amount of data transmitted. However, these technologies often lack the ability to identify and classify the complexity of image content, making it difficult to ensure the integrity of images in critical areas while achieving effective compression and intelligent scheduling of non-critical areas.
[0003] Existing image transmission methods, when processing high-frequency moving targets in dynamic monitoring scenarios, often fail to distinguish and prioritize critical regions from background regions in the image with fine granularity. This makes it difficult to guarantee the stability and integrity of image information transmission corresponding to sudden motion events. Furthermore, while some technologies attempt to mark the importance of different regions through image slicing and labeling mechanisms, most implementations are still based on static strategies, lacking the ability to analyze and respond to the dynamic characteristics of image structure in real time. This makes them unable to flexibly adapt to the dual challenges of image content changes and network state fluctuations in complex environments. Therefore, balancing transmission efficiency with prioritizing the transmission of critical content and redundancy recovery strategies has become one of the key challenges in the current field of security image processing.
[0004] Therefore, a solution for transmitting photographic images from security cameras is needed. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention is proposed. This invention provides a method and system for transmitting photographic images from a security camera.
[0006] According to one aspect of the present invention, a method for transmitting photographic images from a security camera is provided, comprising: the camera continuously acquiring image frame data, and performing pixel difference comparison based on the previous frame to divide the changed area into a differential image block set B. diff The remaining area is divided into a set of background image patches B. back In the differential image patch set B diffInternally, it performs moving target detection, embeds labels into the identified target patches, and generates a high-priority image dataset D. pri For the background image patch set B back Integrate to form background reference frame F ref The system is configured to compress and store the data every n seconds, awaiting unified packaging and delivery to the client; the high-priority image dataset D is then... pri With background reference frame F ref Divided into a set of image slices P set It also assigns key identifiers to fragments containing moving targets based on tag information, and dynamically generates redundant fragments R based on content complexity. set During the image transmission phase, key fragments and redundant fragments are dynamically sent based on the current network fluctuation status.
[0007] Furthermore, the pixel difference comparison includes: comparing image frames F t With F t-1 Each grid cell is divided into sets of grid units with the same structure. Each grid cell corresponds to a fixed range of pixel blocks to constrain the differential comparison range. The grayscale mean of pixels in each grid cell is extracted as the brightness center value. The degree of inter-frame variation in the region is calculated, and grid regions with a brightness adaptive dynamic threshold are selected as candidate differential block sets. Edge contours and texture direction histograms are extracted from the candidate differential block sets and compared with the corresponding regions in the previous frame. Patches with significant edge changes and texture direction differences exceeding a set threshold are retained and assigned to differential image block sets.
[0008] Furthermore, the moving target detection includes: calculating the difference in Sobel gradient direction distribution between the current frame and the previous frame in the differential image patch set, and retaining patches whose direction changes are greater than a set threshold θ. g The map is plotted and its corresponding direction vector is recorded. A graph structure is established based on the consistency of direction vectors and spatial adjacency between the map plots. Regions that satisfy both temporal continuity and direction consistency are identified as the set of motion regions.
[0009] Furthermore, the identified target tile embedding tag includes: attaching motion tags to tiles in the motion region set, including the current frame timestamp and direction vector.
[0010] Furthermore, the construction of the graph structure includes: in the differential image patch set B diff In this process, a direction vector is extracted for each tile. In a two-dimensional coordinate system, it is determined whether the angle between the direction vectors of the tile and its eight neighboring tiles is less than a set threshold. If the condition is met, a weighted directed edge is established between the tiles to form a directional connected graph structure.
[0011] Furthermore, the image slice set P set The partitioning includes: the high-priority image dataset Dpri With background reference frame F ref Extract the brightness channel separately and construct the image saliency map Z. map According to Z map The value divides the image into salient and non-salient regions; in the image saliency map Z... map Based on this, Sobel gradient maps are overlaid to divide the image into segments, generating an initial set of image segments.
[0012] Furthermore, the dynamic generation of redundant fragments R based on content complexity... set This includes: calculating the structural entropy E for each image piece in the initial set of image pieces. i As a measure of content uncertainty, it is used for subsequent redundancy priority ranking; based on the directional gradient changes within each image slice, the mean square error of the directional histogram is calculated to obtain the texture complexity index C. i E i and C i Perform combined calculations and sort the results according to their size. Select the top K% of the fragments in the sorted results as candidates for redundancy generation. Generate at least one set of redundant fragments for each candidate image fragment and include them in the transmission sequence together with the image fragments to resist the risk of data loss under weak network conditions.
[0013] Furthermore, the transmission of the key fragment includes: continuously collecting transmission delay through a sliding window, calculating the periodic mean and standard deviation, and constructing a network fluctuation index; retrieving a preset priority control coefficient from the configuration table based on the current network fluctuation index, and controlling the ranking weight of the fragment corresponding to the key identifier in the transmission buffer; prioritizing the arrangement of fragments marked as key identifiers in the transmission buffer, and setting the transmission time interval.
[0014] Furthermore, the replacement transmission of the redundant fragments includes: during the fragment reception process, the receiving end records the incomplete data index numbers in the reception sequence in real time, extracts the key identifier attributes of the corresponding numbers, and generates a missing index set; after receiving the missing index set, the encoding end extracts the associated redundant fragment set from the generated redundant fragments based on the key identifier as the query condition, and marks the current transmission round; the sending end loads the redundant fragment set, encodes it according to its order in the initial fragment sequence, and adds a unique round identifier to distinguish between normal transmission and retransmission fragments; after receiving the redundant fragments, the receiving end reconstructs the fragments corresponding to the missing index set based on the round identifier and the initial sequence number, and embeds them into the original frame image data structure.
[0015] According to another aspect of the present invention, a security camera image transmission system is provided, comprising: an image acquisition module, used for continuously acquiring image frame data by the camera, and performing pixel difference comparison based on the previous frame to divide the changing area into a differential image block set B. diff The remaining area is divided into a set of background image patches B. back ;
[0016] The object detection module is used to detect objects in the differential image patch set B. diff Internally, it performs moving target detection, embeds labels into the identified target patches, and generates a high-priority image dataset D. pri ;
[0017] The background integration module is used to integrate the background image patch set B. back Integrate to form background reference frame F ref The system is configured to compress and store the data every n seconds, waiting for it to be packaged and sent to the client.
[0018] The image slicing module is used to slice high-priority image datasets D. pri With background reference frame F ref Divided into a set of image slices P set It also assigns key identifiers to fragments containing moving targets based on tag information, and dynamically generates redundant fragments R based on content complexity. set ;
[0019] The dynamic transmission module is used to dynamically send critical and redundant fragments based on the current network fluctuation status during the image transmission phase.
[0020] Compared with existing technologies, the security camera image transmission method and system provided by this invention effectively divides image frames into differential image blocks and background image blocks by introducing a partitioning mechanism based on inter-frame pixel differences, thereby significantly improving the detection efficiency of moving targets and the targeting of data processing. By embedding markers such as direction vectors and motion timestamps within the differential image block set, priority encoding of dynamic target image regions is achieved. Furthermore, combined with the periodic compression strategy of background image frames, redundant data is compressed to the maximum extent, effectively reducing the overall data transmission load. At the same time, by constructing an image segmentation priority model through brightness saliency and texture complexity, supplemented by structural entropy and directional gradient analysis, redundant backup generation of key content is achieved, greatly improving data integrity under weak network conditions.
[0021] Furthermore, this invention combines a priority sorting method based on key fragment identifiers to achieve a data scheduling strategy with strong network adaptability. The sending end can adjust the transmission order and time interval of image segments in real time, enhancing the continuity and fault tolerance of the video stream in unstable network environments. The redundant fragment retransmission mechanism also ensures that the data receiving end can quickly recover the original image data based on the identifier information when fragments are lost, effectively enhancing the system's stability and image restoration capabilities.
[0022] In summary, this invention significantly reduces unnecessary image data traffic while ensuring high-reliability transmission of critical image content. It balances network adaptability and image content integrity, making it suitable for security image transmission applications in various complex environments. It has high practical value and promotion potential. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0024] Figure 1 This is a flowchart of a security camera image transmission method according to an embodiment of the present invention.
[0025] Figure 2 This is a flowchart illustrating the dynamic generation of redundant segments based on content complexity in a security camera image transmission method according to an embodiment of the present invention.
[0026] Figure 3 This is a flowchart illustrating the replacement transmission of redundant segments in a security camera image transmission method according to an embodiment of the present invention.
[0027] Figure 4 This is a structural block diagram of a security camera image transmission system according to an embodiment of the present invention. Detailed Implementation
[0028] Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein.
[0029] As mentioned in the background section, existing image transmission methods, when processing high-frequency moving targets in dynamic monitoring scenarios, typically fail to distinguish and prioritize key and background regions in the image with fine granularity. This makes it difficult to guarantee the stability and integrity of image information transmission corresponding to sudden motion events. Furthermore, while some technologies attempt to mark the importance of different regions through image slicing and labeling mechanisms, most implementations are still based on static strategies, lacking real-time analysis and feedback capabilities for the dynamic characteristics of image structure. This makes them unable to flexibly adapt to the dual challenges of image content changes and network state fluctuations in complex environments. Therefore, balancing transmission efficiency with prioritizing the transmission of key content and redundancy recovery strategies has become one of the key challenges in the current field of security image processing. Thus, a new image transmission solution for security cameras is needed.
[0030] Figure 1 This is a flowchart of a security camera image transmission method according to an embodiment of the present invention. Figure 1 As shown, the security camera image transmission method includes: S1: The camera continuously acquires image frame data and performs pixel difference comparison based on the previous frame, dividing the changed area into a differential image block set B. diff The remaining area is divided into a set of background image patches B. back S2: In the differential image patch set B diff Internally, it performs moving target detection, embeds labels into the identified target patches, and generates a high-priority image dataset D. pri S3: For the background image patch set B back Integrate to form background reference frame F ref S4: Compress and store the high-priority image dataset D every n seconds, waiting for unified packaging and sending to the client; pri With background reference frame F ref Divided into a set of image slices P set It also assigns key identifiers to fragments containing moving targets based on tag information, and dynamically generates redundant fragments R based on content complexity. set S5: During the image transmission phase, key fragments and redundant fragments are dynamically sent based on the current network fluctuation status.
[0031] In one embodiment of the present invention, S1 specifically includes: the camera continuously acquiring image frame data F. t And based on the previous frame F t-1 Pixel difference comparison is performed, and the changed areas are divided into a set of differential image patches B. diff The remaining area is divided into a set of background image patches B. back .
[0032] The pixel difference comparison includes: comparing image frames F tWith F t-1 Each grid cell is divided into sets of grid units with the same structure. Each grid cell corresponds to a fixed range of pixel blocks to constrain the differential comparison range. The grayscale mean of pixels in each grid cell is extracted as the brightness center value. The degree of inter-frame variation in the region is calculated, and grid regions with a brightness adaptive dynamic threshold are selected as candidate differential block sets. Edge contours and texture direction histograms are extracted from the candidate differential block sets and compared with the corresponding regions in the previous frame. Patches with significant edge changes and texture direction differences exceeding a set threshold are retained and assigned to differential image block sets.
[0033] Specifically, the continuous acquisition of image frames by the camera aims to achieve dynamic, real-time image acquisition of the monitored area, ensuring the timeliness and accuracy of subsequent difference analysis. In existing technologies, the image acquisition frequency of cameras is often fixed at around 30 fps (frames per second), meeting the monitoring needs of most scenarios. However, this invention achieves dynamic adjustment of the frame rate by setting acquisition trigger conditions, thereby optimizing the use of storage resources and transmission bandwidth. For example, when the monitored area remains stationary, the acquisition frame rate will be automatically reduced, retaining only necessary image frames for comparison; and once a significant change in light intensity or motion interference is detected, it will quickly resume high-speed acquisition. This dynamic frame rate adjustment strategy not only improves the utilization efficiency of image frames but also avoids the accumulation of invalid data, fundamentally optimizing the processing speed and accuracy of subsequent differential recognition and image block segmentation.
[0034] After acquiring image frame data, this invention further performs a pixel difference comparison based on the previous frame. This pixel difference comparison refers to comparing the grayscale value, color value, or brightness value of each pixel in the current frame with the corresponding pixel value in the previous frame, calculating the change, and determining whether a significant change exists. Traditional techniques often rely solely on the absolute difference in pixel brightness values, making them susceptible to misjudgments due to factors such as lighting fluctuations and noise interference. This invention employs a grid-constrained differential comparison method based on region structure. By dividing the image into several regular grid units, each unit corresponding to a fixed pixel block range, the comparison process no longer targets a single pixel but statistically analyzes the changing trend of the entire pixel block region. This method exhibits stronger robustness against noise, motion blur, and other interference, while significantly improving algorithm efficiency and the accuracy of subsequent image partitioning.
[0035] Based on the above difference comparison results, this invention divides the image into two main categories: a set of differential image patches and a set of background image patches. Image patches showing significant changes are assigned to the set of differential image patches, while other regions that remain static or show minimal changes are considered part of the background image patch set. The division is based on multi-dimensional features, including but not limited to grayscale change thresholds, edge saliency, and texture direction differences. Specifically, after the initial judgment of pixel differences, this invention further extracts image edge contours and texture direction histograms from candidate differential regions and performs a detailed comparison with the corresponding regions in the previous frame. Only if there are significant differences in edge contours or if the texture direction change exceeds a set threshold is the region ultimately assigned to the set of differential image patches. This multi-level filtering mechanism effectively avoids false alarms and false negatives, especially in complex scenes (such as those with frequent changes in lighting or partial occlusion), accurately identifying the true target movement area, thus ensuring the practicality and intelligent analysis effect of the monitoring system.
[0036] Furthermore, in terms of grayscale mean calculation, this invention proposes an adaptive weighted grayscale mean extraction algorithm. Based on the pixel value within each grid cell, a spatial location weight factor and a temporal residual decay factor are added to generate the brightness center value of the current grid cell. This brightness center value not only reflects the average brightness state of the current image block but also incorporates temporal information to a certain extent, effectively avoiding misjudgments caused by instantaneous illumination changes. Subsequently, by using the difference between the brightness center value and the brightness center value of the previous frame, combined with a dynamic adaptive threshold discrimination mechanism, the degree of inter-frame variation in local areas is accurately characterized. This dynamic threshold is calculated by linking multiple dimensions such as the overall image brightness distribution, standard deviation, and historical fluctuation curves. Compared to traditional fixed thresholds, it has stronger environmental adaptability and precision control capabilities, making it particularly suitable for image monitoring systems in complex outdoor lighting environments.
[0037] In summary, this invention not only ensures the accuracy and stability of image dynamic change detection but also significantly improves system response speed and recognition accuracy, laying a high-efficiency foundation for subsequent image-based behavior analysis, event recognition, and anomaly detection functions. This step, in its design and implementation, fully considers various complex situations existing in real-world environments and achieves efficient identification of image change regions through innovative technical approaches such as gridded structures, adaptive algorithms, and multi-dimensional feature filtering.
[0038] S2: In the differential image patch set B diff Internally, it performs moving target detection, embeds tile timestamps, spatial coordinate indices, and dynamic labels into the identified target tiles, and generates a high-priority image dataset D. pri .
[0039] Preferably, the moving target detection includes: calculating the difference in Sobel gradient direction distribution between the current frame and the previous frame in the differential image patch set, and retaining patches whose direction changes are greater than a set threshold θ. g The graph is plotted and its corresponding direction vector is recorded. A graph structure is established based on the consistency of direction vectors and spatial adjacency between the plots, and the regions that satisfy both temporal continuity and direction consistency are identified as the set of motion regions. The embedded markers of the identified target plots include: adding motion markers to the plots in the set of motion regions, including the current frame timestamp and direction vector.
[0040] Preferably, the construction of the graph structure includes: in the differential image patch set B diff In this process, a direction vector is extracted for each tile. In a two-dimensional coordinate system, it is determined whether the angle between the direction vectors of the tile and its eight neighboring tiles is less than a set threshold. If the condition is met, a weighted directed edge is established between the tiles to form a directional connected graph structure.
[0041] As can be seen, performing moving target detection in a set of differential image patches mainly includes two core steps: calculating the difference in Sobel gradient direction distribution and constructing the graph structure motion region. Based on the Sobel operator, this invention proposes an improved direction vector difference extraction algorithm, aiming to accurately extract the dynamic directional features between image patches. Specifically, the Sobel gradient maps of the current frame and the previous frame are calculated for each differential image patch to obtain the principal direction vector of each patch; then, by comparing the difference between the principal direction vectors of these two frames, it is determined whether the angle between them is greater than a set threshold (an empirical value range can be set according to different scenarios). If the direction change is significant, it indicates that the image patch has undergone significant spatial displacement in the time dimension, and can be initially regarded as a potential moving target region.
[0042] Specifically, to avoid false detections caused by abrupt changes in a single image patch, this invention further constructs a directional connectivity graph structure to improve the accuracy of identifying continuously moving regions. The construction method is as follows: in a two-dimensional image coordinate system, for each difference image patch T... i Extract its principal direction vector V i And traverse its eight neighboring plots T j If V i With V j If the angle between them is less than a threshold (e.g., within 10°), then in T i With T j Establish a directed edge between them and assign an edge weight value W. ij This weight value is calculated jointly based on directional similarity and pixel gray-level gradient difference. For example, the following weighting function can be used:
[0043]
[0044] Among them, W ij For block T i With T j The weight of the connected edge between them; ∠V i V j The angle between the main direction vectors of the two tiles; The average Sobel gradient value of the patch; α and β are weight coefficients; The maximum gradient value of all pixels in the image is used to normalize the gradient difference, normalizing the gradient difference to [0,1].
[0045] The directional connectivity graph constructed using the above method has the characteristics of dense structure and adjustable edge weights, which can effectively capture local continuous motion trends. Combined with the temporal continuity test, that is, if directional connectivity and spatial adjacency are continuously satisfied in several adjacent frames (e.g., within 3 frames), then the map patch can be regarded as part of the effective motion region, thus forming a complete set of motion regions.
[0046] As can be seen, this invention not only achieves fine-grained recognition of image targets in the spatial domain, but also realizes intelligent classification and priority sorting of image data through timestamp and direction vector embedding, providing a key foundation for subsequent data compression, fast scheduling and event retrieval.
[0047] As can be seen, this invention achieves accurate detection of potential moving targets in image difference blocks through a two-level mechanism of Sobel orientation difference recognition and graph structure connectivity analysis. It integrates multi-dimensional features such as orientation vectors and temporal continuity to achieve highly robust recognition and structured representation of moving regions; and by constructing a dataset with dynamic priorities through a label embedding mechanism, it significantly improves the practicality and processing efficiency of image data in multi-task scenarios.
[0048] S3: For the background image patch set B back Integrate to form background reference frame F ref The frame is compressed and stored every n seconds, and then packaged and sent to the client as static reference information for the image scene.
[0049] First, to ensure the spatiotemporal stability of the background reference frame, this step integrates the set of image patches in the image sequence that are not marked as motion regions, based on the differential image analysis and moving target removal results completed in steps S1 and S2.
[0050] First, for each frame in the image sequence, it is divided into a fixed grid of tiles. Then, by calling the labeling information output from the first two steps, tiles not marked as motion regions are filtered out. Based on this, to reduce the impact of occasional interference on background construction, this invention employs a temporal redundancy strategy, which statistically integrates candidate tiles from multiple frames at the same spatial location to improve the robustness and consistency of the final generated frame.
[0051] After determining the set of background image patches in each frame, spatial alignment and temporal fusion operations are performed on all background patches using a sliding window approach to construct a complete background reference image in single-frame form. This process includes the following two key sub-steps: Spatial alignment, which involves reassembling and stitching according to the standard image block structure to ensure that the background frame image has the same resolution as the original image. Missing regions are repaired using nearest neighbor interpolation or mean imputation algorithms; Temporal fusion, which involves pixel fusion of multiple candidate background patches (from different frames) at the same location, preferably using a weighted median filtering algorithm to enhance static consistency.
[0052] Furthermore, considering that the content change frequency of static background frames is much lower than that of moving foreground regions, this invention sets the compression and storage cycle of background frames to once every n seconds to improve overall data processing efficiency. Here, n is set according to requirements and is not limited here. The compression mechanism adopts a lightweight, low-redundancy transform coding method, such as JPEG-LS or WebP light compression mode, and incorporates custom metadata (including generation time, tile stability distribution matrix, missing rate index, etc.) to ensure good visual restoration capabilities during subsequent client decoding. After each round of compression, the background reference frame is stored in the static frame buffer and marked with its sequence number and generation timestamp. When the transmission link allows or the client actively requests it, this background frame will be uniformly packaged and sent, working in conjunction with the client's decoding module to construct a static reference for the image scene.
[0053] S4: Transfer the high-priority image dataset D pri With background reference frame F ref Divided into a set of image slices P set It also assigns key identifiers to fragments containing moving targets based on tag information, and dynamically generates redundant fragments R based on content complexity. set .
[0054] To achieve effective perception and differentiated processing of important regions in an image, this invention first performs saliency map construction and Sobel gradient-guided region subdivision operations on the high-priority image dataset and the background reference frame, respectively, ultimately generating an initial set of image segments. Specifically, the image segment set P... set The partitioning includes: the high-priority image dataset D priWith background reference frame F ref Extract the brightness channel separately and construct the image saliency map Z. map According to Z map The value divides the image into salient and non-salient regions; in the image saliency map Z... map Based on this, Sobel gradient maps are overlaid to divide the image into segments, generating an initial set of image segments.
[0055] For example, for input image I, the brightness channel is extracted and a saliency map is constructed using frequency domain filtering and a visual attention mechanism. The saliency map reflects the importance of different regions of the image as perceived by the human eye. Then, based on the pixel intensity distribution in the saliency map, a threshold τ is set. s The image is divided into salient and non-salient regions, with salient regions being preferentially divided into finer-grained image slices.
[0056] Based on saliency segmentation, the Sobel edge gradient map G(x,y) of the image is calculated and combined with the saliency map S(x,y) for joint segmentation. The segmentation process incorporates a segmentation granularity control function:
[0057]
[0058] Where d1<d2<d3 represents the image patch size under different conditions; τ g This is the threshold for the variation of the Sobel gradient. This strategy enables small-size, high-density partitioning in regions with high saliency and complex edges, while larger-size, low-density partitioning is used in regions with low saliency or simple structures, ensuring that the image patch granularity matches the importance of the content.
[0059] After constructing the initial image patch set, key identifiers are embedded for all image patches containing moving targets based on the labeled moving target patch information. The specific process includes: for each image patch, determining whether it spatially overlaps with the set of moving regions; if the overlap area exceeds a set ratio, such as 0.25, a key identifier is added; simultaneously, annotation information such as motion direction vectors and timestamps are retained for subsequent distribution and client decoding. This mechanism ensures that the system can prioritize the recovery of key regions during network jitter or packet loss, improving the accuracy and continuity of image tasks (such as recognition and tracking).
[0060] To improve the timeliness of motion region marking, this invention further establishes a time window update mechanism for motion tags. Specifically, for an image patch marked as a motion region in the current frame, the system records the frame number of its last marking. If the region is not identified as motion again in the subsequent T consecutive frames (e.g., T=5), its key segment label is automatically revoked, and it is reintegrated into the normal patch processing flow. This strategy avoids misidentification of key segments and resource redundancy caused by tag retention after the moving target moves out, ensuring that the tag status is updated synchronously with the actual changes in the image.
[0061] To improve image recoverability under weak network conditions, this invention introduces a redundant segmentation generation mechanism driven by both structural entropy and texture variance to achieve content redundancy design for highly complex regions. More preferably, such as... Figure 2 As shown, the method of dynamically generating redundant fragments R based on content complexity... set This includes: calculating the structural entropy E for each image piece in the initial set of image pieces. i As a measure of content uncertainty, it is used for subsequent redundancy priority ranking; based on the directional gradient changes within each image slice, the mean square error of the directional histogram is calculated to obtain the texture complexity index C. i E i and C i Perform combined calculations and sort the results according to their size. Select the top K% of the fragments in the sorted results as candidates for redundancy generation. Generate at least one set of redundant fragments for each candidate image fragment and include them in the transmission sequence together with the image fragments to resist the risk of data loss under weak network conditions.
[0062] For example, the structural entropy E i The calculation is as follows:
[0063]
[0064] Where, p k N represents the normalized probability value of the k-th bin of the grayscale histogram, reflecting the discreteness of the grayscale information distribution of the image patch; b The number of bins in the discrete distribution used in the structural entropy calculation is the number of sub-intervals into which a certain feature of an image patch (such as gradient direction or texture intensity) is divided.
[0065] The E i and C i Combinatorial calculation can be expressed as: γE i +(1-γ)C i , where γ is a weighting coefficient (it is recommended to initially set it to 0.6, biased towards structural entropy stability). After calculation, all image slices are sorted according to their scores.
[0066] In summary, this invention achieves precise organization and enhanced resilience against packet loss of image data through a saliency-guided and gradient-controlled segmentation mechanism, complexity modeling based on both structure and texture metrics, and redundancy strategies. This significantly improves the availability, stability, and business support capabilities of image tasks in complex network environments.
[0067] S5: During the image transmission phase, based on the current network fluctuation status, selectively prioritize the transmission of key fragments with critical identifiers. In the event of fragment loss, activate the corresponding redundant fragment R. set The image sequence is reconstructed at the receiving end based on the timestamp and location index, and then transmitted as a substitute.
[0068] First, a network state evaluation mechanism based on a sliding window is used to dynamically determine the stability of the current transmission network. Specifically, the transmission of key segments includes: continuously collecting transmission delays through a sliding window, calculating the periodic mean and standard deviation, and constructing a network fluctuation index; this network fluctuation index is used to reflect the short-term stability of the transmission path. When the standard deviation is large, it indicates that there are significant network fluctuations, and the transmission priority of key image information needs to be increased; based on the current network fluctuation index, a preset priority control coefficient is retrieved from the configuration table to control the ranking weight of the segments corresponding to the key identifiers in the transmission buffer; segments marked as key identifiers are given priority in the transmission buffer, and a transmission time interval is set, thereby ensuring that key image content (such as areas containing moving targets) has a higher probability of successful transmission even under poor network conditions.
[0069] As can be seen, in the scheduling and transmission of critical image fragments, the sending end adjusts the order of each image fragment based on whether it carries a critical identifier when constructing the buffer queue. Image fragments marked with a critical identifier are placed at the front of the buffer queue under the influence of a priority coefficient, and by setting a shorter transmission interval, they are sent to the receiving end before other non-critical fragments. This mechanism effectively improves the transmission efficiency and reliability of images in critical areas, and is particularly important in weak network conditions or environments with sudden latency changes.
[0070] Based on the aforementioned key fragmentation scheduling mechanism, this step further establishes a comprehensive redundant fragmentation replacement mechanism to address the issue of packet loss or incorrect reception of image fragments during transmission.
[0071] Specifically, such as Figure 3As shown, the replacement transmission of the redundant fragments includes: during the fragment reception process, the receiving end records the incomplete data index numbers in the reception sequence in real time, extracts the key identifier attributes of the corresponding numbers, and generates a missing index set; after receiving the missing index set, the encoding end extracts the associated redundant fragment set from the generated redundant fragments according to the key identifier as the query condition, and marks the current transmission round; the sending end loads the redundant fragment set, encodes it according to its order in the initial fragment sequence, and adds a unique round identifier to distinguish between normal transmission and retransmission fragments; after receiving the redundant fragments, the receiving end reconstructs the fragments corresponding to the missing index set according to the round identifier and the initial sequence number, and embeds them into the original frame image data structure.
[0072] For example, while receiving image fragments, the receiving end continuously maintains a receiving index record, which includes the image fragment numbers received in each time slice and their completion status. Within each preset time period, the receiving end identifies the missing fragment numbers in the current receiving sequence based on the index record and constructs a missing index set. This missing index set is sent back to the sending end as a feedback signal. After receiving this set, the encoding end first checks whether the image fragment number corresponding to the missing index has a key identification attribute. If it does, it retrieves the redundant fragment set associated with the key fragment from the redundant fragment pool saved during the redundant fragment generation stage and marks it as a retransmission task in the current transmission round.
[0073] Furthermore, to distinguish between normal image fragments and redundant fragments, an independent round identifier is added to the redundant fragments before they are sent, and their position information in the original image fragment sequence is retained. This design enables the receiver to accurately map the redundant fragments back to the positions corresponding to the missing fragments after receiving them, thereby restoring the integrity of the image frame data structure.
[0074] Furthermore, during the encoding and decoding of redundant segments, a transmission round limit mechanism is implemented to avoid redundancy conflicts and data inconsistencies caused by multiple retransmissions. Each group of redundant segments is allowed a maximum of N transmission attempts. If recovery is unsuccessful after exceeding this number of attempts, the segment is marked as unrecoverable and proceeds to the subsequent image inpainting module for processing, such as image inpainting algorithms based on spatiotemporal interpolation or neighboring frame information fusion, to compensate for lost areas.
[0075] To enhance the robustness of overall image reconstruction, this invention, in addition to setting a limit on the number of redundant retransmission rounds, further introduces a neighboring frame redundancy completion mechanism. For example, if a critical segment fails to be recovered after N consecutive retransmission attempts (e.g., N=5), the receiver can automatically activate image segments at corresponding positions in adjacent frames and, combined with image matching and interpolation reconstruction algorithms, approximate the missing area. This strategy compensates for visual defects caused by packet loss to the greatest extent possible without increasing network load, and is particularly suitable for situations where the background of the image area is relatively continuous or similar.
[0076] During the image data structure reconstruction stage, the receiving end uses both timestamp and position index information to reorder and intra-frame embed the received image slices. Timestamps maintain the original arrival order of the slices, while position indices restore their spatial location within the image frame. Finally, all valid slices and redundant replacement slices are merged into the original image frame structure, achieving seamless reconstruction of the complete image sequence.
[0077] As can be seen, through the aforementioned multi-stage collaborative processing mechanism, step S5 not only effectively improves the robustness of image transmission but also achieves priority protection of critical image regions in complex network environments. This method is particularly suitable for scenarios with high requirements for image integrity and real-time performance, such as security images.
[0078] In summary, the security camera image transmission method based on the embodiments of the present invention has been clarified. By introducing a partitioning mechanism based on inter-frame pixel differences, it effectively divides image frames into differential image blocks and background image blocks, thereby significantly improving the detection efficiency of moving targets and the targeting of data processing. By embedding markers such as direction vectors and motion timestamps within the differential image block set, priority encoding of dynamic target image regions is achieved. Furthermore, combined with a periodic compression strategy for background image frames, redundant data is compressed to the maximum extent, effectively reducing the overall data transmission load. Simultaneously, by constructing an image segmentation priority model using brightness saliency and texture complexity, supplemented by structural entropy and directional gradient analysis, redundant backup generation of key content is achieved, significantly improving data integrity under weak network conditions.
[0079] Furthermore, this invention combines a priority sorting method based on key fragment identifiers to achieve a data scheduling strategy with strong network adaptability. The sending end can adjust the transmission order and time interval of image segments in real time, enhancing the continuity and fault tolerance of the video stream in unstable network environments. The redundant fragment retransmission mechanism also ensures that the data receiving end can quickly recover the original image data based on the identifier information when fragments are lost, effectively enhancing the system's stability and image restoration capabilities.
[0080] In summary, this invention significantly reduces unnecessary image data traffic while ensuring high-reliability transmission of critical image content. It balances network adaptability and image content integrity, making it suitable for security image transmission applications in various complex environments. It has high practical value and promotion potential.
[0081] Figure 4 This is a structural block diagram of a security camera image transmission system according to an embodiment of the present invention. Figure 4 As shown, the security camera image transmission system includes: an image acquisition module 100, used for continuously acquiring image frame data from the camera, and comparing pixel differences based on the previous frame to divide the changing area into a differential image block set B. diff The remaining area is divided into a set of background image patches B. back ;
[0082] Target detection module 200, used for detecting objects in differential image patch set B diff Internally, it performs moving target detection, embeds labels into the identified target patches, and generates a high-priority image dataset D. pri ;
[0083] Background integration module 300 is used for background image block set B back Integrate to form background reference frame F ref The system is configured to compress and store the data every n seconds, waiting for it to be packaged and sent to the client.
[0084] Image slicing module 400 is used to slice high-priority image dataset D pri With background reference frame F ref Divided into a set of image slices P set It also assigns key identifiers to fragments containing moving targets based on tag information, and dynamically generates redundant fragments R based on content complexity. set ;
[0085] The dynamic transmission module 500 is used to dynamically send key fragments and redundant fragments according to the current network fluctuation status during the image transmission stage.
[0086] Here, those skilled in the art will understand that the specific operations of each step in the above-described security camera image transmission method have been referenced above. Figures 1 to 3 The description of the security camera's image transmission method is detailed here, and therefore, its repeated description will be omitted.
[0087] In summary, the security camera image transmission method based on the embodiments of the present invention has been clarified. By introducing a partitioning mechanism based on inter-frame pixel differences, it effectively divides image frames into differential image blocks and background image blocks, thereby significantly improving the detection efficiency of moving targets and the targeting of data processing. By embedding markers such as direction vectors and motion timestamps within the differential image block set, priority encoding of dynamic target image regions is achieved. Furthermore, combined with a periodic compression strategy for background image frames, redundant data is compressed to the maximum extent, effectively reducing the overall data transmission load. Simultaneously, by constructing an image segmentation priority model using brightness saliency and texture complexity, supplemented by structural entropy and directional gradient analysis, redundant backup generation of key content is achieved, significantly improving data integrity under weak network conditions.
[0088] Furthermore, this invention combines a priority sorting method based on key fragment identifiers to achieve a data scheduling strategy with strong network adaptability. The sending end can adjust the transmission order and time interval of image segments in real time, enhancing the continuity and fault tolerance of the video stream in unstable network environments. The redundant fragment retransmission mechanism also ensures that the data receiving end can quickly recover the original image data based on the identifier information when fragments are lost, effectively enhancing the system's stability and image restoration capabilities.
[0089] In summary, this invention significantly reduces unnecessary image data traffic while ensuring high-reliability transmission of critical image content. It balances network adaptability and image content integrity, making it suitable for security image transmission applications in various complex environments. It has high practical value and promotion potential.
Claims
1. A method for transmitting photographic images from a security camera, characterized in that, include: The camera continuously acquires image frame data and compares pixel differences based on the previous frame, dividing the changed areas into a set of differential image blocks B. diff The remaining area is divided into a set of background image patches B. back ; In the differential image patch set B diff Internally, it performs moving target detection, embeds labels into the identified target patches, and generates a high-priority image dataset D. pri ; For the background image patch set B back Integrate to form background reference frame F ref The system is configured to compress and store the data every n seconds, waiting for it to be packaged and sent to the client. The high-priority image dataset D pri With background reference frame F ref Divided into a set of image slices P set It also assigns key identifiers to fragments containing moving targets based on tag information, and dynamically generates redundant fragments R based on content complexity. set ; During the image transmission phase, key fragments and redundant fragments are dynamically sent based on the current network fluctuation status. The image segment set P set The partitioning includes: the high-priority image dataset D pri With background reference frame F ref Extract the brightness channel separately and construct the image saliency map Z. map According to Z map The value divides the image into salient and non-salient regions; in the image saliency map Z... map Based on this, Sobel gradient maps are overlaid to divide the image into segments, generating an initial set of image segments. The dynamic generation of redundant fragments R based on content complexity set This includes: calculating the structural entropy E for each image piece in the initial set of image pieces. i As a measure of content uncertainty, it is used for subsequent redundancy priority ranking; based on the directional gradient changes within each image slice, the mean square error of the directional histogram is calculated to obtain the texture complexity index C. i E i and C i Perform combined calculations and sort the results according to their size. Select the top K% of the fragments in the sorted results as candidates for redundancy generation. Generate at least one set of redundant fragments for each candidate image fragment and include them in the transmission sequence together with the image fragments to resist the risk of data loss under weak network conditions. The transmission of the key fragments includes: continuously collecting transmission delays through a sliding window, calculating the periodic mean and standard deviation, and constructing a network fluctuation index; retrieving a preset priority coefficient from the configuration table based on the current network fluctuation index, and controlling the ranking weight of the fragments corresponding to the key identifiers in the transmission buffer; prioritizing the arrangement of fragments marked as key identifiers in the transmission buffer, and setting the transmission time interval. The replacement transmission of redundant fragments includes: during fragment reception, the receiving end records the incomplete data index numbers in the received sequence in real time, extracts the key identifier attributes of the corresponding numbers, and generates a missing index set; after receiving the missing index set, the encoding end uses the key identifier as a query condition to extract the associated redundant fragment set from the generated redundant fragments and marks the current transmission round; the sending end loads the redundant fragment set, encodes it according to its order in the initial fragment sequence, and adds a unique round identifier to distinguish between normal transmission and retransmission fragments; after receiving the redundant fragments, the receiving end reconstructs the fragments corresponding to the missing index set according to the round identifier and the initial sequence number, and embeds them into the original frame image data structure.
2. The security camera image transmission method according to claim 1, characterized in that, The pixel difference comparison includes: comparing image frames F t With F t-1 Each grid cell is divided into sets of grid cells with the same structure. Each grid cell corresponds to a fixed range of pixel blocks to constrain the differential comparison range. The grayscale mean of pixels in each grid cell is extracted as the brightness center value. The degree of inter-frame variation in the region is calculated. Grid cells with a brightness adaptive dynamic threshold are set as candidate differential block sets. Edge contours and texture direction histograms are extracted from the candidate differential block sets and compared with the corresponding region in the previous frame. Patches with significant edge changes and texture direction differences exceeding a set threshold are retained and assigned to differential image block sets.
3. The security camera image transmission method according to claim 1, characterized in that, The moving target detection includes: calculating the difference in Sobel gradient direction distribution between the current frame and the previous frame in the differential image patch set, and retaining patches whose direction changes are greater than a set threshold θ. g The map is plotted and its corresponding direction vector is recorded. A graph structure is established based on the consistency of direction vectors and spatial adjacency between the map plots. Regions that satisfy both temporal continuity and direction consistency are identified as the set of motion regions.
4. The security camera image transmission method according to claim 3, characterized in that, The identified target tile embedding markers include: attaching motion markers to tiles in the motion region set, including the current frame timestamp and direction vector.
5. The security camera image transmission method according to claim 4, characterized in that, The construction of the graph structure includes: in the differential image patch set B diff In this process, a direction vector is extracted for each tile. In a two-dimensional coordinate system, it is determined whether the angle between the direction vectors of the tile and its eight neighboring tiles is less than a set threshold. If the condition is met, weighted directed edges are established between the tiles to form a directional connected graph structure.
6. A security camera image transmission system, based on the security camera image transmission method according to any one of claims 1 to 5, characterized in that, include: The image acquisition module is used by the camera to continuously acquire image frame data and compare pixel differences based on the previous frame, dividing the changed area into a set of differential image blocks B. diff The remaining area is divided into a set of background image patches B. back ; The object detection module is used to detect objects in a differential image patch set B. diff Internally, it performs moving target detection, embeds labels into the identified target patches, and generates a high-priority image dataset D. pri ; The background integration module is used to integrate the background image patch set B. back Integrate to form background reference frame F ref The system is configured to compress and store the data every n seconds, waiting for it to be packaged and sent to the client. The image slicing module is used to slice high-priority image datasets D. pri With background reference frame F ref Divided into a set of image slices P set It also assigns key identifiers to fragments containing moving targets based on tag information, and dynamically generates redundant fragments R based on content complexity. set ; The dynamic transmission module is used to dynamically send critical and redundant fragments based on the current network fluctuation status during the image transmission phase.
Citation Information
Patent Citations
Remote ultrasonic image transmission system
CN119233036A
Computer network communication data processing method and system based on artificial intelligence
CN119834933A