the error in segmented a ebsd png #75
-
|
Hi, The error message is shown like this: segmented = GS.initial_segmentation(filtered) ValueError Traceback (most recent call last) ~\CristalX\grains\segmentation.py in initial_segmentation(self, *args) ~\Anaconda3\envs\CristalX\lib\site-packages\skimage\segmentation_quickshift.py in quickshift(image, ratio, kernel_size, max_dist, return_tree, sigma, convert2lab, random_seed) ~\Anaconda3\envs\CristalX\lib\site-packages\skimage\color\colorconv.py in rgb2lab(rgb, illuminant, observer) ~\Anaconda3\envs\CristalX\lib\site-packages\skimage\color\colorconv.py in rgb2xyz(rgb) ~\Anaconda3\envs\CristalX\lib\site-packages\skimage\color\colorconv.py in _prepare_colorarray(arr, force_copy) ValueError: Input array must have a shape == (..., 3)), got (519, 584, 4) The 3D numpy.ndarray is (519, 584, 4), it is not in the shape of (...,3). Is it associated with the png I uploaded? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 17 replies
-
|
Hi, I witnessed this type of error before. This is not related to CristalX, rather to your input image. The image is expected to be a 3-channel image, such as RGB. So yes, the shape should be of (..., ..., 3). |
Beta Was this translation helpful? Give feedback.









Hi,
I witnessed this type of error before. This is not related to CristalX, rather to your input image. The image is expected to be a 3-channel image, such as RGB. So yes, the shape should be of (..., ..., 3).