The detected edges are displayed by combining the horizontal and vertical edges "(1) ." This paper proposes a hardware architecture of Prewitt edge detection. The input image is limited to 8-bit grayscale and a frame size of 256 x 256 pixels. Moving window is limited to 3 x 3 masks. The architecture is targeted for AItera FPGA using Quartus II and is capable of operating with a clock frequency of 145 MHz at 550 frames per second (fps). Verification is through synthesis only with parameters obtained from simulation on Matlab. By using the combination of both MatIab and Veri log, it can be easily import and export data to the designed hardware implementation to read and display images.
II. RELATED WORKS Alzahrani and Chen [2] proposed a pipeline architecture which is capable of producing one edge detected pixel for every clock cycle with maximum clock frequency of 10 MHz. The architecture is operational for real time edge detection application. Shen et al. [3] presented a software implementation of Perwitt edge detection technique by using convolution operation. The scheme is capable of performing on compressed images and videos that can be used in variety of image processing application for instance motion estimation and comer detection. Pel-Yung [4] proposed the systolic array architecture with scalable first in, first out (FIFO) design to perform the effect of edge detection on five images with different size. It is capable to produce 73.6 MHz frequency with video rate 280 fps. Abbasi et al [5] proposed a real time architecture for Perwitt edge detection by conducting pipelining technique. The architecture executed faster than the software designed version by C or C++ languages.
III. THE PROPOSED HARDWARE ARCHITECTURE OF PREWITT EDGE DETECTION The proposed architecture is divided into two parts, the data path unit (DU) and the control unit (CU). Fig. 2 displays the top-level view of the proposed hardware architecture for Prewitt edge detection. A 64 K bytes external memory device is used to store the image pixel values. First, MatIab software read the raw image pixels and stores it into a memory initialization file (mit). Fig. 3 shows the architecture design of the memory pointer unit (MPU), extemal memory and delay line.
99
Fig. 2. Functional Block Diagram (FBO) of edge detection.
The duty of memory pointer unit (MPU) is to generate the 16 bits address for reading the raw pixels from the memory. For 256 x 256 image size and 3 x 3 mask, for instance, the first traversed window would have pixels as the windows elements shows in matrix "(2)."
(2)
In the proposed architecture, each pixel is identified as a combination of the column and the row address which is calculated by (3)."
Pixeladdress = Columnaddress x 256 + Rowaddres (3)
The column address produced by three 8 bit counters called: counterl, counter2 and counter3 which consist of the 8 high bit address. The 8 low bit address or row address generates by counterO. The performance of MPU is determined by the generation of these three addresses for loading pixels. In each processing step, the address multiplexor is used to select the column counter address. Then the column and row addresses are combined to prod � ce the 16-bit address for the memory. The 8-bit raw image pixel from memory unit related is loaded to the delay line. When three rows in buffer units are completely filled, the read enable bit is triggered by CU which starts the processing of pixel values.
f.:··············································1 .: �! �o::.·Pci!:.:� t.'tit . IPT..) � Co.nl � � ::: i
fnmct:
.
. .................................................
Data out
Addre:ss
External �lemo�'
Fig. 4 displays the structure of buffer unit, moving window and arithmetic unit (AU). The row pixels from the memory unit are mapped into different registers in the buffer unit to organize as one column by a multiplexor. The constructed column move forward and shifts into the moving window. The moving window acts as a FIFO. All pixels from moving widow are loaded in the AU. In AU the horizontal and vertical component of the values are calculated. The AU consisting of two's complements units and adders to calculate the vertical and horizontal edges. The values are computed in parallel units to achieve the higher speed.
........1 1 ...................................................................................... , $1 s: _ .... _ $9
Output
Fig. 4. The internal structure of the moving window and AU.
Fig. 5 shows the CU which is a finite state mach . ine (FSM) used to determine the sequence of data processmg operations performed by the DU. CU issues are to generate control signals which produce sequences in a specific order. CU contains of four states during the first to third states it generates the control signals needed for reading new raw image pixels from memory and loading into corresponding registers. The final state controls signals activate AU to perform mathematical calculation. When moving window reaches at the end of any rows, before loading new values, CU should reset all registers in the moving window to avoid output error and set the control signals to load the new column of data.
cu
elk
Fig. 5. The input output block diagram (lOBO) of CU.
IV. RESULTS AND ANALYSIS Verilog and Matlab simulation are particularly useful because it reveals the comparisons between hardware and software. Fig. 6 shows the outputs of both Veri log and Matlab implementations. The comparison between Matlab and Veri log results revealed that there is no computational Fig. 3. Memory pointer unit with external memory and delay line. error.
The detected edges are displayed by combining the horizontal and vertical edges "(1) ." This paper proposes a hardware architecture of Prewitt edge detection. The input image is limited to 8-bit grayscale and a frame size of 256 x 256 pixels. Moving window is limited to 3 x 3 masks. The architecture is targeted for AItera FPGA using Quartus II and is capable of operating with a clock frequency of 145 MHz at 550 frames per second (fps). Verification is through synthesis only with parameters obtained from simulation on Matlab. By using the combination of both MatIab and Veri log, it can be easily import and export data to the designed hardware implementation to read and display images.
II. RELATED WORKS Alzahrani and Chen [2] proposed a pipeline architecture which is capable of producing one edge detected pixel for every clock cycle with maximum clock frequency of 10 MHz. The architecture is operational for real time edge detection application. Shen et al. [3] presented a software implementation of Perwitt edge detection technique by using convolution operation. The scheme is capable of performing on compressed images and videos that can be used in variety of image processing application for instance motion estimation and comer detection. Pel-Yung [4] proposed the systolic array architecture with scalable first in, first out (FIFO) design to perform the effect of edge detection on five images with different size. It is capable to produce 73.6 MHz frequency with video rate 280 fps. Abbasi et al [5] proposed a real time architecture for Perwitt edge detection by conducting pipelining technique. The architecture executed faster than the software designed version by C or C++ languages.
III. THE PROPOSED HARDWARE ARCHITECTURE OF PREWITT EDGE DETECTION The proposed architecture is divided into two parts, the data path unit (DU) and the control unit (CU). Fig. 2 displays the top-level view of the proposed hardware architecture for Prewitt edge detection. A 64 K bytes external memory device is used to store the image pixel values. First, MatIab software read the raw image pixels and stores it into a memory initialization file (mit). Fig. 3 shows the architecture design of the memory pointer unit (MPU), extemal memory and delay line.
99
Fig. 2. Functional Block Diagram (FBO) of edge detection.
The duty of memory pointer unit (MPU) is to generate the 16 bits address for reading the raw pixels from the memory. For 256 x 256 image size and 3 x 3 mask, for instance, the first traversed window would have pixels as the windows elements shows in matrix "(2)."
(2)
In the proposed architecture, each pixel is identified as a combination of the column and the row address which is calculated by (3)."
Pixeladdress = Columnaddress x 256 + Rowaddres (3)
The column address produced by three 8 bit counters called: counterl, counter2 and counter3 which consist of the 8 high bit address. The 8 low bit address or row address generates by counterO. The performance of MPU is determined by the generation of these three addresses for loading pixels. In each processing step, the address multiplexor is used to select the column counter address. Then the column and row addresses are combined to prod � ce the 16-bit address for the memory. The 8-bit raw image pixel from memory unit related is loaded to the delay line. When three rows in buffer units are completely filled, the read enable bit is triggered by CU which starts the processing of pixel values.
f.:··············································1 .: �! �o::.·Pci!:.:� t.'tit . IPT..) � Co.nl � � ::: i
fnmct:
.
. .................................................
Data out
Addre:ss
External �lemo�'
Fig. 4 displays the structure of buffer unit, moving window and arithmetic unit (AU). The row pixels from the memory unit are mapped into different registers in the buffer unit to organize as one column by a multiplexor. The constructed column move forward and shifts into the moving window. The moving window acts as a FIFO. All pixels from moving widow are loaded in the AU. In AU the horizontal and vertical component of the values are calculated. The AU consisting of two's complements units and adders to calculate the vertical and horizontal edges. The values are computed in parallel units to achieve the higher speed.
........1 1 ...................................................................................... , $1 s: _ .... _ $9
Output
Fig. 4. The internal structure of the moving window and AU.
Fig. 5 shows the CU which is a finite state mach . ine (FSM) used to determine the sequence of data processmg operations performed by the DU. CU issues are to generate control signals which produce sequences in a specific order. CU contains of four states during the first to third states it generates the control signals needed for reading new raw image pixels from memory and loading into corresponding registers. The final state controls signals activate AU to perform mathematical calculation. When moving window reaches at the end of any rows, before loading new values, CU should reset all registers in the moving window to avoid output error and set the control signals to load the new column of data.
cu
elk
Fig. 5. The input output block diagram (lOBO) of CU.
IV. RESULTS AND ANALYSIS Verilog and Matlab simulation are particularly useful because it reveals the comparisons between hardware and software. Fig. 6 shows the outputs of both Veri log and Matlab implementations. The comparison between Matlab and Veri log results revealed that there is no computational Fig. 3. Memory pointer unit with external memory and delay line. error.
การแปล กรุณารอสักครู่..
![](//thimg.ilovetranslation.com/pic/loading_3.gif?v=b9814dd30c1d7c59_8619)