Question: Write a java program that takes an image and map it onto a graph . Map each pixel onto a vertex of the graph in
Write a java program that takes an image and map it onto a graph .
Map each pixel onto a vertex of the graph in a one-to-one relationship with the pixel intensity assigned to the vertex weight.
the link weights are defined as the absolute value of the difference between the vertex weights that they join .
A vertex could be linked to any other, but a useful simplification is only to link vertices to their nearest neighbours. Either four or eight neighbours may be considered. Fig. 2 shows the mapping of an image onto an eight-wayconnected graph.

pixel vertex link Fig. 2 Mapping an image onto an eight-way-connected graph pixel vertex link Fig. 2 Mapping an image onto an eight-way-connected graph
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
