How to reconstruct a corrupted image?
9 views (last 30 days)
Show older comments
I have a corrupted image which i am supposed to reconstruct.

I want to remove upper layer and reconstruct the image.
The final output must look like this.

0 Comments
Answers (2)
Image Analyst
on 24 Apr 2023
I don't know what the "upper layer" is. First you can call rgb2gray() to convert it to gray scale. But after that there is a lot of judgment calls and artistic talent involved so, honestly, I'd use Photoshop for that (and I do all the time). It would be the fastest way.
7 Comments
Steven Lord
on 9 May 2023
Since this is a homework assignment, please show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Rik
on 9 May 2023
I think you're forgetting who is asking for help and who is offering help. Repeating an unanswered question is not rude. I have therefore removed your flag.
Feel free to share your result in an answer. I would be interested to see your approach to undo cropping and discoloration.
DGM
on 9 May 2023
Edited: DGM
on 9 May 2023
You can start by cleaning up a large part of the work like so:
inpict = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1365103/image.png');
gray = im2gray(inpict);
% remove the bulk of the cast
d = abs(im2double(inpict) - im2double(gray)); % isolate the non-gray component
d = mean(d,3); % reduce it to gray
outpict = gray + im2uint8(d);
imshow(outpict,'border','tight')
At this point, you can work on isolating and inpainting defects.
See also:
Note that this example still requires the user to identify the defect regions manually.
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!