Image shielding method and device, equipment and storage medium

By partitioning and sorting the set of edge coordinate points in the image to be blocked in the image collected by the smart camera, modifying the bytes in the image buffer, the privacy occlusion of the smart camera image is achieved, solving the problem of privacy leakage and reducing the risk of privacy leakage.

CN120017767APending Publication Date: 2025-05-16TIANJIN YUGUANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510058588.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

How to achieve privacy occlusion in images collected by smart cameras and reduce the risk of personal privacy leakage.

Method used

By obtaining the edge coordinate points set of the area to be blocked, it is divided into two new edge coordinate points sets according to the preset conditions, and repeating this process until each partition contains only one coordinate point, obtaining a sequence of coordinate points sorted from left to right, and then modifying the bytes corresponding to these coordinate points in the image buffer to achieve privacy occlusion of the image.

Benefits of technology

It realizes privacy occlusion of images in the video input layer, so that the pictures obtained by the subsequent detection model or image output layer are pictures that have been blocked and processed, reducing the risk of privacy leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017767A_ABST
    Figure CN120017767A_ABST
Patent Text Reader

Abstract

The invention discloses an image occlusion method and device, equipment and a storage medium, and relates to the technical field of computers, and the method comprises the steps: obtaining an initial edge coordinate point set of a to-be-occluded region in an original image; traversing each coordinate point from the leftmost end and the rightmost end of the edge coordinate point set, and dividing the edge coordinate point set into two new edge coordinate point sets left and right according to a preset first condition; returning to execute the step of traversing each coordinate point from the leftmost end and the rightmost end of the edge coordinate point set until each edge coordinate point set only comprises one coordinate point, and obtaining a coordinate point sequence in which each coordinate point is sequenced from left to right; and modifying a plurality of bytes corresponding to the to-be-occluded region in a preset image buffer region based on the coordinate point sequence to obtain image data after the original image is occluded. According to the method and the device, the image shielding is completed on the input layer of the image, so that the picture obtained by the subsequent image output layer is the picture after shielding processing, and the risk of privacy disclosure is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image shielding method, device, equipment and storage medium. Background Art

[0002] With the rapid development of technology, smart cameras have been widely used in homes, businesses and public places, becoming an important part of modern life. Especially in the home environment, smart cameras are often used to monitor the elderly, children and family safety, providing home users with real-time monitoring images and alarm functions. However, when cameras are used in these private scenes, the user's life privacy is also exposed on the Internet, which has caused a series of privacy leakage problems.

[0003] Most smart cameras on the market currently have network connection functions, which can transmit the captured images to the cloud or the user's mobile device in real time. This technology allows users to check the situation at home through mobile phones or computers anytime and anywhere, but it also brings great risks of privacy leakage.

[0004] In summary, how to achieve privacy shielding of camera-captured images, thereby reducing the probability of personal privacy leakage, has become a problem that needs to be urgently solved in this field.

