New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connected Components - Wrong Values #574
Comments
Thanks for reporting this! Please run |
Here you go:
|
Perfect! That helps a lot. Looks like a C struct changed 2 months ago. See last change in this commit. The short version is the class CCObjectInfo70A(Structure):
CCMaxMetrics = CCMaxMetrics
_fields_ = [('_id', c_ssize_t),
('bounding_box', RectangleInfo),
('color', PixelInfo),
('centroid', PointInfo),
('area', c_double),
('census', c_double),
('merge', c_bool),
('metric', c_double * CCMaxMetrics),
('key', c_ssize_t)] # <= Only for ImageMagick 0x710 Your welcome to attempt to edit |
That does appear to have fixed it. |
This should be resolved in Wand-0.6.8. Thanks for reporting! |
I'm trying to write a script that will process bezel images (border with a transparent area in the middle) for an emulator. It extracts the alpha channel to black & white, then runs connected_components to find the white box and turn those coordinates into a text file. But the information in Wand isn't corresponding to what the command line is giving me.
Using magick on the command line results in:
Which is correct, the white area's top left corner is at (556, 307) and the size is 818x680.
The part of my script that runs the connected components is:
Which outputs:
So the values are all rearranged for the second area, but the first area (the black around the box) is correct.
The text was updated successfully, but these errors were encountered: