Could i reverse the color of object with background ?

i want to ask, could i change the color ( reverse ) the background color with the object color ?
for example :
<a>[URL=http://imageshack.us/photo/my-images/8/ricef.png/][IMG]http://img8.imageshack.us/img8/101/ricef.png[/IMG][/URL]</a>
Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL]

Respuestas (1)

Walter Roberson
Walter Roberson el 9 de Mayo de 2011

0 votos

Sure. If your image data is in the range 0 to 1, replace each pixel value by 1 minus the pixel value. If your image data is in the range 0 to 255, replace each pixel value by 255 minus the pixel value (but make sure the output is the right data class.)

1 comentario

danny agus
danny agus el 9 de Mayo de 2011
hmm
i have tried this code
I2 = I - background
which is the background is black color
and the I = original image
and the color is averaged
how i can replace the pixel ?
i replace it one by one ?
or can i do it with one step ?
i already fix the image
u can see the image

Iniciar sesión para comentar.

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Preguntada:

el 9 de Mayo de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by