[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of this application is to provide an image masking method, device, equipment and storage medium, aiming to solve the technical problem of how to achieve privacy masking of camera-captured images.

[0007] To achieve the above object, the present application proposes an image shielding method, the method comprising:

[0008] Acquire an initial edge coordinate point set of the area to be blocked in the original image, wherein the edge coordinate point set includes a plurality of coordinate points of the edge of the area to be blocked;

[0009] Traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set respectively, and dividing the edge coordinate point set into two new edge coordinate point sets from the left and right according to a preset first condition;

[0010] Returning to the step of traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set, until each edge coordinate point set includes only one coordinate point, a coordinate point sequence of each of the coordinate points is obtained in which the coordinate points are sorted from left to right;

[0011] Based on the coordinate point sequence, multiple bytes corresponding to the to-be-shielded area are modified in a preset image buffer to obtain image data of the original image after shielding.

[0012] In one embodiment, the step of dividing the edge coordinate point set into two new edge coordinate point sets according to a preset first condition includes:

[0013] Determine a reference point in the coordinate area to which the edge coordinate point set belongs;

[0014] When traversing backward from the rightmost end, if the first comparison result between the coordinate point and the reference point satisfies a preset first condition, the current coordinate point is marked as the first coordinate point;

[0015] When traversing forward from the leftmost end, if the second comparison result between the coordinate point and the reference point does not satisfy the first condition, the current coordinate point is marked as the second coordinate point;

[0016] The positions of the first coordinate point and the second coordinate point in the edge coordinate point set are exchanged until the forward traversal and the reverse traversal reach the same coordinate point, and the edge coordinate point set is divided into two new edge coordinate point sets according to the third comparison result between the same coordinate point and the reference point.

[0017] In one embodiment, the step of obtaining an initial set of edge coordinate points of the area to be blocked in the original image includes:

[0018] Obtaining a set of key coordinate points of the area to be blocked in the original image;

[0019] If the number of coordinate points in the key coordinate point set is greater than a preset number threshold, the key coordinate point set is used as an initial edge coordinate point set.

[0020] In one embodiment, after the step of obtaining a set of key coordinate points of the area to be blocked in the original image, the method further includes:

[0021] If the number of coordinate points in the key coordinate point set is less than a preset number threshold, determining a plurality of interpolation coordinate points between any two adjacent coordinate points in the key coordinate point set;

[0022] Each of the interpolation coordinate points is added to the key coordinate point set to obtain an initial edge coordinate point set.

[0023] In one embodiment, the step of determining a plurality of interpolation coordinate points between any two adjacent coordinate points in the key coordinate point set includes:

[0024] For any two adjacent coordinate points, calculate the horizontal axis coordinate difference and the vertical axis coordinate difference between the two adjacent coordinate points;

[0025] The coordinate value corresponding to the larger difference between the horizontal axis coordinate difference and the vertical axis coordinate difference is used as the difference principal axis;

[0026] Calculating a dynamic step length according to the coordinate difference on the difference principal axis and a preset number of interpolation points;

[0027] Calculate a linear equation between two adjacent coordinate points according to the two adjacent coordinate points;

[0028] The interpolation coordinate points are determined according to the linear equation and the dynamic step size.

[0029] In one embodiment, after the step of obtaining a set of key coordinate points of the area to be blocked in the original image, the method further includes:

[0030] If the number of coordinate points in the key coordinate point set is less than a preset number threshold, generating a fitting curve based on each coordinate point in the key coordinate point set;

[0031] Uniformly inserting a preset number of interpolation coordinate points into the fitting curve to obtain each interpolation coordinate point;

[0032] Each of the interpolation coordinate points is added to the key coordinate point set to obtain an initial edge coordinate point set.

[0033] In one embodiment, the step of modifying a plurality of bytes corresponding to the to-be-occluded area in a preset image buffer based on the coordinate point sequence includes:

[0034] Calculating a starting byte offset and an ending byte offset of the area to be blocked according to the coordinate information of each of the coordinate points in the coordinate point sequence and a preset view offset;

[0035] Calculate the starting byte address of the starting byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the starting byte offset;

[0036] Calculate the end byte address of the end byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the end byte offset;

[0037] A plurality of bytes in the image buffer are modified according to the starting byte address and the ending byte address.

[0038] In one embodiment, the step of modifying a plurality of bytes in the image buffer according to the start byte address and the end byte address comprises:

[0039] If the starting byte address is the same as the ending byte address, applying a bit mask operation to the byte at the starting byte address to modify the byte at the starting byte address;

[0040] If the starting byte address is different from the ending byte address, a bit mask operation is applied to the starting byte at the starting byte address to set the starting byte to the starting bit, a bit mask operation is applied to the ending byte at the ending byte address to set the ending bit, and the bytes between the starting byte and the ending byte are set to preset values.

[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes an image blocking device, the image blocking device comprising:

[0042] An acquisition module, used to acquire an initial edge coordinate point set of the area to be blocked in the original image, wherein the edge coordinate point set includes a plurality of coordinate points of the edge of the area to be blocked;

[0043] A partitioning module, used for traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set respectively, and dividing the edge coordinate point set into two new edge coordinate point sets according to a preset first condition;

[0044] a sorting module, configured to return to the step of traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set, until each edge coordinate point set includes only one coordinate point, and obtain a coordinate point sequence in which each of the coordinate points is sorted from left to right;

[0045] The masking module is used to modify a plurality of bytes corresponding to the to-be-masked area in a preset image buffer based on the coordinate point sequence to obtain the masked image data of the original image.

[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image occlusion method described above.

[0047] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image masking method described above are implemented.

[0048] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the image masking method described above are implemented.

[0049] The present application provides an image masking method, which first obtains an edge coordinate point set of an area to be masked, and traverses from the leftmost and rightmost ends of the edge coordinate point set respectively according to a preset first condition, partitions the points in the point set into two new edge coordinate point sets, and then repeatedly partitions the left and right edge coordinate point sets after partitioning until each partition includes only one coordinate point, thereby obtaining a coordinate point sequence of all coordinate points sorted from left to right according to the first condition, and then according to the coordinate point sequence, modifies the bytes corresponding to the coordinate point sequence in the image buffer of the system, so that the image can be masked at the video input layer.

[0050] In summary, the present application can take into account the data of multiple dimensions of the coordinate points in the multi-dimensional point set by partitioning and sorting the coordinate points of the contours that need to be occluded, thereby achieving efficient multi-dimensional sorting. At the same time, the bytes of the image are modified in the image buffer according to the coordinate point sequence obtained by the sorting, and the image occlusion is completed at the image input layer, so that the images obtained by subsequent other detection models or the image output layer are the images that have been occluded, thereby reducing the risk of privacy leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the image shielding method of the present application;

[0054] Figure 2 A schematic diagram of a scene for coordinate completion involved in an embodiment of an image occlusion method of the present application;

[0055] Figure 3 This is a schematic diagram of an implementation process involved in an embodiment of the image shielding method of the present application;

[0056] Figure 4 This is a schematic diagram of the module structure of the image shielding device according to an embodiment of the present application;

[0057] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the image shielding method in the embodiment of the present application.

[0058] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0059] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0060] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0061] The main solution of the embodiment of the present application is: obtaining an initial edge coordinate point set of the area to be occluded in the original image, wherein the edge coordinate point set includes multiple coordinate points of the edge of the area to be occluded; traversing each of the coordinate points from the leftmost and rightmost ends of the edge coordinate point set respectively, and dividing the edge coordinate point set into two new edge coordinate point sets from the left and right according to a preset first condition; returning to execute the step of traversing each of the coordinate points from the leftmost and rightmost ends of the edge coordinate point set respectively until each edge coordinate point set includes only one coordinate point, and obtaining a coordinate point sequence of each of the coordinate points sorted from left to right; based on the coordinate point sequence, modifying multiple bytes corresponding to the area to be occluded in a preset image buffer to obtain image data of the original image after occlusion.

[0062] In this embodiment, for the convenience of description, the electronic device is used as the execution subject for explanation below.

