ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2020-04-11 12:34:02 -0500 | received badge | ● Taxonomist |
2015-01-19 03:53:05 -0500 | received badge | ● Famous Question (source) |
2015-01-19 03:53:05 -0500 | received badge | ● Notable Question (source) |
2015-01-19 03:53:05 -0500 | received badge | ● Popular Question (source) |
2014-11-20 13:54:25 -0500 | received badge | ● Notable Question (source) |
2014-11-20 13:54:25 -0500 | received badge | ● Popular Question (source) |
2014-11-20 13:54:25 -0500 | received badge | ● Famous Question (source) |
2014-01-28 17:25:15 -0500 | marked best answer | 3D calibration in OpenCV without chessboard images? It takes me a long time to get functions to work in OpenCV so I'd like to know whether my overall plan makes sense before I dive into the details of trying to make it happen. (Open CV 2.3.1, Windows 7, C++) I'd be appreciative of any advice. Problem: I work at a skeet range & want to learn 3D information about the flight of the clay targets until they're hit. Data:
Plan
Questions
If it is
Thank you for any help. Charles |
2014-01-28 17:24:37 -0500 | marked best answer | Request for approach recommendation for an object identification Equipment - Windows 7, OpenCV 2.3.1, Visual Studio C++ 2010 Express, and, eventually, any digital video cameras needed, lenses (?) Project - I want to build a machine to identify characteristics of the flight of a baseball my son hits to the outfield (length, direction, height, etc) in realtime. Solution description - I will have two fixed digital video cameras observe the flight of the ball and will analyze those video streams with OpenCV to locate and track the ball. OpenCV methods There are three methods I've read about and/or seen to identify a ball 1. circle detection from edges 2. circle detection of blobs in a color range (orange ball and tennis ball examples) 3. moving circle blob detection by frame differencing (car and people identifying and tracking) I have done the first (cvtColor, GaussianBlur, Canny, HoughCircles) only well enough that I can get it to work with certain color backgrounds. I started the second but before I spend days making it work I realized I don't know what the best approach is. It seems to someone with no image analysis experience - me - that my PC could have difficulty in 1 finding the right edges since the weather and background will change from game to game. 2 could be difficult because there may be several blobs in the foreground (players' white uniforms, bases) and the background (white lettering or background on signs) that would also be baseball white, and because the baseball white would change as the sun went down or the ball got dirty. I think 3 is the best way to go but don't want to spend a lot of time making it work (my early attempts failed) if I'd just learn it's shortcomings for tracking a baseball after I had it functioning. The question: Which of 1-3 or 4, 5, 6 (I'm sure there are other methods you know of that I don't) is the most appropriate approach in OpenCV to learn characteristics about the 3D flight (distance, height, direction, etc.) of a baseball hit to the outfield? (I'm expecting to need to write the code myself but I wouldn't turn down portions of the program that are sent to me.) Thanks for any advice. |
2012-10-17 10:20:09 -0500 | received badge | ● Famous Question (source) |
2012-09-11 21:15:48 -0500 | received badge | ● Famous Question (source) |
2012-09-11 21:15:48 -0500 | received badge | ● Popular Question (source) |
2012-09-11 21:15:48 -0500 | received badge | ● Notable Question (source) |
2012-08-17 10:12:45 -0500 | received badge | ● Famous Question (source) |
2012-08-17 10:12:45 -0500 | received badge | ● Popular Question (source) |
2012-08-17 10:12:45 -0500 | received badge | ● Notable Question (source) |
2012-06-29 03:54:51 -0500 | received badge | ● Notable Question (source) |
2012-05-31 06:31:22 -0500 | asked a question | How do I forward map a point in Open CV with a mapx and mapy? Ultimately, I'm trying to determine the 3D location of a point I've identified in two cameras. I'm having trouble locating the 2D point for each camera from its mapx & mapy. I could not find in Bradski & Kaehler's OpenCV book how to do it and I have not gotten answers yet (or probaly ever) from Stack Overflow and Opencv-users. PROCESS
PROBLEM with 5: I have the x and y location of the point in the distorted and unrectified image for each camera(from #4) but I don't know how to get the undistorted and rectified x and y for each camera from the two maps initUndistortRectifyMap creates for each camera. I don't want to remap the whole image since I only want to learn the 3D location of one object for each frame. QUESTION: How do I forward map a point (get the undistorted and rectified x and y) with its two maps? |
2012-05-19 06:07:40 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? ... I don't understand the _Tp, &, or <> but I do understand a Point and integer and MSVC has complained when I've sent it just a Point, and when it's sent two ints or just one |
2012-05-19 06:07:40 -0500 | received badge | ● Commentator |
2012-05-19 06:06:51 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? Tried mapxC1.at(s. After 1st . MSVC says "no OL func matches arg list" & it undrlines 2nd arg & says too many arguments. Why does VC say this when as I'm typing the args it says arg options are "const_Tp & at<_Tp> (cv::Point pt) const or in the () could be things like int i0, i1 or just i0=0? ... |
2012-05-19 06:05:20 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? Does a single channel matrix mean that for each row & column matrix location there is one object, in this case a16 bit unsigned integer? |
2012-05-19 06:04:55 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? Thank you squared, Martin, The values held at the pixel represented by and x and a y pixel can be floats, right, just not the pixel (since a pixel is just 1 pixel at a location defined by two integers: row and column number)? |
2012-05-16 05:19:11 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? What I've done: PointC1x & PointC1y are floats that are the x & y of Keypoint objects in an image that's been cvtColor( ... CV_RGB2GRAY) Q.) Am I even creating the Mat for the map correctly mapxC1.create(sizeImage,1); ? Charles Mennell |
2012-05-16 05:17:45 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? 1.) MSVC++ says about mapxC1.at(PointC1x,PointC1y) that no overloaded functn matches argumnt list and that there are too many args in functn call. |
2012-05-16 05:17:32 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? Hi Martin, Thank you so much for your help! I know I'll reach the answer being assisted by an OCV expert. You told me how to put exactly the data I want into maps but now I'm frustrated since I still can't get that data. I tried your suggestion and link. Results: |
2012-05-15 09:22:25 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? vector<Point2f> point1Cam1UndistortedRectified; point1Cam1UndistortedRectified.at(0).x = mapxC1[PointC1x, PointC1y]; point1Cam1UndistortedRectified.at(0).y = mapxC1[PointC1x, PointC1y]; but MSVC++ says not operator "[]" matches these operands right after mapxC1 in the last two lines. Know why? |
2012-05-15 09:15:44 -0500 | commented answer | Does OpenCV's undistortPoints also rectify them? I can't read mapx & mapy. I try Mat mapxC1; mapxC1.create(sizeImage,1); initUndistortRectifyMap(cameraMatrix1, distCoeffs1, R1, camMat1UndistRect, sizeImage, 0, /* ???*/ mapxC1, mapyC1); |
2012-05-13 23:11:20 -0500 | received badge | ● Popular Question (source) |
2012-05-09 05:00:21 -0500 | asked a question | Is this the correct OCV method to transform two 2D points to one 3D? There's a moving object whose imagePoints I identity at two times with two MS LifeCams on my Windows 7 PC in MSVSC++. I want to determine the distance between those two 3D points. The steps I'm using are shown. I included almost no detail since now I want to just learn if I'm using the right OpenCV 2.3.1 functions.
From 30k feet are these the correct steps? Thanks. Charles |
2012-05-04 04:07:15 -0500 | asked a question | Does OpenCV's undistortPoints also rectify them? I'm trying to determine the distance between two object by using two cameras (OCV 2.3.1, MSVC++, Win7) but can't calculate the object's objectPoints. I think this is because the image points aren't being rectified before their disparity is calculated. I. WHAT I DO FIRST Step 1. Calibrate each camera by itself Step 2. Calibrate the cameras to together. Step 3. Create the rectification data
stereoRectify(
cameraMatrix[0], cameraMatrix[1],
distCoeffs[0], distCoeffs[1],
imageSize,
R, T,
RC1, RC2, //RC1: Rotation matrix Camera 1
PC1, PC2,
Q,
CALIB_ZERO_DISPARITY,
1, II. WHAT I BELIEVE Goal: I'm trying undistort and rectify the image points of one object in the image from camera 1 and the image from camera 2 (I do this process twice: once while the clay pigeon's on the launcher and once one frame before the clay pigeon disintegrates) Method: I believe that I don't need to use initUndistortRectifyMap then Remap but can instead just use undistortPoints. I think undistortPoints undistorts the points of interest and rectifies them. III. WHAT I DO SECOND You can ignore this if my beliefs aren't correct. The input and output arrays for undistortPoints (launcherC1, launcherC1Undistorted, ... clayPigeonC2, clayPigeonC2Undistorted) are vectors of Point2f objects. IV. DISCREPANCY BETWEEN BELIEF AND REALITY
After all undistortPoints functions are run,
1. launcherC1Undisorted.y does not equal launcherC2Undistorted.y
2. clayPigeonC1Undistorted.y does not equal clayPigeonC2Undistorted.y. V. QUESTIONS Q1: In addition to undistorting them does undistortPoints also rectify points? Q1.1_yes. Are the values of y supposed to be equal after rectification? Q1.1.1_yes Can you tell from the code I've included what I'm doing wrong so that they don't? Q1_no If undistortPoints doesn't rectify the points then how do I rectify them? Thank you for any assistance. Charles++ |
2012-04-13 06:04:44 -0500 | commented answer | 3D calibration in OpenCV without chessboard images? OK, I'll do calibration on each camera before I calibrate the camera's together. Could this intrinsic calibration be done before the camera is mounted if the camera isn't jostled, the lens rotated or the camera's body torqued when it's mounted? Whether the cameras are extrinsically calibrated with the object points I've measured (+- inch at hundreds of yards) or with object points on pattern boards that are held at different locations that both cameras can see ...
My guess is that StereoCalibration outputs rotation matrix and translation vector. These two items are put into StereoRectify which will output a transformation matrix ... (more) |
2012-04-07 11:40:37 -0500 | received badge | ● Good Question (source) |
2012-04-07 10:03:57 -0500 | received badge | ● Nice Question (source) |