Project points out of field view

asked 2016-04-08 05:35:11 -0500

updated 2020-11-13 13:41:52 -0500

Hello everyone,

I'm currently trying to project points, so i'm want to use the projectPoints with correct parameters. But i couldn't find in the documentation how the function will work because i know that i have points that can't be project because there are not in the field of view of the camera. (do the function returns me negative values ?)

Thank you in avdance

Sorry for my bad english :/

edit retag flag offensive close merge delete

Comments

The function cv::projectPoints takes in entry the 3D points in the object frame and with the intrinsic and extrinsic parameters will compute the 2D points in the image frame.

I think that you just have to check if the 2D image point is inside the image (e.g. inside [0 ; 640] for x and inside [0 ; 480] for y) to check if the 3D point is inside or outside of the camera field of view.

Eduardo gravatar imageEduardo ( 2016-04-08 07:13:32 -0500 )edit

Yes that's what i'm trying to do.

I will try to be clear. Example : I have a frame (let say 640*480). I have a 3D point (whatever world coordinates) that i know outside of the frame if a project it (x=-50 and y=-10). My question here is, if a apply the cv::projectPoints on this point, will it return 2D Point (x=-50,y=-10) ?

Thanks for you response

Blue007422 gravatar imageBlue007422 ( 2016-04-08 07:23:34 -0500 )edit