[0063] With the rapid development of technology, smart cameras have been widely used in homes, businesses and public places, becoming an important part of modern life. Especially in the home environment, smart cameras are often used to monitor the elderly, children and family safety, providing home users with real-time monitoring images and alarm functions. However, when cameras are used in these private scenes, the user's life privacy is also exposed on the Internet, which has caused a series of privacy leakage problems.

[0064] Most smart cameras on the market currently have network connection functions, which can transmit the captured images to the cloud or the user's mobile device in real time. This technology allows users to check the situation at home through mobile phones or computers anytime and anywhere, but it also brings great risks of privacy leakage.

[0065] In summary, how to achieve privacy shielding of camera-captured images, thereby reducing the probability of personal privacy leakage, has become a problem that needs to be urgently solved in this field.

[0066] In response to the above problems, the present application provides an image occlusion method, which first obtains the edge coordinate point set of the area to be occluded, and according to a pre-set first condition, traverses from the leftmost and rightmost ends of the edge coordinate point set respectively, and partitions the points in the point set into two new edge coordinate point sets on the left and right, and then repeatedly partitions the partitioned left and right edge coordinate point sets until each partition includes only one coordinate point, thereby obtaining a coordinate point sequence of all coordinate points sorted from left to right according to the first condition, and then according to the coordinate point sequence, modifying the bytes corresponding to the coordinate point sequence in the system's image buffer, so that the image can be occluded at the video input layer.

[0067] In summary, the present application can take into account the data of multiple dimensions of the coordinate points in the multi-dimensional point set by partitioning and sorting the coordinate points of the contours that need to be occluded, thereby achieving efficient multi-dimensional sorting. At the same time, the bytes of the image are modified in the image buffer according to the coordinate point sequence obtained by the sorting, and the image occlusion is completed at the image input layer, so that the images obtained by subsequent other detection models or the image output layer are the images that have been occluded, thereby reducing the risk of privacy leakage.

[0068] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes an electronic device as an example to illustrate this embodiment and the following embodiments.

[0069] Based on this, the present application embodiment provides an image shielding method, referring to Figure 1 , Figure 1 This is a flowchart diagram of the first embodiment of the image masking method of the present application.

[0070] In this embodiment, the image shielding method includes steps S10 to S40:

[0071] Step S10, obtaining an initial edge coordinate point set of the area to be blocked in the original image, wherein the edge coordinate point set includes a plurality of coordinate points of the edge of the area to be blocked;

[0072] It should be noted that, in this embodiment, the monitoring device will receive the coordinate point set of the area to be occluded after selecting the area to be occluded from the upper-level device (which can be a smart phone connected to the camera). For example, in the monitoring screen seen by the user on the mobile phone, a closed curve is drawn on the touch screen with a gesture. The area included in the closed curve is the area to be occluded. The mobile phone records the curve drawn by the user, selects the key points in the curve and sends them to the monitoring device. The monitoring device can then obtain the initial edge coordinate point set of the area to be occluded in the original image.

[0073] In this embodiment, when the monitoring device blocks an image, it first obtains an initial set of edge coordinate points of the area to be blocked in the original image. The edge coordinate point set records in detail the contour of the edge of the area to be blocked and is composed of multiple coordinate points. Each coordinate point is precisely located on the image, thereby outlining the specific shape and position of the area to be blocked.

[0074] Furthermore, in a feasible implementation manner, the above step S10 may include steps S11 to S12:

[0075] Step S11, obtaining a set of key coordinate points of the area to be blocked in the original image;

[0076] In this embodiment, the system first obtains a set of key coordinate points of the area to be blocked output by the host device.

[0077] Step S12: If the number of coordinate points in the key coordinate point set is greater than a preset number threshold, the key coordinate point set is used as an initial edge coordinate point set.

[0078] In this embodiment, after the key coordinate point set is obtained, it is determined whether the number of coordinate points in the key coordinate point set is greater than a preset number threshold, which is set according to the actual application scenario and the accuracy requirements of image processing. If the number of coordinate points in the key coordinate point set exceeds this threshold, it means that the number of edge coordinate points obtained meets the accuracy requirements in subsequent processing, and the key coordinate point set can be directly used as the initial edge coordinate point set for subsequent occlusion processing.

[0079] Furthermore, in a feasible implementation manner, after the above step S11, the method may further include steps S13 to S14:

[0080] Step S13, if the number of coordinate points in the key coordinate point set is less than a preset number threshold, determining a plurality of interpolation coordinate points between any two adjacent coordinate points in the key coordinate point set;

[0081] In this embodiment, if the number of coordinate points in the key coordinate point set does not exceed the threshold, the occlusion processing may not be accurate enough due to the insufficient number of coordinate points. Therefore, it is necessary to insert multiple interpolation coordinate points between any two adjacent coordinate points in the key coordinate point set. These interpolation coordinate points are calculated by some interpolation algorithm (such as linear interpolation, quadratic interpolation, etc.). They can fill the gaps between the key coordinate points and make the edge coordinate point set more dense and accurate.

[0082] Furthermore, in a feasible implementation manner, the above step S13 may further include steps S131 to S135:

[0083] Step S131, for any two adjacent coordinate points, calculating the horizontal axis coordinate difference and the vertical axis coordinate difference between the two adjacent coordinate points;

[0084] In this embodiment, for any two adjacent coordinate points (denoted as point A and point B), the horizontal axis coordinate difference Δx and the vertical axis coordinate difference Δy between them are calculated.

[0085] Step S132, taking the coordinate value corresponding to the larger difference between the horizontal axis coordinate difference and the vertical axis coordinate difference as the difference principal axis;

