Video anti-recording method, system and device and storage medium
By setting buried pixels in the video and setting them according to the color with the largest number of color pixels, the problem of watermark affecting user experience in the prior art is solved, and effective video anti-recording and tampering detection is achieved.
Patent Information
- Application Number
- CN202411716362.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing video anti-recording technology prevents video from being copied by adding watermarks, but the watermark will obscure some images and affect the user experience.
By setting the buried pixel, the video picture is divided using the M*N pixel area unit, and the color with the largest number of color pixels is set to the video picture. This method does not affect the original image of the video, and it can be determined whether the video is the original video by matching the color of the buried pixel.
It effectively prevents videos from being copied and tampered without affecting the user experience, and destroys the malicious video coding method to avoid the vulnerabilities of original video screening.
Smart Images

Figure CN119693494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video anti-recording, and more specifically, to a method, system, device and storage medium for video anti-recording. Background Art
[0002] The moment a video is created and released, it may face the risk of being broadcast and copied. Currently, the most commonly used method to prevent screen recording is to add a watermark to the video, but adding a watermark will block part of the image, thus affecting the user's viewing experience and reducing the user's sense of experience. Summary of the invention
[0003] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art. One purpose of the present invention is to provide a method for preventing video from being recorded.
[0004] A second objective of the present invention is to provide a system for preventing video from being recorded.
[0005] A third object of the present invention is to provide a computer device.
[0006] A fourth objective of the present invention is to provide a computer storage medium.
[0007] In order to achieve the above-mentioned first objective, the present invention provides a method for preventing video recording, including a process of setting buried pixel and a process of matching buried pixel;
[0008] The process of setting buried pixels includes the following steps:
[0009] Step 11. Read the video file and get each frame of the video;
[0010] Step 12. Analyze each frame of the image, and normalize the pixel color of each frame of the image according to the principle of normalization to obtain three colors of red, green and blue. The processed image only contains three colors of red, green and blue pixel colors, and obtains the red, green and blue coordinate diagram of the XY axis. 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 is one of red, green and blue;
[0011] Step 13. Divide the image into M*N pixel area units, and calculate the coordinates of the pixels required to be buried in each segmented area. There is at least one buried pixel, and it is located at the specified position of the M*N pixel area unit. According to the red, green and blue coordinate diagram, divide the coordinates according to 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 to obtain a binary array ((a, b), (x, y, C)) of the entire image segmentation area.
[0012] Step 14. Take the color with the most color pixels in each segmented area as the color of the buried pixel;
[0013] 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 picture, and finally a video with buried pixels is obtained.
[0014] As a further improvement, the process of matching buried pixels includes the following steps:
[0015] 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;
[0016] Step 22: Segment the source image into M*N pixel area units, and calculate the coordinates of each segmented area;
[0017] Step 23. Obtain the color of the buried pixel position of each segmented area;
[0018] Step 24. The pixel colors in each segmented area are normalized to obtain three colors of red, green and blue, and the color with the most color pixels in each segmented area is obtained;
[0019] Step 25. In the entire image, the color of the buried pixel position of each segmented area is matched with the color with the most color pixels. If the coordinates and colors of the buried pixels exceeding the set ratio match, it is considered to be the original video.
[0020] Furthermore, if the video is not the original video in step 25, the following steps are performed:
[0021] Step 26: After the M*N pixel area unit is shifted rightward by i pixels along the X-axis direction,
[0022] Step 27. Move up by j pixels along the Y axis and use it as the new origin to segment the source image;
[0023] Step 28. Obtain the color of the buried pixel position of each segmented area;
[0024] Step 29. The pixel colors in each segmented area are normalized to obtain three colors of red, green and blue, and the color with the most color pixels in each segmented area is obtained;
[0025] Step 30. Match the color of the buried pixel position of each segmented area with the color with the most color pixels. If the coordinates and colors of the buried pixels exceeding the set ratio 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;
[0026] Step 31. i is incremented by 1, j is reset to 0, and step 26 is executed until i=M.
[0027] Furthermore, M*N=50*50.
[0028] Furthermore, the set number is 10% of the number of video frames.
[0029] Furthermore, the set ratio is 30%.
[0030] Furthermore, there is one buried pixel, and it is located in the upper right corner of the M*N pixel area unit.
[0031] In order to achieve the above-mentioned second objective, the present invention provides a system for preventing video recording, comprising:
[0032] Set up a buried pixel module to read the video file and get each frame of the video;
[0033] Parse 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 pixel colors, and obtains the red, green and blue coordinate diagram of the XY axis. 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 is one of red, green and blue;
[0034] The image is divided into M*N pixel area units, and the coordinates of the buried pixels required for each segmented area are calculated. There is at least one buried pixel, and it is located at the specified position of the M*N pixel area unit. According to the red, green and blue coordinate map, the coordinates are divided according to the M*N pixel as the minimum image area. The M*N pixel area unit is the minimum image area and 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.
[0035] Take the color with the most color pixels in each segmented area as the color of the buried pixel;
[0036] 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;
[0037] 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;
[0038] Divide the source image into M*N pixel area units and calculate the coordinates of each segmented area;
[0039] Get the color of the buried pixel position in each segmented area;
[0040] 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;
[0041] 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 the buried pixels exceeding the set ratio match, it is considered to be the original video.
[0042] In order to achieve the third objective above, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method for preventing video recording when executing the computer program.
[0043] In order to achieve the fourth objective above, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned method for preventing video recording is implemented.
[0044] Beneficial Effects
[0045] Compared with the prior art, the present invention has the following advantages:
[0046] The present invention divides the source image into M*N pixel area units, and uses the color with the most color pixels as the color of the buried pixel position, and then sets the buried pixel at the specified position of the segmented area to obtain a video with buried pixels. The buried pixel color has a low sense of abruptness with the original video, which will not affect the user's viewing and will not reduce the user's experience. By matching the buried pixel color of the video to be detected, it can be known whether the video to be detected is the original video, which can effectively target malicious video coding methods, destroy the video image feature value, and avoid the loophole of original video identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flowchart for setting buried pixel in the present invention;
[0048] Figure 2 This is a flowchart of matching buried pixel in the present invention;
[0049] Figure 3 The red, green and blue coordinate diagram of the XY axis is obtained according to the normalization principle in the present invention;
[0050] Figure 4 Schematic diagram of dividing the source image into M*N pixel area units. DETAILED DESCRIPTION
[0051] The present invention will be further described below with reference to the specific embodiments in the accompanying drawings.
[0052] See also Figure 1 to Figure 4, a method for preventing video recording, includes a process of setting buried pixel and a process of matching buried pixel.
[0053] The process of setting buried pixel includes the following steps 11 to 15:
[0054] Step 11. Read the video file and get each frame of the video.
[0055] Step 12. Analyze each frame of the image and normalize the pixel colors of each frame of the image to obtain three colors: red, green and blue. The processed image only contains three colors: red, green and blue pixel colors. Figure 3 As shown. The 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 triplet data sets (x, y, C) are obtained. C represents the color, which is one of red, green and blue.
[0056] Step 13. Segment the image with M*N pixel area units and calculate the coordinates of the pixels that need to be buried in each segmented area. There must be at least one buried pixel located at the specified position of the M*N pixel area unit. According to the red, green and blue coordinate diagram, divide the coordinates according to 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 to obtain a binary array ((a, b), (x, y, C)) of the entire image segmentation area. Indicates rounding up.
[0057] In this embodiment, M*N=50*50, such as Figure 4 The picture shown is 950*805 pixels cut into several 50*50 pixel areas.
[0058] Preferably, there is one buried pixel, and it is located in 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 to avoid affecting the overall color of the image, take the color with the most color pixels in each segmented area as the color of the buried pixel. For example: red pixels are 150, green pixels are 60, and blue pixels are 40. Take red as the color of the buried pixel, and you will get the coordinates and colors of the buried points in each area.
[0060] 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 picture, and finally a video with buried pixels is obtained.
[0061] If the original video has not been processed, the process of matching buried pixels includes the following steps Step 21 to Step 25:
[0062] Step 21. Read the video file, 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 the video can be effectively detected without matching every frame of the video, ensuring the detection speed.
[0063] Step 22: Divide the source image into M*N pixel area units and calculate the coordinates of each segmented area.
[0064] Step 23. Get the color of the buried pixel position in each segmented area.
[0065] Step 24. The pixel colors in each segmented area are normalized to obtain three colors of red, green and blue, and the color with the most color pixels in each segmented area is obtained.
[0066] Step 25. In the entire image, the color of the buried pixel position of each segmented area is matched with the color with the most color pixels. If the coordinates and colors of the buried pixels exceeding the set ratio match, it is considered to be the original video. In this embodiment, the set ratio is 30%.
[0067] If the video in step 25 is not the original video, that is, the original video may have been cropped, then the following steps, step 26 to step 31, are executed:
[0068] Step 26: Shift the M*N pixel area unit rightward by i pixels along the X-axis direction.
[0069] Step 27. After moving up by j pixels along the Y-axis, use it as the new origin to segment the source image.
[0070] Step 28. Get the color of the buried pixel position in each segmented area.
[0071] Step 29. 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.
[0072] Step 30. 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 the buried pixels exceeding the set ratio 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.
[0073] Step 31. i is incremented by 1, j is reset to 0, and step 26 is executed until i=M.
[0074] An internal combustion engine friction and accessory loss measurement system, comprising:
[0075] Set up a buried pixel module to read the video file and get each frame of the video;
[0076] Parse 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 pixel colors, and obtains the red, green and blue coordinate diagram of the XY axis. 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 is one of red, green and blue;
[0077] The image is divided into M*N pixel area units, and the coordinates of the buried pixels required for each segmented area are calculated. There is at least one buried pixel, and it is located at the specified position of the M*N pixel area unit. According to the red, green and blue coordinate map, the coordinates are divided according to the M*N pixel as the minimum image area. The M*N pixel area unit is the minimum image area and 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.
[0078] Take the color with the most color pixels in each segmented area as the color of the buried pixel;
[0079] 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;
[0080] 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;
[0081] Divide the source image into M*N pixel area units and calculate the coordinates of each segmented area;
[0082] Get the color of the buried pixel position in each segmented area;
[0083] 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;
[0084] 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 the buried pixels exceeding the set ratio match, it is considered to be the original video.
[0085] A computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the above-mentioned method for preventing video from being recorded is implemented.
[0086] A computer-readable storage medium stores a computer program, which implements the above-mentioned method for preventing video from being recorded when the computer program is executed by a processor.
[0087] The present invention can effectively target malicious video coding methods, destroy video image feature values, and avoid loopholes in original video identification.
[0088] The above are only preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A method for preventing video recording, characterized in that: Including the process of setting buried pixel and matching buried pixel; The process of setting 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 color of each frame of the image according to the principle of normalization to obtain three colors of red, green and blue. The processed image only contains three colors of red, green and blue pixel colors, and obtains the red, green and blue coordinate diagram of the XY axis. 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 is one of red, green and blue; Step 13. Divide the image into M*N pixel area units, and calculate the coordinates of the pixels required to be buried in each segmented area. There is at least one buried pixel, and it is located at the specified position of the M*N pixel area unit. According to the red, green and blue coordinate diagram, divide the coordinates according to 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 to obtain a binary array ((a, b), (x, y, C)) of the entire image segmentation area. 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 picture, and finally a video with buried pixels is obtained.
2. A method for preventing video recording according to claim 1, characterized in that: 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. Obtain the color of the buried pixel position of each segmented area; Step 24. The pixel colors in each segmented area are normalized to obtain 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, the color of the buried pixel position of each segmented area is matched with the color with the most color pixels. If the coordinates and colors of the buried pixels exceeding the set ratio match, it is considered to be the original video.
3. A method for preventing video recording according to claim 2, 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 it as the new origin to segment the source image; Step 28. Obtain the color of the buried pixel position of each segmented area; Step 29. The pixel colors in each segmented area are normalized to obtain 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 of each segmented area with the color with the most color pixels. If the coordinates and colors of the buried pixels exceeding the set ratio 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 reset to 0, and step 26 is executed until i=M.
4. A method for preventing video recording according to claim 1, characterized in that: The M*N=50*50.
5. A method for preventing video recording according to claim 2, characterized in that: The set number is 10% of the number of video frames.
6. A method for preventing video recording according to claim 2, characterized in that: The set ratio is 30%.
7. A method for preventing video recording according to claim 1, characterized in that: There is one buried pixel, and it is located in the upper right corner of the M*N pixel area unit.
8. A video anti-recording system, characterized in that: include: Set up a buried pixel module to read the video file and get each frame of the video; Parse 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 pixel colors, and obtains the red, green and blue coordinate diagram of the XY axis. 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 is one of red, green and blue; The image is divided into M*N pixel area units, and the coordinates of the buried pixels required for each segmented area are calculated. There is at least one buried pixel, and it is located at the specified position of the M*N pixel area unit. According to the red, green and blue coordinate map, the coordinates are divided according to the M*N pixel as the minimum image area. The M*N pixel area unit is the minimum image area and 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. 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 the buried pixels exceeding the set ratio match, it is considered to be the original video.
9. 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 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for preventing video recording according to any one of claims 1 to 7 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
Method, system, and computer-readable medium for embedding and extracting a watermark in a video
US20130259294A1