Image Preprocessor Settings

< Previous | Contents | Manuals Home | Boris FX | Next >

Image Preprocessor Settings

Image preprocessor objects are generated by shot.live and shot.preset and correspond to the settings accessed via the image preprocessor dialog.

Shot.preset is a list of the image preprocessor presets (prepsets) for a shot. The same prepset object type is used for the actual live prepsets as for pre-stored prepsets, though some operations can be performed only on the live set, and some only on the stored sets. You should not edit the currently active prepset (as accessed via shot.prepset). Use the prepset object obtained from live for active prepsets: when a different prepset is made active, the current settings are copied back into storage, over-writing any changes made to the stored version while the prepset was active.

NOTE: Use new shot.preset to create new prepsets, as copies of the current image preprocessor configuration . The returned object is the stored prepset, but the new prepset has been Activate()’d already.

You can change the name and affects of the new prepset with that returned value, but you must use shot.live to configure the distortion, stabilization, etc of the new prepset.

Attributes marked with “(genkey)” are animated tracks. See the beginning of Objects and Attributes for more information. The number of derived image preprocessor attributes is even larger than it seems!

.Activate() Activates this prepset by storing away the live prepset’s value in its storage area, copying in this prepset’s values, and marking it active.

Stored prepsets only.

.active Whether this prepset is active or not. Stored prepsets only, read-only.

.adjustMotion Stabilizer manual position pan/tilt adjustment.

2-D point (degrees, genkey)

.adjustRotation Stabilizer manual rotation adjustment (degrees, genkey)

.adjustScale Stabilizer manual scale adjustment (genkey)

.affects Bit vector of which groups of controls the prepset affects, ie on the popup creating new prepsets. 1: Resolution, 2:Color, 4: Blur,

8:Lens, 16: Stabilization, 32: Region of Interest. Stored prepsets only.

.appliedDistortion(radius) Calculate the radius resulting if the supplied

radius is distorted by the present prepset parameters (live prepset only). Use WarpPt in most cases!

.apply Apply lens distortion (1), or remove (0)

.blur Blur value, pixels (genkey). See also

.lumaBlur, .chromaBlur

.channel Channel selection (small integer)

.chromaBlur Blur applied to chrominance only, typically used for DNG (pixels, genkey). See also .blur,

.lumaBlur.

.ClearActual() Clears the “actual” stabilization track. Live prepset only.

.ClearReference() Clears the “reference” stabilization track. Live prepset only.

.color Color saturation setting (genkey)

.colormapName Color map name. This is the human-readable name for prepsets selected from the user or system areas, or a full filename for maps opened via the Open button. See Scene.LoadColorMap().

.cubic Cubic distortion coefficient (genkey)

.denoise Denoise setting (genkey)

.description Textual description for this (stored) prepset.

.Deactivate() Deactivates the active prepset by clearing

.active. Any existing changes in the live side are not written to the active prepset.

.Disconnect() Disconnects the live preset from representing any stored preset, making sure the values are saved for the current preset, then clearing

.active for the stored version.

.distort Image preprocessor distortion coefficient (genkey). Same as .quadratic.

.eccentricity Distortion eccentricity (genkey)

.exposure Exposure adjustment in f-stops

.FilledInner() List of two U/V points defining the largest bounding box fully filled with source pixels of the image preprocessor’s output image.

.FilledOuter() List of two U/V points defining the smallest bounding box fully enclosing all source pixels in the image preprocessor’s output image.

.FilledScale() A scaling factor that puts the outer edge of the image entirely outside image area. This is shape-dependent and therefore can be a tighter bound than using FilledInner(), with less loss of resolution.

.fov Stabilizer’s FOV track, controls keystoning and FOV-controlled distortion and squeeze (genkey).

.frequency Stabilization filter cutoff frequency (genkey)

.HasActual() 1/0 if the prepset has an actual stabilization track. Live prepset only.

.HasReference() 1/0 if the prepset has a reference stabilization track. Live prepset only.

.hipass Hipass filter frequency value, pixels. (genkey)

.hue Hue alteration (genkey)

.inMillimeters 1/0 depending on whether the selected lens prepset file, if any, requires absolute millimeters radii as input.

.interpolation Interpolation mode. Small integer.

