distance

camera to object distance calculation using opencv and python

為{幸葍}努か 提交于 2021-01-28 18:27:37
问题 I am using Microsoft Lifecam HD 3000 on my quadcopter for autonomous landing . I wish to calculate the distance between the onboard camera on the quadcopter and a landing pad which has a rectangle printed on it. The distance can then be fed as error to the PID controller. i am using python to code this. Could anyone suggest a simple way to find the distance. PS: I don't need the exact value of distance 回答1: If the landing rectangle size is known/constant then it is doable some data to prepare

Removing Spatial Outliers (lat and long coordinates) in R

隐身守侯 提交于 2021-01-27 18:19:59
问题 I've done my best to read up on this, and I think I've found the process that fits best, but if anyone else has any ideas or any functions or different methods for this it would be much appreciated. So I have a list of small data frames of different row lengths with each data frame containing several latitude and longitude coordinates in separate columns. For each item on the list separately, I need to remove a coordinate pair that may be an outlier and then find the mean center of the

mysql - select records with near distance from each other

纵然是瞬间 提交于 2021-01-27 17:51:06
问题 I have a mysql table containing locations, for example: ID latitude longitude value 1 11.11111 22.22222 1 2 33.33333 44.44444 2 3 11.11112 22.22223 5 I want to select records which are located near to each other (in the above example, rows 1 and 3), so that I can insert them in a new table as one record. By saying near, let's say 100 meters. I would like the new table to be: ID latitude longitude value 1 11.11111 22.22222 3 2 33.33333 44.44444 2 As you can see, I would like to keep the

How to find adjacent lines on a regular 3D grid in python

丶灬走出姿态 提交于 2021-01-27 07:24:43
问题 I have the coordinate of a bunch of points and want to create surfaces out of them in a python package. I want to arrange my data before importing them into the package. Points are coming from a regular grid. Firstly, I am creating lines based on the location of points. In this step I just define which point numbers create my lines. My input data is: coord = np.array( [[0., 0., 2.], [0., 1., 3.], [0., 2., 2.], [1., 0., 1.], [1., 1., 3.], [1., 2., 1.], [2., 0., 1.], [2., 1., 1.], [3., 0., 1.],

How to find adjacent lines on a regular 3D grid in python

两盒软妹~` 提交于 2021-01-27 07:24:43
问题 I have the coordinate of a bunch of points and want to create surfaces out of them in a python package. I want to arrange my data before importing them into the package. Points are coming from a regular grid. Firstly, I am creating lines based on the location of points. In this step I just define which point numbers create my lines. My input data is: coord = np.array( [[0., 0., 2.], [0., 1., 3.], [0., 2., 2.], [1., 0., 1.], [1., 1., 3.], [1., 2., 1.], [2., 0., 1.], [2., 1., 1.], [3., 0., 1.],

generate 3-d random points with minimum distance between each of them?

て烟熏妆下的殇ゞ 提交于 2021-01-27 06:31:37
问题 there. I am going to generate 10^6 random points in matlab with this particular characters. the points should be inside a sphere with radious 25, the are 3-D so we have x, y, z or r, theta, phi. there is a minimum distance between each points. first, i decided to generate points and then check the distances, then omit points with do not have these condition. but, it may omit many of points. another way is to use RSA (Random Sequential Addition), it means generate points one by one with this

Get Distance Between Two Points in GeoPandas

主宰稳场 提交于 2021-01-05 11:31:30
问题 I have two points as below. I need to get the distance between them in meters. POINT (80.99456 7.86795) POINT (80.97454 7.872174) How can this be done via GeoPandas? 回答1: Your points are in a lon, lat coordinate system (EPSG:4326 or WGS 84). To calculate a distance in meters, you would need to either use the Great-circle distance or project them in a local coordinate system to approximate the distance with a good precision. For Sri Lanka, you can use EPSG:5234 and in GeoPandas, you can use

Calculate minimum distance between multiple polygons with R

自古美人都是妖i 提交于 2020-12-31 04:34:49
问题 I'm still somewhat new to R and the sf package... I have two sets of multipolygon data that I am trying to analyze. My first set of polygons (fires) contains hundreds of wildfire perimeters. The second set (towns) contains hundreds of urban areas boundaries. For each fire, I would like to calculate the distance to the closest town (fire polygon edge to closest town polygon edge), and add that as a field to each fire. So far I have mostly been using the sf package for spatial data. In my

Calculate minimum distance between multiple polygons with R

て烟熏妆下的殇ゞ 提交于 2020-12-31 04:31:45
问题 I'm still somewhat new to R and the sf package... I have two sets of multipolygon data that I am trying to analyze. My first set of polygons (fires) contains hundreds of wildfire perimeters. The second set (towns) contains hundreds of urban areas boundaries. For each fire, I would like to calculate the distance to the closest town (fire polygon edge to closest town polygon edge), and add that as a field to each fire. So far I have mostly been using the sf package for spatial data. In my

Transport matrix is missing in the code behind scipy.stats.wasserstein_distance

断了今生、忘了曾经 提交于 2020-12-12 05:43:42
问题 Looking at the comments for the code behind scipy.stats.wasserstein_distance which invokes a function called _cdf_distance(p, u_values, v_values, u_weights=None, v_weights=None) , it says this function implements the following formula: l_p(u, v) = \left( \int_{-\infty}^{+\infty} |U-V|^p \right)^{1/p} However, this is not the Wasserstein distance as I know it since, although I see the distance matrix |U-V| in the above formula comment, the transport matrix is noticeably absent. The transport