Skip to content

Instantly share code, notes, and snippets.

Pixeltovoxelprojector Implementation Summary for Rust

The Pixeltovoxelprojector is a computer vision system that projects pixel motion from camera images into a 3D voxel space to track objects. Here's a comprehensive summary for implementing the same functionality in Rust:

Core Architecture

The system consists of two main implementations:

1. Astronomical Object Tracking (spacevoxelviewer.py + process_image.cpp)

  • Purpose: Track celestial objects from FITS astronomical images
@v0l
v0l / snort_req.md
Created September 16, 2024 21:12

basic_diagram

Request flow:

  1. RequestBuilder builds a set of 1 or more filters and has a human readable id, this is used to track the query result sets (NoteCollection)
    1. ID is important for grouping requests, grouping happens when multiple RequestBuilder objects are requested with the same ID. In this case filters are emitted after groupingDelay
    2. The NoteCollection is a container to store events, it stores only the latest version of replaceable events and contains no duplicates, it also track which relays events are seen on.
  2. RequestBuilder is sent to the QueryManager, if the Query already exists (query.id === builder.id) then the new RequestBuilder filters are appended to the query, otherwise a new Query object is created and stored in the QueryManager.
  3. Query object (sometime later) emits an event to send filters to relays (handled in QueryManager).
  4. QueryManager asks `Cach
@v0l
v0l / NostrAuth.cs
Created March 31, 2023 09:20
Nostr auth handler for ASP.NET
using System.Security.Claims;
using System.Text.Encodings.Web;
using System.Text.Json;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Options;
using NNostr.Client;
public static class NostrAuth
{
public const string Scheme = "Nostr";
use bitcoin::consensus::Decodable;
use bitcoin::hashes::hex::FromHex;
use bitcoin::hashes::hex::ToHex;
use bitcoin::Transaction;
use bitcoin::util::psbt::serialize::Serialize;
fn main() {
let amount = 100_000_000u64;
println!();
use std::str::FromStr;
use bitcoin::util::bip32::ExtendedPubKey;
use bitcoin::util::bip32::DerivationPath;
use bitcoin::secp256k1::Secp256k1;
use bitcoin::secp256k1::ffi::types::AlignedType;
use slip132::FromSlip132;
fn main() {
let network = bitcoin::Network::Bitcoin;
@v0l
v0l / NppSerializer
Last active January 19, 2025 03:16
A c# Binary serializer using attribute flags, usefull if you need to do network communication with C++ applications that copy structs directly from memory.
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
namespace npid
{
[AttributeUsage(AttributeTargets.Struct)]