How can I delete part of a binary image?

조회 수: 3(최근 30일)
Timilehin Oyinloye
Timilehin Oyinloye 2022년 7월 25일
댓글: Timilehin Oyinloye 2022년 7월 25일
Hello,
I have several images with different shape and sizes. I am trying to make a code to delete the wider part (lower region) in each of the images. So far, I have been able to change the original images to a binary image.
The part of the image I want to delete is the area within red box in the second picture (Image2.JPG) I attached, i.e. the part that appears like fingers.
Thank you.

채택된 답변

DGM
DGM 2022년 7월 25일
편집: DGM 2022년 7월 25일
If all you want to do is put a black region over that part of the image:
myimage(310:end,150:300,:) = 0;
Otherwise, you'll have to describe how the region is to be replaced.
If this is supposed to be automated, you'll have to describe what image features can be relied upon and define the criteria used to locate the region that needs to be replaced.
  댓글 수: 4
Timilehin Oyinloye
Timilehin Oyinloye 2022년 7월 25일
Thank you very much.
This is helpful.

댓글을 달려면 로그인하십시오.

추가 답변(1개)

NN
NN 2022년 7월 25일
Hi,
As per my understanding, you want to delete some part of an image.
Please find some of the existing solutions to your problem :
  1. https://in.mathworks.com/matlabcentral/answers/293816-how-to-delete-some-part-of-an-image?s_tid=answers_rc1-1_p1_MLT
  2. https://in.mathworks.com/matlabcentral/answers/154845-how-to-delete-selective-part-of-image?s_tid=answers_rc1-2_p2_MLT
Hope this helps. Please let me know if the problem still persists.
Regards,
Narvik
  댓글 수: 1
Timilehin Oyinloye
Timilehin Oyinloye 2022년 7월 25일
Thank you very much for the response.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by