- https://www.mathworks.com/help/matlab/ref/videoreader.html
- https://www.mathworks.com/help/matlab/ref/videowriter.html
How to perform salt and noise attack on watermarked video ?
6 ビュー (過去 30 日間)
古いコメントを表示
There is various attacts exists for image processing. I want to conduct an image processing attacks (like salt and pepper) on entire watermarked video. Therefore, the retrived watermarke is going to further analysis after an image processing attack.
In last, I want to know, how to pefrom atacks on watermarked video?
0 件のコメント
回答 (1 件)
Suraj Kumar
2024 年 10 月 3 日
To perform a salt and pepper noise attack on a video in MATLAB, you can use the ‘imnoise’ function in MATLAB.
1. Read the video file using the class ‘VideoReader’ in MATLAB and then prepare to write the output video using ‘VideoWriter’ class.
videoReader = VideoReader(videoFile);
outputFile = 'attacked_video.mp4';
videoWriter = VideoWriter(outputFile, 'MPEG-4');
You can refer to the following links to learn more about these classes:
2. Loop through each frame of the video, add noise in each frame using the ‘imnoise’ function and then write the frame to the new video file.
while hasFrame(videoReader)
frame = readFrame(videoReader);
% Add salt-and-pepper noise
noisyFrame = imnoise(frame, 'salt & pepper', 0.1);
writeVideo(videoWriter, noisyFrame);
end
To learn more about ‘imnoise’ function in MATLAB, refer to the following documentation:
Hope this helps!
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!