Code Monkey home page Code Monkey logo

cedar-detect's Introduction

Overview

CedarDetect provides efficient and accurate detection of stars in sky images. Given an image, CedarDetect returns a list of detected star centroids expressed in image pixel coordinates.

Features:

  • Employs localized thresholding to tolerate changes in background levels across the image.
  • Adapts to different image exposure levels.
  • Estimates noise in the image and adapts the star detection threshold accordingly.
  • Automatically classifies and rejects hot pixels.
  • Rejects trailed objects such as aircraft lights or satellites.
  • Tolerates the presence of bright interlopers such as the moon, streetlights, or illuminated foreground objects.
  • Simple function call interface with few parameters aside from the input image.
  • Fast! On a Raspberry Pi 4B, the execution time per 1M image pixels is usually less than 10ms, even when several dozen stars are present in the image.

For more information, see the crate documentation in src/algorithm.rs.

Usage

Rust

See the sample program at src/bin/test_cedar_detect.rs for example usages of CedarDetect called directly from Rust program logic.

Python

There is (currently) no option to link CedarDetect with Python. Instead, a microservice invocation API is provided using gRPC.

The src/bin/cedar_detect_server.rs binary runs as a gRPC service, providing a simple image โ†’ centroids RPC interface. See src/proto/cedar_detect.proto for the gRPC service definition.

In python/cedar_detect_client.py, a simple Python script demonstrates how to invoke CedarDetect using its gRPC server. This program reads some test images, uses CedarDetect to find centroids, and then plate-solves these centroids using Tetra3.

To try it out:

  1. Install Python and all needed dependencies.

  2. Install Tetra3.

  3. With python/ as your current directory, execute:

     python -m grpc_tools.protoc -I../src/proto --python_out=. --pyi_out=. --grpc_python_out=. ../src/proto/cedar_detect.proto
    
  4. Run the CedarDetect gRPC server in background:

     cargo run --release --bin cedar-detect-server &
    
  5. Run the python program:

     python cedar_detect_client.py
    

Other languages

Any language that can be a gRPC client should be able to invoke CedarDetect.

cedar-detect's People

Contributors

smroid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mrosseel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.