You are on page 1of 8

Technological Institute of the Philippines

1338 Arlegui St., Quiapo, Manila

College of Engineering and Architecture


Electronics Department

Experiment #5
Audio and Image Signal Representation

2x2 box

Submitted by:
Bobis, Daniel D.

Submitted to:
Engr. Mark Nelson E. Pangilinan

Date:
August 9, 2017
I. Intended Learning Outcomes

1. Understand how sound and image signals are represented in LabVIEW.


2. Perform some simple operations on sound and image signals and determine the effect of
these operations.

II. Discussion (Background of the Activity / cite your reference/s)

An audio signal is an analog representation of sound, typically as an electrical voltage.


Audio signals may be synthesized directly, or may originate at a transducer such as microphone,
musical instrument pickup, phonograph cartridge, or tape head. Loudspeakers or headphones
convert an electrical audio signal into sound. (from http://en.wikipedia.org/wiki/Audio_signal,
retrieved May 30, 2011). LabVIEW offers a variety of ways to read and write audio files in
WAV format. Using the Simple Read and Simple Write subVIs of LabVIEW, an audio signal in
a one-dimensional array can be retrieved and vise-versa. Then, various operations can now be
done to this signal using various VIs of LabVIEW, such as scaling, filtering, etc.

A digital image is a numeric representation (normally binary) of a two-dimensional


