OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

imgAutoBinary

Contents

Menu Information

Auto Binary

Brief Information

Auto convert to binary

Additional Information

X-Function not designed for Auto GetN Dialog.

Command Line Usage

1. imgAutoBinary img:=mat(1) oimg:=mat(2);

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Matrix img

Input

Image

<active>

Specifies the input image. The default input is the active image.

Output Image oimg

Output

Image

<input>

Specifies the output image. By default, the output image is the same as the input image.

See the syntax here.

Description

This X-Function converts the input image into a binary image automatically. The threshold used to perform the conversion is calculated based on statistical features of the input image.

This X-Function works best with gray images. If the input image is a color image, each channel of it will be separately binarized.

Note that this X-Function does not have a dialog.

Examples

In this example, we use the imgAutoBinary function to convert the input image to a binary image:

  1. When the input image is active, select Image: Conversion: Auto Binary. This performs the conversion and the input image is modified.
Image:imgAutoBinary_help_English_files_image002.jpg
Image:imgAutoBinary_help_English_files_image004.jpg
The original image
The output image


Algorithm

The computation uses L_AutoBinaryBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_AutoBinaryBitmap topic.

References

LEADTOOLS Main API Help file, Version 14

Related X-Functions

imgBinary, imgC2gray