Using QuPath for whole tissue photo analysis

Hi all! I’m VERY new to image analysis. I have a series of photos of tissues (whole tissue, non-slide, JPG images) to do pixel counting on. I currently use ImageJ but I was wondering if this was something QuPath could be automated to do. Thanks for any suggestions!

It would help to have some more information - and sample pictures now that you have made your first post.

The fact that you use the word “photo” has me worried, though, as pixel counting in photos is meaningless without very controlled circumstances. A picture of a person and a picture of the moon might have the same number of pixels from the same camera, and yet each pixel means something very different unless distances, lighting, etc are controlled.

Hi, thanks so much for the response!
Below is one of the photos we’re using. It is a section of a heart. The goal is to measure pixels in the the red tissue and the white/pink tissue.
Yes, we are aware of the severe limitations on the analysis however we were not involved in the planning and were asked to count pixels.

I would have to say maybe.

Between the shadows and the potential angle, I am not sure how consistent it will be. I would definitely double check all of the results, and you may want to head off reviewer comments by setting aside training and test sets, and manually annotating your test set. Then you can create a DICE coefficient between the expected and calculated results (in samples that were not used for training).

You may need several layers of thresholding or pixel classifiers to get rid of background like the white bar on the left that may interfere in brightness thresholds, and the black text which may interfere with darkness thresholds. One way may be a pixel classifier to “identify tissue” and then thresholding on Red pixels to separate dark red from pink.

Wow, this has been super helpful for understanding the scope of what is needed!
Do you think that using a binary mask or changing the photo to grayscale would help at all?

1 Like

Probably not. If anything, manually cropping down to just the tissue would be most useful from the perspective of increasing classifier accuracy.

Though in QuPath you can just draw an annotation and run your other classifiers inside of that.

Oh, okay! That makes sense. Thank you again for your help!

Setting the color vectors would be impossible in grey.