Counting on image J

imagej

#1

Hello,

I’m new to image J and i’ll try to explain my problem as precisely as i can.
I have to analyse cells on a rat brain image and they appear as black dots on the brain.So i turn my picture into a 8 bit one and use the threshold to make them red.
But when i use the threshold to make them red, some stains on the image and on the brain also become red.

Is there a way to threshold only certains pixels wide things on image J? Or to isolate the little black dots?
Because as far i as know about image J i have to use the paintbrush tool to clear all the stains pixel after pixel.

Please help


#2

Have a look at morphological opening and closing.
https://homepages.inf.ed.ac.uk/rbf/HIPR2/open.htm
https://homepages.inf.ed.ac.uk/rbf/HIPR2/close.htm


#3

Depending on your exact situation, there are also a few other things you could try. If the other stains are in a different region of the brain than the cells, then you could simply crop the image or use some other technique to ignore the region with the stains. Another thing you could try is using the Local Thickness plugin (also provided as part of the BoneJ plugin) after the initial segmentation. This will produce a image where the value of each pixel corresponds to the size of the “object” the pixel belongs to in the segmented image. You could then segment this result to sort by size.


#4

Well it could a lot easier to explain my problem if i could upload pictures… i’ll try the solutions you gave me and keep you updated

Thanks


#5

actually, this would be super useful :wink:


#6

Since i’m a new user, i can’t. Do you know when i’ll be able to upload pictures?


#7

Hi Vincent,
You should be able to as of now since you responded to anothers comment.
Bob


#8

Ok let’s try


#9

It is unlikely that your problem can be resolved with a greyscale threshold because greyscale thresholding does not know anything about the spatial distribution of the grey values on the image (i.e. whether they are dark dots or dark regions), it is histogram based.
You’ll probably have better luck trying to find dark dots that are surrounded by bright pixels using template matching, or morphological domes, or local maxima, or some machine learning method, like the weka segmentation in Fiji.


#10

Agreed. Unfortunately, using these methods could take a while longer to fine-tune. However, after seeing the image, I certainly agree that thresholding probably will never work on this/these image(s).

Vincent0304, if you do use Weka, I would be interested in hearing about your results. I have a similar problem with poor contrast between classes and have yet to get significant improvement (compared to my previous method) using Weka.


#11

Got it Vincent, I’ll take a closer look.

Bob


#12

maybe it’s only me: but I can barely find a difference by eye.


#13

yes it’s actually a bit more visible on the real picture, but the image quality is not that good.


#14

Thanks a lot, i’ll try to use Weka and keep you updated on the results. Maybe not today though…


#15

Okay i’m trying a new way to solve my problem (Weka does not work thanks to my very old computer)

here’s my image. See those not round red thing? That’s my problem. When i use analyse particules, i try to change the settings but it seems they are included in the analysis (i know cause it’s shown with the “Show : outlines” setting).
Do anyone know a way to not calcule it?


#16

Hello Vincent0304,
First when you use analyze particles it will give you a list of the particles and their area. This is done by the lines size, so in your data the longest line or area will be your outline. Just subtract that data from the rest.
Meanwhile I don’t think that computer age has anything to do with Weka for it is also somewhat aged. So read the help included carefully and try again.
Also it would benefit you to try to correct the illumination slope of the image by using possibly Polynomial Shading corrector available in the Plugins site, or some other type of background smoothing technique.
Bob


#17

Ok thanks a lot. Sorry but i’m a total rookie, i can’t find the help included. i looked into the fiji app. file and in the file called wekafiles and found nothing.


#18

after Google search: Fiji weka


#19

Oh… thanks a lot everybody. I think i’m good now