FAQ Database Discussion Community


Doing camera calibration by having intrinsic matrix and distortion coefficients in OPENCV and in real-time video

python,c++,opencv,camera-calibration,real-time-updates
I have already used the calibration code provided by opencv to calibrate my camera and everything went ok! I also can undistort any image I want by applying the parameters using a code written in Python. import numpy as np import cv2 # copy parameters to arrays K = np.array([[385.58130632872212,...

Project image points to object points with opencv 3.0.0 beta

opencv,camera-calibration,fisheye,opencv3.0
I use opencv 3.0.0 beta. I calibrated my camera and I would like project image points (2D) to points in 3D. I saw the function :void fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, InputArray rvec, InputArray tvec, InputArray K, InputArray D, double alpha=0, OutputArray jacobian=noArray()) but I would like the opposite projection. I...

OpenCV Error through calibration tutorial (solvePnPRansac)

python,computer-vision,camera-calibration,opencv3.0,pose-estimation
Can anyone know what is going on with this opencv error ? cv2.error: /home/desktop/OpenCV/opencv/modules/core/src/matrix.cpp:2294: error: (-215) d == 2 && (sizes[0] == 1 || sizes[1] == 1 || sizes[0]*sizes[1] == 0) in function create Line code which raise it is : rvecs, tvecs, inliers = cv2.solvePnPRansac(objp, corners2, cameraMatrix, dist) I...

camera frame world coordinates relative to fiducial

opencv,computer-vision,camera-calibration,perspectivecamera
I am trying to determine camera position in world coordinates, relative to a fiducial position based on fiducial marker found in a scene. My methodology for determining the viewMatrix is described here: Determine camera pose? I have the rotation and translation, [R|t], from the trained marker to the scene image....

camera extrinsic calibration

computer-vision,camera-calibration,extrinsic-parameters
I have a fisheye camera, which I have already calibrated. I need to calculate the camera pose w.r.t a checkerboard just by using a single image of said checkerboard,the intrinsic parameters, and the size of the squares of the checkerboards. Unfortunately many calibration libraries first calculate the extrinsic parameters from...

disparity map's color is reversed

c++,opencv,camera-calibration,disparity-mapping
the result of my disparity map is good. as I know , close items should be light and far items are dark . The opposite happens with me. this is my code: CvStereoBMState *BMState = cvCreateStereoBMState(); assert(BMState != 0); BMState->preFilterSize=31/*41*/; BMState->preFilterCap=41/*31*/; BMState->SADWindowSize=31/*41*/; BMState->minDisparity=-0/*-64*/; BMState->numberOfDisparities=112/*128*/; try { while(true) { if(true) {...

OpencCV error during calibration

c++,opencv,camera-calibration,calibration
This is my calibratio code: void calibrate() { int numBoards = 21; int board_w = 6; int board_h = 9; Size board_sz = Size(board_w, board_h); int board_n = board_w*board_h; vector<vector<Point3f> > object_points; vector<vector<Point2f> > imagePoints1, imagePoints2; vector<Point2f> corners1, corners2; vector<Point3f> obj; for (int j=0; j<board_n; j++) { obj.push_back(Point3f(j/board_w, j%board_w, 0.0f));...

How to draw 3D Coordinate Axes with OpenCV for face pose estimation?

opencv,image-processing,3d,computer-vision,camera-calibration
Suppose I have got the face euler angles (pitch, yaw, roll) now. How can draw the 3D Coordinate Axes which show the face pose. Here is an exmaple from here: ...

Image correction in visual odometry

matlab,computer-vision,camera-calibration,matlab-cvst
I am trying to implement visual odometry algorithm via matlab. According to step 2 in http://en.wikipedia.org/wiki/Visual_odometry. I need to do image correction before feature detection, matching and motion estimation. I think I need to undistort image like the function (here) in matlab. Can I use the original intrinsic and extrinsic...

Android Camera2 API Focus Distance Calibration

android,camera-calibration
Currently I have a Nexus 9 that returns a value of "Approximated" when mCameraCharacteristics.get(CameraCharacteristics.LENS_INFO_FOCUS_DISTANCE_CALIBRATION) is called. My question is...what devices are out there that allows for a "Calibrated" device? Or is there a way I can calibrate the camera? An accurate focus distance is very helpful for my application. ...

Finding 3D coordinate of object

opencv,image-processing,3d,camera-calibration
I try to find 3D coordinate (in world )of abject that I know his coordinate in image .so after some research in internet I succed to find X and Y cordinate. but I can't find Z that is my program in openCV void drawAndCalcul3D(int x,int y,Mat& frame) { cv::Mat uvPoint...

ROS Image subscriber - window popup does not appear

opencv,camera-calibration,ros,subscriber
I am following image subscribe tutorial on official ROS page. when I run my_subscriber no window popup appears. I type - rosrun image_transport_tutorial my_subscriber output is - init done opengl support available And then nothing happens. (even the output "init done" is unexplained because there is not output line in...

Determine camera pose?

c++,opencv,computer-vision,camera-calibration,perspectivecamera
I am trying to determine camera pose based on fiducial marker found in a scene. Fiducial: http://tinypic.com/view.php?pic=4r6k3q&s=8#.VNLnWTVVK1E Current process: Use SIFT for feature detection Use SIFT for descriptor extraction Use FLANN for matching Find the homography using CV_RANSAC Identify the corners of the fiducial Identify corners of the fiducial in...

What is the difference between using an A0 and an A4 camera calibration board ? Is there any ? If yes, what and why?

matlab,opencv,computer-vision,camera-calibration,matlab-cvst
What is the difference between using an A0 and an A4 camera calibration board ? Is there any ? If yes, what and why ? For example, here they use A3 board http://se.mathworks.com/help/vision/ref/estimatecameraparameters.html but here a much larger board : http://se.mathworks.com/help/vision/examples/stereo-calibration-and-scene-reconstruction.html . Why not simply always use a small A4...

Creating stereoParameters class in Matlab: what coordinate system should be used for relative camera rotation parameter?

matlab,computer-vision,coordinate-systems,camera-calibration,matlab-cvst
stereoParameters takes two extrinsic parameters: RotationOfCamera2 and TranslationOfCamera2. The problem is that the documentation is a not very detailed about what RotationOfCamera2 really means, it only says: Rotation of camera 2 relative to camera 1, specified as a 3-by-3 matrix. What is the coordinate system in this case ? A...