How to reconstruct a corrupted image?

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.

回答 (2 件)

Image Analyst
Image Analyst 2023 年 4 月 24 日

0 投票

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 件のコメント

Niranjunbutt
Niranjunbutt 2023 年 4 月 25 日
I am not supposed to use photoshop. I am talking about upper yellowish layer on baby's face. I have converted image into gray scale already. I don't know what to do next. I have applied morphological structuering like imopen, imerode and imdillate as sell but didn't worked. Could you tell me what filters could be used to achieve the objective?
Image Analyst
Image Analyst 2023 年 4 月 25 日
Try medfilt2 and regionfill and see attached demo of a modified median filter.
Why are you "not supposed to" use Photoshop? What/who is stopping you? Certainly not me.
Niranjunbutt
Niranjunbutt 2023 年 4 月 25 日
編集済み: Niranjunbutt 2023 年 4 月 25 日
Didn't work.
Image Analyst
Image Analyst 2023 年 4 月 25 日
You replied almost instantly, and didn't even answer my question. But such an automatic program to make such judgement calls for how to repair a photo could take years to write and make robust. Good luck.
Niranjunbutt
Niranjunbutt 2023 年 5 月 9 日
Its an assignment and I am not supposed to use photoshop or AI. I have developed an algorithm of my own and it delivers quite fascinating results. And you are rude. Since I have said I am not supposed to use photoshop then why are you keep asking again and again.
Steven Lord
Steven Lord 2023 年 5 月 9 日
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
Rik 2023 年 5 月 9 日
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
DGM 2023 年 5 月 9 日
編集済み: DGM 2023 年 5 月 9 日

0 投票

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.

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

2023 年 4 月 24 日

編集済み:

DGM
2023 年 5 月 9 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by