First of all, thanks to everybody that is helping me.
Second, please excuse my poor english.
And now, Iīm going to explain a bit more the project with an example.
Letīs supose that Iīve this image (no matter if itīs small, itīs only
to show the problem):
(1,1,0,0)
(1,1,0,0)
(0,0,1,1)
(0,0,1,1)
The image will enter to the FPGA through a PIN input, and will be
stored in a shift register.
Once the image is in the FPGA, I was thinking to apply Heaviside to
every "1" pixel of the imgage f.e: Hi,j=h(h(bi,j +bi,j-1 +bi-1,j-1
-1)+h(bi,j +bi-1,j-1 -1), when bi,j is the binary bit value of each
pixel.
After each parallel-shrink operation, the image will change like this:
1š(0,1,0,0)
(1,1,0,0)
(0,0,1,1)
(0,0,1,1)
2š(0,0,0,0)
(0,1,0,0)
(0,0,1,1)
(0,0,1,1)
3š(0,0,0,0)
(0,0,0,0)
(0,0,1,1)
(0,0,1,1)
4š(0,0,0,0)
(0,0,0,0)
(0,0,0,1)
(0,0,1,1)
5š(0,0,0,0)
(0,0,0,0)
(0,0,0,0)
(0,0,0,1)
6š(0,0,0,0)
(0,0,0,0)
(0,0,0,0)
(0,0,0,0)
What I need is that the final image looks like this:
(0,0,0,0)
(0,1,0,0)
(0,0,0,0)
(0,0,0,1)
To get that, I made a condition:
(i-1,j)=0 & (i,j-1)=0 & [(i+1,j)=1 | (i,j+1)=1]
that condition will avoid the "killig" of isolated "1"īs.
In the image above, we can see two objects, and from here I can label
the image, count the objects, etc...
What do you think about the algorithm?. My problem is how to translate
it into VHDL (I know for sure that I will need to work with arrays,
but I donīt know how). Iīm an electronic engineer and Iīve a bit
experience on C++, Pascal, Java but programmming itīs not my best.
Than you for reding me, and again, any suggestion will be appreciated.