kylemcdonald / ofxCv

Alternative approach to interfacing with OpenCv from openFrameworks.
Other
658 stars 276 forks source link

intrinsics including distortion #33

Open elliotwoods opened 12 years ago

elliotwoods commented 12 years ago

i know you don't agree in general on the definition of intrinsics including distortion but i think it'd be highly practical (and make camera settings more portable) if distortion was included in intrinsics then intrinsics itself would deal with unprojection, etc and Calibration's role would generally be to generate intrinsics instances (+stereo and other things)

kylemcdonald commented 12 years ago

i did run into a situation while at ycam where i would have liked intrinsics to include distortion, i remember. but i didn't implement it because i couldn't think of a clearer way of organizing things than the current structure.

the main goals are:

  1. conceptual clarity: classes and methods are separated clearly, in a way that makes sense to explain.
  2. terseness. any common task should be one line of code. loading calibration data should be one line. undistorting an image should be another. getting the relative transformation from one calibrated camera to another is one line.

for me, those goals are satisfied by the current Calibration and Intrinsics classes, but i'm always open to suggestions. since you're "in it" right now, if you can think of a consistent and clear way to restructure Calibration and Intrinsics, i'd be glad to take a look. it just makes a lot of sense to me that distCoeffs are in Calibration, because Calibration handles conversion to/from a distorted camera.

better than an issue might be some pseudocode, to indicate where you think each method should be, and where the data should be stored.