DeinterlaceFrames2d
Separates even and odd frames from an interlaced image.
Access to parameter description
This algorithm generates two output images from an interlaced input image. The first output image contains all even rows of the input image, while the second output image contains its odd rows.
See also
Access to parameter description
This algorithm generates two output images from an interlaced input image. The first output image contains all even rows of the input image, while the second output image contains its odd rows.
See also
Function Syntax
This function returns a DeinterlaceFrames2dOutput structure containing outputEvenImage and outputOddImage.
// Output structure of the deinterlaceFrames2d function. struct DeinterlaceFrames2dOutput { /// The output even field image. std::shared_ptr< iolink::ImageView > outputEvenImage; /// The output odd field image. std::shared_ptr< iolink::ImageView > outputOddImage; }; // Function prototype
DeinterlaceFrames2dOutput deinterlaceFrames2d( std::shared_ptr< iolink::ImageView > inputImage, DeinterlaceFrames2d::SplitMode splitMode, std::shared_ptr< iolink::ImageView > outputEvenImage = NULL, std::shared_ptr< iolink::ImageView > outputOddImage = NULL );
This function returns a tuple containing output_even_image and output_odd_image.
// Function prototype. deinterlace_frames_2d( input_image, split_mode = DeinterlaceFrames2d.SplitMode.HALF_IMAGE, output_even_image = None, output_odd_image = None )
This function returns a DeinterlaceFrames2dOutput structure containing outputEvenImage and outputOddImage.
/// Output structure of the DeinterlaceFrames2d function. public struct DeinterlaceFrames2dOutput { /// The output even field image. public IOLink.ImageView outputEvenImage; /// The output odd field image. public IOLink.ImageView outputOddImage; }; // Function prototype. public static DeinterlaceFrames2dOutput DeinterlaceFrames2d( IOLink.ImageView inputImage, DeinterlaceFrames2d.SplitMode splitMode = ImageDev.DeinterlaceFrames2d.SplitMode.HALF_IMAGE, IOLink.ImageView outputEvenImage = null, IOLink.ImageView outputOddImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr | |||||
splitMode |
The split mode for generating the output images.
|
Enumeration | HALF_IMAGE | ||||||
outputEvenImage |
The output even field image. | Image | nullptr | ||||||
outputOddImage |
The output odd field image. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
input_image |
The input image. | image | Binary, Label, Grayscale or Multispectral | None | |||||
split_mode |
The split mode for generating the output images.
|
enumeration | HALF_IMAGE | ||||||
output_even_image |
The output even field image. | image | None | ||||||
output_odd_image |
The output odd field image. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | null | |||||
splitMode |
The split mode for generating the output images.
|
Enumeration | HALF_IMAGE | ||||||
outputEvenImage |
The output even field image. | Image | null | ||||||
outputOddImage |
The output odd field image. | Image | null |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); DeinterlaceFrames2d deinterlaceFrames2dAlgo; deinterlaceFrames2dAlgo.setInputImage( polystyrene ); deinterlaceFrames2dAlgo.setSplitMode( DeinterlaceFrames2d::SplitMode::HALF_IMAGE ); deinterlaceFrames2dAlgo.execute(); std::cout << "outputEvenImage:" << deinterlaceFrames2dAlgo.outputEvenImage()->toString(); std::cout << "outputOddImage:" << deinterlaceFrames2dAlgo.outputOddImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) deinterlace_frames_2d_algo = imagedev.DeinterlaceFrames2d() deinterlace_frames_2d_algo.input_image = polystyrene deinterlace_frames_2d_algo.split_mode = imagedev.DeinterlaceFrames2d.HALF_IMAGE deinterlace_frames_2d_algo.execute() print( "output_even_image:", str( deinterlace_frames_2d_algo.output_even_image ) ) print( "output_odd_image:", str( deinterlace_frames_2d_algo.output_odd_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); DeinterlaceFrames2d deinterlaceFrames2dAlgo = new DeinterlaceFrames2d { inputImage = polystyrene, splitMode = DeinterlaceFrames2d.SplitMode.HALF_IMAGE }; deinterlaceFrames2dAlgo.Execute(); Console.WriteLine( "outputEvenImage:" + deinterlaceFrames2dAlgo.outputEvenImage.ToString() ); Console.WriteLine( "outputOddImage:" + deinterlaceFrames2dAlgo.outputOddImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = deinterlaceFrames2d( polystyrene, DeinterlaceFrames2d::SplitMode::HALF_IMAGE ); std::cout << "outputEvenImage:" << result.outputEvenImage->toString(); std::cout << "outputOddImage:" << result.outputOddImage->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) result_output_even_image, result_output_odd_image = imagedev.deinterlace_frames_2d( polystyrene, imagedev.DeinterlaceFrames2d.HALF_IMAGE ) print( "output_even_image:", str( result_output_even_image ) ) print( "output_odd_image:", str( result_output_odd_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); Processing.DeinterlaceFrames2dOutput result = Processing.DeinterlaceFrames2d( polystyrene, DeinterlaceFrames2d.SplitMode.HALF_IMAGE ); Console.WriteLine( "outputEvenImage:" + result.outputEvenImage.ToString() ); Console.WriteLine( "outputOddImage:" + result.outputOddImage.ToString() );