09-01-2018 07:42 PM
Hi,
I started a Vivado HLS project to implement a convolution block that also executes erode and dilate operations. My testbench receives a small input image and writes the result in an output image. The problem is that this output image is being deformed and I didn't found out why it's happening.
I'm sending my source codes and both the images. If someone could take a look, it will help me a lot. I started using Vivado for researches purpose, so it really means to me to get things working.
Thank you
09-02-2018 12:23 AM
It looks like it's stretched every line by a factor of about 3:1, so my first guess would be that your input image is being read in as RGB and you're trying to treat it like monochrome. You could easily just bypass the function to verify that it's a testbench problem rather than an issue with your convolution.
09-02-2018 12:23 AM
It looks like it's stretched every line by a factor of about 3:1, so my first guess would be that your input image is being read in as RGB and you're trying to treat it like monochrome. You could easily just bypass the function to verify that it's a testbench problem rather than an issue with your convolution.
09-02-2018 05:59 AM
It worked! Thanks!
I though that if I did the conversion in matlab, I didn't had to worry about it in Vivado.
09-02-2018 06:11 AM
"imread" has a flag "CV_LOAD_IMAGE_GRAYSCALE" which might correct the problem for you. Otherwise, you can explicitly convert to 1-channel during the processing.
09-02-2018 07:50 AM
Nice! I've solved this problem now, but unfortunattely looks like that only the dilate is working. Erode is giving me a full black image and the default convolution is given me a very weird result:
Maybe my functions sumWindow and minWindow are not implemented properly...
09-02-2018 08:01 AM
Solved. It indeed wasn't coded properly haha thanks