Exemple #1
0
        public HXLDCont CreateShapeModel(HImage img, ModelParameter modelParameter, out HShapeModel model)
        {
            model = new HShapeModel(
                img,
                modelParameter.numLevels,
                modelParameter.angleStart,
                modelParameter.angleExtent,
                modelParameter.angleStep,
                modelParameter.scaleMin,
                modelParameter.scaleMax,
                modelParameter.scaleStep,
                modelParameter.optimization,
                modelParameter.metric,
                modelParameter.contrast,
                modelParameter.minContrast);



            var modelContours = Model.GetShapeModelContours(1);

            var homMat2D = new HHomMat2D();


            homMat2D.VectorAngleToRigid(0, 0, 0, ModelRegion.Row, ModelRegion.Column, 0);
            var contoursAffinTrans = modelContours.AffineTransContourXld(homMat2D);

            return(contoursAffinTrans);
        }
Exemple #2
0
 public HXLDCont CreateShapeModel(HRegion modelRegion, HImage img, ModelParameter modelParameter, out HShapeModel model)
 {
     return(CreateShapeModel(img.ReduceDomain(modelRegion), modelParameter, out model));
 }