Research Article

Distributed Image Compression Architecture over Wireless Multimedia Sensor Networks

Algorithm 3

Distributed  image  compression.
 CN  selects  the  highest-energy  SN  in  the  camera  cluster  as  the  image  compression  cluster  head  (ICH)
if  Node  is  ICH  then
if  Node  receives  image  from  the  CN  then
 Select  a  specified  number  of  SNs  that  have  the  highest  energy  
 in  the  image  compression  cluster  as  the  members
if  Has  member  in  image  compression  cluster  and  the  shortcut  tasks  are  
greater  than  its  normal  tasks  then
 ICH  applies  one  level  of  DWT  on  the  image
 ICH  encodes  HH,  HL,  and  LH
 ICH  sends  the  LL  to  nearest  member  node  in  the  image  compression  cluster
Else
 ICH  performs  all  compression  tasks
 ICH  sends  the  compressed  data  to  the  ICH’s  communication  CH
end  if
end  if
if  Compression  tasks  are  finished  then
 ICH  combines  all  compressed  data  and  sends  them  to  the  ICH’s  communication  CH
end  if
else  if  Node  is  member  of  the  image  compression  cluster  then
if  Node  receives  LL  from  another  SN  in  the  image  compression  cluster  then
 Find  the  next-nearest  SN  in  the  image  compression  cluster
if  Has  the  next-nearest  node  in  image  compression  cluster  then
 Node  applies  one  level  of  DWT  on  LL  of  the  previous  level
 Node  encodes  HH,  HL,  and  LH  and  sends  the  compressed  data  to  the  ICH
 Node  sends  the  LL  of  this  level  to  the  nearest   member  node  in  the  image
compression  cluster
Else
 Node  performs  the  remaining  compression  tasks
 Node  sends  the  compressed  data  to  the  ICH
end  If
end  If
end  if