fill_interlacefill_interlaceFillInterlaceFillInterlacefill_interlace (Operator)

Name

fill_interlacefill_interlaceFillInterlaceFillInterlacefill_interlace — Interpolate 2 video half images.

Signature

fill_interlace(ImageCamera : ImageFilled : Mode : )

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

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

void FillInterlace(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)

static void HOperatorSet.FillInterlace(HObject imageCamera, out HObject imageFilled, HTuple mode)

HImage HImage.FillInterlace(string mode)

def fill_interlace(image_camera: HObject, mode: str) -> HObject

Description

The operator fill_interlacefill_interlaceFillInterlaceFillInterlacefill_interlace 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 ModeModeModemodemode determines whether this must be done for even ('even'"even""even""even""even", 'rmeven'"rmeven""rmeven""rmeven""rmeven") or odd ('odd'"odd""odd""odd""odd", 'rmodd'"rmodd""rmodd""rmodd""rmodd") line numbers. If you choose 'even'"even""even""even""even" or 'odd'"odd""odd""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""rmeven""rmeven""rmeven" or 'rmodd'"rmodd""rmodd""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""switch""switch""switch" for ModeModeModemodemode 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

Parameters

ImageCameraImageCameraImageCameraimageCameraimage_camera (input_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject (byte / uint2)

Gray image consisting of two half images.

ImageFilledImageFilledImageFilledimageFilledimage_filled (output_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject * (byte / uint2)

Full image with interpolated/removed lines.

ModeModeModemodemode (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

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

Default: 'odd' "odd" "odd" "odd" "odd"

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

Example (HDevelop)

read_image(Image,'video_image')
fill_interlace(Image,New,'odd')
sobel_amp(New,Sobel,'sum_abs',3)

Example (C)

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

Example (HDevelop)

read_image(Image,'video_image')
fill_interlace(Image,New,'odd')
sobel_amp(New,Sobel,'sum_abs',3)

Example (HDevelop)

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_interlacefill_interlaceFillInterlaceFillInterlacefill_interlace 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary an exception is raised.

Possible Predecessors

read_imageread_imageReadImageReadImageread_image, grab_imagegrab_imageGrabImageGrabImagegrab_image

Possible Successors

sobel_ampsobel_ampSobelAmpSobelAmpsobel_amp, edges_imageedges_imageEdgesImageEdgesImageedges_image, regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing, diff_of_gaussdiff_of_gaussDiffOfGaussDiffOfGaussdiff_of_gauss, thresholdthresholdThresholdThresholdthreshold, dyn_thresholddyn_thresholdDynThresholdDynThresholddyn_threshold, auto_thresholdauto_thresholdAutoThresholdAutoThresholdauto_threshold, mean_imagemean_imageMeanImageMeanImagemean_image, binomial_filterbinomial_filterBinomialFilterBinomialFilterbinomial_filter, gauss_filtergauss_filterGaussFilterGaussFiltergauss_filter, anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusionanisotropic_diffusion, sigma_imagesigma_imageSigmaImageSigmaImagesigma_image, median_imagemedian_imageMedianImageMedianImagemedian_image

See also

median_imagemedian_imageMedianImageMedianImagemedian_image, binomial_filterbinomial_filterBinomialFilterBinomialFilterbinomial_filter, gauss_filtergauss_filterGaussFilterGaussFiltergauss_filter, crop_partcrop_partCropPartCropPartcrop_part

Module

Foundation