detect any random point cointained in each line of this image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

detect any random point cointained in each line of this image

Post by diegomage »

Im trying to detect a point inside a line in this image
Image

Im using this command but only detect the area box and the centroid

Code: Select all

 convert   nmonddo52   -define connected-components:verbose=true  -connected-components -4 -auto-level ccredsult.png 
what could I do

please help
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: detect any random point cointained in each line of this image

Post by fmw42 »

Inside which line? You will need to turn this image into black and white. Make transparency white. If the point is inside the right side closed curve, then the centroid is likely inside it.

Please explain further.
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: detect any random point cointained in each line of this image

Post by diegomage »

ok wait a moment
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: detect any random point cointained in each line of this image

Post by diegomage »

i upload this image
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: detect any random point cointained in each line of this image

Post by diegomage »

this


Image
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: detect any random point cointained in each line of this image

Post by diegomage »

is a random point by each connected image
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: detect any random point cointained in each line of this image

Post by diegomage »

the centroid not help me for my task
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: detect any random point cointained in each line of this image

Post by diegomage »

because sometimes coincides with hollow of number figure and Ruin my command to detect numbers
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: detect any random point cointained in each line of this image

Post by fmw42 »

try grep "black" and it will find all black points

convert image txt: | grep "black"

Or if you want only the red ones

convert image txt: | grep "red"
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: detect any random point cointained in each line of this image

Post by diegomage »

very thankyou
Post Reply