So basically im trying to count number of shots change during a single video. Currently im not interested in fading in / out algorithms, but simply number of total scenes change.
i've came up with the following algoirthm, but kinda stuck with getting a scalar value from the similarity matrix:
videoPlayer = vision.VideoPlayer;
Frame1 = step(videoFReader);
for i=1:n - 1
step(videoPlayer, Frame1);
Frame2 = step(videoFReader);
hist1 = imhist(Frame1);
hist2 = imhist(Frame2);
D = pdist2(hist2, hist1,'euclidean'); % D is a matrix
histNorm = norm(D); % histNorm is a very small value which
% doesn't change its value drasticly during
% an actual scence change
Frame1 = Frame2;
%location = strcat('c:\1\', int2str(i), 'pic.jpg');
%imwrite(d, location, 'Quality', 100);
audios=audio( (i-1)*op + 1 : i*op , : );
end