#### Category : coordinates

After the pose estimation, my marker is detected and the ID appears on the image of my camera. Here my code : while(inputVideo.grab()) { cv::Mat frame, imgGray; inputVideo.retrieve(frame); if(frame.channels() == 3 || frame.channels() == 4) cv::cvtColor(frame, imgGray, cv::COLOR_BGR2GRAY); else frame.copyTo(imgGray); std::stringstream outFileName; boost::ptr_list<cctag::CCTag> markers; cctag::cctagDetection(markers, pipeId, frameId, imgGray, params, bank, true, durations); // if the ..

How do you sort square given coordinates into descending rows? Adjacent row/column points are equidistant and complete but the size of the square and angle relative to the x-axis may vary. I can’t seem to figure out how to do a sort with multiple conditions that works for me. I can find a corner by ..

I have list in which coordinates of multiple Polygons are being fed. I need to arrange the Polygons in an order that the left most polygon is the first element of that list (sorting by comparing x coordinates). int main() { std::vector<cv::Point2f> vec1; vec1.push_back(cv::Point(400, 100)); vec1.push_back(cv::Point(500, 50)); vec1.push_back(cv::Point(600, 100)); vec1.push_back(cv::Point(500, 150)); std::vector<cv::Point2f> vec2; vec1.push_back(cv::Point(100, 100)); ..

I have a 3D cube and I want to create a grid on the surface of the cube constructed from quad elements. For the quad elements first the nodes needs to be defined. The number of nodes in each direction should be configurable. The inside of the cube has to be empty. The Grid.h file ..

I’m using this code to set my cursor position where I want it displayed while executing a console application: void setCursorPos(const int x, const int y) { COORD coordinates; coordinates.X = x; coordinates.Y = y; HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); if(!(SetConsoleCursorPosition(hConsole, coordinates))) { std::cout << " FATAL ERROR SETTING CURSOR POSITION nnn"; exit(0); } return; } ..

I’m trying to retrieve the coordinates relative to a window through a local mouse hook (WH_MOUSE). According to MSDN, the MouseProc’s lParam is equivalent to the MOUSEHOOKSTRUCT struct, which contains a POINT value that is relative to the screen. I tried calling ScreenToClient to convert the coordinates to be relative to the window, but it ..

I am trying to embed a Python script in C++ and I can successfully pass on the input image directory as a variable from C++ to Python function which draws contours on the image and returns the convex hull coordinates but when I try to call back the convex hull coordinates using the following code, ..