image. Depending on whether or not the image resolution is fixed, it may be of vector or raster
type. Without qualifications, the term digital image usually refers to raster images, also called
bitmap images. Raster images have a finite set of digital values, called picture elements or
pixels. The digital image contains a fixed number of rows and columns of pixels. Pixels are the
smallest individual element in an image, holding quantized values that represent the brightness
of a given color at any specific point. Each pixel of a raster image is typically associated to a
specific position in some 2D region, and has a value consisting of one or more quantities related
to that position (from http://en.wikipedia.org/wiki/Digital_image, retrieved May 30, 2011).

III. Learning Activities

Activity 3.1 Audio Signal Representation and Signal Processing


Activity 3.2 Image Signal Representation and Signal Processing

IV. Questions and Answers

Activity 3.1 Audio Signal Representation and Signal Processing

Question 1: Adjust the time stamp of the Waveform graph to display the waveform from 0 to
0.02 seconds. What is being displayed in the Waveform graph? Relate this to the sound
heard. Answer:
Question 2: Adjust the time stamp of the Waveform graph to display the waveform from 1.20
to 1.21 seconds. What is being displayed in the Waveform graph? Relate this to the sound
heard. Answer:

Question 3: How did LabVIEW represented the audio signal?


Answer: LabVIEW represented the audio signal as a sine wave.

Question 4: Obtain some information on the audio file like the length of the file, total number
of samples, sampling rate, the number of channels and the number of bits per sample. Use
Info.vi. Answer:

Question 5: How did the audio sounded?


Answer: The audio sounded like the original file.

Question 6: What was being displayed in the Waveform Graph? How many channels does
this file have?
Answer: The amplitude of the audio signal is being displayed in the Waveform Graph wherein
it has two channels.

Question 7: What is the function of the Flat Sequence Structure?


Answer: The function of the Flat Sequence Structure is to ensure that a sub diagram executes
before or after another sub diagram.
Question 8: Comment on the sound heard and its relationship to the graphs displayed. What
did the Index Array nodes do to the Output data of the file?
Answer: Index Array nodes separate the first and second waveform of the audio signal.

Question 9: What happened to the waveform and to the sound?


Answer: The waveform in the graph is equal to the graph of the Index 0 and Index 1 when
combined wherein the sound is repeated louder.

Question 10: Comment on the waveform of the Noisy signal and the sound heard.
Answer: The waveform of the Noisy signal is similar to the sound heard.

Question 11: What is the function of the Get Waveform Components and Build Waveform
nodes?
Answer: Get Waveform Components returns the analog waveform being specified and Build
Waveform builds an analog waveform or modifies an existing waveform.

Question 12: Why is there a need for a Build Array node to be used when writing a
waveform into a file?
Answer: There is a need for a Build Array node because it takes in a series of inputs and forms
an array of appropriate dimension and size when writing a waveform into a file.

Question 13: Compare the original and the scaled audio in terms of its waveform graph and
how it sounded? What is the effect of scaling or multiplying an audio signal by a constant?
Answer: The effect of scaling or multiplying an audio signal by a constant is that it results in a
bigger waveform and also a louder sound compared to the original audio.

Activity 3.2 Image Signal Representation and Signal Processing

Question 1: With regards to the image file, what does the image depth, the image, and
the Rectangle data indicate?
Answer: Image depth specifies the color depth of the image. The image is an array of bytes that
describes the color of each pixel in the image in raster order. The rectangle is a cluster that
contains coordinates that describe the bounding rectangle of the image.

Question 2: What is being displayed in the table? How many rows does this table have?
What does the data on each cell indicate?
Answer: Hexadecimals are being displayed in the table. The data on each cell indicate the
numeric representation (in hexadecimal) of colors from the image.

Question 3: Why was the indicator connected to the 24-bit pixmap terminal of the Unflatten
Pixmap.vi? Will the output be also seen in the other terminals? Why?
Answer: The indicator is connected to the 24-bit pixmap of the Unflatten Pixmap.vi because it
returns the 2D array of data to draw as a pixmap. If the output is connected in the other
terminals, the dimensions of the image match the dimensions of the array.

Question 4: Compare the output of Table and Table 2. What does the value in each cell
represent?
Answer: In the image, the color varies per column of pixel, while the data in the table varies per
row. The value in each cell are the information on the color of the pixel in hexadecimal form.
Question 5: What is being displayed in the image01.xls? How does it compare with the
one displayed in Table 2?
Answer: The image data is being displayed in the image01.xls. The pixel map that is being seen
in the Table 2 is the transpose of the pixel map of the image.

Question 6: What does the format %x mean? What other formats are available for use? Answer:
The format %x means hexadecimal. Other formats are %g (automatic formatting), %d
(decimal), %f (floating-point), %e (scientific notation), %p (SI notation), %o (octal), %b
(binary), %t (relative time), %T (absolute time), %s (string), and %$ (variable order).

Question 7: How did the Transposed Image look like? What did the transposed operation do to
the image?
Answer: The Transposed Image is a rotated original image. The transposed operation
interchanged each row and the corresponding column from the pixel map of the image.

Question 8: How did LabVIEW represented the image signal?


Answer: LabVIEW represented the image signal as a numeric representation of a two-
dimensional image.

Question 9: What happened to the image? How did this happen?


Answer: It resulted to a noisy image. It happened because of the random variation of brightness
or color information in the image.

Question 10: What is the purpose of the two For Loops and the Random Number multiplied
to the constant? Why is the constant chosen to be equal to 224?
Answer: Two For Loops are added to control repetitive operations of the multiplication of the
Random Number to the constant. The constant is equal to 2 24 because it is the number of
possible color combinations that can be displayed on each pixel.

V. Conclusion

In this laboratory experiment, I understood how sound and image signals are
represented in LabVIEW by performing some simple operations on sound and image signals
and by determining the effects of these operations. In the first activity, the audio file is being
represented as a sine wave. The signal is then scaled resulting to a louder sound. Noise is also
introduced to see its effect on the audio signal. In the second activity, an image is used to
determine its signal. The pixel map is determined to display the color of each pixel. The image
is transposed and noise is also introduced into the image signal.
VI. Machine Problems

This VI manipulates the audio path specified


to play it backwards and saving the output
waveform to a .wav file. This is done by
getting the array of the original wave form,
get the components needed by using the get
waveform components.vi then putting it to
inverse array vi. so you can inverse the array
of the original waveform then putting it back
again to build waveform vi and youre done.
You now have an VI that make audio files
play backwards.

This VI is similar to the first Machine


Problem but this time it deals with an image
but the process is still the same. You get the
components of an image file first by using
the read png vi then getting its components
using the unbundled by name vi we used in
the lab activity. By getting image part data
of the unbundled by name vi, we inverse its
data just like we did in Machine problem 1
and make its output go back to a bundled
data then connecting it to draw unflattened
pixmap vi and create an indicator in its
output.

You might also like