Details

In this tutorial we are going to focus mainly on the color space RGB.

The objective is to introduce you different representations of digital visual signals and to some basic visual processing techniques using Matlab.

Matlab scripts/images can be seen on the bottom of the video and can be downloaded bellow. The output will consist of processed versions of those images, which we’re going to analyse with you to interpret the effects of the conducted processing operations.


Note: The majority of the images has the bitmap format (.bmp) which means that each pixel is represented by three RGB eight bit values, so in total 24 bits per pixel.

Video

Code

					
				function [] = tutorial1(in,out)

				[~,name,ext] = fileparts(in);

				rgb = imread(in);
				if size(rgb,3) ~= 3
					rgb = cat(3,rgb,rgb,rgb);
				end

				figure(1),imshow(rgb),title('RGB');
				imwrite(rgb,strcat(out,name,'-','rgb',ext));
				
				r = rgb(:,:,1);
				figure(2),imshow(r),title('Red');
				imwrite(r,strcat(out,name,'-','r',ext));

				g = rgb(:,:,2);
				figure(3),imshow(g),title('Green');
				imwrite(g,strcat(out,name,'-','g',ext));

				b = rgb(:,:,3);
				figure(4),imshow(b),title('Blue');
				imwrite(b,strcat(out,name,'-','b',ext));
					
				
Online Compiler