Skip to content

hvuhsg/hiddenmark

Repository files navigation

HiddenMark

Invisible digital watermarking for images and audio. Embed and detect watermarks using frequency-domain techniques — entirely in the browser or via CLI and multi-language SDKs.

How It Works

Image watermarking uses ring-based frequency modulation in FFT space. A deterministic pattern is generated from a secret key and embedded into the high-frequency rings of the image's Fourier transform, making the watermark invisible to the human eye but detectable with the correct key.

Audio watermarking uses spread-spectrum correlation with bandpass filtering (2–8 kHz). A pseudo-random noise sequence derived from the key is embedded into audio chunks, preserving audio quality while enabling reliable detection.

Features

  • Browser-based — all processing happens client-side, no files are uploaded
  • Image & Audio — supports both image (PNG) and audio (WAV) watermarking
  • Multi-language SDKs — Go, Python, Rust, C++, Dart, Java, Kotlin, Swift
  • Cross-language compatible — watermarks embedded in one language can be detected in any other
  • CLI tools — embed and detect watermarks from the command line

Quick Start

Web App

npm install
npm run dev

Open the app in your browser to embed or detect watermarks interactively.

CLI

# Embed a watermark into an image
npx tsx cli/embed.ts <input-image> <key-file> [output-image]

# Detect a watermark in an image
npx tsx cli/detect.ts <input-image> <key-file>

# Embed a watermark into audio
npx tsx cli/audio-embed.ts <input-audio> <key-file>

# Detect a watermark in audio
npx tsx cli/audio-detect.ts <input-audio> <key-file>

SDKs

Each SDK provides the same core watermarking functionality:

Language Path
Go sdks/go/
Python sdks/python/
Rust sdks/rust/
C++ sdks/cpp/
Dart sdks/dart/
Java sdks/java/
Kotlin sdks/kotlin/
Swift sdks/swift/

Development

npm run dev            # Start dev server
npm run build          # Production build
npm run check          # TypeScript & Svelte validation
npm test               # Run tests
npm run benchmark      # Performance benchmarks

Database Migrations

npm run migrate          # Apply migrations locally
npm run migrate:remote   # Apply migrations to production

Tech Stack

  • Frontend: SvelteKit, Svelte 5, Tailwind CSS, TypeScript
  • Deployment: Cloudflare Pages + Workers + D1
  • Core Algorithm: Cooley-Tukey FFT (pure TypeScript, no native dependencies in browser)

About

Invisible image watermarking — SvelteKit + Cloudflare Pages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors