I have a 16X16 matrix , which contain members from 0,1,2,3, i want to know which algorithm should i use to find the boundary's between members to show the grouping, in the other word, with which algorithm should i find edge of this grouping? i want the detect the edge in the form of another matrix, so when i plot this two matrix the second one shows the boundary and edge of group of numbers. is Moore Neighbor Contour Tracer algorithm sufficient? but I am not sure the result of the algorithm fulfill my expectation.
00000000000000000000000000
33000000001111111111111111
33330000000001111111111111
33330000000000000111111111
00000000000000000010000000
00000000001111111111111111
00000000000000000000000000
01111111111111111111111111
00000001111111111111111111
11111111111111111111111111
00000000001111122222221111
00000000001111112222221111
00000001111111112222222222
00000000000001112222222222
00000000000000122222222222
00000000000000022222222222