Average is beautiful
バージョン 1.0.1 (8.23 KB) 作成者:
Hiroshi Iwamura
For details, please refer to the YouTube video. It is suitable for both script and live script.
This script was inspired by the following Japanese paper.
The paper states that "taking the average of handwritten hiragana characters makes them more beautiful."
In the paper, they fold the stroke data to create closed curves and expand them to a degree where the difference from the original becomes sufficiently small.
Since it seemed easier to process using the Discrete Cosine Transform (DCT), I chose that method. (DCT is equivalent to taking the DFT of an even extension of the input and is a reversible transformation.)
You can click and drag to draw one stroke, and when you release the click, it will move on to the second stroke. Press any key (e.g., space key, arrow keys) to move to the second try.
Since the determination of each stroke's similarity is based on simple normalization and distance calculation, there may be some mistakes.
This script is not intended for practical use but rather for enjoyment and experimentation.
引用
Hiroshi Iwamura (2024). Average is beautiful (https://www.mathworks.com/matlabcentral/fileexchange/129864-average-is-beautiful), MATLAB Central File Exchange. 取得済み .
MATLAB リリースの互換性
作成:
R2023a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linuxタグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!