Is it possible to obtain the bilateral symmetry of an binary image?
An example of the type of result that I search:
x=[true false false;false true false;false true false;false true false;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false false true;false true false;false true false;false true false;false true false;false true false;false true false;false true false;true false false];
sym=[0 0 1; 0 1 0; 0 1 0; 0 1 0; 1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0; 1 0 0;1 0 0;1 0 0;1 0 0; 0 1 0;0 1 0;0 1 0;0 1 0;0 1 0;0 1 0 ; 0 1 0;0 0 1];
figure, subplot(121), imagesc(x)
subplot(122), imagesc(sym)
As @user2999345 proposes