[0086] In this embodiment, the sizes of Δx and Δy are compared, and the coordinate axis (horizontal axis or vertical axis) corresponding to the larger difference is used as the difference principal axis, which represents the direction with the largest change between two adjacent coordinate points.

[0087] Step S133, calculating the dynamic step length according to the coordinate difference on the difference principal axis and the preset number of interpolation points;

[0088] In this embodiment, the dynamic step length is calculated based on the coordinate difference on the difference axis (i.e., the larger value of Δx or Δy) and the preset number of interpolation points N. The dynamic step length can be calculated by dividing the coordinate difference on the difference axis by (N+1) to ensure that N interpolation points are evenly inserted between two adjacent coordinate points.

[0089] Step S134, calculating a linear equation between the two adjacent coordinate points according to the two adjacent coordinate points;

[0090] In this embodiment, the linear equation between point A and point B is calculated using their coordinate values. The linear equation can be expressed in the form of y=mx+b or x=my+b, where m is the slope (calculated from the coordinates of point A and point B) and b is the intercept (also calculated from the coordinates of point A and point B).

[0091] Step S135, determining each of the interpolation coordinate points according to the linear equation and the dynamic step size.

[0092] In this embodiment, each interpolation coordinate point is determined between point A and point B according to the linear equation and the dynamic step size. The coordinate point can be calculated by iterating on the difference axis in units of the dynamic step size and substituting the coordinate of each iterated point into the linear equation.

[0093] As an example, see Figure 2 , Figure 2This is a schematic diagram of a scene for coordinate completion involved in an embodiment of an image occlusion method of the present application. As shown in 2, the key coordinate point set includes six key coordinate points P1 to P6, and the coordinates are (x1, y1) to (x6, y6), respectively. When completing the coordinates, first calculate the absolute spans of the two end points of the line segment on the x-axis and y-axis: Δx = |p2.x-p1.x|, Δy = |p2.y-p1.y|, where P1.x refers to the value of the point P1 on the horizontal coordinate, and so on.

[0094] Compare Δx and Δy, select the larger span as the main axis of interpolation, and determine the number of interpolation points accordingly: numPoints = max(Δx, Δy).

[0095] Calculate the dynamic step size based on the span of the main axis and the number of interpolation points:

[0096] If Δx is the main axis, then xStep=Δx / (numPoints-1).

[0097] If Δy is the main axis, then yStep=Δy / (numPoints-1).

[0098] Using the slope and intercept of the line segment, the coordinates of the interpolation point are calculated using the linear equation:

[0099] Line segment slope: slope = (p2.y-p1.y) / (p2.x-p1.x).

[0100] Line segment intercept: intercept = p1.y-slope*p1.x.

[0101] For each interpolation point, if Δx is the principal axis, then y=slope*x+intercept; if Δy is the principal axis, then x=(y-intercept) / slope.

[0102] Add all the resulting interpolated points to the line representation: line(x,y).

[0103] In another feasible implementation manner, after the above step S11, the method may further include steps A10 to A20:

[0104] Step A10, if the number of coordinate points in the key coordinate point set is less than a preset number threshold, generating a fitting curve based on each coordinate point in the key coordinate point set;

[0105] Step A20, uniformly inserting a preset number of interpolation points into the fitting curve to obtain interpolation coordinate points;

[0106] Step A30: adding each of the interpolation coordinate points to the key coordinate point set to obtain an initial edge coordinate point set.

[0107] In this embodiment, if the number of key coordinate points is insufficient, these points are used as data points to generate a fitting curve. The selection of the fitting curve depends on the characteristics of the data and the desired results, and may include polynomial fitting, Bezier curve fitting, or other types of curve fitting. The goal of fitting is to find a curve that connects these data points in series as accurately as possible and provides a smooth transition between these data points as much as possible. Then, a preset number of interpolation points are uniformly inserted on the generated fitting curve. These interpolation points are calculated based on the mathematical description of the fitting curve to ensure that they are evenly distributed on the curve. After obtaining each interpolation coordinate point, each interpolation coordinate point is added to the key coordinate point set to obtain the initial edge coordinate point.

[0108] The above steps can form a to-be-occluded area with smoother edges, thereby improving the visual effect of image occlusion.

[0109] Step S14: adding each of the interpolation coordinate points to the key coordinate point set to obtain an initial edge coordinate point set.

[0110] In this embodiment, each interpolation coordinate point is added to the key coordinate point set to obtain an initial edge coordinate point set. At this time, the initial edge coordinate point set already contains a sufficient number of coordinate points to accurately describe the edge shape of the area to be blocked.

[0111] Through the above steps, when the number of key coordinate point sets is insufficient, the system can evenly insert interpolation coordinate points between two adjacent coordinate points based on the linear relationship between adjacent coordinate points and the preset number of interpolation points. This method not only improves the density and accuracy of the edge coordinate point set, but also ensures that the distribution of the interpolation coordinate points is consistent with the original edge shape. Therefore, in the subsequent occlusion processing process, the system can more accurately control the shape and position of the occluded area, thereby generating visually more natural and smooth occluded image data.

[0112] Step S20, traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set respectively, and dividing the edge coordinate point set into two new edge coordinate point sets according to a preset first condition;

[0113] In this embodiment, after obtaining the edge coordinate point set, it is necessary to sort the coordinate points in the point set. Since each coordinate point contains two-dimensional data, the conventional sorting method cannot quickly sort the coordinate points in the edge point set. In this embodiment, when sorting, all coordinate points are first traversed from the leftmost and rightmost ends of the edge coordinate point set respectively. During the traversal process, the edge point set is divided into two left and right partitions according to a preset first condition. One partition includes all points that meet the first condition, and the other partition includes all points that do not meet the first condition.

