Tw1ddle / geometrize-lib-example

Minimal example using the Geometrize library, a tool for geometrizing images
https://www.geometrize.co.uk/
MIT License
13 stars 2 forks source link

Using multiple shape types? #2

Closed Flamekebab closed 5 years ago

Flamekebab commented 5 years ago

The desktop app allows for multiple shape types to be used when processing an image - is that something the lib version can do? Ideally I want to use all of them!

Tw1ddle commented 5 years ago

Hi, I just added the option for you - let me know if it works: https://github.com/Tw1ddle/geometrize-lib-example/commit/ddccc048e464704fc05d6a4a91d1df4ce6cd1914

Flamekebab commented 5 years ago

That seems to be working perfectly! Thanks! Also blimey that was quick!

Does geometrize-lib take into account thread count? The desktop app has a setting for that to speed things up (or at least I assume it speeds things up!).

Tw1ddle commented 5 years ago

No problem :smile:

Threads - it should pick a reasonable number of threads by default: https://github.com/Tw1ddle/geometrize-lib/blob/master/geometrize/geometrize/model.cpp#L76 - increasing number of threads alone will just make the result more "accurate", as it will try more shapes.

You can specify the number of threads to use through this options struct: https://github.com/Tw1ddle/geometrize-lib/blob/master/geometrize/geometrize/runner/imagerunneroptions.h#L22

Used here: https://github.com/Tw1ddle/geometrize-lib-example/blob/master/main.cpp#L140

Hope that helps!