A method of computing a two-dimensional function array for an image processing function selected from one of an edge detection, median filter, erode or dilate, the method being executed in reconfigurable hardware and comprising: storing a plurality of data values in a two-dimensional source array comprising cells arranged in rows and columns, the source array being stored in a memory outside the reconfigurable hardware; defining in the reconfigurable hardware a 3x3 two-dimensional window array having rows and columns, the window array comprising a first cell at the third row of the middle column, a second cell at the third row of the first column and a third cell at the third row of the right column, wherein inputting a value into the first, second and third cells effects a movement within the window array of previous values occupying the respective first, second and third cells up the respective columns within the window array, such that the previous values occupying the first, second and third cells are input into cells of the window array above the first, second and third cells; forming in the reconfigurable hardware a first delay queue and a second delay queue, the first delay queue and the second delay queue comprising FIFO buffers and the first and second delay queues having a length equal to the number of rows of the source array; connecting the output of the first delay queue to the input of the second delay queue and to the first cell of the window array wherein inputting a value to the first delay queue results in the output value of the first delay queue being input to the second delay queue and to the first cell of the window array; connecting the output of the second delay queue to the second cell of the window array wherein inputting a value to the second delay queue results in the output value of the second delay queue being input to the second cell of the window array; loading the first delay queue, the second delay queue and the window array with junk values; iteratively reading all the values of the source array column by column, starting from the upper-leftmost corner cell wherein each reading iteration comprises: inputting the value, read from the two-dimensional source array into the first delay queue and into the third cell of the window array; calculating an output value for the function array for one of the edge detection, median filter, erode or dilate image processing functions based on values of the cells of the window array; wherein the calculating comprises determining whether a value is a junk value and wherein the output value is stored in a result array unless it is a junk value. storing a plurality of data values in a two-dimensional source array comprising cells arranged in rows and columns, the source array being stored in a memory outside the reconfigurable hardware; defining in the reconfigurable hardware a 3x3 two-dimensional window array having rows and columns, the window array comprising a first cell at the third row of the middle column, a second cell at the third row of the first column and a third cell at the third row of the right column, wherein inputting a value into the first, second and third cells effects a movement within the window array of previous values occupying the respective first, second and third cells up the respective columns within the window array, such that the previous values occupying the first, second and third cells are input into cells of the window array above the first, second and third cells; forming in the reconfigurable hardware a first delay queue and a second delay queue, the first delay queue and the second delay queue comprising FIFO buffers and the first and second delay queues having a length equal to the number of rows of the source array; connecting the output of the first delay queue to the input of the second delay queue and to the first cell of the window array wherein inputting a value to the first delay queue results in the output value of the first delay queue being input to the second delay queue and to the first cell of the window array; connecting the output of the second delay queue to the second cell of the window array wherein inputting a value to the second delay queue results in the output value of the second delay queue being input to the second cell of the window array; loading the first delay queue, the second delay queue and the window array with junk values; iteratively reading all the values of the source array column by column, starting from the upper-leftmost corner cell wherein each reading iteration comprises: inputting the value, read from the two-dimensional source array into the first delay queue and into the third cell of the window array; calculating an output value for the function array for one of the edge detection, median filter, erode or dilate image processing functions based on values of the cells of the window array; wherein the calculating comprises determining whether a value is a junk value and wherein the output value is stored in a result array unless it is a junk value. inputting the value, read from the two-dimensional source array into the first delay queue and into the third cell of the window array; calculating an output value for the function array for one of the edge detection, median filter, erode or dilate image processing functions based on values of the cells of the window array; wherein the calculating comprises determining whether a value is a junk value and wherein the output value is stored in a result array unless it is a junk value.