文章目录
org.openpnp.vision.pipeline.stages.ConvertModelToKeyPoints
功能
将当前匹配结果模型转换为 OpenCV 的 KeyPoint(关键点)格式,便于后续阶段进行特征点处理、匹配或定位。
必须是先做检测,得到结果后才能用ConvertModelToKeyPoints将结果数据转成关键点列表。
参数
modelStageName
指定的前一阶段输出的模型对象(Result.model)
根据输入对象的实际类型,提取其中心点、尺寸、得分等信息,构造为 KeyPoint 对象
返回一个新的 Result,其 model 字段为单个 KeyPoint 或 List
例子
bash
<cv-pipeline>
<stages>
<cv-stage class="org.openpnp.vision.pipeline.stages.ImageRead" name="1" enabled="true" file="D:\3rd\openpnp_prj\openpnp-official\openpnp-test-images\my_test\obj.png" color-space="Bgr" handle-as-captured="false"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="0" enabled="true" conversion="Bgr2HsvFull"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.DetectRectlinearSymmetry" name="3" enabled="true" expected-angle="0.0" search-distance="100.0" search-angle="45.0" max-width="100.0" max-height="100.0" symmetric-left-right="true" symmetric-upper-lower="true" symmetric-function="FullSymmetry" asymmetric-function="OutlineSymmetryMasked" min-symmetry="10.0" sub-sampling="8" super-sampling="1" smoothing="5" gamma="2.5" threshold="128" min-feature-size="40.0" diagnostics="false" diagnostics-map="false" property-name="DetectRectlinearSymmetry"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.ConvertModelToKeyPoints" name="2" enabled="true" model-stage-name="3"/>
</stages>
</cv-pipeline>