Closed proofconstruction closed 10 months ago
To generate a boundary, we can choose a pixel in the image and make several particles {p1, p2, ..., pn}
randomly walk starting at that pixel, for some number of cycles. The resulting points {p1_final, p2_final, ..., pn_final}
will lie on the boundary. The Graham scan algorithm can then be used to generate the convex hull enclosing those points, which we can then smooth by drawing Bezier curves or cubic splines through the hull points.
I was testing on the effect earlier and was able to generate something like this:
Will something like this useful?
Actually I couldn't access the full paper above, so couldn't get much info from it.
This is now added in this pull request: https://github.com/sparkfish/augraphy/pull/422
We should figure out an augmentation for placing stains on a document image, which generates the stains itself.
This probably looks like 2 new functions in
augraphy.augmentations.lib
:We can probably use the model here to produce a realistic diffusion effect for function 2.