Professional Documents
Culture Documents
=
) 1 , 1 ( .... ) 1 , 1 ( ) 0 , 1 (
.. ..
) 1 , 1 ( .... ) 1 , 1 ( ) 0 , 1 (
) 1 , 0 ( .... ) 1 , 0 ( ) 0 , 0 (
) , (
N M f M f M f
N f f f
N f f f
y x f
Each el ement of t hi s ar ray i s cal l ed and i mage el ement , pi ct ur e el ement , pi xel or pel .
A M ATLAB i mage can be r epr esent ed as a M ATLAB mat r i x:
(
(
(
(
=
) , ( .... ) 2 , ( ) 1 , (
.. ..
) 1 , 1 ( .... ) 1 , 1 ( ) 1 , 2 (
) , 1 ( .... ) 2 , 1 ( ) 1 , 1 (
) , (
N M f M f M f
N f f f
N f f f
y x f
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Bi nar y Image
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Image Pr ocessi ng Commands
Reading I mages
Images ar e r ead i nt o t he M ATLAB envi r onment usi ng f unct i on i mr ead, whose
synt ax i s
I mread( f ilename)
Her e, f i l ename i s a st r i ng cont ai ni ng t he compl et e name of t he i mage f i l e
(i ncl udi ng any appl i cabl e ext ensi on). For exampl e, t he command l i ne
>> f = imread ( f low er. jpg) ;
Reads t he JPEG i mage f l ower i nt o i mage ar ray f. The semi col on at t he end of
a command l i ne i s used by M ATLAB f or suppr essi ng out put . If a semi col on i s
not i ncl uded, M ATLAB di spl ays t he r esul t s of t he oper at i on(s) speci f i ed i n t hat
l i ne. Fi l e must be l ocat ed i n t he cur r ent di r ect or y or i n t he M ATLAB sear ch
pat h.
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Displaying I mages
>> imshow ( f )
>> imshow ( f low er. jpg)
Thi s command di spl ays t he i mage st or ed i n t he graphi cs f i l e. The f i l e must
cont ai n an i mage t hat can be r ead by i mr ead. The f i l e must be i n t he cur r ent
di r ect or y or on t he M ATLAB pat h.
>> w hos f
Name Si ze Byt es Cl ass At t r i but es
f 350x350x3 367500 ui nt 8
whos f ext ract basi c i nf or mat i on about t he i mage, and di spl ay i t .
Image Pr ocessi ng Commands
Writ ing I mages
Images ar e wr i t t en t o di sk usi ng f unct i on i mwr i t e, whi ch has t he f ol l owi ng
basi c synt ax:
imw rit e ( f, f ilename)
e. g. imw rit e( f, f low er1. png)
Her e, t he above command wr i t es f t o a png f i l e named f l ower 1.
If f i l ename cont ai ns no pat h i nf or mat i on , t hen i mwr i t e saves t he f i l e i n t he
cur r ent wor ki ng di r ect or y. M ost of t he wor k deal s wi t h JPEG or TIFF
i mages, so we f ocus at t ent i on her e on t hese t wo f or mat s.
Image Pr ocessi ng Commands
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
I mage compression
A mor e general i mwr i t e synt ax appl i cabl e onl y t o JPEG i mages i s
>> imw rit e ( f, f ilename, qualit y, q)
Wher e q i s an i nt eger bet ween 0 and 100 (t he l ower t he number t he hi gher
t he degradat i on due t o JPEG compr essi on).
In or der t o r educe st orage and t ransmi ssi on t i me, i t i s i mpor t ant t hat t he
i mages be compr essed as much as possi bl e whi l e not degradi ng t hei r
vi sual appearance beyond a r easonabl e l evel . In t hi s case r easonabl e
means no per cept i bl e f al se cont our i ng.
Image Pr ocessi ng Commands
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Compr essi on
f l ower.j pg (184kb)
f l ower 50.j pg ( 20 kb)
i mwr i t e(f, f l ower 50.j pg , qual i t y , 50)
f l ower 30.j pg ( 16 kb)
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Funct i ons
The f unct i on def i ni t i on l i ne has t he f or m:
Funct i on[ out put s] = name (i nput s)
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Pr oposed Pr oj ect s of Image Pr ocessi ng
Any obj ect shape & col or det ect i on.
To j udge si ze, shape & or i ent at i on of an obj ect .
Aut omat i c at t endance syst em usi ng i mage pr ocessi ng (f ace
r ecogni t i on).
Traf f i c l i ght cont r ol l er usi ng i mage pr ocessi ng (based upon no. of
vehi cl es on t he r oad).
M easur e t he di st ance of obj ect s f r om camera (obst acl e avoi dance).
Si gnat ur e r ecogni t i on.
Saf et y al ar m f or a dr i ver i n dr owsi ness condi t i on(based on eye
bl i nki ng rat e).
Secur i t y syst em.
Obj ect Tracki ng
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Obj ect Tracki ng
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Lane Depar t ur e Syst em
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
Car Tracki ng
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com
For f ur t her quer i es you can mai l me at -
ashut osh.r et hym@gmai l .com
Or cal l at - 9999645463
Prepared by : Ashut osh K. Agar wal
ashut osh.ret hym@gmai l .com