Remove noise in video
21 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Life is Wonderful
le 25 Fév 2020
Modifié(e) : Life is Wonderful
le 15 Mar 2020
I am playing a video file. In the video there are lot's flicker. In first step, I would like to make a detection for flicker frame and later on I would like to remove them as well.
Below is my code snippet. I need a algo for frame with noise detection.
%% Record video - VideoPlayer
clearvars
close all
clc
%%
filename = 'Trim.mp4'; % video to load
wb = waitbar(0,'Loading the file...'); % show progress bar
v = VideoReader(filename); % create VideoReader object
w = v.Width; % get width
h = v.Height; % get height
d = v.Duration; % get duration
s = struct('cdata',zeros(h,w,3,'uint8'),'colormap',[]); % struct to hold frames
k = 1; % initialize counter
NFrames = v.FrameRate*v.Duration % Number of frames
while hasFrame(v) % while object has frame
f = readFrame(v); % read the frame
s(k).cdata = f; % = imrotate(f,90); % rotate frame as needed
k = k + 1; % increment counter
waitbar(v.CurrentTime/d) % update progress bar
end
v.CurrentTime = 13; % set current time
f = readFrame(v); % get the frame
close(wb) % close progress bar
axes % create axes
imshow(f) % show the frame
title('Trim.mp4') % add title
I want to understand the under which condition reported frames and frame rate are different.
How to get the histogram for good vs bad frames.
Any help here ?
Thank you!
0 commentaires
Réponse acceptée
Image Analyst
le 11 Mar 2020
In the loop, I'd get the mean into an array. Then I'd use some kind of outlier detection code to find peaks in the mean signal. Not step changes which indicate scene changes, but sharp peaks or valleys.
6 commentaires
Image Analyst
le 13 Mar 2020
Sorry, I don't know how to get access to the actual video format file inside YouTube's database. Maybe you'll have to play it first and then look in the temporary internet files folder for the most recent video file and then use that.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Audio and Video Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!