Could i reverse the color of object with background ?
Show older comments
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]
Answers (1)
Walter Roberson
on 9 May 2011
0 votes
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 Comment
danny agus
on 9 May 2011
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!