| Cv2DenoiseTVL1 Method |
Primal-dual algorithm is an algorithm for solving special types of variational problems
(that is, finding a function to minimize some functional). As the image denoising,
in particular, may be seen as the variational problem, primal-dual algorithm then
can be used to perform denoising and this is exactly what is implemented.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void DenoiseTVL1(
IEnumerable<Mat> observations,
Mat result,
double lambda = 1,
int niters = 30
)
Public Shared Sub DenoiseTVL1 (
observations As IEnumerable(Of Mat),
result As Mat,
Optional lambda As Double = 1,
Optional niters As Integer = 30
)
public:
static void DenoiseTVL1(
IEnumerable<Mat^>^ observations,
Mat^ result,
double lambda = 1,
int niters = 30
)
static member DenoiseTVL1 :
observations : IEnumerable<Mat> *
result : Mat *
?lambda : float *
?niters : int
(* Defaults:
let _lambda = defaultArg lambda 1
let _niters = defaultArg niters 30
*)
-> unit
Parameters
- observations
- Type: System.Collections.GenericIEnumerableMat
This array should contain one or more noised versions
of the image that is to be restored. - result
- Type: OpenCvSharpMat
Here the denoised image will be stored. There is no need to
do pre-allocation of storage space, as it will be automatically allocated, if necessary. - lambda (Optional)
- Type: SystemDouble
Corresponds to \f$\lambda\f$ in the formulas above.
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. - niters (Optional)
- Type: SystemInt32
Number of iterations that the algorithm will run.
Of course, as more iterations as better, but it is hard to quantitatively
refine this statement, so just use the default and increase it if the results are poor.
See Also