Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have an image with several points and I labeled them so I can know their coordinates (x,y).
Now I have a list of coordinates such as:

obj [0]: (1.5918367346938775, 806.42857142857144)
obj [1]: (5.5131578947368425, 860.59539473684208)
obj [2]: (0.0, 853.0)
(...)
obj [1183]: (1722.6078431372548, 1575.8725490196077)
obj [1184]: (1725.7272727272727, 330.72727272727275)
obj [1185]: (1726.4285714285713, 335.85714285714283)
obj [1186]: (1727.0, 327.0)

How can I be able to plot the the density map of the image in Python?
Posted
Updated 29-Jul-15 1:18am
v3
Comments
Richard MacCutchan 29-Jul-15 7:00am    
Density of what? All you have is a set of points.
Member 11870877 29-Jul-15 7:18am    
With the set of points I could calculate the average distance between the 3 closests points and then make a density map?
Richard MacCutchan 29-Jul-15 7:37am    
So you probably need to sort the points into some order so you can then take any set and count how many exist within a certain area. Alternatively create a 2D array of whatever detail level you want, and plot the points into it.
Kornfeld Eliyahu Peter 29-Jul-15 7:22am    
Do you mean the relation between points and no-point in the area described by the coordinates?
Member 11870877 29-Jul-15 7:23am    
yes!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900