简体   繁体   中英

how to find the optimal values for parameter in_range and out_range for sklearn.exposure.rescale_intensity

If I use (0,100) my image becomes totally white and if I use (300,700) it becomes completely white. Do I need to brute-check every value every time I use in_range or is there some optimal values for both the parameters?

The documentation for rescale_intensity states

in_range, out_rangestr or 2-tuple, optional

    [...]

    ‘image’
        Use image min/max as the intensity range.
    [...]

So, if you set in_range='image' , which is the default anyway, the min and max of the image will be used for the range and the output image will always have maximum contrast between black and white.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM