Image Inversion

버전 1.0.0.0 (317 KB) 작성자: Stead Kiger
InvertIm inverts an image array im in the sense of reversing its grayscale (NOT matrix inversion)
다운로드 수: 3.8K
업데이트 날짜: 2007/4/11

라이선스 없음

InvertIm generalized image inversion (grayscale reversal)

This function has several options that are useful for inversion of medical images for use in other software.

invIm=InvertIm(im) inverts an image array im in the sense of reversing its grayscale (NOT matrix inversion). InvertIm effects the inversion by computing new image data rather than by reversing the colormap or look-up-table (LUT), which is often, but not always, a better approach. im can be an array of any dimension composed of numeric or binary elements (integers [uint8, int8, uint16, int16, etc.], floating point [double or single], or logical). The result invIm is the same data class as im.

For numeric arrays, the inverse is computed using

invIm = (maxVal + minVal) - im

with appropriate treatment of the different data types. For integer arrays, minVal and maxVal are the minimum and maximum allowed integers. For floating point arrays, if the image data lie within the range [0,1], the inversion is performed with default minVal and maxVal of 0 and 1. If the image data lie outside [0,1], then the minimum and maxmimum values of the data are used for minVal and maxVal.

Invert(im, bitsStored) returns the inverse of the image im using a maxVal of 2^bitsStored. This option is convenient when inverting images with a limited dynamic range, e.g., when you have a 16-bit image that only uses the first 12 bits of data. This option is only applicable to integer data.

invIm=Invert(im, [], lowerLimit) returns the inverse of the image im using a minVal of lowerLimit. This option is useful, for example, when inverting signed integer image data that is only positive.

invIm=Invert(im, [], [], upperLimit) returns the inverse of the image im using a maxVal of upperLimit.

All three optional arguments may be used together (e.g., invIm=Invert(im, bitsStored, lowerLimit, upperLimit)), but upperLimit will supercede bitsStored.

인용 양식

Stead Kiger (2024). Image Inversion (https://www.mathworks.com/matlabcentral/fileexchange/14609-image-inversion), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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