This repository contains a collection of MATLAB scripts & functions for basic image-processing tasks like image manipulation, image enhancement, image segmentation, and many more. Whether you're a beginner looking to learn image processing with MATLAB or an experienced user seeking reference code, you'll find various examples and tutorials here. If you are new to MATLAB, I would suggest first looking at my MATLAB basics repository, where I have covered all the basics of MATLAB, here you will find programs only related to image processing.
Before using the code in this repository, make sure you have MATLAB installed on your system. You can download MATLAB from the official MathWorks website, or you can use the online MATLAB with some restrictions of usage from the online MATLAB 1 or online MATLAB 2. No additional installation is required for these MATLAB scripts apart from MATLAB software. Open MATLAB and run the scripts as needed.
To start using the codes, you will need some images; though you can take any image, I have provided some standard MATLAB images that you can use. You can download it from here.
Sl. No. | Programs | Function used | Code Links |
---|---|---|---|
1 | Program to read and show an image in MATLAB | imread(), imshow() | [Code] |
2 | Program to write/save an image in MATLAB | imwrite() | [Code] |
3 | Program to resize an image in different dimensions | imresize() | [Code] |
4 | Program to convert an image from RGB to grayscale image | rgb2gray() | [Code] |
5 | Program to convert an image to its negative image | imcomplement() | [Code] |
6 | Program for bit plane slicing | mod(),floor() | [Code] |
7 | Program to rotate an image | imrotate() | [Code] |
8 | Program to crop an image | imcrop() | [Code] |
9 | Program to flip an image | flip() | [Code] |
10 | Program for affine transform of an image | affine2d() | [Code] |
11 | Program for shearing transform of an image | affine2d(),imwarp() | [Code] |
12 | Program to binarize an image | imbinarize() | [Code] |