Forum Discussion
Altera_Forum
Honored Contributor
17 years agoGuys,
I will be receiving 8bit of data as input. The very first 8bits will be my R(Red) component, 2nd 8bits my G component and 3rd 8bits my B component. Thus constituting my 1 pixel. Now say if my image size is 255x255. That means I will be receiving 255 Rs, 255 Gs and 255 Bs, thus completing my 1 row. Like wise when 3 rows get completed, I will have to calculate the Average by using 3x3 window. eg. R1_red1 R1_green1 R1_blue1 R1_red2 R1_green2 R1_blue2 R1_red3 .. R2_red1 R2_green1 R2_blue1 R2_red2 R2_green2 R2_blue2 R2_red3 .. R3_red1 R3_green1 R3_blue1 R3_red2 R3_green2 R3_blue2 R3_red3 .. Now, Avg = (R1_red1 + R1_red2 + R1_red3 + R2_red1 + R2_red2 + R2_red3 + R3_red1 + R3_red2 + R3_red3 ) / 9 like wise for green and blue also. now, R2_red2 will be replaced by this Avg. and my this 3x3 window will move right to again calculte for same R1,R2 and R3 rows and for red2, red3 and red4 this time. when complete row is finished (till width of the pic) my 3x3 window will move 1 row down i.e calculation will be performed on R2, R3 and R4. This design I have to make it for Cyclone device and I have a deadline of 2 days.