Implementing scanning indow using HDL FIFOs

2 visualizaciones (últimos 30 días)
Alla
Alla el 6 de Mzo. de 2020
Comentada: Bharath Venkataraman el 10 de Mzo. de 2020
Hello, I have been trying to implement s canning window algorithm using the HDL FIFO block to no avail, I constantly get results that are delayed and can't keep track of why that is, the push and pop don't seem to behave as I expect them to.
A scanning window for a 3x3 window for instance would use 3 FIFOs (with a register size equal to the row size of the input) connected to each other (first OUT into second IN, and second OUT to third IN), the elements of the matrix or map are stramed through the FIFOs, once they're full the last elemnt of each is popped, that's done three ti;es to generate a 3x3 window, then the same is done untill the FIFOs are empty. that's when the whole thing is shifted one row down sinc ethe first row elemnts are not present in the enxt windows (no padding is needed since it's valid 2D Convolution)0
Are there any good examples on this? or any advice on how to implement it efficiently?

Respuestas (1)

Bharath Venkataraman
Bharath Venkataraman el 9 de Mzo. de 2020
We have a block that does the windowing - please look at the Line Buffer block. I believe this will meet your needs.
  2 comentarios
Alla
Alla el 10 de Mzo. de 2020
The block does not allow for doing much, my aim is to have something I can reconfigure and customize.
Bharath Venkataraman
Bharath Venkataraman el 10 de Mzo. de 2020
It does the threee things you were asking for before:
  1. Form a 3x3 window
  2. Has FIFOs connected to each other
  3. The rows are shifted down
You can now implement the convolution/filtering operation.
If you want that as well, the Image Filter block does the filtering as well.

Iniciar sesión para comentar.

Categorías

Más información sobre HDL Coder en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by