Remove Rows/columns of a rgb Image

조회 수: 5 (최근 30일)
marie lasz
marie lasz 2020년 10월 10일
댓글: Ameer Hamza 2020년 10월 10일
Hello ,
I have a rgb image 512x512 pixels. I want to remove it's rows or columns pixels. How can I do that in matlab? Any help please :)
Thanks

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 10월 10일
Something like this
img; % 3D RGB image array
c = []; % list of columns to delete
r = []; % list of rows to delete
img(r,c,:) = []
  댓글 수: 2
marie lasz
marie lasz 2020년 10월 10일
thanks for you kind response. I didn't get this line of code: img(r,c,:) = []?
Ameer Hamza
Ameer Hamza 2020년 10월 10일
This line delete the rows specified in vector 'r', and columns specified in vector 'c' from variable img. [] tells MATLAB to delete those lines.

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by