I’m not sure if this really is a bug or is caused by my specific data and pipeline. But for me it does not make sense…
Since I’m working on bright field images I have to invert the original image to use IdentifyPrimaryObjects. As threshold method I’m using “Binary Image”. This binary image is produced by my own module. For some images I recognized that there are objects identified at positions where my binary image is black. After debugging I found out that this is caused by the following piece of code:
blurred_image is the original image inverted, mask is black, and local_threshold seems to be the inverted binary image (objects black, background white). The original image contains a black frame containing pixels with value 0, so the inverted image, here the blurred_image, contains pixels with value 255. Because of “>=” the new computed binary_image has white pixels at the positions where the original input binary image has not, which leads to the from identified objects.
Vice versa if there would be pixels with value 0 in the background of the blurred_image, which might be possible for flourescence images, and in the input binary image the new binary_image would be white, too, which wouldn’t make sense at all.
The error does not occur, when omitting the equal sign:
Is this a bug or what’s the point in that equal sign?
Thank you and best wishes,