You can use the imadjust
function in MATLAB to display an output image darker than the original image on the screen.
The imadjust
function adjusts the intensity values of an image based on specified input and output ranges. To achieve a darker output image, you need to map the original intensity range to a narrower range of lower values.
Here is an example code to achieve this:
main.m503 chars16 lines
In this example, the imadjust
function is used to adjust the intensity range of the original image to a range from 0.2 to 0.8. The []
argument is used to let MATLAB automatically determine the output range based on the input range.
By specifying a narrower intensity range in the imadjust
function, you can make the output image appear darker.
gistlibby LogSnag