필터 지우기
필터 지우기

How to change the pixel values without using for-loop ?

조회 수: 3 (최근 30일)
Priyanka Roy
Priyanka Roy 2015년 4월 22일
댓글: Richard Hall 2020년 3월 15일
let i have a image matrix like : A =
120 200 250 254 225
204 235 226 227 1
243 249 225 29 1
27 82 92 222 224
12 252 229 255 255
I want to change the values within range 240 to 255 into 0 without using for-loop The output array or matrix will be : A =
120 200 0 0 225
204 235 226 227 1
0 0 225 29 1
27 82 92 222 224
12 0 229 0 0
how will I calculate it ?

채택된 답변

Guillaume
Guillaume 2015년 4월 22일
편집: Guillaume 2015년 4월 22일
This is a basic matrix operation that I'm sure is covered in Getting started:
A(A >= 240) = 0
  댓글 수: 2
Priyanka Roy
Priyanka Roy 2015년 4월 22일
Thanks :)
Richard Hall
Richard Hall 2020년 3월 15일
That "basic matric operation" is not in "Getting Started".

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by