Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter is a struct that provides methods for converting image payloads into enhanced images.
func NewConverter ¶
NewConverter creates a new instance of the Converter struct, which can be used to convert image payloads into enhanced images. rotationDegrees: The counter-clockwise rotation, in degrees, applied to every incoming image (0 to disable).
func (*Converter) Encode ¶
Encode encodes an image.Image losslessly as PNG, so no second generation of JPEG compression artifacts is added on top of the camera's own. image: The image.Image object to be encoded.
func (*Converter) FromPayload ¶
FromPayload decodes an image payload and prepares it for the AI provider: it levels the image by the configured rotation, smooths out JPEG block artifacts, and stretches the image's own brightness range, which lifts dim frames without the posterization of a fixed gamma/contrast boost. If the digit strip can be located, an enlarged crop of it is stacked below the full image: the models read best with both the full meter for context and the enlarged digits for detail, while a crop alone loses that context whenever its detection is imperfect. payload: The byte slice containing the image data to be converted.