For Beginners
Standard Benchmarks: (Many Thanks for making it available online...)
https://homepages.cae.wisc.edu/~ece533/images/
https://www.petitcolas.net/watermarking/image_database/
https://www.geocaching.com/mark/gallery.aspx
http://www.vision.caltech.edu/Image_Datasets/Caltech101/
http://www.vision.caltech.edu/Image_Datasets/Caltech256/
http://www.cs.utexas.edu/~grauman/courses/spring2008/datasets.htm
http://www.cvpapers.com/datasets.html
http://www.cs.toronto.edu/~kriz/cifar.html
http://www.imageprocessingplace.com/root_files_V3/image_databases.htm
Found on first hit
https://www.youtube.com/playlist?list=PLEo-jHOqGNyUWoCSD3l3V-FjX9PnHvx5n
FirstScript.m
im = imread('lenaColor.png'); %image file 'lenaColor.png'
%imshow(im); %uncomment to display in Figure
if length(unique(im)) > 255 % for color image
imgry = rgb2gray(im); %Command to convert RGB image to grayscale image
else
imgry = im;
end
%figure % uncomment to display in a new Figure imgry
%imshow(imgry);
%figure % uncomment to display the Histogram in a new Figure
%imhist(imgry); %uncomment to view the inbuilt Histogram
[pixelCount, grayLevels] = imhist(imgry); %obtain the values in variables
plot(grayLevels,pixelCount); %plot the graph using the variables
SecondScript.m
im = imread('lenaColor.png'); %image file 'lenaColor.png'
if (size(im,3) ~= 1) % for color image size(im,3)==3
imgry = rgb2gray(im); %converting to grayscale
elseif (size(im,3) == 1)
imgry = im;
end
[pixelCount, grayLevels] = imhist(imgry);
s = sum(pixelCount); %Total number of pixels of the pixels
pixNormalized = pixelCount/s; %P_i / s
plot(grayLevels,pixNormalized);
ThirdScript.m (mypeppers.png)
im = imread('mypeppers.png');
figure, imshow(im); %this will be displayed original color figure
if (size(im,3) ~= 1)
imgry = rgb2gray(im);
elseif (size(im,3) == 1)
imgry = im;
end
figure, imshow(imgry)
t0=8;
t1=46;
t2=120;
t3=225;
[row,col] = size(imgry);
for i= 1:row
for j=1:col
% if (imgry(i,j) >= t0 && imgry(i,j)<=t1) %for dark gray in between the big and small capsicum
% im2(i,j) = imgry(i,j);
%elseif
if (imgry(i,j) > t1 && imgry(i,j)<=t2) %for big capsicum
im2(i,j) = imgry(i,j);
elseif (imgry(i,j) > t2 && imgry(i,j)<=t3) %for small capsicum
im2(i,j)=imgry(i,j);
else
im2(i,j)=0;
end
end
end
figure, imshow(im2)
[pixelCount, grayLevels] = imhist(imgry);
figure, plot(grayLevels,pixelCount);
Good Lecture on Image Segmentation.
https://www.youtube.com/watch?v=GuqBJ4W7_58 (Excellent explanation at 6:26 And Also 14:25 in regards to Otsu's or any other related work)
https://www.youtube.com/watch?v=ojapO75FV38
https://www.youtube.com/watch?v=f1SaYzOthCM (Global Thresholding)
https://www.youtube.com/watch?v=mIza_x78Aqw (Otsu's Thresholding method at 4:30)