Forum Discussion
Altera_Forum
Honored Contributor
10 years agohow to count only adjacent(linked) 1's quantity in 7X7 matrix buffer using fpga?
hello. i'm studying image processing using fpga. i attached 7x7 matrix image. yellow is 1 and white is 0. normally i can count all 1's quantity in 7x7 matrix included un-linked 1, but i can'...
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- You are perhaps just considering vertical and horizontal neighbors pixels. The first thing that comes to mind is recommend you to change the scan operator that you're currently using, in order to also consider diagonal pixels as connected. --- Quote End --- thank you for your answer. you are right. i attached another example matrix. in that case, if i considerate diagonal pixel then yellow('1') q'ty is 7. if i don't considerate diagonal pixel then yellow('1') q'ty is 4. but in my method, i am beginner so just all pixel added using simple way. the result is only 9. that is problem. my wanted value is 4 or 7 but get the 9. restrict condition is time. i have to get the value 4 or 7 within 108us(short time). so i can't using breadth first search algorithm also.