Project Name: erosion.dpj Project Type: ADSP-BF533 [X] ADSP-BF537 [ ] ADSP-BF561 [ ] Hardware Used: ADSP-BF533 EZ-Kit VisualDSP++ Emulator System Services Components Used: None OVERVIEW ======== The erosion function performs erosion on the input binary image. The structured elements are stored as shown below. | h00 h01 h02 | | h10 h11 h12 | | h20 h21 h22 | If input under consideration is: | x00 x01 x02 | | x10 x11 x12 | | x20 x21 x22 | Then out put Y11 = ((x00&h00) &(x01&h01) & (x02&h02) &(x10&h10) &(x11&h121) & (x12&h12) & (x20 &h20) &(x21&h21) &(x22 &h22)); The values in first row, last row, first column and last column output, are treated as zero. For this function to work properly the number of columns in the input image must be an even number, aligned to a word boundary. The input image must not be stored in the same memory bank with the structured element. Prototype: void _erosion(unsigned char* in, int row, int col, short * mask, unsigned char *out ); Arguments: in -> pointer to the input image. row -> number of rows of input image. col -> number of columns of input image. mask -> pointer 3x3 mask. out -> pointer the output buffer. Registers used : A0, A1, R0-R7, I1, B1, L1, P0-P5, LC0, LC1. P0-P5. RUNNING THE APPLICATION (on the ADSP-BF533 EZ-KIT Lite) ========================================================= 1) Load project "erosion.dpj". 2) Select "Project->Rebuild Project" 3) Select "Debug->Run". 4) Observe output on VisualDSP++ console window. Files in This Application ========================== This example consists of the following files: "./erosion.ldf" - linker description file "./erosion.dpj" - project file "../../src/t_erosion.c" - source file "../../src/erosion.asm" - source file "../../include/erosion.h" - include file "../../../../BFinUtils/ADSP-BF533/SDK-cycle_count.asm" - source file "../../../../Include/SDK-cycle_count.h" - include file