Pdclab 6
Pdclab 6
EXPERIMENT NO. 6
LAB ASSESSMENT:
Ability to Conduct
Experiment
Data Presentation
Experiment Results
Conclusion
Introduction:
Convolution is a mathematical operation that combines two functions or sets of data to
produce a third function, which shows how one function modifies or “shapes”; the other. In
simple terms, it’s a way to apply a filter (a small set of numbers) to data (like an image,
audio, or sequence) to detect patterns, smooth, or emphasize certain parts of the data.
To perform convolution:
1. Place the filter on top of part of the data.
2. Multiply each element in the filter with the corresponding element in the data.
3. Sum up all these multiplied values to get a single new value.
4. Slide the filter to the next position and repeat the process, creating a new
“transformed”; version of the data.
Simple Example:
For an image, let’s say the filter is designed to find edges. When you slide this filter across
the image, it will produce high values where there’s an edge (a big change in pixel values),
allowing you to detect edges in the output.
Key Parameters:
1D Convolution involves several key parameters:
• Kernel Size: Determines the length of the kernel. A larger kernel captures more
context in the input.
• Stride: Controls how much the kernel shifts at each step. A stride of 1 moves the
kernel one position at a time, while a stride greater than 1 skips positions.
• Padding: Optional padding adds extra values (often zeros) at the sequence’s
boundaries to control the output size.
Applications of 1D Convolution:
1D convolutions are commonly used in:
Key Parameters:
In 2D convolution, you can control:
1. Kernel Size: Defines the area the kernel covers, like 3x3 or 5x5. Larger kernels
capture more context.
2. Stride: Controls how much the kernel moves at each step. A stride of 1 means
moving one pixel at a time, while higher strides skip pixels.
3. Padding: Adds extra pixels (often zeros) around the image edges, allowing the kernel
to cover more of the image.
Applications of 2D Convolution:
2D convolution is widely used in computer vision tasks, including: