Ask Your Question

elliotwoods's profile - activity

2020-12-12 03:57:00 -0600 edited question binary calibration pattern with XY recoverable features

binary calibration pattern with XY recoverable features Hi all I think I've seen this before, but it is also possible t

2020-12-12 03:43:38 -0600 commented answer Why OpenCV building is so slow with CUDA?

Thanks cudawarped. Just to check - did you compile for only 1 CUDA architecture, or all architectures? Compiling here (a

2020-12-12 03:33:40 -0600 edited question binary calibration pattern with XY recoverable features

binary calibration pattern with XY recoverable features Hi all I think I've seen this before, but it is also possible t

2020-12-12 03:28:25 -0600 edited question binary calibration pattern with XY recoverable features

binary calibration pattern with XY recoverable features Hi all I think I've seen this before, but it is also possible t

2020-12-12 03:27:33 -0600 asked a question binary calibration pattern with XY recoverable features

binary calibration pattern with XY recoverable features Hi all I think I've seen this before, but it is also possible t

2020-08-11 20:29:12 -0600 received badge  Notable Question (source)
2020-08-11 10:43:20 -0600 edited answer Why OpenCV building is so slow with CUDA?

I'm also noticing this (e.g. several hours to build with CUDA) I understand that it's building many versions of each ke

2020-08-11 10:37:43 -0600 answered a question Why OpenCV building is so slow with CUDA?

I'm also noticing this (e.g. several hours to build with CUDA) I understand that it's building many versions of each ke

2019-10-25 12:27:38 -0600 received badge  Popular Question (source)
2018-05-06 06:22:35 -0600 edited question Multi-view solvePnP routine

[Paid job] Multi-view solvePnP routine Hi all! I need a multi-view version of the solvePnP function. Qualitively: We w

2018-05-01 22:57:54 -0600 edited answer Multi-view solvePnP routine

@Tetragramm seems to have solved this at: https://github.com/Tetragramm/opencv_contrib/blob/master/modules/mapping3d/inc

2018-05-01 22:56:54 -0600 edited question Multi-view solvePnP routine

[Paid job] Multi-view solvePnP routine Hi all! I need a multi-view version of the solvePnP function. Qualitively: We w

2018-05-01 22:56:50 -0600 edited question Multi-view solvePnP routine

[Paid job] Multi-view solvePnP routine Hi all! I need a multi-view version of the solvePnP function. Qualitively: We w

2018-05-01 22:56:36 -0600 answered a question Multi-view solvePnP routine

@Tetragramm seems to have solved this at: https://github.com/Tetragramm/opencv_contrib/blob/master/modules/mapping3d/inc

2018-02-07 23:13:59 -0600 received badge  Notable Question (source)
2017-08-10 09:34:37 -0600 commented question Multi-view solvePnP routine

Hi Tetragramm. In the end we went with single-camera because we couldn't get stereo working in time (i didn't get a chance to try your implementation). I didn't receive an email from you, and I just want to get in touch again to say thank you for your time and let's chat on email if you have time.

2017-04-10 22:34:36 -0600 commented question Multi-view solvePnP routine

Hi @Tetragramm. Wow this is amazing! I'll try this is as soon as I can . The artwork opening is tomorrow, and my attempt at stereo solvePnP using non-linear fit didn't work (warning - uses other libraries, also produces terrible results. i think i have something wrong somewhere). so i'm on a monocular route right now. will try and switch to your solution tonight. do you have a DM channel?

2017-03-31 21:55:13 -0600 commented answer Multi-view solvePnP routine

Thanks for letting me know about composeRT! it really helps

2017-03-31 21:54:33 -0600 commented question Multi-view solvePnP routine

We can presume that the markers are in ordered sets. i.e. objectPoints1 and imagePoints1 are equal length, and objectPoints1[i] corresponds with imagePoints1[i] (as with solvePnP)

2017-03-31 21:53:41 -0600 commented question Multi-view solvePnP routine

Hi @Tetragramm! I linked to this post from a few places so want to stick with it if possible (i think it gets bumped up the list when somebody posts here).

2017-03-23 06:32:43 -0600 answered a question Unhandled exception at Microsoft C++ exception: cv::Exception at memory location

this isn't necessarily an exception about memory allocation (in fact, most likely it isn't).

try wrapping your code like this

try {
    codeWhichCausesPain();
} catch(const std::exception & e) {
   cout << "Doesn't work : " << e.what();
}

