100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Samenvatting

Introductie Medische Beeldbewerking Samenvatting H4-8

Beoordeling
-
Verkocht
4
Pagina's
25
Geüpload op
05-10-2018
Geschreven in
2017/2018

Dit is een samenvatting voor het vak "Introductie Medische Beeldwerking" in de minor "Biomedische Beeldvorming" aan de VU. Een samenvatting van de hoofdstukken 4 t/m 8 van het boek Introduction to Digital Image Processing with MATLAB® (door McAndrew, A.). Hierin zijn ook de bijbehorende college's van het vak verwerkt in de tekst.

Meer zien Lees minder










Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Documentinformatie

Heel boek samengevat?
Nee
Wat is er van het boek samengevat?
H 4 t/m 8
Geüpload op
5 oktober 2018
Aantal pagina's
25
Geschreven in
2017/2018
Type
Samenvatting

Voorbeeld van de inhoud

Chapter 4 Point Processing

4.1 Introduction
Any image-processing operation transforms the gray values of the pixels. Image-processing
operations can be divided into three classes based on the information required to perform the
transformation. From the most complex to the simplest, they are as follows:
1. Transforms. A transform represents the
pixel values in some other equivalent form.
Transforms allow for some very efficient
and powerful algorithms.
2. Neighborhood processing. To change the
gray level of a given pixel we only need to
know the value of the gray levels in a small
neighborhood of pixels around the given
pixel.
3. Point operations. A pixel’s gray value is
changed without any knowledge of its
surroundings.
Although point operations are the simplest, they contain some of the most powerful and
widely used image processing operations. They are especially useful in image pre-processing,
where an image is required to be modified before the main job is attempted.

4.2 Arithmetic Operations
Arithmetic operations act by applying a simple function 𝑦 = 𝑓(𝑥) to each gray value in the
image. Thus 𝑓(𝑥) is a function which maps the range 0 … 255 onto itself. Simple functions
include adding or subtracting a constant value to each pixel or multiplying each pixel by a
constant.

In each case we may have to fiddle the output slightly in order to ensure that the results are
integers in the 0 … 255 range. We can do this by first rounding the result to obtain an integer,
and then clipping the values by setting:
255 𝑖𝑓 𝑦 > 255,
𝑦←{
0 𝑖𝑓 𝑦 < 0.

Figure 2.2 shows the result of adding or
substracting 128 from each pixel in the
image. When we add 128, all gray values
of 127 or greater will be mapped to 255.
When we substract 128, all gray values of
127 or less will be mapped to 0. Adding a
constant will lighten an image and
substracting a constant will darken it.

Arithmetic operations can’t be performed
on unit8 data type, because this type is only used for data storage. So, first we need to turn the
matrix of type unit8 into a matrix of type double. We can transform the matrix in and out of
double or use the imadd or imsubtract function to add or subtract a value.

,b1 = uint8(double(b)+128);
b1 = imadd(b,128);

We can also perform lightening or darkening of an image by multiplication. To implement
these functions we use the immultiply or imdivide function.
If we compare darkening by subtraction and multiplication we see a lot of information has
been lost by the subtraction process. This is because with subtraction all pixels with gray
values 128 or less have become zero. A similar loss of information also occurs with addition.

Complement
The complement of a grayscale image is its photographic negative.
If an image matrix m is of type double and thus its gray values are in the range 0.0 to 1.0, we
can obtain its negative with the command: 1-m.
If the image is binary, we can use: ~m.
If the image is of type uint8, the best approach is the imcomplement function:
bc = imcomplement(b);.

Special effects can be obtained by complementing only part of the image. For example, by
taking the complement of pixels of gray value 128 or less and leaving the other pixels
untouched. The effect of these functions is called solarization.

4.3 Histograms
Given a grayscale image, its histogram consists of its gray levels; that is, it is a graph
indicating the number of times each gray level occurs in the image.
• In a dark image, the gray levels are clustered at the lower end.
• In a uniformly bright image, the gray levels are clustered at the upper end.
• In a well-contrasted image, the gray levels are well spread out over much of the range.

We can view the histogram of an image in MATLAB by using the imhist function,
p = imread(‘pout.tif’);
imshow(p), figure, imhist(p), axis tight
where the axis tight command ensures the axes are scaled so that all the histogram bars fit
entirely within the figure.

Given a poorly contrasted image, we would like to enhance its contrast by spreading out its
histogram. There are two ways of doing this: histogram stretching or histogram equalization.

4.3.1 Histogram Stretching (Contrast Stretching)
We can stretch out gray levels in the center of the range by applying a piecewise linear
function. An example is given in Figure 2.9 which has the effect of stretching the gray levels
5-9 to gray levels 2-14, according to equation,
14 − 2
𝑗= (𝑖 − 5) + 2
9−5
where i is the original gray level and j is its result after the transformation. Or basically:
𝑏𝑖+1 − 𝑏𝑖
𝑦= (𝑥 − 𝑎𝑖 ) + 𝑏𝑖
𝑎𝑖+1 − 𝑎𝑖
where a indicates the range of gray levels that need to be stretched to a range of gray levels b.

, Gray levels outside this range are either left alone (as in this case) or transformed according to
the linear functions at the ends. This yields an image with greater contrast than the original.




Use of imadjust
To perform histogram stretching in MATLAB, the imadjust
function may be used. In its simplest incarnation, the
command imadjust(im,[a,b],[c,d])stretches the image
according to the function shown in Figure 2.10. Because
imadjust is designed to work equally well on images of type
double, uint8, or uint16, the values a, b, c and d must be
between 0 and 1. The function automatically converts the
image (if needed) to be of type double.

Note that imadjust does not work quite in the same way as shown in Figure 2.10. Pixel values
less than a are all converted to c, and pixel values greater than b are all converted to d. If
either [a,b]or[c,d] are chosen to be [0,1], the abbreviation[]may be used. Thus, for
example, the command imadjust(im,[],[])does nothing, and the command
imadjust(im,[],[1,0])inverts the gray values of the image to produce a result similar to
a photographic negative.

The imadjust function has one other optional parameter: the gamma value, which describes
the shape of the function between coordinates (𝑎, 𝑐) and (𝑏, 𝑑). Use of the gamma value alone
can be enough to substantially change the appearance of the image. If gamma is equal to 1,
which is the default, then a linear mapping is used. However, values less than 1 produce a
function that is concave downward, and values greater than 1 produce a figure that is concave
upward. The imadjust stretching function can be viewed with the plot function.

A piecewise linear-stretching function
We can easily write our own function to perform piecewise linear stretching. To do this, we
make use of the find function to find the pixel values in the image between ai and ai+1.
Because the line between the coordinates (𝑎𝑖 , 𝑏𝑖 ) and (𝑎𝑖+1 , 𝑏𝑖+1 ) has the equation,
𝑏 −𝑏
𝑦 = 𝑎𝑖+1 −𝑎𝑖 (𝑥 − 𝑎𝑖 ) + 𝑏𝑖 ,
𝑖+1 𝑖
the heart of our function will be the lines:
pix = find(im >= a(i) & im < a(i+1));
out(pix) = (im(pix)-a(i))*(b(i+1)-b(i))/(a(i+1)-a(i)+b(i);
€3,49
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
sle8 Vrije Universiteit Amsterdam
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
97
Lid sinds
7 jaar
Aantal volgers
73
Documenten
35
Laatst verkocht
2 maanden geleden

3,9

20 beoordelingen

5
6
4
8
3
4
2
2
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen