function v = gmean(A)
%GMEAN Geometric mean of columns.
%
V = GMEAN(A) computes the geometric mean of the columns of A.
%
is a row vector with size(A,2) elements.
%
%
Sample M-file used in Chapter 3.
%
%
%
%
%
%
V
Copyright 2002-2009 R. C. Gonzalez, R. E.

function [dir, x0 y0] = boundarydir(x, y, orderout)
%BOUNDARYDIR Determine the direction of a sequence of planar points.
%
[DIR] = BOUNDARYDIR(X, Y) determines the direction of travel of
%
a closed, nonintersecting sequence of planar points with
%
coordin

function [VG, A, PPG]= colorgrad(f, T)
%COLORGRAD Computes the vector gradient of an RGB image.
%
[VG, VA, PPG] = COLORGRAD(F, T) computes the vector gradient, VG,
%
and corresponding angle array, VA, (in radians) of RGB image
%
F. It also computes PPG, t

function g = fuzzyfilt(f)
%FUZZYFILT Fuzzy edge detector.
%
G = FUZZYFILT(F) implements the rule-based fuzzy filter
%
discussed in the "Using Fuzzy Sets for Spatial Filtering"
%
section of Digital Image Processing Using MATLAB/2E. F and G are
%
the input

function mu = bellmf(z, a, b)
%BELLMF Bell-shaped membership function.
%
MU = BELLMF(Z, A, B) computes the bell-shaped fuzzy membership
%
function. Z is the input variable and can be a vector of any
%
length. A and B are scalar shape parameters, ordered s

function rc_new = bound2eight(rc)
%BOUND2EIGHT Convert 4-connected boundary to 8-connected boundary.
%
RC_NEW = BOUND2EIGHT(RC) converts a four-connected boundary to an
%
eight-connected boundary. RC is a P-by-2 matrix, each row of
%
which contains the ro

function H = bandfilter(type, band, M, N, D0, W, n)
%BANDFILTER Computes frequency domain band filters.
%
%
Parameters used in the filter definitions (see Table 4.3 in
%
DIPUM 2e for more details about these parameters):
%
M: Number of rows in the filter.

function [s, sUnit] = bsubsamp(b, gridsep)
%BSUBSAMP Subsample a boundary.
%
[S, SUNIT] = BSUBSAMP(B, GRIDSEP) subsamples the boundary B by
%
assigning each of its points to the grid node to which it is
%
closest. The grid is specified by GRIDSEP, which i

function P = i2percentile(h, I)
%I2PERCENTILE Computes a percentile given an intensity value.
%
P = I2PERCENTILE(H, I) Given an intensity value, I, and a
%
histogram, H, this function computes the percentile, P, that I
%
represents for the population of i

function f = adpmedian(g, Smax)
%ADPMEDIAN Perform adaptive median filtering.
%
F = ADPMEDIAN(G, SMAX) performs adaptive median filtering of
%
image G. The median filter starts at size 3-by-3 and iterates
%
up to size SMAX-by-SMAX. SMAX must be an odd int

function varargout = ice(varargin)
%ICE M-file for ice.fig
%
ICE, by itself, creates a new ICE or raises the existing
%
singleton*.
%
%
H = ICE returns the handle to a new ICE or the handle to
%
the existing singleton*.
%
%
ICE('Property','Value',.) creat

function cp = cornerprocess(c, T, q)
%CORNERPROCESS Processes the output of function cornermetric.
%
CP = CORNERPROCESS(C, T, Q) postprocesses C, the output of
%
function CORNERMETRIC, with the objective of reducing the
%
number of irrelevant corner point

Digital Image Processing
/
[email protected]
/
Two Categories of Image Enhancement
Spatial domain methods
Direct manipulation of pixels in an image
Frequency domain methods
Modifying the Fourier Transform of an image
Objective of Enhancement

Digital Image Processing
Image Enhancement
The objective of image enhancement is to process an
image so that the result is more suitable than the
original image for a specific application.
There are two main approaches:
Image enhancement in spatial d

Digital Image Processing
Fourier Transform: Concept
A signal can be
represented as a weighted
sum of sinusoids.
Fourier Transform is a
change of basis, where the
basis functions consist of
sines and cosines.
[email protected]
Fourier Transform:

Digital Image Processing
[email protected]
Color is a powerful descriptor
Simplify object identification and extraction
from scene.
Humans can discern thousands of color shades
and intensities, compared to about two dozen
shades of gray.

Digital Image Processing
[email protected]
Image Processing : Process images by means
of digital computers
Image : photograph/picture scanned/produced
Digital image : An electronic photograph
made up of a set of picture elements, "pixels"

Digital Image Processing
[email protected]
Segmentation based on Similarity
Thresholding
Thresholding
Global Thresholding
Suppose that an image, f(x,y), is composed of light
objects on a dark background, and the following figu

Digital Image Processing
20071119
Multiresolution Processing
Background
Simple statistical modeling
over the entire image
is impossible
Low resolution
High resolution
Gaussian pyramid
Laplacian pyramid
Image pyramid
A simple structure to represent im

Digital Image Processing
[email protected]
Shift Invariant Linear Systems
What is a system?
A system is anything that accepts an input and
produces an output in response to the input
Traditionally, a system accepts an input sequence
and produc

Digital Image Processing
[email protected]
1.
2.
3.
()()
Preliminaries
Binary Images
Binary image processing
Images only consist of two colors (tones):
white or black
Binary images are com

Digital Image Processing
[email protected]
Hough
Introduction
The aim of segmentation
Divide an image into constituent regions or objects
Partition an image into regions
Two approaches
Detection of Discontinuities
Discontinui

function rc_new = bound2four(rc)
%BOUND2FOUR Convert 8-connected boundary to 4-connected boundary.
%
RC_NEW = BOUND2FOUR(RC) converts an eight-connected boundary to a
%
four-connected boundary. RC is a P-by-2 matrix, each row of
%
which contains the row a

function out = conwaylaws(nhood)
%CONWAYLAWS Applies Conway's genetic laws to a single pixel.
%
OUT = CONWAYLAWS(NHOOD) applies Conway's genetic laws to a single
%
pixel and its 3-by-3 neighborhood, NHOOD.
%
%
%
%
%
%
Copyright 2002-2009 R. C. Gonzalez, R

function image = bound2im(b, M, N)
%BOUND2IM Converts a boundary to an image.
%
IMAGE = BOUND2IM(b) converts b, an np-by-2 array containing the
%
integer coordinates of a boundary, into a binary image with 1s
%
in the locations of the coordinates in b and