also check your console. generally when an exception is thrown in opencv it gets written to the console also.

Then once you know what the exception is, and what code is causing it, then we can figure out what the reason is :)

2017-03-17 05:35:38 -0600 received badge  Enthusiast
2017-03-15 20:52:20 -0600 commented answer Multi-view solvePnP routine

current thinking : adding another line after https://github.com/opencv/opencv/blob... to include the error from the second camera would result in a simultaneous solve. Just would need to be able to transform _r and _t by either R+T,E,F from stereoCalibrate.

2017-03-13 22:49:11 -0600 commented question Aruco 2.0* dictionaries for OpenCV 3.1.0

having the same issue here! after setting up the whole studio with marker_mapper's favourite MIP_36h12. I'm unable to use any of the markers in OpenCV :)

2017-03-08 10:31:59 -0600 received badge  Scholar (source)
2017-03-08 10:31:48 -0600 answered a question Issue with build on symbols OpenCV 3.2.0 / VS2015 / Release (x64)

User berak was correct. This was a 32bit/64bit mismatch issue.

The bad setting wasn't in the project settings but in the Solution configuration (was set to use the 32bit version of the project for the 64bit build profile). I've seen that pop up a couple of times before but didn't recognise the symptoms.

Thanks to all on IRC and here for helping

Elliot

2017-03-08 08:28:08 -0600 commented question Issue with build on symbols OpenCV 3.2.0 / VS2015 / Release (x64)

hi berak. Thank you for helping on this! I now tried moving opencv_core320.lib to front and end of lib list but same result. definitely using all 64bit (checked dumpbin and all application project settings). I'll try CMAKE now as a sanity check + if it works i can compare project differences.

2017-03-08 04:58:47 -0600 commented question Issue with build on symbols OpenCV 3.2.0 / VS2015 / Release (x64)

also i posted the question on SO http://stackoverflow.com/questions/42... (i imagine more general C++ experience with name mangling there, and more experience with opencv building here :)

2017-03-08 04:57:44 -0600 asked a question Issue with build on symbols OpenCV 3.2.0 / VS2015 / Release (x64)

Hey all

I've been hitting a problem for a couple of days now of getting OpenCV to run within a project with VS2015 but am having library linking problems.

Specifically, I'm the maintainer of the ofxCvMin addon for openFrameworks, and am currently trying to upgrade the libraries from 2.4.x to 3.2.0. (I've built and linked opencv libs a few times for windows and osx over the years).

