tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
Loading...
Searching...
No Matches
TinyDetectOpts Struct Reference

How hard to look. More...

#include <detect.h>

Public Attributes

uint32_t min_size
 Shortest face to look for, as a box height in pixels.
uint32_t max_size
float scale_factor
 Ratio between one search scale and the next. Zero reads as 1.1.
uint32_t min_neighbors
 Overlapping raw detections a box needs to survive. Zero reads as 3.

Detailed Description

How hard to look.

A zeroed structure is valid and means the defaults; tiny_detect_opts fills one in with them explicitly.

Member Data Documentation

◆ max_size

uint32_t TinyDetectOpts::max_size

Tallest face to look for, as a box height in pixels. Zero means the image.

◆ min_neighbors

uint32_t TinyDetectOpts::min_neighbors

Overlapping raw detections a box needs to survive. Zero reads as 3.

The false positive control. One is almost no filtering; a real face usually gathers ten or more.

◆ min_size

uint32_t TinyDetectOpts::min_size

Shortest face to look for, as a box height in pixels.

The cost knob, and the only one that matters. The search reduces the image until a face of this height fills the cascade's window, so the largest image the detector actually scans is the input scaled by window height / min_size. Halving this quadruples the work.

Zero means the cascade's own window, which on a full resolution photograph is a search over millions of positions. Statistics in this library run on a reduced image for the same reason; see tiny_image_detect_faces.

◆ scale_factor

float TinyDetectOpts::scale_factor

Ratio between one search scale and the next. Zero reads as 1.1.

Smaller finds more and costs more. Below 1.05 the levels overlap so far that the extra detections are the same faces again.


The documentation for this struct was generated from the following file: