-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Editor] (WIP) Add a new tool in order to add an handwritten signature to a pdf (bug 1942343) #19339
Conversation
/botio-linux preview |
272b79e
to
d4acae6
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/cfe6a210281f1ba/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/cfe6a210281f1ba/output.txt Total script time: 0.86 mins Published |
d4acae6
to
e51f339
Compare
e51f339
to
b770e3c
Compare
b770e3c
to
fdc8e45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not reviewed signaturedraw.js
in any detail, but overall the patch seems reasonable.
…e to a pdf (bug 1942343) This patch is adding some code in order to extract a drawing as curves from an image. The algorithm is basically the following: - reduce the dimensions - make it gray - apply a bilateral filter in order to add some blurryness while keeping the edges - compute the histogram - guess what's the background color which should contain a large majority of the pixels - make a binary image - extract the contours in using the Suzuki algorithm - apply the Douglas-Peucker algorithm in order to reduce the number of points The algorithm is improvable but it should work pretty well if there's a clear difference between the background and the drawing. In a v2 we could use a ML model in order to improve the extraction. There's few changes related to the UI in order to make the tool usable, but they're very basic for the moment.
fdc8e45
to
2f828c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, thanks.
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/42fef60dbe9d78a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/51fcb1308f967fb/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/42fef60dbe9d78a/output.txt Total script time: 10.92 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/51fcb1308f967fb/output.txt Total script time: 27.72 mins
|
This patch is adding some code in order to extract a drawing as curves from an image. The algorithm is basically the following:
The algorithm is improvable but it should work pretty well if there's a clear difference between the background and the drawing.
In a v2 we could use a ML model in order to improve the extraction.
There's few changes related to the UI in order to make the tool usable, but they're very basic for the moment.