Lecture17_Image_Processing_I

Tutorials:
Let's use the logical operations to do some fund stuff.

Before we move on, try to understand why RGB images has 3 colors.
Look at the following figure, other colors can be created by the combination of the R, G, and B components.

For the following image processing tasks, you will have to separate the RGB images into 3 slices, and then process one by one, then combine them. Just following the tutorial, you will get it.

Have your script file in the same directory, then use the following script to show the figure:

Check the generated 's' in your workspace, do you understand the three numbers in 's'?

They mean the size of the image is 480 pixels x 852 pixels by 3 layers. Why 3 layers? The image has Red, Green, and Blue, 3 layers. It is a RGB file.

Now, let's pick up a background image for this foreground. Download the background here:
Now you should see two images:

Now, let's extract the person from the left figure, merge the extracted image to the one on the right.

To understand the code better, you probably need to go back to last lecture's tutorials.
You should see a merged figure:

Use the following code to plot the intensity profile of the figure:

You should see the following plot. Note that the thin white line drawn in the middle of the figure, and the profile of the intensity was drawn along the line.

Repeat the first example shown in the tutorial.