[0114] Further, in a feasible implementation manner, the step of dividing the edge coordinate point set into two new edge coordinate point sets according to the preset first condition in the above step S20 may include steps S21 to S24:

[0115] Step S21, determining a reference point in the coordinate area to which the edge coordinate point set belongs;

[0116] In this embodiment, when partitioning each coordinate point in the edge coordinate point set, it is first necessary to determine a reference point of a partition, and then set a first condition according to the coordinates of the reference point. For example, the first condition can be set to: when the position of the coordinate point in the two-dimensional coordinate axis is to the right or above the reference point, the first condition is satisfied. Other methods that can be used to partition the coordinate points in the two-dimensional coordinate axis are also applicable to this application and will not be described in detail here.

[0117] Step S22, when traversing backward from the rightmost end, if the first comparison result between the coordinate point and the reference point satisfies a preset first condition, marking the current coordinate point as the first coordinate point;

[0118] In this embodiment, the coordinate points in the edge coordinate point set are traversed backward from the rightmost end, and for each traversed coordinate point, a certain comparison result (such as distance, angle, direction, etc.) between it and the reference point is calculated, and the comparison result is compared with the preset first condition. If the comparison result satisfies the first condition (such as the distance is less than a certain threshold, the angle is within a certain range, etc.), the current coordinate point is marked as the first coordinate point.

[0119] Step S23, when traversing forward from the leftmost end, if the second comparison result between the coordinate point and the reference point does not satisfy the first condition, marking the current coordinate point as the second coordinate point;

[0120] In this embodiment, at the same time, the coordinate points in the edge coordinate point set are traversed forward from the leftmost end. For each traversed coordinate point, the comparison result between it and the reference point is also calculated and compared with the first condition. If the comparison result does not meet the first condition (i.e., the opposite of the condition in step S22), the current coordinate point is marked as the second coordinate point.

[0121] Step S24, exchanging the positions of the first coordinate point and the second coordinate point in the edge coordinate point set until the forward traversal and the reverse traversal reach the same coordinate point, and dividing the edge coordinate point set into two new edge coordinate point sets based on the third comparison result between the same coordinate point and the reference point.

[0122] In this embodiment, after the first coordinate point and the second coordinate point are determined, the positions of the two coordinate points in the edge coordinate point set are exchanged, and then the forward traversal and the reverse traversal are continued until the pointers of the forward traversal and the reverse traversal meet at the same coordinate point. At this time, according to the third comparison result between this meeting point (or the point corresponding to the termination condition) and the reference point (this comparison result may be different from the first condition or may be the same, depending on the segmentation requirements), the edge coordinate point set is divided into two new edge coordinate point sets on the left and right. Through the above steps, the edge coordinate point set can be divided into two left and right partitions according to whether the first condition is met. In the subsequent steps, the two partitions are further divided, and finally a coordinate point sequence sorted left and right according to certain conditions can be obtained.

[0123] As an example, when the data is 1-dimensional, if a sequence is {1,3,4,7,2,6,5}, when sorting, start traversing from both ends at the same time, and use greater than 3 as the condition. When traversing from the left, if the value of an element is greater than 3, it is marked as the first element, that is, when traversing to 4, mark 4 as the first element. When traversing from the right, if the value of an element is not greater than 3, it is marked as the second element, that is, when traversing to 2, mark 2 as the second element. At this time, 4 and 2 are combined in Swap the order in the sequence to get {1,3,2,7,4,6,5}. Continue traversing and stop at the element 7. At this time, 7 meets the condition of being greater than 3. Divide the element 7 into the partition greater than 3 on the right. At this time, the sequence is divided into two partitions [1,3,2] and [7,4,6,5]. Recursively swap the two partitions, and the final sequence is {1,2,3,4,5,6,7}. This method is also applicable when the elements are two-dimensional.

[0124] Exemplarily, this application proposes a new quicksort algorithm. Through a dual-condition partitioning strategy, this algorithm can perform efficient sorting on multi-dimensional point sets. Specifically, the algorithm selects a point in the point set as the pivot point and divides the point set into two parts according to the coordinate values (x and y) of the pivot point: one part contains all points above or to the right of the pivot point, and the other part contains all points below or to the left of the pivot point. Then, the algorithm recursively sorts these two parts of the point set until the entire point set becomes ordered.

[0125] The technical implementation and formula are as follows:

[0126] Select the pivot point: Select a point from the point set as the pivot point and record its coordinate values (pivot = point[low].x, pivot = point[low].y).

[0127] Dual-condition partitioning:

[0128] Use two pointers i and j to traverse from the beginning and end of the point set respectively.

[0129] When i < j, perform the following partitioning operation:

[0130] Compare from the back: If point[j] is above or to the right of the pivot point (i.e., point[j].y > pivot or (point[j].x == pivot && point[j].y > pivot)), then move j one position to the left.

[0131] If i < j, then assign the value of point[j] to point[i] and move i one position to the right.

[0132] Compare from the front: If point[i] is below or to the left of the pivot point (i.e., point[i].y < pivot or (point[i].x == pivot && point[i].y < pivot)), then move i one position to the right.

[0133] If i < j, then assign the value of point[i] to point[j] and move j one position to the left.

[0134] Store the pivot point: Assign the coordinate values of the pivot point to the middle position after partitioning (point[i].x = pivot, point[i].y = pivot).

[0135] Recursive sorting: Recursively perform the above sorting operations on the left and right parts of the point set after partitioning (quicksort(point, low, i - 1); quicksort(point, i + 1, high);).

