# How to change the max pixel value of the image

9 visualizaciones (últimos 30 días)
Med Future el 11 de Ag. de 2022
Comentada: Rena Berman el 23 de Ag. de 2022
Hello everyone i hope you are doing well.
I have the following image in which white pixel value exist 35,40,45,55
• I want to find the maximum index for example in above 55 is the maximum index then add 50 pixel in to to make new maximum value to 105
• Then i want to divided the each pixel value with the maximum value(105). Then map the value to 10000 e.g multiple new pixel value with 10000 so it will map between 1 to 10000
How can i do it in matlab
##### 3 comentariosMostrar 1 comentario más antiguoOcultar 1 comentario más antiguo
Med Future el 11 de Ag. de 2022
@Walter Roberson Yes it it logical array which is 2D.
The maximum index or you can say pixel value means for example the row2 show the maximum index( pixel value) which is 55.
Then i will add 50 in this index number (pixel value). the new index (pixel value) is 105. then divide all pixel values by maximum pixel value 105. and then map/multiple it by 10000.
maximum row pixel value to 10000.
row1 = min(idx);
row2 = max(idx);
Rena Berman el 23 de Ag. de 2022

Iniciar sesión para comentar.

### Respuestas (1)

Benjamin Thompson el 11 de Ag. de 2022
This is to increase the values of specific values in a matrix. You can probably take it from there:
>>
>> A = [35 40 45 55; 35 35 55 35; 40 40 40 40]
A =
35 40 45 55
35 35 55 35
40 40 40 40
>> Ireplace = A == 55
Ireplace =
3×4 logical array
0 0 0 1
0 0 1 0
0 0 0 0
>> A(Ireplace) = 55 + 50
A =
35 40 45 105
35 35 105 35
40 40 40 40
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Med Future el 12 de Ag. de 2022
@Benjamin Thompson This it not what i want. the number is still remain the same in your case

Iniciar sesión para comentar.

### Categorías

Más información sobre Image Arithmetic en Help Center y File Exchange.

R2022a

### Community Treasure Hunt

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

Start Hunting!

Translated by