Coding wavelets the easy way

You can import these images into Matlab using the "Import Data" menu item. You will get a 3 dimensional array of size 512x512x3, i.e. a 512x512 image with three color channels. In this case, these are the Red, Green and Blue (RGB) channels.
Working of this RGB color space is not convenient as the data is heavily redundant between the three channels. To avoid this, we use a linear transformation (which is also used in JPEG) to convert the image into the YCbCr space, where Y is the luminance (grayscale) channel and Cb and Cr are two chrominance channels.
The provided routine convertYCbCr converts from RGB to YCbCr, and the provided routine convertYC2RGB does the inverse conversion.

The 2-D wavelet transforms that we will use will operate on images with one channel, e.g. we will work on each channel separately.