camera-calibration

Re-distort points with camera intrinsics/extrinsics

≯℡__Kan透↙ 提交于 2019-12-03 09:30:23
问题 Given a set of 2D points, how can I apply the opposite of undistortPoints ? I have the camera intrinsics and distCoeffs and would like to (for example) create a square, and distort it as if the camera had viewed it through the lens. I have found a 'distort' patch here : http://code.opencv.org/issues/1387 but it would seem this is only good for images, I want to work on sparse points. 回答1: This question is rather old but since I ended up here from a google search without seeing a neat answer I

Easy monocular camera self-calibration algorithm

北战南征 提交于 2019-12-03 09:10:40
I have a video of a road/building and I want to create a 3D model out of it. The scene I am looking at is rigid and the drone is moving. I assume not having any extra info like camera pose, accelerations or GPS position. I would love to find a python implementation that I can adapt to my liking. So far, I have decided to use the OpenCV calcOpticalFlowFarneback() for optical flow, which seems reasonably fast and accurate. With it, I can get the Fundamental Matrix F with findFundamentalMat() . So far so good. Now, according to the tutorial I am following here , I am supposed to magically have

Find distorted rectangle in image (OpenCV)

一个人想着一个人 提交于 2019-12-03 07:24:54
I am looking for the right set of algorithms to solve this image processing problem: I have a distorted binary image containing a distorted rectangle I need to find a good approximation of the 4 corner points of this rectangle I can calculate the contour using OpenCV, but as the image is distorted it will often contain more than 4 corner points. Is there a good approximation algorithm (preferably using OpenCV operations) to find the rectangle corner points using the binary image or the contour description? The image looks like this: Thanks! Dennis Andrey Sboev Use cvApproxPoly function to

camera calibration MATLAB toolbox

◇◆丶佛笑我妖孽 提交于 2019-12-03 07:09:06
I have to perform re-projection of my 3D points (I already have data from Bundler). I am using Camera Calibration toolbox in MATLAB to get the intrinsic camera parameters. I got output like this from 27 images (chess board; images are taken from different angles). Calibration results after optimization (with uncertainties): Focal Length: fc = [ 2104.11696 2101.75357 ] ± [ 23.13283 22.92478 ] Principal point: cc = [ 969.15779 771.30555 ] ± [ 21.98972 15.25166 ] Skew: alpha_c = [ 0.00000 ] ± [ 0.00000 ] Distortion: kc = [ 0.11555 -0.55754 -0.00100 -0.00275 0.00000 ] ± [ >0.05036 0.59076 0.00307

create opencv camera matrix for iPhone 5 solvepnp

我的未来我决定 提交于 2019-12-03 04:36:45
问题 I am developing an application for the iPhone using opencv. I have to use the method solvePnPRansac: http://opencv.willowgarage.com/documentation/cpp/camera_calibration_and_3d_reconstruction.html For this method I need to provide a camera matrix: __ __ | fx 0 cx | | 0 fy cy | |_0 0 1 _| where cx and cy represent the center pixel positions of the image and fx and fy represent focal lengths, but that is all the documentation says. I am unsure what to provide for these focal lengths. The iPhone

What are the main references to the fish-eye camera model in OpenCV3.0.0dev?

谁都会走 提交于 2019-12-03 04:24:46
问题 I am wrestling with the Fish-Eye Camera Model used in OpenCV 3.0.0.dev . I have read the documentation in this link several times, especially the "Detailed Description" part and formulas modeling fish-eye distortion. By now I have two concerns: Based on the projection models listed here and their conceptual explanations in " Accuracy of Fish-Eye Lens Model " By Hughes, I can't figure out which projection model has been used in the OpenCV implementation. Since the description is so concise, I

Convert between MATLAB stereoParameters and OpenCV stereoRectify stereo calibration

回眸只為那壹抹淺笑 提交于 2019-12-03 03:52:13
I wish to convert a MATLAB stereoParameters structure to intrinsics and extrinsics matrices to use in OpenCV's stereoRectify. If I understood http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html and http://mathworks.com/help/vision/ref/stereoparameters-class.html , stereoParameters.CameraParameters1 and stereoParameters.CameraParameters2 store the intrinsic matrices and the other members of stereoParameters the extrinsic ones. I think I got this mapping Intrinsics: cameraMatrix1 = stereoParameters.CameraParameters1.IntrinsicMatrix' cameraMatrix2 =

How can I undistort an image in Matlab using the known camera parameters?

◇◆丶佛笑我妖孽 提交于 2019-12-03 03:46:11
This is easy to do in OpenCV however I would like a native Matlab implementation that is fairly efficient and can be easily changed. The method should be able to take the camera parameters as specified in the above link. You can now do that as of release R2013B, using the Computer Vision System Toolbox. There is a GUI app called Camera Calibrator and a function undistortImage . The simplest and most common way of doing undistort (also called unwarp or compensating for lens distortion) is to do a forward distortion on a chosen output photo size and then a reverse mapping using bilinear

Fisheye/Wide-Angle lens Calibration in OpenCV

蹲街弑〆低调 提交于 2019-12-03 03:27:30
I know the default OpenCV Calibration systems model a Pinhole camera, but I'm working with a system using extremely wide FOV lens (187-degrees). If there any existing way to do this in OpenCV, or to work with just wide lenses? Or will I have to rewrite all the calibration/undistort for my system? Seems there's no good OpenCV way to do this. I wound up using OCamLib to do the actual calibration, then writing my own "undistortPoints" function (using Scaramuzza's algorithms) to undistort 2D image points into 3D unit vectors (rather than 2D points). Unfortunately, this also breaks lots of other

Meaning of the retval return value in cv2.CalibrateCamera

走远了吗. 提交于 2019-12-03 03:19:50
as the title says, my question is about a return value given by the calibrateCamera function from OpenCv. http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html I have a functionnal implementation in python to find the intrinsic parameters and the distorsion coefficients of a Camera using a Black&White grid. The question is more about the retval returned by the function. If i understood correctly it is the "the average re-projection error. This number gives a good estimation of precision of the found parameters. This should be as close to zero as possible." as