Intrinsic camera matrix intialization (Bugfix #3312)


Added by Bastian Schubert almost 4 years ago. Updated over 3 years ago.


Status:Done Start date:2013-10-10
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:calibration, 3d
Target version:Next Hackathon Estimated time:0.00 hour
Affected version:2.4.0 - 2.4.5 Operating System:Any
Difficulty:Easy HW Platform:Any
Pull request:https://github.com/Itseez/opencv/pull/1649

Description

When working with normalized image coordinates the principal point is initialized to 0/0. This is happening in the function cvInitIntrinsicParams2D in this lines:

a[2] = (imageSize.width - 1)*0.5;
a[5] = (imageSize.height - 1)*0.5;

As i'm only working with normalized coordinates, i would appreciate an initialization of 0.5/0.5 for the principal point. I would suggest the following:

a[2] = (!imageSize.width) ? 0.5 : (imageSize.width - 1)*0.5;
a[5] = (!imageSize.height) ? 0.5 : (imageSize.height - 1)*0.5;

History

Updated by Kirill Kornyakov almost 4 years ago

Well, it would be great if you could send a pull request for review.

  • Target version set to Next Hackathon
  • Description changed from When working with normalized image coordinates the principal point is initial... to When working with normalized image coordinates the principal point is initial... More
  • Tracker changed from Bug to Bugfix

Updated by Bastian Schubert almost 4 years ago

Kirill Kornyakov wrote:

Well, it would be great if you could send a pull request for review.

How?

Updated by Kevin Carr almost 4 years ago

I created a pull request for this issue here: https://github.com/Itseez/opencv/pull/1649

Updated by Kevin Carr over 3 years ago

The above pull request has been merged into 2.4.

  • % Done changed from 0 to 100

Updated by Dmitry Retinskiy over 3 years ago

  • Status changed from New to Done
  • Pull request set to https://github.com/Itseez/opencv/pull/1649

Also available in: Atom PDF