.invert Invert channels

.isImageMap Returns 1 if the live prepset has a UVmap active.

.isSelected Whether or not the PrepSet is selected. This is used internal to the PrepSet manager.

.kind Kind of prepset, for stored prepsets. 0: normal scene-only. 1: loaded from a file. 2: from the preference prepsets.

.kurve List of Kurves color corrector channels, 1..5 for Y, R, G, B, S. Live shot only.

.kurveMode Bit mask of enables for each channel, Y=1, R=2, G=4, B=8, S=16. Live shot only.

.kurveMax A point consisting of the maximum range of kurve values in X and Y (input and output) across all 5 channels. These are controlled by the knobs in the Kurves view.

.kurveMin A point consisting of the minimum range of kurve values in X and Y (input and output) across all 5 channels. These are always 0,0 at present, since there are no minimum-value knobs. Might be altered to pass negative floating values without change.

.lensAnyAnimated Whether any advanced or classic lens parameter is animated (ie not constant). Live prepset only.

.lensAtDefaults Whether any advanced or classic lens parameter is ever at a non-default value; if none are, there is no actual distortion is present. Warning: fisheye types are distorted at all times; this is not reflected in lensAtDefaults, see .lensHasDistortion. Live prepset only.

.LensCopyCameraDistortion(cam) Copy the advanced lens distortion

parameters from the camera into this live prepset. You must set the prepset’s lensType to match the camera’s lensType before performing this call. Any existing distortion values on this prepset are ignored.

.lensHasDistortion Whether any advanced or classic lens parameter is ever at a non-default value; if none are, there is no actual distortion present. Fine point: fisheye types are distorted at all times; so .lensHasDistortion is on at all times for fisheye lenses. See .lensAtDefaults for a report solely on whether values are at defaults or not! Live prepset only.

.lensNomBPW Nominal Sensor (back plate) Width reported by any lens prepset file that has been selected, or zero. Live prepsets only. Read- only.

.lensNomFOV Nominal Field of View reported by any lens prepset file that has been selected, or zero. Live prepsets only. Read-only.

.LensNParam() Return the number of parameters for the current advanced lens type. Live prepset only.

.LensParam(pno) Return the value of the lens parameter on the current frame. Note that any rotation angle is in radians, not degrees. See also

.lensparam1 etc. Live prepset only.

.lensparam1, .lensparam2,… Advanced lens parameter value for parameter

N (1 and up) on the current frame. Live prepset only.

.lensparam1IsKeyed, .lensparam2IsKeyed,… Whether or not the parameter is

keyed on the current frame. . Live prepset only.

.lensparam1Animated, .lensparam2Animated,… Whether or not the

parameter is animated (ie not constant). Live prepset only.

.LensParamDefault(pno) Default value for this parameter for the

current lens type.

.LensParamIsAnimated(pno) Return 1 if the parameter is truly animated, ie

has keys with multiple different values.

.LensParamIsKeyed(pno) Return 1 if the parameter is keyed on the

current frame, zero if it is not. Live prepset only.

.LensParamName(pno) Human-readable name of this parameter.

.LensParamNumKeys(pno) Number of keys, different than IsAnimated in

that the keys might be the same.

.LensParamRescaleFactor(pno, adj) Returns a factor that should be applied

to the given parameter if the shot image plane is being scaled up by adj (ie the dimensionless coordinates are being scaled down by a factor of adj). This factor will be some power of adj (including 0 th or 1st).

.LensParamSetKeyed(pno, val) Add a key on the current frame if val=1,

delete any key on the current frame if val=0, and truncate all keys following the current frame if val<0. Live prepset only.

.lensPrepsetName Name of any lens prepset file selected for this image preprocessor prepset. This is the human-readable name for prepsets selected from the user or system areas, or a full filename for maps opened via the Open button. See Scene.LoadLens().

.LensRescale(sfac) Adjust all the parameters to reflect a change in the image plane padding or cropping (not resolution!) by sfac. For example, the image is padded to increase its size by 20%, so sfac is 1.2, and the distortion coefficients get smaller to accommodate that (taking into account the x and y powers of the various coefficients). Note that horizontal and vertical scaling must be the same for this to work, thus there is only one scaling parameter. Live prepset only.

