Why does Image Filter does not produce valid output when using certain image dimension?

2 次查看(过去 30 天)
Hello,
I am trying to implement a HDL-Coder conform 2D Filter in Simulink with the Image Filter block from the Vision HDL Toolbox. To begin with, I started with the Generate HDL Code for Image Sharpening example, but used an image dimension of 28x28 pixels. Therefore, I changed the properties of the Image from File, Frame to Pixels and Pixels to Frame blocks accordingly (28*28 sample time, 28 active and total pixels per line and video lines).
But this Simulink module does not create an valid output, since the vEnd constrol signal of the Image Filter stay low, although the vStart control signal seems to act normal. Simulink give the following warnings:
Warning: Line out of frame bounds
Warning: Extra line end signal
I tried to fix that by my own by changing some setting in the used Vision HDL Blocks, but I had no success until now. Do you have an explanation or solution for my problem?
Thank you very much in advance!

采纳的回答

Kiran Kintali
Kiran Kintali 2020-8-23
编辑:Walter Roberson 2020-8-23
Can you share a sample model that reproduces the issue? Thanks
This is another example shows how to design a hardware-targeted image filter.
web(fullfile(docroot, 'visionhdl/gs/design-video-processing-algorithms-for-hdl-in-matlab.html'))
  1 个评论
Tobis Stelzer
Tobis Stelzer 2020-8-24
Thanks, for your reply!
I solved this issue by changing the inactive lines in the Frame to Pixel Block to 38 pixels each. I use a 5x5 filter kernel.
I could not find an explanation or rule on how to set the right number of inactive lines depending on the filter kernel size or padding. Is there any?
Thanks!

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by