Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Laplacian filter

Omar21

Newbie
Joined
Apr 4, 2024
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
14
Hi, I am coding in Verilog for a Laplacian filter where I am using a kernel as the follow
is it correct to insert it like that?

Code:
// Define the Laplacian filter kernel
    reg [31:0] kernel [0:2][0:2];
    initial begin
        kernel[0][0] = 0; kernel[0][1] = 1; kernel[0][2] = 0;
        kernel[1][0] = 1; kernel[1][1] = -4; kernel[1][2] = 1;
        kernel[2][0] = 0; kernel[2][1] = 1; kernel[2][2] = 0;
    end
 
I don't know if values are your concern or the syntax, but Python uses this for a 5th order normalize array.

array([[ 0, 0, 0, 0, 0],
[ 0, 9, -2, -3, -4],
[ 0, -2, 16, -6, -8],
[ 0, -3, -6, 21, -12],
[ 0, -4, -8, -12, 24]])

FWIW.

No comment on syntax. Compiler is happy.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top