coordinates

Convert kinect RGB and depth values to XYZ coordinates

只愿长相守 提交于 2019-12-21 05:23:10
问题 I'm looking for an easy way to Convert kinect RGB and depth values to XYZ coordinates using MATLAB. My goal is a function with an input of: RGB and depth values of each point taking by Kinect camera, and output of: x,y and z values of each point. [RGB, depth] = RGB_D2XYZ(XYZ) Thanks, Ben 回答1: You can have a look to this great article. They have a function call DepthToCloud.m. You just need to be sure to pass Image center and top-left corner. They are using Kinect too, so you don't really need

Get the mouse coordinates when clicking on canvas

被刻印的时光 ゝ 提交于 2019-12-21 04:37:14
问题 A common question, but I still need help. I'm trying to get and store the mouse coordinates when someone clicks within the canvas. my HTML <canvas id="puppyCanvas" width="500" height="500" style="border:2px solid black" onclick = "storeGuess(event)"></canvas> and my javascript //setup canvas var canvasSetup = document.getElementById("puppyCanvas"); var ctx = canvasSetup.getContext("2d"); guessX = 0;//stores user's click on canvas guessY = 0;//stores user's click on canvas function storeGuess

python: elegant way of finding the GPS coordinates of a circle around a certain GPS location

放肆的年华 提交于 2019-12-21 04:28:35
问题 I have a set of GPS coordinates in decimal notation, and I'm looking for a way to find the coordinates in a circle with variable radius around each location. Here is an example of what I need. It is a circle with 1km radius around the coordinate 47,11 . What I need is the algorithm for finding the coordinates of the circle , so I can use it in my kml file using a polygon. Ideally for python. 回答1: Use the formula for "Destination point given distance and bearing from start point" here: http:/

how to map latitude and longitude to a 3D Sphere

99封情书 提交于 2019-12-21 02:36:08
问题 Trying to map coordinates with latitude and longitude onto a 3d sphere. I've tried three different sets of equations from the internet and none of them work. Does anyone know how to do it. These are the ones I tried that didn't work. var phi = (90-lat)*(Math.PI/180), theta = (lon+180)*(Math.PI/180), x = -((radius) * Math.sin(phi)*Math.cos(theta)), z = ((radius) * Math.sin(phi)*Math.sin(theta)), y = ((radius) * Math.cos(phi)); return new THREE.Vector3(x,y,z); var height = 600; var phi = (lat)

Efficiently finding the closest coordinate pair from a set in Python

一曲冷凌霜 提交于 2019-12-20 18:42:39
问题 The Problem Imagine I am stood in an airport. Given a geographic coordinate pair, how can one efficiently determine which airport I am stood in? Inputs A coordinate pair (x,y) representing the location I am stood at. A set of coordinate pairs [(a1,b1), (a2,b2)...] where each coordinate pair represents one airport. Desired Output A coordinate pair (a,b) from the set of airport coordinate pairs representing the closest airport to the point (x,y) . Inefficient Solution Here is my inefficient

Efficiently finding the closest coordinate pair from a set in Python

一个人想着一个人 提交于 2019-12-20 18:42:26
问题 The Problem Imagine I am stood in an airport. Given a geographic coordinate pair, how can one efficiently determine which airport I am stood in? Inputs A coordinate pair (x,y) representing the location I am stood at. A set of coordinate pairs [(a1,b1), (a2,b2)...] where each coordinate pair represents one airport. Desired Output A coordinate pair (a,b) from the set of airport coordinate pairs representing the closest airport to the point (x,y) . Inefficient Solution Here is my inefficient

Sorting list of two-dimensional coordinates by clockwise angle using Python?

依然范特西╮ 提交于 2019-12-20 10:27:57
问题 I have a set of points with x and y coordinates that can be seen in the figure below. The coordinates of the 9 points were stored in a list as follows: L = [[5,2], [4,1], [3.5,1], [1,2], [2,1], [3,1], [3,3], [4,3] , [2,3]] The idea is to sort the points clockwise from an origin. In this case, the origin is the point that is colored and that has an arrow that indicates the direction of the ordering. Do not worry about creating methodology to determine the origin because it is already solved.

How to get GPS Coordinates from all the users of my application?

淺唱寂寞╮ 提交于 2019-12-20 09:13:43
问题 Explanation/Scenario: I am developing a app that needs to get in real-time(like 3sec's update) the location of all users of mine app, and these users knowing that, too, will see the another users location, in a map, for example: This location, needs to be in real-time, because all of the users have access to the map, they need to know where are the users of the app, in the exact moment, to find them selves. Question: What i need to do to make my application get in real time the location of

Firebase rules regex troubles

那年仲夏 提交于 2019-12-20 04:32:58
问题 ^([-+]?)([\d]{1,2})(((\.)(\d+)(,)))(([-+]?)([\d]{1,3})((\.)(\d+))?)$ I am trying to use this regex above to be able to confirm that the data is a valid coordinate. I am having trouble getting this to work with Firebase rules. When i run the regex in an online regex tester, it works okay, but Firebase rules doesn't seem to accept it. Here is my firebase rule: ".validate": "newData.isString() && newData.val().matches(/^([-+]?)([\d]{1,2})(((\.)(\d+)(,)))(([-+]?)([\d]{1,3})((\.)(\d+))?)$/)" Is

Firebase rules regex troubles

空扰寡人 提交于 2019-12-20 04:32:37
问题 ^([-+]?)([\d]{1,2})(((\.)(\d+)(,)))(([-+]?)([\d]{1,3})((\.)(\d+))?)$ I am trying to use this regex above to be able to confirm that the data is a valid coordinate. I am having trouble getting this to work with Firebase rules. When i run the regex in an online regex tester, it works okay, but Firebase rules doesn't seem to accept it. Here is my firebase rule: ".validate": "newData.isString() && newData.val().matches(/^([-+]?)([\d]{1,2})(((\.)(\d+)(,)))(([-+]?)([\d]{1,3})((\.)(\d+))?)$/)" Is