Hi. I am new to matlab. I am working on the project to dehaze a video. I converted the video to frames but i could not access it.i need to access it and store it in a folder and convert it back to video. I attach my code. Can someone help me out.

2 views (last 30 days)
warning off; clear all; close all; clc;
obj = mmreader('wildlife.avi'); vid = read(obj); frames = obj.NumberOfFrames; %Read the Total number of frames and displyed in command window ST='.jpg';
%%ex)readind and writing the 100 frames
%if u want to change the values means replace upto 1:776
for x = 1:10
Sx=num2str(x);
Strc=strcat(Sx,ST);
Vid=vid(:,:,:,x);
imwrite(Vid,Strc);
end
for k = 1:10; x=1; filename = 'C:\Users\Tamil\Desktop\project\x'; HazeImg = imread([filename, '.jpg']); figure, imshow(HazeImg, []); method = 'manual'; wsz = 15; A = Airlight(HazeImg, method, wsz); wsz = 3; ts = Boundcon(HazeImg, A, 30, 300, wsz); lambda = 2; t = CalTransmission(HazeImg, ts, lambda, 0.5); r = Dehazefun(HazeImg, t, A, 0.85); figure, imshow(ts, []); figure, imshow(1-t, []); colormap hot; figure, imshow(r, []); x=x+1; k=k+1; end

Answers (0)

Categories

Find more on Display Image in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!