I can successfully build Debug and Release libs (this wasn't an issue at all). (note : current setup is static libs, not using static CRT)

I managed to build an application linking the debug libraries (with a little extra help on #opencv IRC), but Release is still is not working. VC++ doesn't seem to recognise the imported symbols.

Diggiging deeper, it seems that the C++ application is looking for :

?deallocate@Mat@cv@@QAEXXZ
public: void __thiscall cv::Mat::deallocate(void)

when building. But in opencv_core320.lib we have:

?deallocate@Mat@cv@@QEAAXXZ
public: void __cdecl cv::Mat::deallocate(void) __ptr64

which VC++ doesn't consider to be a compatible symbol. I presume there are some project settings which affect the symbol naming strategy (__thiscall <> __cdecl hints at a C++ vs C style).

Is anybody aware of project settings which affect how the symbols are decorated when using OpenCV with VC++?

Thank you

NB : CMAKE is not an option here as the projects/solutions need to be openFrameworks generated (although could be used to look into which build settings are present)

2017-03-07 19:43:30 -0600 commented answer Multi-view solvePnP routine

I'm sorry but it doesn't get what I want :). I wish there was a way to hack stereoCalibrate to do what I need (e.g. if there were flags like USE_STEREO_EXTRINSICS_GUESS | FIX_STEREO_EXTRINSICS, and it output the extrinsics to the object rather than just between the cameras). Or perhaps it wasn't clear from my question that I want the extrinsics of the stereo pair RELATIVE TO THE SCENE, not to each other.. Thank you

2017-03-07 09:56:21 -0600 answered a question how to use open cv in visual studio 2017

please clarify which language you are using with Visual Studio, e.g. C++, VB, C#, etc.

Visual Basic As @berak notes, OpenCV does not support Visual Basic (although there are unofficial .NET wrapping for OpenCV which you could use to employ OCV in VB). Due to the nature of .NET, you wouldn't need libraries which were specifically built for Visual Basic .NET 2017, you could use older libraries also.

Visual C++ If you're referring to VC (Visual C++), then you will need c++ libraries (and binaries) built with/for Visual C++ 2017. These are not available officially yet, but you could try using a recent version of cmake and a recent version of opencv from github to generate and build your own VC 2017 projects and solution. But you likely will hit many issues.

Since it sounds like you might be new to OpenCV, it's strongly suggested that you use a well supported platform e.g. Visual C++ 2015. If you want to avoid C++, then please consider using OpenCV with Python as it is quite easy to setup and is well documented.

2017-03-07 08:01:01 -0600 asked a question Multi-view solvePnP routine

Hi all!

I need a multi-view version of the solvePnP function.

Qualitively: We want to resolve the pose (rotation + translation) of an object in space using projections of landmarks on that object onto multiple image planes. Each image plane represents a calibrated camera at fixed locations in the world (for each we have a priori : cameraMatrix, distortionCoefficients, rotation, translation). The object is covered in markers (e.g. 10-20 markers, perhaps 4-8 will be in the camera's view at any time) which can be seen and identified in the cameras and are at known 3D positions in object space and known corresponding 2D positions in each image plane. Using the correspondences of 3D points in object space to 2D points in projected image space for each camera, we must reliably (and quickly) discover the rotation and translation for the object.

Quantitively:

  • Inputs
    • Set[ intrinsics, extrinsics ] views // size N
    • Set[ Set[ObjectPoints], Set[ImagePoints] ] // size N
  • Outputs
    • rotation of object // 3-vector
    • translation of object // 3-vector

I have some notes at: https://paper.dropbox.com/doc/KC35-st...

And posed a freelancer posting at: https://www.upwork.com/jobs/~01b0f0c4...

Using a single camera this is possible using the solvePnP function (which optimises the rotation and translation so that the projections of object points match the observed points on the image plane)

Template for the function could be:

double solvePnPMultiView(vector<vector<cv::Point3f>> objectPointsPerView
        , vector<vector<cv::Point2f>> imagePointProjectionsPerView
        , vector<cv::Mat> cameraMatrixPerView
        , vector<cv::Mat> distortionCoefficientsPerView
        , vector<cv::Mat> translationPerView
        , vector<cv::Mat> rotationVectorPerView

        , cv::Mat & objectRotationVector
        , cv::Mat & objectTranslation
        , bool useExtrinsicGuess);


//same function but with different data format
double solvePnPMultiView(vector<vector<cv::Point3f>> objectPointsPerView
        , vector<vector<cv::Point2f>> undsitortedImagePointProjectionsPerView
        , vector<cv::Mat> rectifiedProjectionMatrixPerView

        , cv::Mat & objectRotationVector
        , cv::Mat & objectTranslation
        , bool useExtrinsicGuess);

//specific version for stereo (calls one of the functions above)
double solvePnPStereo(vector<cv::Point3f> objectPointsObservedInCamera1
        , vector<cv::Point2f> projectedImagePointsObservedInCamera1
        , vector<cv::Point3f> objectPointsObservedInCamera2
        , vector<cv::Point2f> projectedImagePointsObservedInCamera2
        , cv::Mat cameraMatrix1
        , cv::Mat distortionCoefficientsCamera1
        , cv::Mat cameraMatrix2
        , cv::Mat distortionCoefficientsCamera2
        , cv::Mat camera1ToCamera2RotationVector
        , cv::Mat camera1ToCamera2Translation

        , cv::Mat & objectRotationVector
        , cv::Mat & objectTranslation
        , bool useExtrinsicGuess);

(these functions would all call the same code internally, but just have different ways of being used)

The object we're trying to track is a tree (with known mesh taken from photo-scan). The tree is covered in retroreflective markers. We are projecting onto the tree from a set of moving video projectors (attached to robot arm). I'm pretty confident I can figure out which marker is which before we get to the solvePnP stage. This is all part of a new artwork by our studio (please check http://kimchiandchips.com#lightbarrie... for an example of previous work).

Notes:

  • Routine should take less than 3ms on Core i7 for 2 views with 10 object points each.
  • Ideally don't use any libraries other than OpenCV (would be even be great to PR this into OpenCV)
  • I think OpenCV's only numerical solver is CvLevMarq which is C only, but I'd like to use C++ style where possible (i.e. it seems probably might ...
(more)