its possible use connected component with area range ?
its possible use connected component with area range ?
I use this command
-define connected-components:area-threshold=200 -define connected-components:mean-color=true -connected-components 8
But I need to know if is possible assign a range between 100 and 150
Please help me
-define connected-components:area-threshold=200 -define connected-components:mean-color=true -connected-components 8
But I need to know if is possible assign a range between 100 and 150
Please help me
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: its possible use connected component with area range ?
No, there is no option to tell it to only process colors in a given range. Perhaps you can explain further what you are trying to do. I may misunderstand your question.
Please always provide full command lines and again please identify your IM version and platform.
Please always provide full command lines and again please identify your IM version and platform.
Re: its possible use connected component with area range ?
I refer the area threshold a range between values 100 and 150
I think that not exist option ?
Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-07-12
this filter area less than 200 (values area btween 0 and 200)
I need filter in range 100 and 150
and linux ubuntu 14.04
I think that not exist option ?
Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-07-12
Code: Select all
convert image.png -define connected-components:area-threshold=200 -define connected-components:mean-color=true -connected-components 8 out.png
this filter area less than 200 (values area btween 0 and 200)
I need filter in range 100 and 150
and linux ubuntu 14.04
Last edited by diegomage on 2017-09-25T21:26:38-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: its possible use connected component with area range ?
No, there is no option for range that I know.
Re: its possible use connected component with area range ?
Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-07-12
linux ubuntu 14.04
linux ubuntu 14.04
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: its possible use connected component with area range ?
You can collect the output list and find the ID values you want to keep according to the area range and run it again using -define connected-components:keep=list-of-ids
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: its possible use connected component with area range ?
Can you provide and example image? You might be able to create a mask by running the command twice making the output the id values, once with 100 and again with 200 and get the difference and threshold them. Then use the mask to eliminate the unwanted gray level values from your original.
Re: its possible use connected component with area range ?
I know how filter by range but Im trying to learn is exist a way for doing this "more easy" (less code)
for example I use a command like this for range filter
Code: Select all
convert image.png -define connected-components:area-threshold=15 -define connected-components:mean-color=true -connected-components 8 out1.png
Code: Select all
convert image.png -define connected-components:area-threshold=10 -define connected-components:mean-color=true -connected-components 8 out2.png
Code: Select all
convert out1.png out2.png -compose ChangeMask -composite out3.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: its possible use connected component with area range ?
There is no easier way.