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

cpmorphology shape broadcast error #324

dlogan opened this Issue May 9, 2012 · 1 comment


None yet
2 participants

dlogan commented May 9, 2012

Error doing grayscale erosion in Morph open operation:

Traceback (most recent call last):
File "C:\Trunk\CellProfiler.git\trunk\cellprofiler\gui\", line 1019, in do_step
File "C:\Trunk\CellProfiler.git\trunk\cellprofiler\modules\", line 543, in run
File "C:\Trunk\CellProfiler.git\trunk\cellprofiler\modules\", line 701, in run_function
File "C:\Trunk\CellProfiler.git\trunk\cellprofiler\cpmath\", line 2501, in opening
eroded_image = grey_erosion(image, radius, mask, footprint)
File "C:\Trunk\CellProfiler.git\trunk\cellprofiler\cpmath\", line 2336, in grey_erosion
big_image[iradius:-iradius,iradius:-iradius] = image
ValueError: operands could not be broadcast together with shapes (721,1024,13) (721,1024,3)




@ghost ghost assigned LeeKamentsky May 9, 2012


This comment has been minimized.

LeeKamentsky commented May 9, 2012

The image was color with all 3 channels being the same. I made Morph do a gentle color -> gray (warns user if it's color, but converts to gray anyway, and from there, possibly it converts to binary for things like skeletonize).

The work-around for the user is to do the color to gray explicitly in the pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment