A method, system, device and storage medium for video anti-recording
By segmenting the video image and setting buried pixels, the problem of watermark blocking the image and affecting the user experience is solved, and effective identification and protection of video anti-recording is achieved.
Patent Information
- Application Number
- CN202411716362.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In existing video anti-recording technologies, adding a watermark will block the image and affect the user experience.
By dividing the video image into M*N pixel area units, setting and matching buried pixels, using the most colorful color as the buried pixel, and matching the buried pixel color with the original video, video anti-recording is achieved.
When the pixel color of the embedded point matches the original video, it does not affect the user's viewing experience. It can effectively identify malicious videos, destroy the video image feature values, and avoid the original video identification loopholes.
Smart Images

Figure CN119693494B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of video anti-recording, more particularly, it relates to a video anti-recording method, system, device and storage medium. BACKGROUND
[0002] The video creation may face the risk of being rebroadcasted and copied at the moment of being published. The most commonly used anti-recording screen method at present is to add a watermark to the video, but adding a watermark will block part of the picture, thereby affecting the user's viewing and reducing the user's experience. SUMMARY
[0003] The present application aims to solve the above-mentioned problems of the prior art. The first object of the present application is to provide a video anti-recording method.
[0004] The second object of the present application is to provide a video anti-recording system.
[0005] The third object of the present application is to provide a computer device.
[0006] The fourth object of the present application is to provide a computer storage medium.
[0007] In order to achieve the above-mentioned first object, the present application provides a video anti-recording method, comprising the processes of setting a buried point pixel and matching the buried point pixel.
[0008] The process of setting a buried point pixel comprises the following steps:
[0009] Step 11. Read the video file to obtain each frame of picture of the video;
[0010] Step 12. Analyze each frame of picture to obtain red, green and blue colors according to the principle of normalization, the processed picture only contains red, green and blue pixel colors, and the XY axis red, green and blue coordinate graph is obtained, the position of each pixel is located by (x, y) coordinates, and a series of three-element data groups (x, y, C) are obtained, C represents color, which is one of red, green and blue;
[0011] Step 13. Divide the picture by M*N pixel area unit, and calculate the coordinates of the buried point pixel required by each divided area, the buried point pixel is at least one and is located at the specified position of the M*N pixel area unit, according to the red, green and blue coordinate graph, the coordinates are divided by M*N pixels as the minimum picture area, the M*N pixel area unit is the minimum picture area in the whole picture, which is marked by coordinates (a, b), and the two-element array of the divided area of the whole picture ((a, b), (x, y, C)) is obtained, a = ⌈x / M⌉, b = ⌈y / N⌉;
[0012] Step 14. Take the color with the most pixels in each partition as the color of the buried pixel;
[0013] Step 15. According to the coordinates of each partition and the color of the corresponding buried pixel, set the buried pixel to each frame of the picture, and finally obtain the video with the buried pixel set.
[0014] As a further improvement, the process of matching the buried pixel includes the following steps:
[0015] Step 21. Read the video file to obtain each frame of the picture, and randomly extract a set number of pictures as source pictures as needed;
[0016] Step 22. Partition the source picture in M*N pixel area units, and calculate the coordinates of each partition;
[0017] Step 23. Obtain the color of the buried pixel position in each partition;
[0018] Step 24. The pixel color in each partition is obtained according to the principle of normalization, and the color with the most pixels in each partition is obtained;
[0019] Step 25. In the entire picture, match the color of the buried pixel position in each partition with the color with the most pixels, and if the coordinates and color of more than a certain proportion of the buried pixels match, it is considered to be the original video.
[0020] Further, if step 25 checks that it is not the original video, the following steps are performed:
[0021] Step 26. After moving i pixels to the right along the X-axis direction in M*N pixel area units,
[0022] Step 27. After moving j pixels up along the Y-axis direction, partition the source picture as a new origin;
[0023] Step 28. Obtain the color of the buried pixel position in each partition;
[0024] Step 29. The pixel color in each partition is obtained according to the principle of normalization, and the color with the most pixels in each partition is obtained;
[0025] Step 30. Match the color of the buried pixel position in each partition with the color with the most pixels, and if the coordinates and color of more than a certain proportion of the buried pixels match, it is considered that the original video has been cropped; otherwise, j is incremented by 1, step 27 is executed, and step 31 is executed until j=N;
[0026] Step 31.i set i = i + 1, j = 0, execute step 26 until i = M.
[0027] Further, the M*N = 50*50.
[0028] Further, the set number is 10% of the number of video frames.
[0029] Further, the set proportion is 30%.
[0030] Further, the buried point pixel is one and is located at the upper right corner of the M*N pixel region unit.
[0031] In order to achieve the above-mentioned purpose two, the application provides a video anti-recording system, comprising:
[0032] The buried point pixel setting module is configured to read a video file to obtain each frame of picture of the video;
[0033] The each frame of picture is parsed, and the pixel colors of each frame of picture are obtained according to the normalization principle to obtain three colors of red, green and blue, and the processed picture only contains three colors of red, green and blue pixel colors, and an XY axis red-green-blue coordinate diagram is obtained, the position of each pixel is located through (x, y) coordinates to obtain a series of three-element data groups (x, y, C), and C represents color, which is one of red, green and blue;
[0034] The picture is segmented into M*N pixel region units, and the coordinates of the buried point pixel required by each segmented region are calculated, the buried point pixel is at least one and is located at a specified position of the M*N pixel region unit, the coordinates are segmented according to M*N pixels as the minimum picture region according to the red-green-blue coordinate diagram, the M*N pixel region unit is the minimum picture region which is marked with coordinates (a, b) in the whole picture, a = ⌈x / M⌉, b = ⌈y / N⌉, and a two-element array of the segmented region of the whole picture ((a, b), (x, y, C)) is obtained.
[0035] The color with the most color pixels in each segmented region is taken as the color of the buried point pixel;
[0036] According to the coordinates of each segmented region and the color of the corresponding buried point pixel, the buried point pixel is set to each frame of picture, and finally a video with the buried point pixel is obtained.
[0037] The matching buried point pixel module is configured to read a video file to obtain each frame of picture of the video, and randomly extract a set number of pictures as source pictures according to needs.
[0038] The source picture is segmented into M*N pixel region units, and the coordinates of each segmented region are calculated.
[0039] The color of the buried point pixel position of each segmented region is obtained.
[0040] The pixel color in each segmentation area is obtained according to the normalization principle, and three colors of red, green and blue are obtained, and the color with the most color pixels in each segmentation area is obtained;
[0041] In the entire picture, the color of the pixel position of the embedding point of each segmentation area is matched with the color with the most color pixels, and if the coordinates and colors of more than a set proportion of embedding points are matched, the original video is considered.
[0042] In order to achieve the above-mentioned purpose three, the application provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor realizes the above-mentioned video anti-recording method when executing the computer program.
[0043] In order to achieve the above-mentioned purpose four, the application provides a computer readable storage medium, which stores a computer program, and the computer program realizes the above-mentioned video anti-recording method when executed by a processor.
[0044] Advantages
[0045] Compared with the prior art, the application has the advantages of:
[0046] The application divides the source picture by M*N pixel area units, sets the embedding point pixel in the specified position of the segmentation area according to the color with the most color pixels as the color of the pixel position of the embedding point, and obtains the video with the embedding point pixel, the color of the embedding point pixel is low in abruptness, does not affect the user's watching, and does not reduce the user's experience. By matching the color of the embedding point pixel of the to-be-detected video, it can be known whether the to-be-detected video is the original video, and the malicious video coding mode can be effectively targeted to destroy the video picture feature value to avoid the loophole of the original video discrimination. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 The flowchart of setting the embedding point pixel in the application;
[0048] Figure 2 The flowchart of matching the embedding point pixel in the application;
[0049] Figure 3 The red, green and blue coordinate graph of the XY axis obtained according to the normalization principle in the application;
[0050] Figure 4 The schematic diagram of dividing the source picture by M*N pixel area units. DETAILED DESCRIPTION
[0051] The application will be further described below in combination with the specific embodiments in the drawings.
[0052] Reference Figures 1-4A method for video anti-recording, comprising a process of setting a buried pixel and a process of matching the buried pixel.
[0053] The process of setting the buried pixel comprises steps 11-15 as follows:
[0054] Step 11. Read a video file to obtain each frame of pictures of the video.
[0055] Step 12. Analyze each frame of pictures to obtain red, green and blue colors of each frame of pictures according to the principle of normalization. The processed pictures only contain red, green and blue pixel colors, as shown in the following figure. Figure 3 The red, green and blue coordinate graph of the XY axis is obtained, and each pixel is positioned by (x, y) coordinates to obtain a series of three-element data groups (x, y, C), wherein C represents a color, which is one of red, green and blue.
[0056] Step 13. Divide the pictures into M*N pixel area units, and calculate the coordinates of the buried pixels needed by each divided area, wherein the buried pixels are at least one and located at the specified position of the M*N pixel area unit. According to the red, green and blue coordinate graph, the coordinates are divided into M*N pixel area units as the minimum picture area, and the minimum picture area is indicated by coordinates (a, b) in the entire picture to obtain a two-element array of the divided area of the entire picture ((a, b), (x, y, C)), a = ⌈x / M⌉, b = ⌈y / N⌉, and ⌈⌉ represents the upward rounding calculation.
[0057] In this embodiment, M*N = 50*50, as shown in the following figure. Figure 4 The 950*805 pixel picture is cut into several 50*50 pixel areas.
[0058] Preferably, the buried pixel is one and located at the upper right corner of the M*N pixel area unit.
[0059] Step 14. In order to make the color of the buried pixel not too abrupt and not affect the overall color of the picture as much as possible, the most color pixels in each divided area are taken as the color of the buried pixel. For example, the red pixel is 150, the green pixel is 60, and the blue pixel is 40. The red color is taken as the color of the buried pixel to obtain the coordinates of the buried pixel and the color of each area.
[0060] Step 15. According to the coordinates of each divided area and the color of the corresponding buried pixel, the buried pixel is set to each frame of pictures, and finally a video with the buried pixel is obtained.
[0061] If the original video has not been processed, the process of matching the buried pixel comprises steps 21-25 as follows:
[0062] Step 21. Read the video file to obtain each frame of the video, and randomly extract a set number of pictures as source pictures as needed. In this embodiment, the set number is 10% of the number of video frames, and it is not necessary to match each frame of the video, which ensures the detection speed.
[0063] Step 22. Divide the source pictures into M*N pixel area units, and calculate the coordinates of each divided area.
[0064] Step 23. Obtain the color of the buried pixel position of each divided area.
[0065] Step 24. Obtain the red, green and blue colors of the pixel color in each divided area according to the normalization principle, and obtain the color with the most color pixels in each divided area.
[0066] Step 25. Match the color of the buried pixel position of each divided area with the color with the most color pixels in the entire picture, and if the coordinates and color of more than a set proportion of the buried pixels match, it is considered to be the original video. In this embodiment, the set proportion is 30%.
[0067] If the verification in step 25 is not the original video, that is, the original video may be cropped, the following steps 26-31 are executed:
[0068] Step 26. After moving i pixels to the right along the X-axis direction of the M*N pixel area unit.
[0069] Step 27. After moving j pixels up along the Y-axis direction, divide the source picture as a new origin.
[0070] Step 28. Obtain the color of the buried pixel position of each divided area.
[0071] Step 29. Obtain the red, green and blue colors of the pixel color in each divided area according to the normalization principle, and obtain the color with the most color pixels in each divided area.
[0072] Step 30. Match the color of the buried pixel position of each divided area with the color with the most color pixels, and if the coordinates and color of more than a set proportion of the buried pixels match, it is considered that the original video is cropped; otherwise, j is incremented by 1, step 27 is executed, and step 31 is executed until j=N.
[0073] Step 31. i is incremented by 1, j is cleared, step 26 is executed until i=M.
[0074] A video recording prevention system, comprising:
[0075] A buried pixel setting module is configured to read a video file to obtain each frame of the video.
[0076] Parsing each frame of picture, the pixel color of each frame of picture is obtained according to the principle of normalization, three colors of red, green and blue, the processed picture only contains three colors of red, green and blue pixel colors, and the red, green and blue coordinate graph of the XY axis is obtained, the position of each pixel is located through (x, y) coordinates, and a series of three data groups (x, y, C) are obtained, C represents color, which is one of red, green and blue;
[0077] The picture is segmented into M*N pixel region units, and the coordinates of the pixels to be buried in each segmented region are calculated, the pixels to be buried are at least one and are located at a specified position of the M*N pixel region unit, according to the red, green and blue coordinate graph, the coordinates are segmented according to M*N pixels as the minimum picture region, the M*N pixel region unit is the minimum picture region, which is indicated by coordinates (a, b) in the entire picture, and a two-dimensional array of the segmented region of the entire picture ((a, b), (x, y, C)) is obtained, a = ⌈x / M⌉, b = ⌈y / N⌉;
[0078] The color with the most color pixels in each segmented region is taken as the color of the pixel to be buried;
[0079] According to the coordinates of each segmented region and the color of the corresponding pixel to be buried, the pixel to be buried is set to each frame of picture, and finally a video with pixels to be buried is obtained;
[0080] The matching pixel to be buried module is used to read a video file to obtain each frame of picture of the video, and a set number of pictures are randomly extracted as source pictures according to needs;
[0081] The source picture is segmented into M*N pixel region units, and the coordinates of each segmented region are calculated;
[0082] The color of the pixel to be buried position of each segmented region is obtained;
[0083] The pixel color in each segmented region is obtained according to the principle of normalization, three colors of red, green and blue, and the color with the most color pixels in each segmented region is obtained;
[0084] In the entire picture, the color of the pixel to be buried position of each segmented region is matched with the color with the most color pixels, if the coordinates and colors of more than a set proportion of pixels to be buried are matched, the original video is considered.
[0085] A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned video anti-recording method when executing the computer program.
[0086] A computer readable storage medium, which stores a computer program, the computer program is executed by a processor to implement the above-mentioned video anti-recording method.
[0087] The present application can effectively counteract the code mode of malicious video, destroy the characteristic value of the video picture, and bypass the loophole of original video discrimination.
[0088] The above is only the preferred embodiment of the present application, it should be noted that for those skilled in the art, without departing from the structure of the present application, can also make several deformation and improvement, these will not affect the effect of the present application and the practicality of the patent.
Claims
1. A method for preventing video recording, characterized in that: Including the process of setting buried pixels and matching buried pixels; The process of setting up buried pixels includes the following steps: Step 11. Read the video file and get each frame of the video; Step 12. Analyze each frame of the image and normalize the pixel colors of each frame to obtain three colors: red, green, and blue. The processed image only contains three colors of red, green, and blue pixels. A red, green, and blue coordinate diagram of the X and Y axes is obtained. The position of each pixel is located by the (x, y) coordinate to obtain a series of three-dimensional data sets (x, y, C), where C represents the color, which can be one of red, green, and blue. Step 13. Segment the image into M*N pixel area units and calculate the coordinates of the pixels required for embedding in each segmented area. There must be at least one embedded pixel located at a specified position in the M*N pixel area unit. According to the red, green, and blue coordinate map, segment the coordinates into the minimum image area of M*N pixels. The minimum image area of the M*N pixel area unit is marked with coordinates (a, b) in the entire image to obtain a binary array ((a, b), (x, y, C)) of the entire image segmentation area, where a=⌈x / M⌉ and b=⌈y / N⌉. Step 14. Take the color with the most color pixels in each segmented area as the color of the buried pixel; Step 15. According to the coordinates of each segmented area and the color of the corresponding buried pixel, the buried pixel is set to each frame of the image, and finally a video with the buried pixel is obtained; The process of matching buried pixels includes the following steps: Step 21. Read the video file, obtain each frame of the video, and randomly select a set number of pictures as source pictures as needed; Step 22: Segment the source image into M*N pixel area units and calculate the coordinates of each segmented area. Step 23. Get the color of the buried pixel position of each segmented area; Step 24. The pixel colors in each segmented area are normalized to obtain the three colors of red, green, and blue, and the color with the most color pixels in each segmented area is obtained; Step 25. In the entire image, match the color of the buried pixel position in each segmented area with the color with the most color pixels. If the coordinates and colors of more than the set ratio of buried pixels match, it is considered to be the original video.
2. A method for preventing video recording according to claim 1, characterized in that: If the video is not the original video, the following steps are performed: Step 26: Shift the M*N pixel area unit rightward by i pixels along the X-axis direction; Step 27. Move up by j pixels along the Y axis and use this as the new origin to segment the source image. Step 28. Get the color of the buried pixel position of each segmented area; Step 29. The pixel colors in each segmented area are normalized to obtain the three colors of red, green, and blue, and the color with the most color pixels in each segmented area is obtained; Step 30. Match the color of the buried pixel position in each segmented area with the color of the most color pixels. If the coordinates and colors of more than a set ratio of buried pixels match, it is considered that the original video has been cropped. Otherwise, j is incremented by 1 and step 27 is executed until j = N, and step 31 is executed. Step 31. i is incremented by 1, j is cleared, and step 26 is executed until i=M.
3. The method for preventing video recording according to claim 1, wherein: The M*N=50*50.
4. The method for preventing video recording according to claim 1, wherein: The set number is 10% of the video frame number.
5. The method for preventing video recording according to claim 1, wherein: The set ratio is 30%.
6. The method for preventing video recording according to claim 1, wherein: There is one buried pixel, and it is located in the upper right corner of the M*N pixel area unit.
7. A video anti-recording system, characterized in that: include: Set up a pixel embedding module to read the video file and obtain each frame of the video; Each frame of the image is parsed and the pixel colors of each frame are normalized according to the principle of normalization to obtain three colors: red, green and blue. The processed image only contains three colors of red, green and blue pixels, and a red, green and blue coordinate diagram of the XY axis is obtained. The position of each pixel is located by the (x, y) coordinate, and a series of three-dimensional data sets (x, y, C) are obtained. C represents the color, which can be one of red, green and blue. The image is divided into M*N pixel area units, and the coordinates of the pixels required for embedding in each segmented area are calculated. There must be at least one embedded pixel located at a specified position in the M*N pixel area unit. According to the red, green, and blue coordinate map, the coordinates are divided into the minimum image area of M*N pixels. The M*N pixel area unit is the minimum image area and is marked with coordinates (a, b) in the entire image. The binary array ((a, b), (x, y, C)) of the entire image segmentation area is obtained, where a=⌈x / M⌉ and b=⌈y / N⌉. Take the color with the most color pixels in each segmented area as the color of the buried pixel; According to the coordinates of each segmented area and the color of the corresponding buried pixel, the buried pixel is set to each frame of the picture, and finally a video with buried pixels is obtained; The matching buried pixel module is used to read the video file, obtain each frame of the video, and randomly extract a set number of pictures as source pictures as needed; Divide the source image into M*N pixel area units and calculate the coordinates of each segmented area; Get the color of the buried pixel position in each segmented area; The pixel colors in each segmented area are normalized to obtain three colors: red, green, and blue, and the color with the most color pixels in each segmented area is obtained; In the entire image, the color of the buried pixel position in each segmented area is matched with the color with the most color pixels. If the coordinates and colors of more than the set ratio of buried pixels match, it is considered to be the original video.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method for preventing video recording according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for preventing video recording according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Digital video embossed stamp embedding and extracting method
CN109474830A
Video anti-counterfeiting identification method and system based on artificial intelligence
CN115512276A