Remove a part or object from an image

Hello everyone,
I really need the help with this task. My work is to remove the laser from the following image and return the same image without the laser. If anyone can help me with it, i will be more than greatfull to describe me the steps. Thank you in advance.

3 件のコメント

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 2 月 10 日
"My work is to remove the laser from the following image and return the same image without the laser."
Once removal the laser spots, what would be remaining on that region, like black, white or fill with simmilar pattern (Little challenging last one, as samples data are is quite less)
Christian Nasrallah
Christian Nasrallah 2021 年 2 月 10 日
Black

サインインしてコメントする。

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 2 月 10 日
編集済み: KALYAN ACHARJYA 2021 年 2 月 10 日

0 投票

rgbImage=imread('laser_image.png');
grayImage=rgb2gray(rgbImage);
mask=bwareafilt(grayImage>170,1);
%Change the threshod value ^ as per requirennets
%% Folloing lines code just for maksing RGB Image
r_data=rgbImage(:,:,1);
g_data=rgbImage(:,:,2);
b_data=rgbImage(:,:,3);
r_data(mask)=0;
g_data(mask)=0;
b_data(mask)=0;
result_image=cat(3,r_data,g_data,b_data)
Above, last 7 lines you can avoid, by doing another masking approach, please refer the below link
figure,imshow(result_image);

2 件のコメント

Christian Nasrallah
Christian Nasrallah 2021 年 2 月 12 日
Thank you a lot man, your answer was helpful alot.
KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 2 月 13 日
@Christian Nasrallah my pleasure. I'm glad it helped

サインインしてコメントする。

カテゴリ

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

質問済み:

2021 年 2 月 9 日

コメント済み:

2021 年 2 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by