Changing a map image into nodes and edges - java

I'm developing an application and I have a map like the following and I want to extract the nodes and edges connecting these nodes in order to be able to apply any shortest path algorithm and have the data as a graph.
I used canny edge detector and it worked however it only displays the image after modification but doesn't save the data and I wanted it as vectors
What can I use to do do the following ???
Thanks in advanceenter image description here

Related

opencv android-edge detection

I am creating a project in android ,where i need to detect the edges of the object in very intial stage.But the edges are not appropriate they are broken .I have tried otsu thresholding method for edge detection.
Now i m trying to get the intensity from histogram ,can anyone help me to figure out the mean from the histogram of an image using calchist method in opencv. Also, i am giving a thought to dividing the image into blocks of 3* 3,as then computing each block.,but enable to find how to do that .
I am using opencv library.
Thanks,
Please do respond.
Canny, sobel,prewitt and many edge detection algorithms perform edge detection.
But, as you said,they remain incapable to extract all edges.
You can use some edge linking algorithms to link those broken edges.
I used ant colony algorithm(genetic algorithm) to make the image understandable.
But there are dozens of linking algorithm you can use.
Cheers.

How can I get the HierarchicalLayout graph to render properly?

I am using the Graphstream library to create a visual representation of a Tree structure.
Current view of graph
But the nodes are all clumped together. What can I do to make the graph look like -> Image for Manually arranged nodes.
Is there a way to store node positions from graph to a file and then load them when the application is running?

Image classification using SIFT and SVM with Java

I have some images of flowers that I have extracted SIFT features from and I clustered the features using K-Means(k=3). I would like to create a "histogram of cluster membership identifiers" to feed to an SVM classifier as described in the accepted answer to the question below.
Large Scale Image Classifier
My question is, how do I create this histogram in Java? I'm using OpenCV, is there a method I have missed?
I have a Mat of centres where each row is a cluster centre and I have a Mat of labels where each element in a column is a cluster index (0...2) for each key point in an image.

Android - Zooming Issue on project

I'm working on this project which involves a map with pins on it that populate from a database. The idea was to click on the map and the pin would pull up information, I have all of this working. I position these with a relative layout and the pin inside this.
Where my problem lies is, I have a pinch to zoom and all that on here and when I zoom on the image, my pins stay in their original position. Is there anyway I can have these pins zoom in when the image is zoomed?
Thanks!
I would look into placing the Pins onto the map via an exact location (eg latitude and Longitude) and then the pin always being the same size image this when the map zooms the pin is relative to an exact position there for moving with the image below.
another eg would be locating the pin on pixles 100 right and 50 down.
An implementation of an HTML map like element in an Android View:
Supports images as drawable or bitmap in layout
Allows for a list of area tags in xml
Enables use of cut and paste HTML area tags to a resource xml (ie, the ability to take an HTML map - and image and use it with minimal editing)
Supports panning if the image is larger than the device screen
Supports pinch-zoom
Supports callbacks when an area is tapped.
Supports showing annotations as bubble text and provide callback if the bubble is tapped
try this link you will find your solution https://github.com/catchthecows/AndroidImageMap

How to plot a node in given coordinate using JUNG

I want to virtualize my network simulations and need to plot the nodes in the network. Each node has a pre-defined location and I need to plot the nodes into the correct coordination.
I am using JUNG: http://jung.sourceforge.net/applet/index.html
Any suggestions?
Thanks!
I recently solved this problem by writing my own rendering Layout for JUNG.
As base for my derived layout I used the Circle Layout, which is pretty simple. In there you will see that JUNG does a setLocation(Dimension d) for every Vertex, which is pretty much what you are looking for, I guess. Just take a look at the source of the CircleLayout.
Then you could use a custom Vertex object, which stores the coordinates you want the vertex to have, which is then read by your custom layout.

Categories

Resources