←Select platform

Lambda Property

Summary
Gets or sets the lambda factor.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public int Lambda { get; set; } 
@property (nonatomic, assign) NSInteger lambda; 
public int getLambda(); 
public void setLambda( 
   int intValue 
); 
public: 
property int Lambda { 
   int get(); 
   void set (    int ); 
} 
Lambda # get and set (LambdaConnectednessCommand) 

Property Value

Valid values for Lambda range from 1 to 1000. By default, the value is 950.

Remarks

Small values of lambda can result in one region. Large values can result in an over-segmented image.

Example
C#
Java
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
public void LambdaConnectednessCommandExample() 
{ 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   //Load an image 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\NaturalFruits.jpg")); 
 
   //Prepare the command 
   LambdaConnectednessCommand command = new LambdaConnectednessCommand(); 
   command.Lambda = 985; 
 
   //Apply 
   command.Run(image); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
 
import java.io.File; 
import java.io.IOException; 
 
import org.junit.*; 
import org.junit.Test; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import static org.junit.Assert.*; 
 
import leadtools.*; 
import leadtools.codecs.*; 
import leadtools.imageprocessing.core.LambdaConnectednessCommand; 
 
 
public void lambdaConnectednessCommandExample() { 
   String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images"; 
 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.setThrowExceptionsOnInvalidImages(true); 
 
   // Load an image 
   RasterImage image = codecs.load(combine(LEAD_VARS_IMAGES_DIR, "NaturalFruits.jpg")); 
 
   // Prepare the command 
   LambdaConnectednessCommand command = new LambdaConnectednessCommand(); 
   command.setLambda(985); 
   assertTrue(command.getLambda() == 985); 
 
   // Apply 
   command.run(image); 
 
   // Save the image 
   String outputFileName = combine(LEAD_VARS_IMAGES_DIR, "lambda_result"); 
   codecs.save(image, outputFileName, RasterImageFormat.JPEG, 0); 
 
   assertTrue(new File(outputFileName).exists()); 
   System.out.printf("Command run, image saved to %s", outputFileName); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.3.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.