Image+Sampling

LabVIEW 3.2 Image Sampling
In Lab 3.1 we explored the effects of quantization on image quality and on image storage space measured in bits. Now we will discover that selecting the correct number of pixels in an image also has a big impact on image quality and image storage. This is called sampling. Both sampling and quantization are necessary if we want to represent an image as numbers. || Note: You will have to zoom back in on the downsampled image to view it properly. || || Pay special attention to the areas where the color of the neighboring objects changes abruptly -The sky clouds are choppy and the boundaries of it are sharp -The top edge of the small building from straight edge the top of the building turns to a serrated -The sides of the small building the pattern changes from many vertical lines to only 2 faded diagonal lines -The side of the large building not straight -The palm trees one is no longer able to see individual leaves || 4:.5 Is the loss of image quality worth the savings in storage required if: -You are making a photograph to place in a scrapbook? No -You are posting the image on a web page? No -You are transmitting the image from Jupiter to Earth at 300 bits per second? Yes || || 2:.5 Is the loss of image quality worth the savings in storage required if: -You are making a photograph to place in a scrapbook? No -You are posting the image on a web page? Yes -You are transmitting the image from Jupiter to Earth at 300 bits per second? Yes || || Note the differences from the original image in the following areas: -The sky Clouds are more prominent -The top edge of the small building No, it looks contorted -The side of the large building You could not tell what this is if you didn't see the original picture -The palm trees They look like black blobs || appears to be the same color everywhere. How does the sampled image show you that there are small color variations in the sky in the original image? Use the cursor to read 5 different RGB values for five different pixels in the sky of the sampled image. Move the cursor to a pixel location and click the left mouse button to see the three RGB values. Record these values RGB value 1 = 213, 221, 227 RGB value 2 = 241, 233, 220 RGB value 3 = 219, 218, 227 RGB value 4 = 231, 225, 234 RGB value 5 = 200, 214, 225 || Not really, you cannot tell what the image is || Why? No, we will be able to match color perfectly If we can not have enough pixels for a perfect image, how do we decide how many pixels to use? We pick a grouping with good quality that doesn't take up much space || Blocky and distorted ||
 * || Procedure ||
 * 1. || Start the Lab. ||
 * || The image of the striped building and the clouds should appear with the downsampling factor set to 1.
 * || Slowly increase the downsampling factor from 1 to 6 and observe the changes in the sampled image.
 * 2. || Change the downsampling factor to 6
 * || Q1: Examine the sampled image and note differences from the original image in the following areas:
 * || Q2: What is the ratio of the number of bits in the sampled image to the number of bits in the original image?
 * 3. || Change the downsampling factor to 3
 * || Q3: What is the ratio of the number of bits in the sampled image to the number of bits in the original image?
 * 4. || Change the downsampling factor to 12
 * || Q4:At a downsizing factor of 12 can you still tell what the objects in the image are?
 * || Q5: Look more closely at the sky in the original image and the sampled image. In the original image it
 * || Q6: Is an image with a downsizing sample of 12 sutable for any application?
 * 5. || Stop the Lab Close the Lab ||
 * || Do we ever have enough pixels to perfectly show all the details in an object?
 * || If we do not use enough pixels what will the edges of the obects look like?