Commit 7a4a6147 authored by Alok Bharadwaj's avatar Alok Bharadwaj

Upload New File

parent a3cd22ad
{
"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
}
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