Question: I'm trying to de-shred a document using Matlab and Gusek. The problem I'm having is that the code doesn't account for pieces being upside down.
I'm trying to de-shred a document using Matlab and Gusek. The problem I'm having is that the code doesn't account for pieces being upside down. There are 150 different pieces, but I can't see how many are flipped, so it should check for all possible combinations. How can I correct this, without losing the constraint that all pieces can only be used once?

% Loading shreds for i 1:150 tempstr/Data/De-shredding/shred',int2str(i), ' PNG' Iimread (tempstr); s( : , : , i) = 1( : , [1 end] ) . /255; end clear I i tempstr; %% Generate dissimilarity matrix Dzeros (150,150); for i-1:150 for j = 1:150 if ij sum (abs (S ( : ,2 , i )-S ( : , 1 , j ) ) ) ; D(i,j) else D(i,j) - 1000000; end end end clear i j; % Loading shreds for i 1:150 tempstr/Data/De-shredding/shred',int2str(i), ' PNG' Iimread (tempstr); s( : , : , i) = 1( : , [1 end] ) . /255; end clear I i tempstr; %% Generate dissimilarity matrix Dzeros (150,150); for i-1:150 for j = 1:150 if ij sum (abs (S ( : ,2 , i )-S ( : , 1 , j ) ) ) ; D(i,j) else D(i,j) - 1000000; end end end clear i j
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