[0136] Step S30, returning to the step of traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set, until each edge coordinate point set includes only one coordinate point, and obtaining a coordinate point sequence of each of the coordinate points sorted from left to right;

[0137] In this embodiment, after the initial edge coordinate point set is partitioned into left and right partitions, the left and right partitions are used as two new edge coordinate point sets, and then the edge coordinate point set is recursively partitioned until each edge coordinate point set obtained by the partition contains only one coordinate point, so that a coordinate point sequence in which each coordinate point is sorted from left to right according to the first condition can be obtained.

[0138] Step S40: modifying a plurality of bytes corresponding to the to-be-occluded area in a preset image buffer based on the coordinate point sequence to obtain image data of the original image after occlusion.

[0139] In this embodiment, after obtaining the coordinate point sequence, in order to avoid privacy leakage, the device directly processes the image at the video input layer after collecting the original image through the sensor. When it is transmitted to other subsequent layers, the image is already occluded, which reduces the probability of privacy leakage from the root.

[0140] For details, please refer to Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an implementation process of an embodiment of an image shielding method of the present application. Figure 3 As shown, after the monitoring device collects images through the sensor, it processes the privacy masking area of ​​the image, and then transmits the processed image to the video input system (VIS), and then outputs it to the AI ​​model for image collection or the video encoder (VENC, velocity encoding). After the video is encoded, it is previewed through live broadcast. Therefore, the collected video image has completed the privacy masking at the video input layer, which can greatly reduce the probability of privacy leakage in the video.

[0141] Furthermore, in a feasible implementation manner, the above step S40 may include steps S41 to S44:

[0142] Step S41, calculating the starting byte offset and the ending byte offset of the area to be blocked according to the coordinate information of each coordinate point in the coordinate point sequence and a preset view offset;

[0143] In this embodiment, the coordinate point sequence is first traversed to determine the x-coordinate values ​​of the leftmost and rightmost ends of the area to be blocked, and the starting byte offset and the ending byte offset relative to the starting position of the image are calculated using these x-coordinate values ​​and the preset view offset.

[0144] Step S42, calculating the starting byte address of the starting byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the starting byte offset;

[0145] In this embodiment, the starting y coordinate and the preset row byte offset are used to calculate the offset of the starting byte relative to the starting address of the image buffer.

[0146] Step S43, calculating the end byte address of the end byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the end byte offset;

[0147] In this embodiment, the offset of the end byte relative to the end address of the image buffer is calculated using the starting y coordinate and the preset row byte offset.

[0148] Step S44: modify multiple bytes in the image buffer according to the starting byte address and the ending byte address.

[0149] In this embodiment, in the image buffer, starting from the start byte address and ending at the end byte address (not included), the bytes within these address ranges are modified.

[0150] Furthermore, in a feasible implementation manner, the above step S44 may further include steps S41 to S42:

[0151] Step S41, if the starting byte address is the same as the ending byte address, applying a bit mask operation to the byte at the starting byte address to modify the byte at the starting byte address;

[0152] Step S42, if the starting byte address is different from the ending byte address, a bit mask operation is applied to the starting byte at the starting byte address to set the starting byte to the starting bit, a bit mask operation is applied to the ending byte at the ending byte address to set the ending bit, and the bytes between the starting byte and the ending byte are set to a preset value.

[0153] In this embodiment, if the start byte address is the same as the end byte address, it means that the area to be modified contains only one byte, and a bit mask operation is applied to the byte. A bit mask operation is a method of modifying a specific bit in a byte by binary bit operation.

[0154] Depending on the masking or modification required, the byte is set to a specific value or pattern using a bit mask. For example, if you want to completely mask the byte, you can set it to completely black (probably 0x000000 in RGB format, but the specific value depends on the color depth and format of the image), or modify certain bits in the byte without affecting other bits.

[0155] If the start byte address is different from the end byte address, it means that the area to be modified contains multiple bytes. Apply a bit mask operation to the byte at the start byte address and set it to the start bit. The start bit is a specific mark used to indicate the beginning of the masked area. Apply a bit mask operation to the byte at the end byte address and set it to the end bit. Set all bytes between the start byte and the end byte to the preset value, which can be 1.

[0156] Specifically, as an example, when performing image occlusion, the modification area is first determined:

[0157] According to the image coordinate information (tmpXmin, tmpXmax) and view offset (view_x), the start and end positions of the modified area are calculated. Specifically, the calculation is performed by the following formula:

[0158] Starting byte offset: line_start_offset = (tmpXmin + view_x) / 8;

[0159] Starting bit offset: first_bite_offset = (tmpXmin + view_x) % 8;

[0160] End byte offset: line_end_offset = (tmpXmax + view_x) / 8;

[0161] End bit offset: last_bite_offset = (tmpXmax + view_x) % 8;

[0162] Calculate the byte address of the modified area:

[0163] According to the y coordinate of the image and the byte offset of each line (line_offset_byte), the address of the start and end bytes of the modified area in the image data buffer (buf_data) is calculated. Specifically, it is calculated by the following formula:

[0164] Starting byte address: cur_star_byte=y*line_offset_byte+line_start_offset;

[0165] End byte address: cur_end_byte=y*line_offset_byte+line_end_offset;

[0166] Modify image data:

[0167] According to the calculated start and end byte addresses and bit offsets, the corresponding bits in the image data buffer are modified. Specifically:

[0168] If the starting byte address is equal to the ending byte address, then the bit mask operation is applied on that byte to modify the bits in the specified range.

