zw版【转发·*nvp系列Delphi例程】HALCON MirrorImage2
procedure TForm1.Button1Click(Sender: TObject);
var
op: HOperatorSetX;
img, img1: HUntypedObjectX;
w, h: OleVariant;
begin
op := CoHOperatorSetX.Create;
op.ReadImage(img, 'circular_barcode');
op.GetImageSize(img, w, h);
HWindowX1.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowX1);
op.MirrorImage(img, img1, 'row');
HWindowX2.SetPart(0, 0, h - 1, w - 1);
img1.DispObj(HWindowX2);
HWindowX2.SetColor('red');
HWindowX2.SetTposition(10, 10);
HWindowX2.WriteString('MirrorImage - row');
op.MirrorImage(img, img1, 'column');
HWindowX3.SetPart(0, 0, h - 1, w - 1);
HWindowX3.SetColor('white');
img1.DispObj(HWindowX3);
HWindowX3.SetColor('red');
HWindowX3.SetTposition(10, 10);
HWindowX3.WriteString('MirrorImage - column');
op.MirrorImage(img, img1, 'main');
HWindowX4.SetPart(0, 0, h - 1, w - 1);
HWindowX4.SetColor('white');
img1.DispObj(HWindowX4);
HWindowX4.SetColor('red');
HWindowX4.SetTposition(10, 10);
HWindowX4.WriteString('MirrorImage - main');
end;