Académique Documents
Professionnel Documents
Culture Documents
Image VS Picture
What is image processing?
Image processing involves changing the
nature of an image
1. improve its pictorial information for human
interpretation,
2. render it more suitable for autonomous
machine perception.
digital image processing
• Involves using a computer to change the
nature of a digital image
• A procedure which satisfies condition,
which makes an image look better
• Humans like their images to be sharp,
clear and detailed
Enhancing the edges of an image to
make it appear sharper
Removing noise from an image
Removing motion blur from an image
Obtaining the edges of an image
Removing detail from an image
Application
Aspects of image processing
• Image enhancement. This refers to processing
an image so that the result is more suitable
for a particular application.
1. sharpening or de-blurring an out of focus
image,
2. highlighting edges,
3. improving image contrast, or brightening
an image,
4. removing noise.
Aspects of image processing
• Image restoration. This may be considered as
reversing the damage done to an image by a
known cause,
1. removing of blur caused by linear motion,
2. removal of optical distortions,
3. removing periodic interference
Aspects of image processing
• Image segmentation. This involves subdividing
an image into constituent parts, or isolating
certain aspects of an image:
1. finding lines, circles, or particular shapes in
an image,
2. in an aerial photograph, identifying cars,
trees, buildings, or roads
An image processing task
• Acquiring the image. First we need to produce a digital
image from a paper envelope. This an be done using
either a CCD camera, or a scanner.
• Preprocessing. This is the step taken before the major
image processing task. The problem here is to perform
some basic tasks in order to render the resulting image
more suitable for the job to follow. In this case it may
involve enhancing the contrast, removing noise, or
identifying regions likely to contain the postcode.
• Segmentation. Here is where we actually get the
postcode; in other words we extract from the image
that part of it which contains just the postcode.
An image processing task
• Representation and description. These terms refer to
extracting the particular features which allow us to
differentiate between objects. Here we will be
looking for curves, holes and corners which allow us
to distinguish the different digits which constitute a
postcode.
• Recognition and interpretation. This means assigning
labels to objects based on their descriptors (from the
previous step), and assigning meanings to those
labels. So we identify particular digits, and we
interpret a string of four digits at the end of the
address as the postcode.
Types of digital images
• Binary. Each pixel is just black or white. Since
there are only two possible values for each
pixel, we only need one bit per pixel. Such
images can therefore be very efficient in
terms of storage. Images for which a binary
representation may be suitable include text
(printed or handwriting), fingerprints, or
architectural plans.
Types of digital images
Types of digital images
• Greyscale. Each pixel is a shade of grey, normally
from 0 (black) to 255 (white). This range means
that each pixel can be represented by eight bits, or
exactly one byte. This is a very natural range for
image file handling. Other greyscale ranges are
used, but generally they are a power of 2. Such
images arise in medicine (X-rays), images of printed
works, and indeed 256 different grey levels is
sufficient for the recognition of most natural
objects.
Types of digital images
Types of digital images
• True colour, or RGB. Here each pixel has a particular
colour; that colour being described by the amount of red,
green and blue in it. If each of these components has a
range 0 – 255, this gives a total of 2553 = 16,777,216
different possible colours in the image. This is enough
colours for any image. Since the total number of bits
required for each pixel is 24, such images are also called
24-bit colour images.
Such an image may be considered as consisting of a
”stack” of three matrices; representing the red, green
and blue values for each pixel. This mean that for every
pixel there correspond three values.
Types of digital images
>> sqrt(2)
>> sin(pi/8)
>> log(10)
>> log10(2)
Variables and the workspace
Matlab, use variables to store values.
>> a=5^(7/2) Enter
>> b=sin(pi/9)-cos(pi/9) Enter
can be entered as
>> a=[4 -2 -4 7 ; 1 5 -3 2 ; 6 -8 -5 -6 ; -7 3 0 1]
Matrix elements
Matrix elements can be obtained by using the
standard row, column, for matrix a above
>> a(2,3)
ans =
-3
Geometri Citra
Geometri Citra
• Formasi pixel dalam citra merupakan
titik suatu obyek yang diproyeksikan
pada bidang citra
• Tingkat kecerahan suatu titik dalam
sebuah citra merupakan fungsi
pencahayaan yang ada pada citra.
Geometri Citra
Geometri Citra
Koordinat Citra
Pixel Dalam Koordinat
Greyscale images
>> w=imread('wombats.tif');
>> figure,imshow(w),pixval on
>> a=imread('autumn.tif');
>> figure,imshow(a),pixval on
– Note now that the pixel values now consist of a
list of three values, giving the red, green and blue
components of the colour of the given pixel.
– An important dierence between this type of
image and a greyscale image can be seen by the
command
>> size(a)
• To obtain any of the RGB values at a given location,
we use similar indexing methods to above. For
example
>> a(100,200,2)
• returns the second colour value (green) at the pixel
in row 100 and column 200. If we want all the
colour values at that point, we can use
>> a(100,200,1:3)
• However, Matlab allows a convenient shortcut for
listing all values along a particular dimension; just
using a colon on its own:
>> a(100,200,:)
• A useful function for obtaining RGB values is
impixel; the command
>> impixel(a,200,100)
• returns the red, green, and blue values of the
pixel at column 200, row 100. Notice that the
order of indexing is the same as that which is
provided by the pixval on command. This is
opposite to the row, column order for matrix
indexing. This command also applies to
greyscale images:
>> impixel(g,100,200)
• will return three values, but since g is a single
two-dimensional matrix, all three values will be
the same.
>> imfinfo('flowers.tif‘)
File Conversion
Data types and conversions
• Elements in Matlab matrices may have a
number of diferent numeric data types; the
most common are listed in table
Image Attributes
• The imshow function, and how spatial
resolution and quantization can affect the
display and appearance of an image
• How image quality may be affected by
various image attributes.
• Human vision in general, images are
preferred to be sharp and detailed.
• The two properties of an image: its spatial
resolution, and its quantization.
imshow function
• Mention that if x is a matrix of type uint8, then the
command imshow(x) will display x as an image,
type uint8 values to be integers between 0 and
255
• Actually not all image matrices come so nicely
bundled up into this data type, and lots of Matlab
image processing commands produces output
matrices which are of type double.
• imshow will display a matrix of type double as a
greyscale image as long as the matrix elements are
between 0 and 1
Convert image to type double
>> c=imread('caribou.tif');
>> cd=double(c);
>> imshow(c),figure,imshow(cd)
Resolusi Citra
• imshow will display a matrix of type double as
a greyscale image as long as the matrix
elements are between 0 and 1.
• take an image type uint8 and convert it to
type double:
>> c=imread('caribou.tif');
>> cd=double(c);
>> imshow(c),figure,imshow(cd)
double
uint8
Konsep Dasar Operasi