Implementing scanning indow using HDL FIFOs

1 vue (au cours des 30 derniers jours)
Alla
Alla le 6 Mar 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?

Réponses (1)

Bharath Venkataraman
Bharath Venkataraman le 9 Mar 2020
We have a block that does the windowing - please look at the Line Buffer block. I believe this will meet your needs.
  2 commentaires
Alla
Alla le 10 Mar 2020
The block does not allow for doing much, my aim is to have something I can reconfigure and customize.
Bharath Venkataraman
Bharath Venkataraman le 10 Mar 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.

Connectez-vous pour commenter.

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by