Table of Contents
Binary Tree Traversal
.
├── CMakeLists.txt
├── include
│ ├── BinTreeNode.h
│ ├── BinTreeTraversal.h
│ ├── ConstantsColor.h
│ ├── Draw.h
│ └── gif.h
├── README.md
└── src
├── Demo.cpp
└── Draw.cpp
2 directories, 9 files
This is a sample code of how you may use the opencv libs to display binary tree traversal. To get a local copy up and running follow these simple steps.
This is an example of how to list things you need to use the software and how to install them.
-
cmake
sudo apt-get install cmake
-
Install
gtk
andgtk3
module to accesscanberra-gtk-module
used byopencv imshow
sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
-
opencv4
sudo su
git clone https://github.com/zoumson/OpencvInstall.git \
&& cd OpencvInstall && chmod +x install.sh && ./install.sh
- Clone the repo
git clone https://github.com/zoumson/BinaryTreeVisualTraversal.git
- Go to the project directory source
cd BinaryTreeVisualTraversal
- Create empty directories
build
,result
andbin
mkdir build && mkdir bin && mkdir result
- Generate the exectutable
demo
and move it tobin
cd build && cmake .. && make -j4 && cd ..
1.Command line options
Binary Tree Trasversal
Usage: demo [params]
-?, -h, --help, --usage (value:true)
show help message
-o, --option (value:4)
trasversal option, 1-->Post order; 2-->Pre order;3-->In order;4-->Level order;
-s, --save (value:./result/trasversal)
trasversal video
- Run for Level order traversal
./bin/demo -o=4
- Output
- Back to the initial file structure configuration
rm -r bin build result
All the headers files are well docummented, read through the comments
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Adama Zouma - - stargue49@gmail.com
Project Link: https://github.com/zoumson/BinaryTreeVisualTraversal