本文整理汇总了Java中com.ni.vision.NIVision.imaqColorThreshold方法的典型用法代码示例。如果您正苦于以下问题:Java NIVision.imaqColorThreshold方法的具体用法?Java NIVision.imaqColorThreshold怎么用?Java NIVision.imaqColorThreshold使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ni.vision.NIVision
的用法示例。
在下文中一共展示了NIVision.imaqColorThreshold方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: operate
import com.ni.vision.NIVision; //导入方法依赖的package包/类
@Override
public Image operate (Image source)
{
// Creating new monocolor image with no border
Image thresholdImage = NIVision
.imaqCreateImage(ImageType.IMAGE_U8, 0);
// @TODO: Store NIVision.Range instead of integers so we don't make a
// new one every time.
NIVision.imaqColorThreshold(thresholdImage, source, 255,
NIVision.ColorMode.HSL, this.hueRange, this.satRange,
this.lumRange);
source.free();
return (thresholdImage);
}
示例2: operate
import com.ni.vision.NIVision; //导入方法依赖的package包/类
@Override
public Image operate (Image source)
{
// Creating new monocolor image with no border
final Image thresholdImage = NIVision
.imaqCreateImage(ImageType.IMAGE_U8, 0);
// @TODO: Store NIVision.Range instead of integers so we don't make a
// new one every time.
NIVision.imaqColorThreshold(thresholdImage, source, 255,
NIVision.ColorMode.HSL, this.hueRange, this.satRange,
this.lumRange);
source.free();
return thresholdImage;
}
示例3: threshold
import com.ni.vision.NIVision; //导入方法依赖的package包/类
private BinaryImage threshold(NIVision.ColorMode colorMode, int low1, int high1, int low2,
int high2, int low3, int high3) throws NIVisionException {
BinaryImage res = new BinaryImage();
NIVision.Range range1 = new NIVision.Range(low1, high1);
NIVision.Range range2 = new NIVision.Range(low2, high2);
NIVision.Range range3 = new NIVision.Range(low3, high3);
NIVision.imaqColorThreshold(res.image, image, 1, colorMode, range1, range2, range3);
res.free();
range1.free();
range2.free();
range3.free();
return res;
}