Convert Image to Video Processing, the next step.

1 view (last 30 days)
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.

Answers (1)

Walter Roberson
Walter Roberson on 30 Jun 2015
  2 Comments
Akira Chan
Akira Chan on 30 Jun 2015
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 on 1 Jul 2015
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!