Geometrize 1.0
C++ library for geometrizing images into geometric primitives
imagerunneroptions.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5#include "../shape/shapetypes.h"
6
7namespace geometrize
8{
9
16 bool enabled = false; // Whether to use these bounds, or to use the bounds of the target image instead (these can't be larger than the image in any case)
17 double xMinPercent = 0.0;
18 double yMinPercent = 0.0;
19 double xMaxPercent = 100.0;
20 double yMaxPercent = 100.0;
21};
22
28{
29public:
31 std::uint8_t alpha = 128U;
32 std::uint32_t shapeCount = 50U;
33 std::uint32_t maxShapeMutations = 100U;
34 std::uint32_t seed = 9001U;
35 std::uint32_t maxThreads = 0;
37};
38
39}
The ImageRunnerOptions class encapsulates preferences/options that the image runner uses.
Definition: imagerunneroptions.h:28
std::uint32_t shapeCount
The number of candidate shapes that will be tried per model step.
Definition: imagerunneroptions.h:32
std::uint32_t seed
The seed for the random number generators used by the image runner.
Definition: imagerunneroptions.h:34
geometrize::ShapeTypes shapeTypes
The shape types that the image runner shall use.
Definition: imagerunneroptions.h:30
std::uint32_t maxShapeMutations
The maximum number of times each candidate shape will be modified to attempt to find a better fit.
Definition: imagerunneroptions.h:33
ImageRunnerShapeBoundsOptions shapeBounds
If zero or do not form a rectangle, the entire target image is used i.e. (0, 0, imageWidth,...
Definition: imagerunneroptions.h:36
std::uint8_t alpha
The alpha/opacity of the shapes (0-255).
Definition: imagerunneroptions.h:31
std::uint32_t maxThreads
The maximum number of separate threads for the implementation to use. 0 lets the implementation choos...
Definition: imagerunneroptions.h:35
Definition: bitmap.cpp:8
ShapeTypes
The ShapeTypes enum specifies the types of shapes that can be used. These can be combined to produce ...
Definition: shapetypes.h:17
@ ELLIPSE
Definition: shapetypes.h:21
The ImageRunnerShapeBoundsOptions struct encapsulates options for where shapes may be drawn within th...
Definition: imagerunneroptions.h:15
double xMinPercent
Definition: imagerunneroptions.h:17
double yMinPercent
Definition: imagerunneroptions.h:18
double xMaxPercent
Definition: imagerunneroptions.h:19
bool enabled
Definition: imagerunneroptions.h:16
double yMaxPercent
Definition: imagerunneroptions.h:20