フィルターのクリア

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 ?
  1 件のコメント
Stephen23
Stephen23 2015 年 4 月 22 日
Such basic MATLAB usage is taught in these tutorials:
And certainly it is covered by "Logical Indexing – Example 1" here:

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

採用された回答

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 Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by