Skip to content

fill_interlaceFillInterlaceFillInterlacefill_interlacefill_interlace🔗

Short description🔗

fill_interlaceFillInterlaceFillInterlacefill_interlacefill_interlace — Interpolate 2 video half images.

Signature🔗

fill_interlace( image ImageCamera, out image ImageFilled, string Mode )void FillInterlace( const HObject& ImageCamera, HObject* ImageFilled, const HTuple& Mode )static void HOperatorSet.FillInterlace( HObject imageCamera, out HObject imageFilled, HTuple mode )def fill_interlace( image_camera: HObject, mode: str ) -> HObject

Herror fill_interlace( const Hobject ImageCamera, Hobject* ImageFilled, const char* Mode )

Herror T_fill_interlace( const Hobject ImageCamera, Hobject* ImageFilled, const Htuple Mode )

HImage HImage::FillInterlace( const HString& Mode ) const

HImage HImage::FillInterlace( const char* Mode ) const

HImage HImage::FillInterlace( const wchar_t* Mode ) const (Windows only)

HImage HImage.FillInterlace( string mode )

Description🔗

The operator fill_interlaceFillInterlace calculates an interpolated full image or removes odd/even lines from a video image composed of two half images. If an image is recorded with a video camera it consists of two half images recorded at different times but stored in one image in the digital form. This can lead to several errors in further processing. In order to reduce these errors the video image is modified. Every second line is re-calculated or removed. The parameter Modemodemode determines whether this must be done for even ('even'"even", 'rmeven'"rmeven") or odd ('odd'"odd", 'rmodd'"rmodd") line numbers. If you choose 'even'"even" or 'odd'"odd" the gray values in the generated lines are calculated as mean values from the direct neighbors above or below the current pixel, respectively. If you choose 'rmeven'"rmeven" or 'rmodd'"rmodd" the even or odd lines numbers are removed (in that case the resulting image is only half as high as the input image). The value 'switch'"switch" for Modemodemode cause the odd and even lines to be exchanged.

For an explanation of the concept of smoothing filters see the introduction of chapter Filters / Smoothing.

Attention🔗

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

  • Automatically parallelized on domain level.

Parameters🔗

ImageCameraimageCameraimage_camera (input_object) (multichannel-)image(-array) → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

Gray image consisting of two half images.

ImageFilledimageFilledimage_filled (output_object) (multichannel-)image(-array) → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject * (byte / uint2)

Full image with interpolated/removed lines.

Modemodemode (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Instruction whether even or odd lines should be replaced/removed.

Default: 'odd'"odd"
List of values: 'even', 'odd', 'rmeven', 'rmodd', 'switch'"even", "odd", "rmeven", "rmodd", "switch"

Example🔗

(HDevelop)

read_image(Image,'video_image')
fill_interlace(Image,New,'odd')
sobel_amp(New,Sobel,'sum_abs',3)
(C)
read_image(&Image,"video_image")\;
fill_interlace(Image,&New,"odd")\;
sobel_amp(New,&Sobel,"sum_abs",3)\;

Complexity🔗

For each pixel: \(O(2)\).

Result🔗

If the parameter values are correct the operator fill_interlaceFillInterlace returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no input images available) is set via the operator set_system('no_object_result',<Result>). If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

read_imageReadImage, grab_imageGrabImage

Possible successors

sobel_ampSobelAmp, edges_imageEdgesImage, regiongrowingRegiongrowing, diff_of_gaussDiffOfGauss, thresholdThreshold, dyn_thresholdDynThreshold, auto_thresholdAutoThreshold, mean_imageMeanImage, binomial_filterBinomialFilter, gauss_filterGaussFilter, anisotropic_diffusionAnisotropicDiffusion, sigma_imageSigmaImage, median_imageMedianImage

See also

median_imageMedianImage, binomial_filterBinomialFilter, gauss_filterGaussFilter, crop_partCropPart

Module🔗

Foundation