nearest-neighbor

Locality Sensitivy Hashing in OpenCV for image processing

江枫思渺然 提交于 2020-01-02 10:46:36
问题 This is my first image processing application, so please be kind with this filthy peasant. THE APPLICATION: I want to implement a fast application ( performance are crucial even over accuracy) where given a photo (taken by mobile phone) containing a movie poster finds the most similar photo in a given dataset and return a similarity score. The dataset is composed by similar pictures (taken by mobile phone, containing a movie poster). The images can be of different size, resolutions and can be

How to make beautiful borderless geographic thematic/heatmaps with weighted (survey) data in R, probably using spatial smoothing on point observations

别说谁变了你拦得住时间么 提交于 2020-01-01 03:24:06
问题 Ever since Joshua Katz published these dialect maps that you can find all over the web using harvard's dialect survey, I have been trying to copy and generalize his methods.. but much of this is over my head. josh disclosed some of his methods in this poster, but (as far as I know) has not disclosed any of his code. My goal is to generalize these methods so it's easy for users of any of the major United States government survey data sets to plop their weighted data into a function and get a

How to make beautiful borderless geographic thematic/heatmaps with weighted (survey) data in R, probably using spatial smoothing on point observations

无人久伴 提交于 2020-01-01 03:24:06
问题 Ever since Joshua Katz published these dialect maps that you can find all over the web using harvard's dialect survey, I have been trying to copy and generalize his methods.. but much of this is over my head. josh disclosed some of his methods in this poster, but (as far as I know) has not disclosed any of his code. My goal is to generalize these methods so it's easy for users of any of the major United States government survey data sets to plop their weighted data into a function and get a

How can I extend this SQL query to find the k nearest neighbors?

依然范特西╮ 提交于 2020-01-01 02:42:11
问题 I have a database full of two-dimensional data - points on a map. Each record has a field of the geometry type. What I need to be able to do is pass a point to a stored procedure which returns the k nearest points (k would also be passed to the sproc, but that's easy). I've found a query at http://blogs.msdn.com/isaac/archive/2008/10/23/nearest-neighbors.aspx which gets the single nearest neighbour, but I can't figure how to extend it to find the k nearest neighbours. This is the current

Find all nearest neighbors within a specific distance

帅比萌擦擦* 提交于 2019-12-31 10:39:17
问题 I have a large list of x and y coordinates, stored in an numpy array. Coordinates = [[ 60037633 289492298] [ 60782468 289401668] [ 60057234 289419794]] ... ... What I want is to find all nearest neighbors within a specific distance (lets say 3 meters) and store the result so that I later can do some further analysis on the result. For most packages I found it is necessary to decided how many NNs should be found but I just want all within the set distance. How can I achieve something like that

Data structure for fast line queries?

99封情书 提交于 2019-12-29 06:31:10
问题 I know that I can use a KD-Tree to store points and iterate quickly over a fraction of them that are close to another given point. I'm wondering whether there is something similar for lines. Given a set of lines L in 3D (to be stored in that data structure) and another "query line" q, I'd like to be able to quickly iterate through all lines in L that "are close enough" to q. The distance I'm planning to use is the minimal Euclidean distance between two points u and v where u is some point on

Binary features and Locality Sensitive Hashing (LSH)

筅森魡賤 提交于 2019-12-29 06:22:43
问题 I am studying FLANN, a library for approximate nearest neighbors search. For the LSH method they represent an object (point in search space), as an array of unsigned int. I am not sure why they do this, and not represent a point simply as a double array (which would represent a point in multi-dimensional vector space). Maybe because LSH is used for binary features? Can someone share more about the possible use of unsigned int in this case? Why unsigned int if you only need a 0 and 1 for each

knn density estimation R [closed]

随声附和 提交于 2019-12-25 03:44:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Is there any function/package to perform k-Nearest Neighbor based density estimation in R? 回答1: class package: function knn ipred package: function ipredknn This search on Baron's Site brings up 29 hits. And the Multivariate Task View has two sections on classification, and has links to a few packages that do

Another Why Is This Nearest Neighbor Spatial Query So Slow?

梦想的初衷 提交于 2019-12-24 05:17:05
问题 Following this recommendation for an optimized nearest neighbor update, I'm using the below tsql to update a GPS table of 11,000 points with the nearest point of interest to each point. WHILE (2 > 1) BEGIN BEGIN TRANSACTION UPDATE TOP ( 100 ) s set [NEAR_SHELTER]= fname, [DIST_SHELTER] = Shape.STDistance(fshape) from( Select [dbo].[GRSM_GPS_COLLAR].*, fnc.NAME as fname, fnc.Shape as fShape from [dbo].[GRSM_GPS_COLLAR] CROSS APPLY (SELECT TOP 1 NAME, shape FROM [dbo].[BACK_COUNTRY_SHELTERS]

Another Why Is This Nearest Neighbor Spatial Query So Slow?

我的未来我决定 提交于 2019-12-24 05:17:04
问题 Following this recommendation for an optimized nearest neighbor update, I'm using the below tsql to update a GPS table of 11,000 points with the nearest point of interest to each point. WHILE (2 > 1) BEGIN BEGIN TRANSACTION UPDATE TOP ( 100 ) s set [NEAR_SHELTER]= fname, [DIST_SHELTER] = Shape.STDistance(fshape) from( Select [dbo].[GRSM_GPS_COLLAR].*, fnc.NAME as fname, fnc.Shape as fShape from [dbo].[GRSM_GPS_COLLAR] CROSS APPLY (SELECT TOP 1 NAME, shape FROM [dbo].[BACK_COUNTRY_SHELTERS]