Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Priyanka Roy
Priyanka Roy el 22 de Abr. de 2015
Comentada: Richard Hall el 15 de Mzo. de 2020
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 ?

Respuesta aceptada

Guillaume
Guillaume el 22 de Abr. de 2015
Editada: Guillaume el 22 de Abr. de 2015
This is a basic matrix operation that I'm sure is covered in Getting started:
A(A >= 240) = 0
  2 comentarios
Richard Hall
Richard Hall el 15 de Mzo. de 2020
That "basic matric operation" is not in "Getting Started".

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by