autoScaleImageCLim

버전 1.0.0.0 (5.61 KB) 작성자: Yair Altman
Automatically update an image axes' CLim based on displayed portion
다운로드 수: 104
업데이트 날짜: 2018/2/21

라이선스 보기

autoScaleImageCLim(hImage) automatically updates the specified image's axis CLim property to the 10th & 90th percentiles of CData values for the displayed portion of the image. This CLim is automatically updated whenever the image is updated, zoomed, panned or modified in any way.

autoScaleImageCLim(hImage, threshold) recalculates CLim based on a user-specified threshold (default: 10). For example, if threshold=5, then the 5% and 95% CData values are used for CLim. This threshold can be specified as either a number in the range [1-49] (indicating full percentage), or as a corresponding numeric fraction in the range [0-0.49].

Inputs:
hImage - handle to a Matlab image object (optional; default=current image)
threshold - threshold for setting CLim (optional; default=10)

Examples:
autoScaleImageCLim() % auto-scale the current axes' image
autoScaleImageCLim(hImage,5) % auto-scale image using 5%-95% CData limits
autoScaleImageCLim(hImage,.07) % auto-scale image using 7%-93% CData limits

Warning:
This code relies on undocumented and unsupported Matlab functionality.
It works on Matlab R2014b or newer, but use at your own risk!

Technical explanation:
A technical explanation of the code in this utility can be found on http://undocumentedmatlab.com/blog/auto-scale-image-colors

인용 양식

Yair Altman (2025). autoScaleImageCLim (https://www.mathworks.com/matlabcentral/fileexchange/66148-autoscaleimageclim), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2017b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Display and Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

clarified that the utility is expected to work only on R2014b or newer (i.e., HG2, not HG1)