Commit f3a160be authored by abharadwaj1's avatar abharadwaj1

added all files

parent 20e398ce
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Introduction to Image Processing\n",
"\n",
"The simplest signal is a sinusoidal wave. Sinusoidal waves have three independant parameters. They are: \n",
"* Amplitude, $A$\n",
"* Frequency, $f$\n",
"* Phase, $\\phi $\n",
"\n",
"The relationship between these parameters is given by the mathematical formula: \n",
"\\begin{equation}\n",
" f(t) =A \\cdot cos(2 \\pi f \\cdot t - \\phi)\n",
"\\end{equation}\n",
"\n",
"Where the variable $t$ represents time. \n",
"\n",
"In the following Illustrative, you can play around these values to get an intuitive feel of these variables\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "068c9312a466412d8e1b6dc582b9e587",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(IntSlider(value=2, description='Amplitude', max=4, min=-4), IntSlider(value=4, descripti…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<function misc.plotwave(Amplitude, Frequency, Phase=0)>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from misc import *\n",
"play_with_wave()"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "skip"
}
},
"source": [
"Signals in real life applications, such as those recieved by your phone during a call, or a radio telescope observing the universe, or the signals from the gravitational wave detectors (LIGO/VIRGO) are quite obviously not simple sinusoids. \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Processing any piece of data would require a mathematical way to describe these signals. Given that real life data are not simple sinusoids, it would require near infinite amounts of parameters to describe such data mathematically. Fortunately, as we shall see in this course, $all$ data can be expressed as a sum of simple sinusoids. Thus, you learn a powerful way to process real life data with arbitrary precision through this course! "
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
This diff is collapsed.
This diff is collapsed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2-D Image Processing\n",
"\n",
"Now that we considered 1-D signals and how the Fourier Transforms of those look like, let us move to signals which vary across two dimensions. An image taken by a digital camera is the most common example of a 2D signal. \n",
"\n",
"What do we mean when we say that an image is a 2-D signal? It means, essentially that an image is nothing but a matrix of numbers. We can actually see this matrix in any data management software like Python, Excel or Matlab. \n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from misc import *"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "efd53eb1622941d7b0296342a172f422",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(IntSlider(value=50, description='Shift Y', max=240, min=5), IntSlider(value=50, descript…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<function misc.display_df(Image, i, j, box)>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"I = rgb2gray(plt.imread('cameraman.bmp'))\n",
"get_pixel_values(I)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Have a look at this image. Move the black rectangle around and see the numbers which form the image at this location. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Each number in this matrix represents a 'pixel value'. When recording an image, photons excites several pixels in a detector and the resulting pattern is what we call an image. For image analysis, the pixel size is important as we shall see later. \n",
"\n",
"Next, we shall try to understand the concepts of spatial frequency and how the 1D analysis we did before applies to images. "
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment