One way to solve this is to merge the peaks to the centre of mass these regions.īelow I recreate the problem and solve it as stated. The problem is that there are peaks in regions of pixels with exactly the same value. by applying a filter on image loading, as I would prefer not to move to a slower type of peak fitting? Spots = _local_max(img, min_distance = 0, exclude_border = True, num_peaks = 2000)Īnd searching for thousands of spots in some images lead to a large number of local maxima being pretty much on top of each other. Img = skimage.io.imread("/Path/to/img.png") Img_ax.add_collection(PatchCollection(patches, facecolors = "None", edgecolors = color, alpha = 0.3, linewidths = 1)) import skimage.ioįrom llections import PatchCollectionĭef plotRoi(spots, img_ax, color, radius): The problem is though, that large spots for some reason give very strong positives. _local_max does a really good job, and is very easy to use on different data, because there's no need to play around much with intensity scaling. However, I'm interested in as many as the small dots as possible - as fast as possible. It generally doesn't matter if they're detected, as measurements are time resolved, so they'll be removed later on. I have an image that looks like this, with some larger impurities/overexposed spots.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |