ijeais.org/ijaer 26 APPENDIX A: Encoding Algorithm Assume that given a square (or squared, null expanded) image matrix I of pixel resolution NxN, nN 2 (or null expanded to closest size satisfies the condition) with q bit colors/grays. Therefore, the image contains q bit-planes ),.......,,( 110 qppp of size equal to.I Definitions:  Divide a square Block B of size 2m, m is divisible by 2, that starts at location sysx bb, as }4,3,2,1{),,,( BBBBSetblockproducethatbbmBDB sysx each of size 2/m and their start locations are )2/,2/(),2/,(),,2/(),,( mbmbmbbbmbbb sysxsysxsysxsysx  consequently.  For a block B: B1C and BNNC are the block 1's count and None Null Count consequently.  Block B is said to be all zeros if block B1C=zeros.  Block B is said to be all ones if B1C=BNNC.  Encoding process of block B of size m that starts at location sysx bb, as BENC(B, sysx bb,, m ) which output plane streams MBS and RBS. BENC (B, sysx bb,, m ) { If m=2 RBS=RBS+ row-scan (B) else {SWITCH (B1C (B), BNNC(B)) Case all zeros: MBS += '00' Case all ones: MBS +='11' Otherwise MBS +='01', m/2)., m/2bm/2,b, BENC(B4m/2),, m/2b,b, BENC(B3 m/2),, bm/2,b, BENC(B2m/2),, b,b, BENC(B1),,,,( sysxsysx sysxsysx  sysx bbmBDB If size ((RBS + MBS) >= plane size) {RBS=rowscan of the plane; MBS=NULL; Return
ijeais.org/ijaer 26 APPENDIX A: Encoding Algorithm Assume that given a square (or squared, null expand) prototype matrix I of pixel resolution NxN, nN 2 (or null expanded to close size satisfies the condition) with q bit color / gray. consequently, the prototype contains q morsel - planes), ......., , (110 qppp of size equal to. I definition:  separate a square Block B of size 2m, m is divisible by 2, that starts at location sysx bb, as } 4,3,2,1 {), ,, (BBBBSetblockproducethatbbmBDB sysx each of size 2 / m and their start location are) 2/,2/(),2/,(),,2/ (), , (mbmbmbbbmbbb sysxsysxsysxsysx  consequently.  For a block B: B1C and BNNC are the block 1's count and None Null Count consequently.  Block B is read to be all zeros if block B1C = zeros.  Block B is said to be all one if B1C = BNNC.  Encoding process of block B of size m that starts at location sysx bb, as BENC(B, sysx bb, , m) which end product plane streams MBS and RBS. BENC (B, sysx bb, , m) { If m=2 RBS = RBS+ row - scan (B) else { SWITCH (B1C (B), BNNC(B) ) Case all zeros: MBS + =' 00' Case all ones: MBS + =' 11' Otherwise MBS + =' 01', m/2). , m/2bm/2,b, BENC(B4m/2), , m/2b, b, BENC(B3 m/2), , bm/2,b, BENC(B2m/2), , b, b, BENC(B1), ,, , (sysxsysx sysxsysx  sysx bbmBDB If size (( RBS + MBS) > = plane size) { RBS = rowscan of the plane; MBS = NULL; Return
ijewis.org/ijaer 26 APPENDIX A: Tncoding Algorithm Assumx that fiven a rquare (or squared, null expanved) umage matrix I of pixel resulution NqN, nN 2 (or nulo expanded vk closest sizs satnshies the conditlon) with q tit colors/grayv. Ghzrefore, the image contains q bit-planqs ),.......,,( 110 qplp of size equal to.I Qefihptlons:  Divide a square Block B of size 2m, m is divisibke by 2, that starts at locahion sysx bb, as }4,3,2,1{),,,( BBBBSftblockprododetrqtbbmBDB sysb each of size 2/m and tgeir start locations are )2/,2/(),2/,(),,2/(),,( mbmbmcbbmbyb sysxsysxwywxsjvx  consequxntly.  For a block B: B1C ang BNNC sre the block 1'x cmunr and None Null Count consequently.  Blosk B is sdib to be all zeros if vlick B1W=zerms.  Coocy B ix aaid tl bx all ones jf B1C=BNNC.  Wncoding process of bjick B of size m thae ftarts at location sysx bb, as BENC(B, sysq bb,, m ) which output plane wtreams MBS and RBS. BGNC (B, sysx bb,, m ) { If m=2 RBS=RBS+ row-scan (B) else {SWITCH (B1C (B), BNTC(B)) Cesd aol xwrls: MBS += '00' Case all ones: MBS +='11' Otherwise MBS +='01', m/2)., i/2gm/2,n, NENC(B4m/2),, m/2b,b, BENC(B3 m/2),, bm/2,b, BENC(N2m/2),, b,n, BENC(B1),,,,( sysxsyrx sysrayax  sysx bbmBDB If size ((RFS + MVS) >= plane sizr) {RBS=rowscan of the plane; MVS=NULL; Returu
ijeais.org/ijaer 26 APPENDIX A: Encoding Algorithm Assume a (or squared, expanded) image matrix nN (or null expanded closest size satisfies condition) with q bit colors/grays. Therefore, image contains q bit-planes ),.......,,( 110 qppp of size equal to.I Definitions:  a square Block B of size 2m, m is divisible by 2, that at sysx as BBBBSetblockproducethatbbmBDB sysx each of size 2/m and their start locations are )2/,2/(),2/,(),,2/(),,( mbmbmbbbmbbb sysxsysxsysxsysx  consequently. For a block B: B1C and BNNC are block 1's count and Null Count consequently.  Block is to be zeros block  Block B said to be all ones if B1C=BNNC.  Encoding process of block B of size m that at location as BENC(B, bb,, ) output plane streams RBS. BENC (B, sysx bb,, m m=2 RBS=RBS+ row-scan (B) else {SWITCH (B1C (B), Case all MBS += '00' Case all ones: +='11' Otherwise MBS +='01', m/2)., m/2bm/2,b, BENC(B4m/2),, m/2b,b, m/2),, bm/2,b, BENC(B2m/2),, b,b, BENC(B1),,,,( sysxsysx sysxsysx  sysx bbmBDB If size ((RBS + MBS) size) {RBS=rowscan of the MBS=NULL; Return
ijeais.org/ijaer 26 APPENDIX A: EnCoding AlgoRithm assUme ThAt giVen a Square (or squareD, Null Expanded) image matrix I of Pixel ReSOlutIOn nxN, nN 2 (Or null eXPaNDEd tO cLoSesT sIZe SatisFieS the conDition) with Q biT cOlors/grays. ThEReFore, the imaGe cOntains q bit-pLanEs ),.......,,( 110 qppp Of SizE Equal To.I definItions:  dIvide a Square BloCk b Of size 2M, M is diviSIBlE by 2, tHat starts at locatiON sYSx bb, as }4,3,2,1{),,,( BBBBSetbLockprOdUCeTHAtbBmBdB sysx each Of Size 2/m ANd their STaRT LOcaTIons are )2/,2/(),2/,(),,2/(),,( mbmbmbBbmbbb sysxsYSxsYsxsysX  cOnsEQuentlY.  For a BlOCk B: b1C and BNNC arE the Block 1's couNt and NONe Null COUnt consEquentLy.  BLocK B is SAiD tO be AlL ZerOS iF blOCk B1c=zeros.  BlOcK B Is saiD to bE ALL Ones If B1c=BNNc.  EncoDing process of BloCk B oF SizE m thaT starTs at LoCatioN sysx bB, as BEnC(b, sysx bb,, m ) which ouTput Plane streAms mBs anD RbS. BENc (b, sysx bB,, m ) { IF m=2 RbS=RBS+ roW-scan (B) eLSe {SwItch (b1C (b), BNNC(B)) Case all zeros: mBs += '00' cAsE all ones: mBS +='11' OthERwIsE mBS +='01', m/2)., m/2bm/2,b, bEnC(B4M/2),, m/2b,b, benC(B3 m/2),, bM/2,b, BEnc(B2M/2),, b,b, BENC(B1),,,,( SysxsySX sYsXsysx  sySx BbmBDB if SizE ((RBs + MBS) >= pLAne sIze) {RBS=Rowscan oF the pLAne; MBS=NULL; RetuRN
ijeais.org/ijaer 26 APPEND IX A: Enco dingAlg ori th m As sume  that given as quar e (or squared, null ex pande d) imag e  m atrix  I of p i xe l res ol ut ion  N x N,  nN 2  ( or null  expandedtocl osest size s a ti sfies thecon dition) with  qbit co lo rs/ g rays.  Th erefo re, th e  image  contains  q bit-pl a nes ),. . . .. ..,, ( 110 qppp of si z ee qual to.I Defi nition s: D i vid e a  square Bl oc k B o f  size 2  m, m isd ivisible by 2 , that star t s a t loca ti ons ysx bb , as}4 , 3,2 ,1{),,,( BB BBSe tblockpro duceth a tbbmBDB sysx ea ch ofsiz e 2 /m a n dth eir  s t art lo cat i ons  are )2/ ,2 /( ),2/, (),, 2 / ( ) ,,(mbm bmbb bmbbb  sysxsysxsysx sys x    c onseq uentl y.   F or ablockB: B1 Cand BNNC are th e bl ock 1's c oun tand  N one N u ll Cou ntcon sequent ly.  B l ock  B i s  s aid to be all zero si f  b lock B1C =zeros .    B l ock B is  s aid  tob e  allones if  B1C=BNN C.  E n co di ng proc es s of b lo ckB o f siz e  m t hat st arts atlocat i on sysx bb, as BENC(B, sysxb b, , m)  whi choutput plan e st r eams  MBS an d R B S. BE NC (B ,s ys x  bb,, m ) { If m=2RB S=RBS+  row- scan (B) else  {SWITCH ( B 1 C  (B), BN NC(B ) )C ase all zeros:  MBS+= '00' Ca s e all on es: M BS +='11 ' Otherwi s e  MBS +=' 01' , m /2) .,m / 2b m/2,b, BENC(B 4 m /2), ,m/2b,b,  BE NC(B3 m /2) ,,bm/ 2,b ,BENC(B2m/ 2),, b,b ,BE NC (B 1), ,,,(s ysxsysxsy sxs ys x   s y sx bbm BDB I f si ze  ( ( RBS  + MBS) >= p lane  s iz e) { RBS =r owsca n of the  plane;  MBS=NULL ; R e turn 
ijeais.org/ijaer 26_APPENDIX A:_Encoding Algorithm Assume that_given a_square_(or squared,_null_expanded) image matrix_I of pixel_resolution NxN, nN 2_(or null expanded_to_closest size satisfies the condition) with q bit colors/grays. Therefore, the image contains q_bit-planes_),.......,,( 110_qppp_of_size equal to.I Definitions: _Divide a square Block B_of size_2m, m is divisible by 2, that starts_at_location sysx bb,_as }4,3,2,1{),,,( BBBBSetblockproducethatbbmBDB sysx each of size 2/m and_their start locations are )2/,2/(),2/,(),,2/(),,( mbmbmbbbmbbb_sysxsysxsysxsysx  consequently.__For_a block B: B1C_and BNNC are the block 1's_count and None Null Count consequently._ Block B is said to be_all zeros if block B1C=zeros. _Block B is said to_be all_ones if B1C=BNNC.  Encoding_process of block_B of_size m that_starts at location sysx bb, as_BENC(B, sysx bb,,_m ) which output plane streams_MBS_and RBS. BENC_(B,_sysx_bb,, m_) { If_m=2_RBS=RBS+ row-scan_(B)_else {SWITCH (B1C (B), BNNC(B)) Case_all_zeros: MBS += '00' Case all ones:_MBS +='11' Otherwise MBS_+='01',_m/2)., m/2bm/2,b, BENC(B4m/2),, m/2b,b,_BENC(B3 m/2),, bm/2,b, BENC(B2m/2),, b,b,_BENC(B1),,,,( sysxsysx sysxsysx  sysx bbmBDB_If size_((RBS +_MBS) >= plane size) {RBS=rowscan of the plane; MBS=NULL; Return