computer vision - Exact measurement of translation and rotation of marker objects using OpenCV/EmguCV -


i measure displacement of object between 2 images. displacement can in image plane. result should give displacement, if possible in sub pixel accuracy.

there assumptions, should make easier, didn't me far:

  • the camara objective virtualy distortion free (telecentric) , oriented perpendicular object plane
  • the object plane never changes
  • the flat marker object (could known image, e.g. play card) in object plane, isn't scaled or warped -> rotational , translational changing.

my first approach take feature recognition example emgucv, find first object in first image, take relevant piece of picture, use template , search in second image. did work, little unsatisfactory. there scaling , warpping in homography matrix (probably because of points, assigned wrong) , placing accuracy quite bad.

i tried once demo of commercial image processing software halcon , worked charm in sub pixel accuracy. there can sort of least square fit of template image searching object in. result affine transform matrix , precise.

is there comparable in emgucv/opencv?

thank in advance!

edit:

found solution in emgucv in function

cameracalibration.estimaterigidtransform(pointf[] src, pointf[] dest, bool fullaffine); 

with fullaffine set false. problem before was, using

features2dtoolbox.gethomographymatrixfrommatchedfeatures(); 

from matching example.

found solution in emgucv in function

cameracalibration.estimaterigidtransform(pointf[] src, pointf[] dest, bool fullaffine); 

with fullaffine set false. problem before was, using

features2dtoolbox.gethomographymatrixfrommatchedfeatures(); 

from matching example.

the problem left small scaling still produced estimaterigidtransform, able calculate out of result.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -