what you are looking for ist the CoordinateSystem property of the Stemmer.Cvb.Image object. You can reset rotation and origin by just settings an identity matrix (AffineMatrix2D.Identity). If you want to set a rotation, you’ll need to do this by creating the coordinate system’s matrix accordingly, e.g.
img.CoordinateSystem = new AffineMatrix2D(
new Matrix2D(Angle.FromDegrees(45.0)),
Point2Dd.Empty);
As this is on the image object, not on the display, this is completely independent of whether you are working with Forms or WPF.
Illusive, so I have now my Image Origin and rotation ready, I need now adding a Label on my Display, a label coming from the Image. I am using this to add labels:
But Stemmer.cvb.Image do not have the reference to add labels and I can not convert my Image Origin point (Stemmer.Cvb.Point2Dd) to System.Drawing.Point (Point2D needed to Add a Display Label).
So my question is How can I add a Label from my Image?
Thank you very much guys!
you transform a point coordinate (Point2D in your case) with a matrix (in your case the affine matrix you are using for the coordinate system, let’s call it cs) the way you usually would in mathematics: By multiplying them:
var pt = cs * Point2D;
Please note that it’s pointless to search for a possibility to add labels on the image object: Labels are entirely living on a display, not on an image.
The conversion from Point2Dd to System.Drawing.Point is done through an extension method (ToPoint) found in the namespace Stemmer.Cvb.Extensions.