Can someone explain me why I get "convert.exe: too many objects" and how can be handle it this error.
It seems that does not matter the value of " -define connected-components:area-threshold ".
By the way, this value represent the minimum number of pixels of rectangle ( width x height ) or what?
I do not found many information about that.
Here is the image. https://www.dropbox.com/s/02erfct6buplxtc/ll.jpg?dl=0
Thank you.
About connected-components
-
- Posts: 24
- Joined: 2012-01-10T05:19:23-07:00
- Authentication code: 8675308
Re: About connected-components
Type 'convert -version'. Does it return Q8? If so, you are limited to 256 unique objects. With the Q16 version of ImageMagick you are limited to 65536 unique objects. We have the Q16 version and connected component labeling completed without complaint, it contains 46570 unique objects.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: About connected-components
It is always best to provide your IM version and platform when asking questions on this forum. It saves a lot of back and forth questions. See viewtopic.php?f=1&t=9620. It is the very top listed post on the User's page.
-
- Posts: 24
- Joined: 2012-01-10T05:19:23-07:00
- Authentication code: 8675308
Re: About connected-components
Thank you very much.
Yes, Magic has right, I use 6.9.0.1 Windows Q8.
I don't understand why Q8 use only 256 and Q16 65K (except a simple 1 byte or 2 bytes representation). For most images Q8 is enough, but the limitation at only 256 connected components is too low.
Yes, Magic has right, I use 6.9.0.1 Windows Q8.
I don't understand why Q8 use only 256 and Q16 65K (except a simple 1 byte or 2 bytes representation). For most images Q8 is enough, but the limitation at only 256 connected components is too low.
Re: About connected-components
Connected components labels are stored as an index in the image colormap index. Q8 is limited to 256 colors (1-byte) where Q16 is limited to 65536 colors (2-bytes).
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: About connected-components
All channels of Q8 compile IM are limited to 8-bits per channel. In Q16 compile of IM all channels are limited to 16-bits per channel when the image is written. Thus Q8 can only store 256 values in any channel, whereas Q16 can store 65535 values per channel.