How to use 2D Translation and Rotational error to get offset value for new point?

401 Views Asked by At

Here I am trying to detect FIDUCIAL points on PCB in real time using camera.

After googling for Two days and reading many post and blog. I found that I have to do something called translational error detection and rotational error detection.

ie. Location of fiducial (object) on Image for actual() vs required(Known location)

In image below

Black Square in bottom right and Top left the Fiducial point which I need to detect and use for error check.

Here (A) is correct Image and (B) is image with error in location of fiducial point.

enter image description here

Now I have to draw line on image, with respect to fiducial point. So on image A I can draw line (RED) as shown in below image (A).

But if I draw Same line on image (B), which has error due to the way it has been placed I will draw the wrong line (RED) if I use the same value of X and Y.

But here for Correct line on (B) I need to ADD ERROR value to my X and Y values so that I can draw correct line (GRREN) as shown in (B).

enter image description here

So here, I am trying to find out how can I archive this;

1) Detect the TWO fiducial point, get their location on Image, compare it with the correct location.

2) Find the ERROR (in Angle / in transaction/ in rotation) ?

3) use the error value by adding it X and Y values.

Any help/Guide is appreciated ...!!! Thanks for your time.

EDIT

I have the Offset values, for both fidicual points, (DX1,DY1) and (DX2,DY2) is values by which original point is moved.

So, now how do I use it ? to correct the error in placement.