Code to process raw dataset to simplified dataset
michaelhuang74 opened this issue · 6 comments
michaelhuang74 commented
The simplification process is discussed as follows.
- Align the drawing to the top-left corner, to have minimum values of 0.
- Uniformly scale the drawing, to have a maximum value of 255.
- Resample all strokes with a 1 pixel spacing.
- Simplify all strokes using the Ramer–Douglas–Peucker algorithm with an epsilon value of 2.0.
Where can I find the source code that implements the above steps for simplifying the raw dataset? Thanks.
hardmaru commented
I’m not sure if this helps (I don’t have the code to do all 4 steps) but I
ported RDP over to JS a while back, and this is the RDP implementation used
in sketch-rnn-js
https://github.com/tensorflow/magenta-demos/blob/master/sketch-rnn-js/data_tool.js
…On Wed, Jun 5, 2019 at 7:30 AM michaelhuang74 ***@***.***> wrote:
The simplification process is discussed as follows.
1. Align the drawing to the top-left corner, to have minimum values of
0.
2. Uniformly scale the drawing, to have a maximum value of 255.
3. Resample all strokes with a 1 pixel spacing.
4. Simplify all strokes using the Ramer–Douglas–Peucker algorithm with
an epsilon value of 2.0.
Where can I find the source code that implements the above steps for
simplifying the raw dataset? Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#33?email_source=notifications&email_token=ABQGQHXAWQA44O6V6OIJIKTPY3UKHA5CNFSM4HTFZCHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXUSQVA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQGQHWIG3GYTEVRBUEOX5DPY3UKHANCNFSM4HTFZCHA>
.
michaelhuang74 commented
@hardmaru Thank you very much for sharing your implementation of RDP algorithm.
PengBoXiangShang commented
@michaelhuang74 Hello, have you got the source code that implements the four preprocessing steps? Thanks.
michaelhuang74 commented
@PengBoXiangShang No, I didn't. It was almost one year ago. I had moved to other things. Sorry.
PengBoXiangShang commented
@michaelhuang74 Thanks for your reply.
PengBoXiangShang commented
@HalfdanJ Hello dear Jonas, could you please release the code to covert the raw data to simplified data? Thank you very much.