Project Name: dilation.dpj Project Group Name: dilation.dpg Project Type: ADSP-BF533 [ ] ADSP-BF537 [ ] ADSP-BF561 [X] Hardware Used: ADSP-BF561 EZ-Kit VisualDSP++ Emulator System Services Components Used: None OVERVIEW ======== A dilate function returns the dilation of an Image by the structuring the structure element. This operation is also commonly known as "fill", "expand", or "grow." It can be used to fill "holes" of a size equal to or smaller than the structure element. This dilation function performs dilation on the binary input image. The structure elements are stored as shown below. | h00 h01 h02 | | h10 h11 h12 | | h20 h21 h22 | If the input under consideration is: | x00 x01 x02 | | x10 x11 x12 | | x20 x21 x22 | Then the output Y11 = ((x00&h00) |(x01&h01) | (x02&h02) |(x10&h10) | (x11&h121) | (x12&h12) | (x20 &h20)|(x21&h21) |(x22 &h22)); Prototype: void _dilation(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. For this example to work properly, the number of columns in the input image must be even and aligned to a word or half word boundary. The input image must not be stored in the same memory bank with the structured elements. Registers used : A0, A1, R0-R3, R6-R7, I1, B1, M0-M3, L1, P0-P5, LC0, LC1. RUNNING THE APPLICATION (on the ADSP-BF561 EZ-KIT Lite) ========================================================= 1) Load project group "dilation.dpg". 2) Select "Project->Rebuild Project" 3) Click OK in the "Load Multiprocessor Confirmation" window to load p0.dxe and p1.dxe. 4) Select "Debug->Multiprocessor Run". 5) Observe output on VisualDSP++ console window. Files in This Application ========================== This example consists of the following files: "./dilation.ldf" - linker description file "./dilation.dpj" - project file "./dilation.dpg" - project group file "corea/corea.dpj" - Core A project file "../../src/t_dilation.c" - Core A source file "../../src/dilation.asm" - Core A source file "../../../../BFinUtils/ADSP-BF561/SDK-cycle_count.asm" - Core A source file "../../include/dilation.h" - Core A include file "../../../../Include/SDK-cycle_count.h" - Core A include file "coreb/coreb.dpj" - Core B project file "../../../../BFinUtils/ADSP-BF561/SDK-coreb_idle.c - Core B source file "sml2/sml2.dpj" - Shared Memory L2 project file "../../../../BFinUtils/ADSP-BF561/SDK-dummy.c - Shared Memory L2 source file "sml3/sml3.dpj" - Shared Memory L3 project file "../../../../BFinUtils/ADSP-BF561/SDK-dummy.c - Shared Memory L3 source file