![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
module demonstrating the computation of boundary on a 2d binary image More...
module demonstrating the computation of boundary on a 2d binary image
This script computes the boundary image on a 2d binary input image loaded from a given input Raw file, and saves the result in a given Raw file.
The application can be called through a command line as follows:
<application_script_filename> [--inputImgFilePath <input_image_file_path> --imgXSz <image_x_size> --imgYSz <image_y_size>] [--outputImgFilePath <output_image_file_path>]
Arguments:
--inputImgFilePath optional; specifies the name of the RAW file, from
which the 2d input image will be loaded; if not
specified by the user, the input image is loaded from
file
<DEV_ROOT>/data/Sample/images/MorphoBin2d1.raw
--outputImgFilePath optional; specifies the name of the RAW file, in
which the 2d output image resulting from entropy
computation will be saved; if not specified by the
user, the output image is saved in file
<TEMPORARY_IPSDK_DIR>/Sample/boundary.raw
--imgXSz mandatory if inputImgFilePath option is specified,
ignored otherwise; specifies the width of input image
--imgYSz mandatory if inputImgFilePath option is specified,
ignored otherwise; specifies the height of input imageHere is a snapshot of default input image used by the application and of corresponding output image when application is launched without any argument:
We start by importing all necessary libraries:
Then we define the input parameters.
We load our input image from the associated Raw file, by calling the function ipsdk::image::file::loadRawImageFile.
We then apply the boundary image processing algorithm on the input image.
Lastly, we save the image resulting from the "boundary" operation to the Raw file.
See the full source listing
1.8.14