How to replace a range of pixel values with another range of pixel values within my image?

조회 수: 5 (최근 30일)
Hi everyone,
I have a range of pixel values of my image, which I would like to replace with another range of pixel values from the same image.
The way I want to do this to replace the coordinate values. I have for example the coordinates ranging from [34 70] to [34 80] in my image, which I would like to replace with the values from the coordinate 10 above so these would be [34 60] to [34 70]. This is to remove an artifact within my image and I have no clue how to do this but to replace each pixel 1 by 1 however, I would like to make a loop statement so that I can repeat this along the other columns.
Any help on this would be greatly appreciated.

채택된 답변

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2020년 2월 7일
yourimage(34,70:80,:)=yourimage(34,60:70,:)
  댓글 수: 4
JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2020년 2월 7일
try with more size to see it, for example :
yourimage(34:44,70:80,:)=yourimage(34:44,60:70,:)
Anon
Anon 2020년 2월 8일
Thank you this works
Do you know how I can make this a loop statement so that I can repeat along the different columns as my artifact is in a diagonal position and it will take me a long time to change each specific column.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by