Convert Image to Video Processing, the next step.

1 次查看(过去 30 天)
Greetings fellow programmers! As stated in the title, I am in quite a pickle. I have done my image processing completely but I have yet to learn any techniques for running a recorded video processing.
Here are my desired pre-processing of image,
if true
Reader = VideoReader('StuckTear.MOV');
get(Reader);
DarkPixel = 125;
extraction = rgb2gray(read(Reader,80));
Threshold = imextendedmax(extraction, DarkPixel);
redux = bwareaopen (Threshold, 35000);
%imshow(extraction)
%figure, imshow(redux);
for x = 1 : nframes
singleFrame = read(Reader, x);
I = rgb2gray(singleFrame);
fill = imfill (redux, 'holes');
se = strel('disk', 10);
dilate = imdilate(fill, se);
G = fspecial('gaussian', [15 15], 2);
Ig = imfilter(dilate, G, 'circular');
end
end
I have done processing my image and I wanted the recorded video to be processed the same way but by frame by frame, is there anyone out there that could provide me some example or perhaps some guidance regarding this? Thank you very much.
I am also planning to make centroid and bounding box on the "ON" pixels as well but that can wait.

回答(1 个)

Walter Roberson
Walter Roberson 2015-6-30
  2 个评论
Akira Chan
Akira Chan 2015-6-30
woo.. thank you very much again sir Walter, I will try it and let you know the problem as soon as possible(if any). Thank you!
Akira Chan
Akira Chan 2015-7-1
I have tried some example from this link you gave me but it let me write a video and then create a new file on my desktop. However, is there a way to read and then process the recorded video right on spot? I don't want to create any other files other than reading from the original file and process it. I also want to make it in such a way that the output is in black and white which is why I did the pre-processing in the first place. Thank you.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by