imread cameraman tif imhist cx imhist log10 figure plot cx close all i

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
% I = imread ('cameraman.tif'); imhist(I);
% [h, cx] = imhist(I);
% h = log10(h);
% figure, plot(cx, h);
% close all;
% im = imread('cameraman.tif');
% imshow(im);
% img_fig = gcf;
% figure;
% imhist(im);
% [h b ] = imhist(im);
% h = log10(h);
% figure, plot(b,h);
% figure(img_fig);
% improfile('bilinear');
% RGB = imread('autumn.tif');
% imshow(RGB);
% HSV = rgb2hsv(RGB);
% HSV(:,:,3) = imadjust(HSV(:,:,3), [0.02 0.68], [0 1], 0.7);
% RGB = hsv2rgb(HSV);
% figure, imshow(RGB);
%
% close all;
% I = imread('concordorthophoto.png');
% imshow(I);
% figure, imhist(I);
% I = imadjust(I, [10 200] / 255, [ ], 10);
% figure, imshow(I);
% figure, imhist(I);
%
% close all;
% im = imread('cameraman.tif');
% im = im2double(im);
% h1 = [0, -1, 0; -1, 15, -1; 0, -1, 0];
% im1 = filter2(h1, im);
% figure, imshow(im), title('1');
% figure, imshow(im1), title('2');
% im = imread('autumn.tif');
% imshow(im);
% I = medfilt2(im);
% figure, imshow(I);
% script;
% echo off all;
% close all;
% I = imread('autumn.tif');
% figure, imshow(I);
% ID = imnoise(I, 'gaussian', 0, 0.1);
% figure, imshow(ID);
% ID = imnoise(I, 'salt & pepper', 0.1);
% figure, imshow(ID);
% ID = imnoise(I, 'speckle', 0.1);
% figure, imshow(ID);
% echo off all;
% close all;
% I = imread('cameraman.tif');
% imshow(I);
% J = imnoise(I, 'gaussian', 0, 0.005);
% figure, imshow(J);
% K = wiener(J, [5, 5]);
% figure, imshow(K);
% script;
% echo off all;
% close all;
% I = imread('cameraman.tif');
% imshow(I);
% Id = im2double(I);
% h = fftshift(fft2(Id));
% figure, imshow(mat2gray(log10(abs(h))));
% Io = ifft(fftshift(h));
% figure, imshow(mat2gray(Io));
% clear;
% echo off all;
% close all;
% I = imread('liftingbody.png');
% imshow(I);
% S = qtdecomp(I, .27);
% M = full(S);
% figure, imshow(M);
% blocks = repmat(uint8(0), size(S));
% for dim = [512 256 128 64 32 16 8 4 2 1];
% numblocks = length(find(S==dim))
% if (numblocks > 0)
% values = repmat(uint8(1), [dim dim numblocks]);
% values(2:dim, 2:dim, :) = 0;
% blocks = qtsetblk(blocks, S, dim, values);
% end
% end
% blocks(end, 1:end) = 1;
% blocks(1:end, end) = 1;
% figure, imshow(blocks, []);
% echo off all;
% close all;
% I = imread('pillsetc.png');
% figure, imshow(I);
% I = im2bw(I, 0.5);
% I = im2double(I);
% L = bwlabel(I);
% RGB = label2rgb(L);
% figure, imshow(RGB);
% stats = regionprops(L, 'all');
% Area = [stats.Area];
% echo off all;
% close all;
% I = imread('pears.png');
% imshow(I);
% BW1 = im2bw(I, 0.5);
% figure, imshow(BW1);
% BW2 = bwmorph(BW1, 'erode', 9);
% figure, imshow(BW2);
% BW2 = bwmorph(BW2, 'thicken', Inf);
% figure, imshow(BW2);
% BW1 = BW1 & BW2;
% figure, imshow(BW1);
% L = bwlabel(BW1);
% RGB = label2rgb(L);
% figure, imshow(RGB);
im1 = imread('river.bmp');
im2 = imread('elk.bmp');
x = CombineWithAlpha(im1, im2, 0.5);
clear;
function inew = CombineWithAlpha(im1, im2, g);
imb = im2double(im1);
imf = im2double(im2);
g = 0.5;
imr(:,:,1)=imf(:,:,1)*g+imb(:,:,1)*(1-g);