- Home
- Installation
- Using Livekeys
- Plugins
- Developer
Plugin lcvphoto
This module contains elements for photo processing. It resembles open cv's photo module.
import lcvphoto 1.0
Summary
Type FastNlMeansDenoising | Denoises a grayscale or color image. |
Type FastNlMeansDenoisingMulti | Denoises a grayscale or color image using multiple frames. |
Type DenoiseTvl1 | Denoises a grayscale or color image. |
Type HueSaturationLightness | Changes the hue, saturation and lightness of an image |
Type Levels | Performs levels adjustments on an image. |
Type AutoLevels | Given the histogram AutoLevels will aoutmatically compute levels of an image. |
Type BrightnessAndContrast | Adjust the brightness and the contrast |
Type Sticher | Stiches a set of images toghether based on the list of matrixes and a set of parameters. |
Type AlignMTB | Aligns a set of input images in accordance to a list of parameters. |
Type CalibrateDebevec | Calibrates the lightness of the image in regards to the exsposure the image was shot in. |
Type CalibrateRobertson | Calibrates the lightness of the image in regard to exsposure the image was shot in. |
Type MergeDebevec | The resulting HDR image is calculated as weighted average of the exposures considering exposure values and camera response. |
Type MergeRobertson | The resulting HDR image is calculated as weighted average of the exposures considering exposure values and camera response. |
Type ToneMap | First step of transforming the image from the HDR to something that is viewable by the user |
Type TonemapDrago | Drago tonemapper. |
Type TonemapMantiuk | Mantiuk tonemapper. |
Type TonemapReinard | Reinard tonemapper. |
Type LevelSliders | Visual levels sliders. |
Type HueSaturationLightnessSliders | Visual sliders for hue saturation lightness. |
FastNlMeansDenoising
type
Inherits | MatFilter |
Property | bool colorAlgorithm |
Property | float h |
Property | float hColor |
Property | int templateWindowSize |
Property | int searchWindowSize |
Denoises a grayscale or color image.
Performs denoising using the Non-local Means Denoising algorithm. Sample in:
samples/photo/fastnlmeansdenoising.qml
bool colorAlgorithm
property
False to use fastNlMeansDenoising, true to use fastNlMeansDenoisingColored. By default, this is autodetected based on the number of channels in the source.
float h
property
Parameter regulating filter strength. Defaults to 3.
float hColor
property
The same as h but for color components. Defaults to 3. Only relevant when using the color algorithm (see colorAlgorithm).
int templateWindowSize
property
Size in pixels of the template patch that is used to compute weights. Should be odd. Defaults to 7.
int searchWindowSize
property
Size in pixels of the window that is used to compute weighted average for a given pixel. Has a large performance impact. Should be odd. Defaults to 21.
FastNlMeansDenoisingMulti
type
Inherits | FastNlMeansDenoising |
Property | int temporalWindowSize |
Denoises a grayscale or color image using multiple frames.
Variant of FastNlMeansDenoising using a history of frames. Implemented with a sliding window, which makes it suitable for video input.
All FastNlMeansDenoising options also apply to FastNlMeansDenoisingMulti.
Usage notes for video input:
- The algorithm is rather slow, which can be a problem for live video processing. Tweak the input framerate, searchWindowSize and temporalWindowSize as required.
- The output will lag
(temporalWindowSize - 1) / 2
frames behind the input. - Output will only start when the buffer is filled; expect
temporalWindowSize - 1
black output frames directly after recompiling the QML.
int temporalWindowSize
property
Size of the sliding window in frames. Higher values keep a longer history, which requires more memory and processing power and increases output delay. Must be an odd number. Defaults to 3.
DenoiseTvl1
type
Denoises a grayscale or color image.
Performs denoising using the primal-dual algorithm.
int bufferSize
property
Number of observations or noised versions of the image to be restored.
real lambda
property
As it is enlarged, the smooth (blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly speaking, as it becomes smaller, the result will be more blur but more sever outliers will be removed.
int nIters
property
Number of iterations that the algorithm will run. The more iterations the better, but it is hard to quantitatively refine this statement, so just use the default and increase it if the results are poor.
HueSaturationLightness
type
Inherits | MatFilter |
Property | int hue |
Property | int saturation |
Property | int lightness |
Changes the hue, saturation and lightness of an image
int hue
property
Controls the hue
int saturation
property
Controls the saturation
int lightness
property
Controls the lightness
Levels
type
Inherits | MatFilter |
Property | lightness |
Property | channels |
Performs levels adjustments on an image.
lightness
property
Controls the lightness overall channels
[white, contrast, black]
channels
property
Recieves the channel index and lightness parameters for the image.
channel index: [white, contrast, black]
Levels{
lightness: [10, 1.0, 255]
channels: {
0: [0, 1.0, 170]
}
}
AutoLevels
type
Inherits | MatFilter |
Given the histogram AutoLevels will aoutmatically compute levels of an image.
BrightnessAndContrast
type
Inherits | MatFilter |
Property | double brightness |
Property | double contrast |
Adjust the brightness and the contrast
double brightness
property
Can be any value.
double contrast
property
Should be between 0 and 10.
Sticher
type
Inherits | MatFilter |
Property | lcvcore#MatList input |
Property | Object params |
Stiches a set of images toghether based on the list of matrixes and a set of parameters.
lcvcore#MatList input
property
Matrix input list to the Stitcher.
Object params
property
Input parameters:
mode
:Stitcher.Panorama
orStitcher.Scans
tryUseGpu
:true
for gpu usage,false
otherwise
AlignMTB
type
Inherits | MatFilter |
Aligns a set of input images in accordance to a list of parameters.
Params:
- int maxBits
- int excludeRange
- bool cut
CalibrateDebevec
type
Inherits | MatFilter |
Property | list |
Property | Mat output |
Calibrates the lightness of the image in regards to the exsposure the image was shot in.
list input
property
List of images.
{qmlProperty:list
{qmlProperty:Object params} Calibration parameters
Params:
- int samples
- float lambda
- bool random
Mat output
property
Outputs single image based on calibrations
Output will contain much more data than the input.
CalibrateRobertson
type
Inherits | MatFilter |
Property | list |
Property | list |
Property | Object params |
Property | Mat output |
Calibrates the lightness of the image in regard to exsposure the image was shot in.
list input
property
List of images.
list times
property
Exposure time.
Object params
property
Calibration parameters.
Params:
- int maxIter
- float threshold
Mat output
property
Outputs single image based on calibrations.
Output will contain much more data than the input.
MergeDebevec
type
Inherits |
|
The resulting HDR image is calculated as weighted average of the exposures considering exposure values and camera response.
Merges images.
If calibrated with CalibrateDebevec, MergeDebevec must be used.
Parameters:
- src vector of input images
- dst result image
- times vector of exposure time values for each image
- response 256x1 matrix with inverse camera response function for each pixel value, it should have the same number of channels as images.
MergeRobertson
type
Inherits |
|
The resulting HDR image is calculated as weighted average of the exposures considering exposure values and camera response.
Merges images.
If calibrated with CalibrateRobertson, MergeRobertson must be used.
Parameters:
- src vector of input images
- dst result image
- times vector of exposure time values for each image
- response 256x1 matrix with inverse camera response function for each pixel value, it should have the same number of channels as images.
ToneMap
type
Inherits |
|
Property | Mat input |
Property | Object params |
First step of transforming the image from the HDR to something that is viewable by the user
Mat input
property
Input image,
Object params
property
Conversion parameters.
TonemapDrago
type
Inherits | ToneMap |
Drago tonemapper.
Available parameters:
- float gamma
- float saturation
- float bias
TonemapMantiuk
type
Inherits | ToneMap |
Mantiuk tonemapper.
Available parameters:
- float gamma
- float scale
- float saturation
TonemapReinard
type
Inherits | ToneMap |
Reinard tonemapper.
Available parameters:
- float gamma
- float intensity
- float lightAdapt
- float colorAdapt
LevelSliders
type
Inherits | Rectangle |
Property | alias input |
Property | lightness |
Property | levelByChannel |
Visual levels sliders.
alias input
property
Input image.
lightness
property
Contains the set lightness values.
levelByChannel
property
Contains the set level values per channel.
HueSaturationLightnessSliders
type
Inherits | Rectangle |
Property | alias hue |
Property | alias saturation |
Property | alias lightness |
Visual sliders for hue saturation lightness.
alias hue
property
Contains the hue that's controled by the slider
alias saturation
property
Contains the saturation that's controled by the slider
alias lightness
property
Contains the lightness that's controled by the slider