[0169] If the starting byte address is not equal to the ending byte address, then a bit mask operation is applied to the starting byte to set the starting bit, a bit mask operation is applied to the ending byte to clear the ending bit, and a bit set operation is applied to the bytes in the middle to set them all to 1.

[0170] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the image masking method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0171] This application also provides an image blocking device, please refer to Figure 4 , the image shielding device comprises:

[0172] An acquisition module 10 is used to acquire an initial edge coordinate point set of the area to be blocked in the original image, wherein the edge coordinate point set includes a plurality of coordinate points of the edge of the area to be blocked;

[0173] A partitioning module 20, configured to traverse each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set respectively, and divide the edge coordinate point set into two new edge coordinate point sets according to a preset first condition;

[0174] The sorting module 30 is used to return to the step of traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set, until each edge coordinate point set includes only one coordinate point, and obtain a coordinate point sequence in which each of the coordinate points is sorted from left to right;

[0175] The masking module 40 is used to modify a plurality of bytes corresponding to the to-be-masked area in a preset image buffer based on the coordinate point sequence to obtain the image data of the original image after masking.

[0176] Optionally, the partition module 20 may also be used for:

[0177] Determine a reference point in the coordinate area to which the edge coordinate point set belongs;

[0178] When traversing backward from the rightmost end, if the first comparison result between the coordinate point and the reference point satisfies a preset first condition, the current coordinate point is marked as the first coordinate point;

[0179] When traversing forward from the leftmost end, if the second comparison result between the coordinate point and the reference point does not satisfy the first condition, the current coordinate point is marked as the second coordinate point;

[0180] The positions of the first coordinate point and the second coordinate point in the edge coordinate point set are exchanged until the forward traversal and the reverse traversal reach the same coordinate point, and the edge coordinate point set is divided into two new edge coordinate point sets according to the third comparison result between the same coordinate point and the reference point.

[0181] Optionally, the acquisition module 10 may also be used for:

[0182] Obtaining a set of key coordinate points of the area to be blocked in the original image;

[0183] If the number of coordinate points in the key coordinate point set is greater than a preset number threshold, the key coordinate point set is used as an initial edge coordinate point set.

[0184] Optionally, the image blocking device may also be used for:

[0185] If the number of coordinate points in the key coordinate point set is less than a preset number threshold, determining a plurality of interpolation coordinate points between any two adjacent coordinate points in the key coordinate point set;

[0186] Each of the interpolation coordinate points is added to the key coordinate point set to obtain an initial edge coordinate point set.

[0187] Optionally, the image blocking device may also be used for:

[0188] For any two adjacent coordinate points, calculate the horizontal axis coordinate difference and the vertical axis coordinate difference between the two adjacent coordinate points;

[0189] The coordinate value corresponding to the larger difference between the horizontal axis coordinate difference and the vertical axis coordinate difference is used as the difference principal axis;

[0190] Calculating a dynamic step length according to the coordinate difference on the difference principal axis and a preset number of interpolation points;

[0191] Calculate a linear equation between two adjacent coordinate points according to the two adjacent coordinate points;

[0192] The interpolation coordinate points are determined according to the linear equation and the dynamic step size.

[0193] Optionally, the image blocking device may also be used for:

[0194] If the number of coordinate points in the key coordinate point set is less than a preset number threshold, generating a fitting curve based on each coordinate point in the key coordinate point set;

[0195] Uniformly inserting a preset number of interpolation coordinate points into the fitting curve to obtain each interpolation coordinate point;

[0196] Each of the interpolation coordinate points is added to the key coordinate point set to obtain an initial edge coordinate point set.

[0197] Optionally, the shielding module 40 may also be used for:

[0198] Calculating a starting byte offset and an ending byte offset of the area to be blocked according to the coordinate information of each of the coordinate points in the coordinate point sequence and a preset view offset;

[0199] Calculate the starting byte address of the starting byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the starting byte offset;

[0200] Calculate the end byte address of the end byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the end byte offset;

[0201] A plurality of bytes in the image buffer are modified according to the starting byte address and the ending byte address.

[0202] Optionally, the shielding module 40 may also be used for:

[0203] If the starting byte address is the same as the ending byte address, applying a bit mask operation to the byte at the starting byte address to modify the byte at the starting byte address;

[0204] If the starting byte address is different from the ending byte address, a bit mask operation is applied to the starting byte at the starting byte address to set the starting byte to the starting bit, a bit mask operation is applied to the ending byte at the ending byte address to set the ending bit, and the bytes between the starting byte and the ending byte are set to preset values.

[0205] The image shielding device provided by the present application adopts the image shielding method in the above embodiment, which can solve the technical problem of how to achieve privacy shielding of the camera capture image. Compared with the prior art, the beneficial effects of the image shielding device provided by the present application are the same as the beneficial effects of the image shielding method provided by the above embodiment, and the other technical features in the image shielding device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0206] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to 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 so that the at least one processor can execute the image blocking method in the above-mentioned embodiment 1.

[0207] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0208] like Figure 5 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0209] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0210] The electronic device provided by the present application adopts the image shielding method in the above embodiment to solve the technical problem of how to achieve privacy shielding of the camera capture image. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the image shielding method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0211] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0212] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0213] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the image shielding method in the above-mentioned embodiment.

