블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday

Category

'Tree'에 해당되는 글 2건

  1. 2010.09.03 OpenCV: cvFindContours( )
  2. 2009.06.11 Sahni's ch.16 Graphs
OpenCV: cvFindContours( )

cvFindContours()
int cvFindContours(CvArr* image, CvMemStorage* storage, CvSeq** first_contour, int header_size=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0, 0))

Finds the contours in a binary image.

Parameters:
  • image – The source, an 8-bit single channel image. Non-zero pixels are treated as 1’s, zero pixels remain 0’s - the image is treated as binary . To get such a binary image from grayscale, one may use Threshold , AdaptiveThreshold or Canny . The function modifies the source image’s content
  • storage – Container of the retrieved contours
  • first_contour – Output parameter, will contain the pointer to the first outer contour
  • header_size – Size of the sequence header, \ge \texttt{sizeof(CvChain)} if \texttt{method} =\texttt{CV\_CHAIN\_CODE} , and \ge \texttt{sizeof(CvContour)} otherwise
  • mode

    Retrieval mode

    • CV_RETR_EXTERNAL retrives only the extreme outer contours
    • CV_RETR_LIST retrieves all of the contours and puts them in the list
    • CV_RETR_CCOMP retrieves all of the contours and organizes them into a two-level hierarchy: on the top level are the external boundaries of the components, on the second level are the boundaries of the holes
    • CV_RETR_TREE retrieves all of the contours and reconstructs the full hierarchy of nested contours
  • method

    Approximation method (for all the modes, except CV_LINK_RUNS , which uses built-in approximation)

    • CV_CHAIN_CODE outputs contours in the Freeman chain code. All other methods output polygons (sequences of vertices)
    • CV_CHAIN_APPROX_NONE translates all of the points from the chain code into points
    • CV_CHAIN_APPROX_SIMPLE compresses horizontal, vertical, and diagonal segments and leaves only their end points
    • CV_CHAIN_APPROX_TC89_L1,CV_CHAIN_APPROX_TC89_KCOS applies one of the flavors of the Teh-Chin chain approximation algorithm.
    • CV_LINK_RUNS uses a completely different contour retrieval algorithm by linking horizontal segments of 1’s. Only the CV_RETR_LIST retrieval mode can be used with this method.
  • offset – Offset, by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context



Learning OpenCV: Chater 8. Contours: Contour Finding
: 234p
"the concept of a contour tree"


Suzuki, M. (1985) Evapotranspiration Estimates of Forested Watersheds in Japan Using the Short-time Period Water-budget Methods. Journal of Japanese Forest Society, 67: 115-125. (in Japanese with English summary)


posted by maetel
Sahni
Data Structures, Algorithms and Applications in C++, 2nd ed.
: Chapter 16 Graphs

graph data structure

terminology:
vertex, edge, adjacent, incident, degree, cycle, path, connected component, and spanning tree

types:
undirected / directed / weighted

representation:
adjacent matrix / array adjacency lists /  linked adjacency lists

standard graph search methods:
breadth-first / depth-first search

algorithms:



16.1 Definitions

graph
: an ordered pair of finite sets of vertices (or nodes or points) and edges (or arcs or lines)

http://en.wikipedia.org/wiki/Graph_(data_structure)

loop
: self-edge

digraph
: directed graph

network
: weighted undirected graph or digraph


16.2 Applications and More Definitions

example 16.1: path problems

example 16.2: spanning trees

A graph is connected iff there is a path between every pair of vertices in the graph.

cycle
: simiple path with the same start and end vertex

tree
: a connected undirected graph that contains no cycles

spanning tree
: a subgraph of a graph that contains all the vertices of the graph and is a tree

example 16.3: interpreters

bipartite graphs


16.3 Properties

http://en.wikipedia.org/wiki/List_of_graph_theory_topics

in-degree
out-degree

complete digraph


16.4 The ADT graph
16.5 Representation of Unweighted Graphs

adjacency matrix
linked adjacency list
array adjacency list

http://en.wikipedia.org/wiki/Adjacency_matrix

http://en.wikipedia.org/wiki/Adjacency_list
16.6 Representation of Weighted Graphs


cost-adjacency-matrix


16.7 Class Implementations

 
16.8 Graph Search Methods

cp. level-order traversal of a binary tree
http://en.wikipedia.org/wiki/Binary_search_tree#Traversal

cp. pre-order traversal of a binary tree
 
 


 
posted by maetel