Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB script I have to implement a Matlab script to de-shred a document divided in 150 shreds. The code I have so far is below.
MATLAB script
I have to implement a Matlab script to de-shred a document divided in 150 shreds.
The code I have so far is below. What is missing is the possibility of the pieces turning upside-down. The dissimilarity matrix is handled in Gusek. Hope someone can fix it.
The problem of de-shredding is to reconstruct a document that has been shredded. Each piece should only be used once, and we should have a single left side and a single right side free after the document has been put back together. Let S- 1,2,... ,nj be the set of pieces. For both sides of each piece we calculate how well it fits all other pieces. This is done by binarising the piece, so that we only have black/white values and then look at the difference between the edges of to pieces. Hence, the dissimilarity will be an integer. Two pieces that corresponds perfectly will have a dissimilarity score of 0, and this score will increase with the dissimilarity. We can put the dissimilarity on matrix form inf d din 12 D ?d21 inf (n-1)n 7n where 'inf' means infinity, di2 is the dissimilarity between piece 1 right hand side and piece 2 left hand side, and d21 is the dissimilarity between piece 2 right hand side and piece 1 left hand side. The problem of de-shredding is to reconstruct a document that has been shredded. Each piece should only be used once, and we should have a single left side and a single right side free after the document has been put back together. Let S- 1,2,... ,nj be the set of pieces. For both sides of each piece we calculate how well it fits all other pieces. This is done by binarising the piece, so that we only have black/white values and then look at the difference between the edges of to pieces. Hence, the dissimilarity will be an integer. Two pieces that corresponds perfectly will have a dissimilarity score of 0, and this score will increase with the dissimilarity. We can put the dissimilarity on matrix form inf d din 12 D ?d21 inf (n-1)n 7n where 'inf' means infinity, di2 is the dissimilarity between piece 1 right hand side and piece 2 left hand side, and d21 is the dissimilarity between piece 2 right hand side and piece 1 left hand side
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started