[0214] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0215] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0216] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: obtains an initial edge coordinate point set of the area to be occluded in the original image, wherein the edge coordinate point set includes multiple coordinate points of the edge of the area to be occluded; traverses each of the coordinate points from the leftmost and rightmost ends of the edge coordinate point set respectively, and divides the edge coordinate point set into two new edge coordinate point sets from the left and right according to a preset first condition; returns to execute the step of traversing each of the coordinate points from the leftmost and rightmost ends of the edge coordinate point set respectively, until each edge coordinate point set includes only one coordinate point, and obtains a coordinate point sequence of each of the coordinate points sorted from left to right; based on the coordinate point sequence, modifies multiple bytes corresponding to the area to be occluded in a preset image buffer to obtain image data of the original image after occlusion.

[0217] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0218] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0219] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0220] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned image shielding method, and can solve the technical problem of how to achieve privacy shielding of camera-collected images. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the image shielding method provided by the above-mentioned embodiment, and will not be elaborated here.

[0221] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned image occlusion method when executed by a processor.

[0222] The computer program product provided in this application can solve the technical problem of how to achieve privacy shielding of camera-collected images. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the image shielding method provided in the above embodiment, which will not be repeated here.

[0223] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An image occlusion method, characterized in that: The method comprises: Acquire an initial edge coordinate point set of the area to be blocked in the original image, wherein the edge coordinate point set includes a plurality of coordinate points of the edge of the area to be blocked; Traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set respectively, and dividing the edge coordinate point set into two new edge coordinate point sets from the left and right according to a preset first condition; Returning to the step of traversing each of the coordinate points from the leftmost end and the rightmost end of the edge coordinate point set, until each edge coordinate point set includes only one coordinate point, a coordinate point sequence of each of the coordinate points is obtained in which the coordinate points are sorted from left to right; Based on the coordinate point sequence, multiple bytes corresponding to the to-be-shielded area are modified in a preset image buffer to obtain image data of the original image after shielding.

2. The image shielding method according to claim 1, wherein: The step of dividing the edge coordinate point set into two new edge coordinate point sets on the left and right according to the preset first condition comprises: Determine a reference point in the coordinate area to which the edge coordinate point set belongs; When traversing backward from the rightmost end, if the first comparison result between the coordinate point and the reference point satisfies a preset first condition, the current coordinate point is marked as the first coordinate point; When traversing forward from the leftmost end, if the second comparison result between the coordinate point and the reference point does not satisfy the first condition, the current coordinate point is marked as the second coordinate point; The positions of the first coordinate point and the second coordinate point in the edge coordinate point set are exchanged until the forward traversal and the reverse traversal reach the same coordinate point, and the edge coordinate point set is divided into two new edge coordinate point sets according to the third comparison result between the same coordinate point and the reference point.

3. The image shielding method according to claim 1, wherein: The step of obtaining an initial set of edge coordinate points of the area to be blocked in the original image comprises: Obtaining a set of key coordinate points of the area to be blocked in the original image; If the number of coordinate points in the key coordinate point set is greater than a preset number threshold, the key coordinate point set is used as an initial edge coordinate point set.

4. The image shielding method according to claim 3, wherein: After the step of obtaining a set of key coordinate points of the area to be blocked in the original image, the method further includes: If the number of coordinate points in the key coordinate point set is less than a preset number threshold, determining a plurality of interpolation coordinate points between any two adjacent coordinate points in the key coordinate point set; Each of the interpolation coordinate points is added to the key coordinate point set to obtain an initial edge coordinate point set.

5. The image shielding method according to claim 4, characterized in that: The step of determining a plurality of interpolation coordinate points between any two adjacent coordinate points in the key coordinate point set comprises: For any two adjacent coordinate points, calculate the horizontal axis coordinate difference and the vertical axis coordinate difference between the two adjacent coordinate points; The coordinate value corresponding to the larger difference between the horizontal axis coordinate difference and the vertical axis coordinate difference is used as the difference principal axis; Calculating a dynamic step length according to the coordinate difference on the difference principal axis and a preset number of interpolation points; Calculate a linear equation between two adjacent coordinate points according to the two adjacent coordinate points; The interpolation coordinate points are determined according to the linear equation and the dynamic step size.

6. The image shielding method according to claim 3, characterized in that: After the step of obtaining a set of key coordinate points of the area to be blocked in the original image, the method further includes: If the number of coordinate points in the key coordinate point set is less than a preset number threshold, generating a fitting curve based on each coordinate point in the key coordinate point set; Uniformly inserting a preset number of interpolation coordinate points into the fitting curve to obtain each interpolation coordinate point; Each of the interpolation coordinate points is added to the key coordinate point set to obtain an initial edge coordinate point set.

7. The image shielding method according to claim 1, wherein: The step of modifying a plurality of bytes corresponding to the to-be-shielded area in a preset image buffer based on the coordinate point sequence comprises: Calculating a starting byte offset and an ending byte offset of the area to be blocked according to the coordinate information of each of the coordinate points in the coordinate point sequence and a preset view offset; Calculate the starting byte address of the starting byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the starting byte offset; Calculate the end byte address of the end byte of the area to be shielded in the image buffer according to the coordinate information, the preset row byte offset and the end byte offset; A plurality of bytes in the image buffer are modified according to the starting byte address and the ending byte address.

8. The image shielding method according to claim 7, wherein: The step of modifying a plurality of bytes in the image buffer according to the start byte address and the end byte address comprises: If the starting byte address is the same as the ending byte address, applying a bit mask operation to the byte at the starting byte address to modify the byte at the starting byte address; If the starting byte address is different from the ending byte address, a bit mask operation is applied to the starting byte at the starting byte address to set the starting byte to the starting bit, a bit mask operation is applied to the ending byte at the ending byte address to set the ending bit, and the bytes between the starting byte and the ending byte are set to preset values.

9. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image masking method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image shielding method according to any one of claims 1 to 8 are implemented.