Posts

Matlab Imge Subplot

Subplot %% Adjust Contrast using Adaptive Histogram Equalization % This example shows how to adjust the contrast in an image using adaptive % histogram equalization (CLAHE). Compared to the |histeq| function, which % operates on an entire image, |adapthisteq| operates on small regions of % the image. %% % Read image into the workspace. I = imread('pout.tif'); %% % Adust the contrast of the image using the |adapthisteq| function. J = adapthisteq(I); %% % Display the contrast-adjusted image with its histogram. figure subplot(1,2,1) imshow(J) subplot(1,2,2) imhist(J,64)

Matlab Image: Add noise

I = imread('images\eight.tif'); J = imnoise(I,'salt & pepper',0.02); figure, imshow(I) figure, imshow(J) ------------------------------------------------------

Matlab: For

path = 'C:\Users\Documents\MATLAB\image_'; int32 i=0; for z=1:10     i=i+1;     value = strcat(path,int2str(i),'.jpg');     display(value);     end

Matlab: String

str = int2str(N) path = 'C:\Users\Documents\MATLAB\image_'; i = 1; path = strcat(path,int2str(i),'.jpg'); path result: C:\Users\mvish\Documents\MATLAB\image_1.jpg -------------------------- path = 'C:\Users\Documents\MATLAB\image_'; int32 i=0; for z=1:10     i=i+1;     value = strcat(path,int2str(i),'.jpg');     display(value);     end

Matlab: Video

1...................... clear clc info = imaqhwinfo('winvideo') info.DeviceInfo(2) vid = videoinput('winvideo',2) preview(vid) 2...................... set(vid, 'FramesPerTrigger', Inf); set(vid, 'ReturnedColorspace', 'rgb'); start(vid) isrunning(vid) islogging(vid) stop(vid) 2...................... set(vid, 'FramesPerTrigger', Inf); set(vid, 'ReturnedColorspace', 'rgb'); start(vid) isrunning(vid) islogging(vid) vid.FrameGrabInterval = 1; stop(vid) 3...................... set(vid, 'FramesPerTrigger', Inf); set(vid, 'ReturnedColorspace', 'rgb'); start(vid) isrunning(vid) islogging(vid) vid.FrameGrabInterval = 1; vid.FramesAcquired stop(vid)