Conversion function:
The first form of:
B=data_type_name (A)
No matter what type A is, turn it into a data_type_name type
Like what:
B=double (a) converts a to a double array b
Second form:
Contains 5 conversion functions:
B=im2uint8 (A)
Type A: Logical,uint8,uint16 and double
Type B: uint8
B=im2uint16 (A)
Type A: Logical,uint8,uint16 and double
Type B: uint16
B=mat2gray (A,[amin,amax])
Type A: double
Type B: Double, range is [0,1]
The setting of less than Amin is 0, is greater than the Amax setting of 1, the number between Amin~amax cur_last= (cur-amin) *[1/(amax-amin)]
B=im2double (A)
Type A: Logical,uint8,uint16 and double
Type B: Double
B=IM2BW (a,t)
Type A: Uint8,uint16 and double
Type B: Logical
Considering the conversion between the luminance image and the two-value image, a pair of brightness image A is converted to a two-value image B. Output two-value image B with a value of 0 pixels, corresponding to the input brightness image a value less than the threshold t of pixels, a pixel with a value of 1 in the two value image B corresponds to the other pixel points in the input brightness image a. The value of T must be within the [0,1] interval, regardless of the type of data entered. The IM2BW function automatically declares an output two value image as an logical array. IPT default T has a value of 0.5