.LensResetParams() Reset the parameters to their default values,

based on the current advanced lens type. Live prepset only.

.LensSetParam(pno, val) Set the lens parameter to the given value,

creating a key on the current frame. Live prepset only.

.lensType Same as .lenstype. Advanced lens type: 1: classic perspective, 2: Radial-4 th, 3:

Anamorphic-6th, 4: Radial+Squash, 5:

Anamorphic-6th Merged, 6: Std. Radial-4 th, 7: Std. Anamorphic-6th, 8: Std. Anamorphic-6 th Merged, 9: Stereographic, 10: Equidistant, 11: Equisolid, 12: Orthographic. It will reset the lens parameters any time it is changed to a different value, and it will cause the proper advanced lens panel to appear (can only happen from Synthia or Python).

.lensTypeName Human-readable version of .lensType. Read- only!

.levels Vector of low/mid/high colors. Genkey.

.lumaBlur Blur applied to luminance only, typically for DNG images (pixels). See also .blur,

.chromaBlur.

.MakeStabilizeActual() Make actual stabilizer tracks, based on

currently-selected trackers. Rebuilds reference also.

.MakeStabilizeReference() Make reference stabilizer tracks, based on

the actual track (previously stored) and the current stabilizer modes.

.maxscale Maximum stabilization zoom scale factor

.mirror 2 bit field: 1=mirror left/right, 2=mirror top/bottom

.nm The name of the prepset (stored prepsets only). Be sure to set this immediately after creating a new prepset via new shot.prepset

.outAspect Output aspect ratio if overridden (see

.stabilizeMode)

.outHRes Output horizontal resolution if overridden

.outVRes Output vertical resolution if overridden

.padBottom Bottom padding

.padLeft Left-side padding

.padRight Right padding

.padTop Top padding

.quadratic Image preprocessor distortion coefficient (genkey), same as .distort.

.quartic Quartic distortion coefficient (genkey)

.removedDistortion(radius) Calculate the radius that, after distortion by

the present prepset parameters, would produce the specified radius. If no such radius exists, -1 is returned. (live prepset only). Use WarpPt in most cases!

.ResetPreset() Reset all the non-stabilizer (live) image preprocessor settings. Live prepset only.

.ResetStabilizer() Clears the stabilizer settings to their defaults.

Live prepset only.

.ROIcenter Center of Region Of Interest, 2-D point.

Genkey.

.ROIsize (Half-)Size of Region of Interest, 2-D point.

Genkey.

.scale Lens scaling value (genkey)

.shot Parent shot object for this prepset. Read/write for stored prepsets, read-only for the live prepset.

.stabilizeActual Stabilizer actual measured track. Rotation vector per frame. See MakeStabilizeActual()

.stabilizeFinal The final rotation vector resulting from the actual, reference, and manual adjustment tracks.

.stabilizeMode Small integer. Bit field. 1: Translate. 2: Rotate.

4: Zoom Animation. 8 Translate Animation.

32: Peg translation. 64: Peg rotation. 128: Resample. Make sure tracks are present before engaging stabilization. Call MakeStabilizeReference() after changes.

.stabilizeReference Stabilizer reference track. Rotation vector per

frame. See MakeStabilizeReference()

.subsample Subsampling selection, a small integer

.uniqueID A unique ID string (representing a 64-bit integer)

.vertScale Vertical scaling factor (genkey)

.vrmode Controls 360 VR processing: 0 none, 1 present, 2 remove, 3 apply. Remove and apply are for converting 360 VR to linear and then back.

.WarpPt(md, uvpoint) Computes a modified uv position due to

action of the image preprocessor (for live prepsets only). Returns null if the corresponding location can’t be determined. See Shot.AdjustTrackers for description of md: this routine does the image preprocessor warp for a single uv location, accessing the same underlying code as AdjustTrackers. To clarify: (md&1)==1 means to apply distortion, warping from undistorted coordinates to source distorted coordinates; (md&1)==0 means to remove distortion, warping from source coordinates to undistorted coordinates. Beware: frequently it is necessary to call this routine with the opposite of the overall function of image or mesh warping!

.willDelete Prepset should/will be deleted. Read/write.

.WriteBack() The current live image preprocessor settings are written back into this (stored) prepset.

©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.