Skip to content

Latest commit

 

History

History
99 lines (67 loc) · 5.83 KB

README.md

File metadata and controls

99 lines (67 loc) · 5.83 KB

MoonRegistration Library Demonstration

Before we start

C++ & C

Name Module Description
MoonDetect_basic.cpp MoonDetect A basic usage, easy and quick
MoonDetect_advance.cpp MoonDetect An advanced usage, you can further customize moon image detection
MoonDetect_c_api.c MoonDetect A basic usage of the C abstraction API
MoonRegistrate_basic.cpp MoonRegistrate A basic usage, easy and quick
MoonRegistrate_advance.cpp MoonRegistrate An advanced usage, you can further customize moon image registration
MoonRegistrate_live_registration.cpp MoonRegistrate Running moon image registration on a live video
MoonRegistrate_c_api.c MoonRegistrate A basic usage of the C abstraction API

Building demos (for C++ & C)

To build all the demos:

  1. create a new directory "build"
mkdir build
  1. setup cmake (assuming you are in ./demo folder)
cmake -S . -B build
  1. build projects (assuming you are in ./demo folder)
cmake --build
  1. play with demo applications, they are in ./build/bin folder

Note that demo need to build with C++ >= 14 because they need the filesystem module

Checkout the CMakeLists.txt file for examples of compiling & linking this library

Python

Name Module Description
MoonDetect_basic.py MoonDetect A basic usage of MoonRegistration Python Wrapper api
MoonDetect_advance.py MoonDetect An advanced usage of MoonRegistration Python Wrapper api, you can customize steps in moon detection
MoonRegistrate_basic.py MoonRegistrate A basic usage of MoonRegistration Python Wrapper api
MoonRegistrate_advance.py MoonRegistrate An advanced usage of MoonRegistration Python Wrapper api, you can customize steps in moon image registration
MoonRegistrate_live_registration.py MoonRegistrate Running moon image registration on a live video

To play with these demo applications,

  1. Install MoonRegistration Python wrapper library following its doc.
  2. Once you have the MoonRegistration package in your python environment, simply run:
python3 /path/to/demo_name.py
  1. You can import the library with:
import MoonRegistration as mr

JavaScript

Name Module Description
MoonDetect_basic.html MoonDetect A basic usage of JavaScript Wrapper api, demonstrating MoonDetect module
MoonRegistrate_basic.html MoonRegistrate A basic usage of JavaScript Wrapper api, demonstrating MoonRegistrate module

Setup demo

  1. Build JavaScript library by yourself, or download pre-built library
  2. Then, simply put the JavaScript module moon-registration folder into the demo folder demo/js (same level with all the html files).
  3. Launch a web server from demo/js folder. Here is an example of using Python3 to launch a web server at port 9000:
cd demo/js
python3 -m http.server 9000
  1. While playing with demo applications, you can open your browser's devtools panel and take a look at the console output.
  2. If you encounters "Memory out of bounds" exception, checkout this explanation