Page 1 of 1
handwriting and skeleton
Posted: 2016-04-25T02:15:21-07:00
by mmmaks2004
please, help
how to make the skeleton of letters?

pixel size: 1

Re: handwriting and skeleton
Posted: 2016-04-25T07:48:28-07:00
by snibgo
Code: Select all
convert f3ca1fa924da.jpg -negate -morphology Thinning:-1 Skeleton -negate s.png
See
http://www.imagemagick.org/Usage/morpho ... g_skeleton
Re: handwriting and skeleton
Posted: 2016-04-25T09:58:36-07:00
by mmmaks2004
How to make that did not show the width of the letters?
Re: handwriting and skeleton
Posted: 2016-04-25T10:11:43-07:00
by snibgo
mmmaks2004 wrote:How to make that did not show the width of the letters?
I don't understand the question. The output from my command is:

Re: handwriting and skeleton
Posted: 2016-04-25T10:57:11-07:00
by mmmaks2004

The output from your command is:

how to remove the line width:

best:

Re: handwriting and skeleton
Posted: 2016-04-25T11:06:29-07:00
by snibgo
You want to remove some lines from the output. What rules determine which lines are to be removed?
Re: handwriting and skeleton
Posted: 2016-04-25T11:58:29-07:00
by mmmaks2004
maybe so,
Rules:
1. Find points that form a junction of 3 lines
3. Remove the shortest line (from 3 lines), if the length is less than 10 pixels
Is it possible to reduce the thickness of the lines of letters to 1 pixel?
Re: handwriting and skeleton
Posted: 2016-04-25T12:19:06-07:00
by snibgo
See the morphology page I linked to.
Each line has two or more line-ends (except for loops), and zero or more junctions. The lines can be broken at junctions into segments. We can forget about segments that don't have a line-end. "-connected-components" tells us the size of each segment, so we can remove all segments that are smaller than a certain size.
When we have found segments, I can't see how to easily identify which segments have a common junction.