ConvertConfig Class
Definition
Namespace: P1.ImageSdk
Defines a set of RAW convertion- and filter-flags, that can be applied to a raw-image More…
public class ConvertConfig
Remarks
Defines a set of RAW convertion- and filter-flags, that can be applied to a raw-image
This class let you raw convert an IIQ raw-image. Use it to setup decoding and convertion options, before actual triggering the convertion with ApplyTo.
You can also apply different filters to the image, including scaling and cropping. You should note that the order the filters are applied is fixed. You cannot define any ordering on your own.
Any applied cropping or resizing dimensions might not be followed 100% by resampling algorithm. The resulting image might differ with a few pixels. Always check the output dimensions, and do not assume your image has the crop you requested.
Simple one-liner raw convertion and scaling var bitmap = new ConvertConfig().SetScale(0.25).AppleTo(new RawImage (“some-file.iiq”));
See also:
Members
Trigger processing of the applied options on the raw-buffer and return a new image as an RGB bitmap |
|
The value range of the Exposure property. |
|
The value range of the Contrast property. |
|
The value range of the Brightness property. |
|
The value range of the Saturation property. |
|
The value range of the ShadowRecovery property. |
|
The value range of the HighlightRecovery property. |
|
The value range of the BlackLevel property. |
|
The value range of the WhiteLevel property. |
|
The value range of the MidtoneLevel property. |
|
The value range of the X and Y field of each element of the curve type properties. |
|
The value range of the Method field of the Clarity property. |
|
The value range of the Factor field of the Clarity property. |
|
The value range of the amount of sharpening gain. |
|
The value range of radius of sharpening algorithm. |
|
The value range of the threshold for noise reduction. |
|
The value range of the amount of halo suppresion in sharpening |
|
The value range of the LuminanceNoiseReductionAmount property. |
|
The value range of the ColorNoiseReductionAmount property. |
|
The value range of the RGB channels of the White Balance Gain property. |
|
The value range of the FocalLength field of the GeometricCorrection property. |
|
The value range of the PixelSize field of the GeometricCorrection property. |
|
The value range of the xp, yp fields of the GeometricCorrection property. |
|
The value range of the k1, k2, k3, p1, p2 fields of the GeometricCorrection property. |
|
The value range of the b1, b2 fields of the GeometricCorrection property. |
Properties
Adjust the exposure of the image |
|
Adjust the contrast of the image. |
|
Adjust the brightness of the image |
|
Adjust the saturation of the image |
|
Used to extract details only in the highlights of the image by reducing the brightness of highlight pixels. |
|
Used to extract details only in the shadows of the image by making them brighter. |
|
Set the level used for black. This is a color that black color is mapped into (as in a level tool) |
|
Set the target level used for black. This is a color that black color is mapped into (as in a level tool) |
|
Set the midtone level. This is a color that is used as 50% level of the color values |
|
Set the level used for white. This is a color that white color is mapped into (as in a level tool) |
|
Set the level used for white target. This is a color that white color is mapped into (as in a level tool) |
|
Set the curve for red values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set the curve for green values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set image gain. TODO TNT |
|
Set the curve for blue values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set the curve for luma values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set the curve for rgb values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
The White Balance as gain for each channels (RGB). The valid range of each individual channel is between 0.0f and 10.0f. |
|
Setup the clarity tool. Its used as a tool to help control the local contrast in the image. |
|
The strength of the luminocity noise reduction. The value is between 0.0 and 1.0. Default is 0.0 |
|
Remove spike noise which may occure in high ISO captures |
|
The strength of the color noise reduction. The value is between 0.0 and 1.0. Default is 0.0 |
|
Adjust the amount of sharpening of the image. SharpeningAmount is a value between 0.0 and 10.0. Default is 0.0 |
|
Patch size for detecting detail, value between 0 and 3. Default is 1.0 |
|
Defines noise level or weak detail, which will be ignored. Value between 0 and 10. Default is 1.0. |
|
Amount of halo suppression, value between 0 and 1. Default is 0.0 |
|
A Boolean value indicating if the conversion will include Geometric Aberration correction |
|
A Boolean value indicating if the conversion will include Compensation of Geometric Aberration correction |
|
User can inject pressure value to be used for environmental compensetation |
|
Custom Geometric Aberration correction parameter set. If geometricCorrection is set to an invalid value, the the conversion will try to load the geometric correction data embedded in the source IIQ file |
|
A Boolean value indicating if the conversion will include Lens Light falloff correction for recognized lenses |
|
Setting that defines how to handle dual exposure |
|
Set EnableLinearPath setting. This setting is used to disable most of the processing steps to make sure that the debayering of the image into rgb domain is done only using a simple linear mapping enabling only the minimum needed processing. |
|
Set Polynomial transformation on bayer data. Six parametters are: ax, bx, cx, ay, by, cy. Range of x and y is [0, Width] and [0, height] |
|
Set Polynomial transformation on bayer data. Six parametters are: ax, bx, cx, ay, by, cy. Range of x and y is [0, 1] |
|
A Boolean value indicating if the conversion will include Chromatic Aberration (CA) correction |
|
Control generation of exposure mask in the mask image. True means enable. Default is disabled. When doing the actual convertion of an image - a mask buffer must be provided. If enabled the ExposureWarningThresholdOver and ExposureWarningThresholdUnder must be set in advance |
|
Set the value of the overexposed warning settings used when exposure mask generation is enabled. ExposeWarningThresholdOver is a value between 0.0 and 1.0 so it is independend oof the bitdepth of the image |
|
Set the value of the underexposed warning settings used when exposure mask generation is enabled. ExposeWarningThresholdUnder is a value between 0.0 and 1.0 so it is independend oof the bitdepth of the image |
|
enable the clip warning mask. For this setting to be used the mask image must be enabled and provided when processing the image |
|
Set the minimum required count of neighbour pixels that must be outside the threshold limits to be set in the clip warning mask. For this to take effect the mask image must be enabled . ClipWarningCount is a value between 1 and 8. |
|
Configures the Canvas Clipping for the conversion |
|
The cropping configuration of the outpu |
|
The scaling factor of the output image if set. |
|
The width of the output image if set. |
|
The height of the output image if set. |
Methods
Creates a clone of the current ConvertConfig, which can be modified independently of the current object |
|
Get the curve used by internal ImageSDK |
|
Get the curve used by internal ImageSDK |
|
Get the curve used by internal ImageSDK |
|
Get the curve used by internal ImageSDK |
|
Get the curve used by internal ImageSDK |
|
Set the pixel format for the output image. |
|
Gets the current configured pixel format, that this config object will produce |
|
Set the pixel format for the output image. |
|
The color space of the output image |
|
Sets the CanvasClip property |
|
Configure for cropping the raw-image |
|
Configure for cropping the raw-image |
|
Reset (remove) any applied crop |
|
Convenience method to reset (remove) any scaling. |
|
Configure scaling of the raw-image |
|
Configures the output scaling using an absolute output width. Height is automatically calculated from the aspect ratio. |
|
Configures the output scaling using an absolute output height. Width is automatically calculated from the aspect ratio. |
|
Adjust the contrast of the image |
|
Adjust the brightness of the image |
|
Adjust the saturation of colors in the image |
|
Adjust th exposure of the image. This is doing almost the same as the SetGain but using an exponential function. |
|
SetPolynomialTransformation(float ax, float bx, float cx, float ay, float by, float cy) |
Gain image nonlinearly. See PolynomialTransform |
SetPolynomialTransformationNormalized(float ax, float bx, float cx, float ay, float by, float cy) |
Gain image nonlinearly. See PolynomialTransformNormalized |
Adjust the gain of the image. This is doing almost the same as SetExposure but just as a linear gain value. |
|
Set the black level. This is a color that is regarded as black as in the level tool of most image editors |
|
Set the black level target. This is a color that is regarded as black as in the level tool of most image editors |
|
Set the midtone level. This is a color that is used as 50% level of the color values. Known from the level tool of most image editors |
|
Set the white level. This is a color that is regarded as white. Known from the level tool of most image editors |
|
Set the white level target. This is a color that is regarded as white. Known from the level tool of most image editors |
|
SetSharpening(float amount, float radius, float threshold, float haloAmount) |
Adjust the parameters of sharpening of the image. |
SetLuminanceNoiseReductionAmount(float luminanceNoiseReductionAmount) |
Sets the strength of the Luminance Noise Reduction algorithm to reduce noise. |
SetNoiseReductionSinglePixelEnabled(bool noiseReductionSinglePixelEnabled) |
Toggles Single Pixel noise reduction to eliminate hot pixels |
SetColorNoiseReductionAmount(float colorNoiseReductionAmount) |
Sets the strength of the Color Noise Reduction algorithm to reduce noise. |
Setup the clarity tool. Its used as a tool to help control the local contrast in the image. A negative value will decrease local contrast and and positive increase it. Its a combination of selecting a method and a factor (amount) |
|
Set shadow recovery. Used to extract details only in the shadows of the image by making them brighter. |
|
Set highlight recovery. Used to extract details only in the highlights of the image by reducing the brightness of highlight pixels. |
|
SetWhiteBalanceGain(float redGain, float greenGain, float blueGain) |
Sets the White Balance as gain for each channels (RGB) |
Sets the White Balance mode |
|
Sets the Enabled state of the Geometric Aberration correction |
|
SetGeometricCorrection(GeometricCorrection geometricCorrection) |
Sets Geometric Aberration correction parameters to be applied. |
Sets the Enabled to allow to compensation Geometric Aberration for environmental variables |
|
Inject a value for the environmental pressure variable used for compensation of Geometric Aberration |
|
Set EnableLinearPath setting. This setting is used to disable most of the processing steps to make sure that the debayering of the image into rgb domain is done only using a simple linear mapping enabling only the minimum needed processing. |
|
SetExposureMaskThreshold(float overExposureThreshold, float underExposureThreshold) |
Threshold for exposure mask |
Threshold for clipping count |
|
Set the curve for red values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set the curve for green values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set the curve for blue values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set the curve for luma values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Set the curve for rgb values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. |
|
Stores the ConvertConfig object to a persisted model located at filePath |
|
Returns a serialized JSON representation of the ConvertConfig object |
|
ApplyTo(RawImage image, Func< UInt32, byte[]> allocFunction=null) |
Trigger processing of the applied options on the raw-image and return a new image as an RGB bitmap |
ApplyTo(RawImage image, ref BitmapImage maskImage, Func< UInt32, byte[]> allocFunction=null) |
Trigger processing of the applied options on the raw-image and return a new image as an RGB bitmap |
Creates a ConvertConfig object from a persisted model located at filePath |
|
Creates a ConvertConfig object from a well-formed JSON string |
|
Returns a list of ‘Y’ values of the Curve defined by the input Points. This is applicable for the RGB/LumaCurve) |