Classifier Cropping Issue

Hi,

When using CellProfiler Analyst 2.0, I noticed the classifier doesn’t properly return my objects when I try to fetch them. Instead, the tiles are centered on x, y coordinates that are shifted away from my objects. I think the problem is that my original image is un-cropped, but I identify objects on a cropped version of the image (I cropped using a rectangle with coordinates and cropped from the edges, removing empty edges afterward). Since the classifier takes tiles from the original image, I think the x and y coordinates of the fetched objects are relative to the original un-cropped image rather than the cropped image.

If I crop the image before using CellProfiler or CellProfiler Analyst, the problem goes away and the tiles that are returned are the objects I’m looking for. Although I could save cropped versions of all my images manually, I figured this could be an easy fix to a possible bug in CellProfiler Analyst by maybe doing some conversion from relative to absolute coordinates in Classifier. Thanks and I hope this helps!

Best,
Asa

If you know the offsets, you might be able to put it directly into your properties file. For instance, if you trim 5 pixels on each edge, this should work:

cell_x_loc = Nuclei_Location_CenterX + 5
cell_y_loc = Nuclei_Location_CenterY + 5

Let us know if that doesn’t solve the problem.

That solved the problem! Thanks so much.
Asa

This has been reported in our issue tracking software (IMG-1013), and we will report back here when a more automated fix has been implemented.
Thanks,
David