Tesi Robotica Un co-processore per Stereo-Matching: Architettura | Seite 58

i i “LP_Tesi” — 2011/9/9 — 21:20 — page 58 — #58 i i 58 Algoritmo 4.5 Funzioni 1 2 3 4 5 function Bit#(8) absSub(Bit#(8) first, Bit#(8) second); if(first>=second) return first-second; else return second-first; endfunction 6 7 8 9 10 11 function Bit#(32) max(Bit#(32) northwest, Bit#(32) north, Bit#(32) westo); if(northwest > north && northwest >= westo) return northwest; else if(north >= northwest && north >= westo) return north; else return westo; endfunction Algoritmo 4.6 Regole 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 'V