Python Programming for Biology: Bioinformatics and Beyond


Figure 18.4.  Example results from common image-processing operations



Download 7,75 Mb.
Pdf ko'rish
bet277/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   273   274   275   276   277   278   279   280   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

Figure 18.4.  Example results from common image-processing operations. An

original microscope image of mammalian cells is shown alongside five adjusted versions

created with image-processing routines presented here. The gamma adjustment used a

factor of 4.0. The blurred, sharpened and edge-detected images were generated by matrix

convolution. The intensity clipping set the lightest pixels to mid-grey and then normalised

the intensities to the full black-white range.

If  we  want  to  perform  a  different  kind  of  adjustment  we  need  to  make  a  different

processing object. The next example is for image sharpness (changing the local contrast at

the edges within an image), where we can make things sharper with a value greater than

one, or more blurred with a value less than one:

processObj = ImageEnhance.Sharpness(img)

img2Sharp = processObj.enhance(4.0)

img2Sharp.show()

imgBlur = processObj.enhance(0.5)

imgBlur.show()



Likewise,  we  can  adjust  brightness  and  overall  colourfulness,  noting  that  in  the  next

examples  we  use  the  method  .enhance()  straight  away,  and  don’t  make  an  explicit

processing  object;  the  object  is  still  made  after  .Brightness(img),  but  it  is  not  given  a

named variable.

imgBrighter = ImageEnhance.Brightness(img).enhance(0.5)

imgDull = ImageEnhance.Color(img).enhance(0.1)




Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   273   274   275   276   277   278   279   280   ...   514




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish