I used OpenCV for this type of task and found that it works very well. It is well documented and has many kinds of operations that are typical for image analysis. I do not see how ImageMagick can even start with this.
I assume that what you mean by "image segmentation" is a grouping of pixels into clusters based on their value and the values of neighboring pixels. If you simply consider the pixel properties independently and essentially just want to load the image into the matrix, it probably doesn't matter what you use; but for any analysis, OpenCV is the way to go, or at least worth a good look.
, , Erode, Canny Edge Detection, Adaptive Thresholds, Contouring algorithms .. , ImageMagick - .