Conversion between image types-matlab__ vision

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.