Python Programming for Biology: Bioinformatics and Beyond



Download 7,75 Mb.
Pdf ko'rish
bet270/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   266   267   268   269   270   271   272   273   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

Image manipulation

Much of what is covered in this chapter is about manipulation of pixmaps. Naturally when

making  changes  we  have  to  be  mindful  of  biasing  the  scientific  investigation.  It  is

important to be objective so that we show what is actually there, not just what we expect

or what looks pretty. Of course this is not different in principle to any other scientific data,

but it is often very easy to manipulate an image and forget to keep the original data. Hence

we  encourage  keeping  the  original  data  in  important  situations.  This  also  allows  the



development of better analytic methods in the future.

Sometimes when manipulating images we will be working with the pixel data directly

in  numeric  Python.  However,  such  low-level  coding  is  not  always  required.  When

performing common operations on an image, such as adjusting contrast or colour balance,

we can make good use of existing high-level graphics libraries that work with Python such

as the Python Imaging Library

1

(PIL) and the Python wrapper to Imagemagick.



2

Although

these  libraries  are  both  worth  considering  we  will  focus  mainly  on  PIL  in  this  chapter.

Generally we will use PIL for high-level functions, especially the ability to display, load

and save images, and then use numeric Python for the detailed work. However, for some

operations  we  will  illustrate  using  both  PIL  and  numeric  Python  and  leave  it  up  to  the

reader to choose which is most convenient or useful.


Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   266   267   268   269   270   271   272   273   ...   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