Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

= [350 200 150] fix code #include #include #include using namespace cv; using namespace std; int main(int argc, char* argv[]){ //Point3d vector objectPoints; objectPoints.push_back(Point3d(350, 200,

image text in transcribed

= [350 200 150]

fix code

#include #include #include

using namespace cv; using namespace std;

int main(int argc, char* argv[]){ //Point3d vector objectPoints; objectPoints.push_back(Point3d(350, 200, 150));

float f = 500; float sx = 1; float sy = 1; float ox = 320; float oy = 240;

//projection matrix Mat K(3, 3, DataType::type); K.at(0, 0) = -f/sx; K.at(1, 0) = 0; K.at(2, 0) = ox;

K.at(0, 1) = 0; K.at(1, 1) = -f/sy; K.at(2, 1) = oy;

K.at(0, 2) = 0; K.at(1, 2) = 0; K.at(2, 2) = 1;

//translation vector vector T; T.push_back(double(-170)); T.push_back(double(-95)); T.push_back(double(-70));

Mat R = Mat::eye(3, 3, CV_64F);

//distortion Mat distCoeffs(3, 1, DataType::type); distCoeffs.at(0) = 0; distCoeffs.at(1) = 0; distCoeffs.at(2) = 0;

//rotation matrix cvMat rvecR(2, 1, DataType::type); rvecR.at(0) = 0; rvecR.at(1) = 0; rvecR.at(2) = 0;

vector projectedPoints;

try{ projectPoints(objectPoints, rvecR, T, K, distCoeffs, projectedPoints); }catch (Exception& e){ const char* err_msg = e.what(); cout

code error: Exception thrown at 0x00007FF80D20A388 in OpenCVExample.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000634A31CC80.

(1 mark) A pinhole camera has focal length f-500. pixel sizes& = 5,-1 . and its principal point is at (2-0) (320.240) . The world coordinate frame and the camera coordinate frame can be related by R and T where -170] 1300 -70 (1 mark) A pinhole camera has focal length f-500. pixel sizes& = 5,-1 . and its principal point is at (2-0) (320.240) . The world coordinate frame and the camera coordinate frame can be related by R and T where -170] 1300 -70

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions