Notes of《Learning OpenCV 3》

1、the choosing of  filter

The Scharr filter is just as fast but more accurate than the Sobel filter, so it should always be used if you want to make
image measurements using a 3 × 3 filter.

2、there is a question when  reading the example code-example_19-01.cpp: program read file-intrinsics.xml and parse it.

  cv::FileStorage fs(argv[3], cv::FileStorage::READ);
  cv::Mat intrinsic, distortion;

  fs["camera_matrix"] >> intrinsic;
  fs["distortion_coefficients"] >> distortion;
  cout << intrinsic << endl;
  cout << distortion << endl;

3、Page 705:

when understanding this deriving process, the key point is that noting the origin of Xl nad Xr.which are different.

4、Page664

The first such option, which we select by setting method to cv::RANSAC, is the RAN‐SAC method (also known as the “random sampling with consensus” method).

5、Page711

The essential matrix E contains information about the translation and rotation that relate the two cameras in physical space (see Figure 19-10), and Fundamental  matrix F contains the same information as E in addition to information about the intrinsics of both cameras. Because F embeds information about the intrinsic parameters, it relates the two cameras in pixel coordinates

6、.Example 19-2. Computing the fundamental matrix using RANSAC
      This routine function: take 20 chessbord pictures,  then do calibration to get  the intrinsics and distortion coefficents. The intrinsics and distortion coefficents are wirtten in a XML file intrinsics.xml and also there is code to read and parse this XML file.

7、Page 721,Stereo calibration is the process of computing the geometrical relationship between the two cameras in space. In contrast,stereo rectification is the process of “correcting” the individual images so that they appear as if they had been taken by two cameras with row-aligned image planes。

8  degree of freedom(自由度的英文)

These four degrees of freedom are mostly freedom to make a mess since most choices of Hr will result in highly distorted images。

9、Page 739.

For each feature in the left image, we search the corresponding row in the right image for a best match.
After rectification, each row is an epipolar line, so the matching location in the right image must be along the same row (same y-coordinate) as in the left image; this matching location can be found if the feature has enough texture to be detectable

10、Page727  Hartley's algorithm and Bouguet's algorithm.

There are many ways to compute our rectification terms, of which OpenCV implements two: (1) Hartley’s algorithm, which can yield uncalibrated stereo using just the fundamental matrix; and (2) Bouguet’s algorithm,which uses the rotation and translation parameters from two calibrated cameras. Hartley’s algorithm can be used to derive structure from motion recorded by a single camera but may (when stereo-rectified) produce more distorted images than Bouguet’s calibrated algorithm.

CHAPTER 4 Images and Large Array Types

Page79 多通道数据的访问。

For a multichannel array, the analogous example would look like this:
cv::Mat m = cv::Mat::eye( 10, 10, 32FC2 );
printf(
"Element (3,3) is (%f,%f)\n",
m.at<cv::Vec2f>(3,3)[0],
m.at<cv::Vec2f>(3,3)[1]
);

at函数的参数是at(行,列)。

CHAPTER 6 Drawing and Annotating

Page 157:

There is a slightly confusing point here, which is mostly due to legacy in origin. The macro CV_RGB(r,g,b) produces a cv::Scalar s with value s.val[] = { b, g, r, 0 }. This is as it should be, as general OpenCV functions know what is red, green, or blue only by the order, and the ordering convention for image data isBGR as stated in the text.

表明在OpenCV里彩色图形的编码顺序是BGRA,即blue green red alpha。而在Java里Bitmap的配置里有

Bitmap.Config.ARGB_8888。 颜色分量的排列顺序和在OpenCV里是不同的。


 



 


 

猜你喜欢

转载自blog.csdn.net/zhashuiguangzi/article/details/86741139