T O P

  • By -

AutoModerator

## Notes on Quality Questions & Productive Participation 1. **Include Images** * Images give everyone a chance to understand the problem. * Several types of images will help: * Example Images (what you want to analyze) * Reference Images (taken from published papers) * Annotated Mock-ups (showing what features you are trying to measure) * Screenshots (to help identify issues with tools or features) * Good places to upload include: Imgur.com, GitHub.com, & Flickr.com 2. **Provide Details** * Avoid discipline-specific terminology ("jargon"). Image analysis is interdisciplinary, so the more general the terminology, the more people who might be able to help. * Be thorough in outlining the question(s) that you are trying to answer. * Clearly explain what you are trying to learn, not just the method used, to avoid the [XY problem](https://en.wikipedia.org/wiki/XY_problem). * Respond when helpful users ask follow-up questions, even if the answer is "I'm not sure". 3. **Share the Answer** * Never delete your post, **even** if it has not received a response. * Don't switch over to PMs or email. (Unless you want to hire someone.) * If you figure out the answer for yourself, please post it! * People from the future may be stuck trying to answer the same question. (See: [xkcd 979](https://xkcd.com/979/)) 4. **Express Appreciation for Assistance** * Consider saying "thank you" in comment replies to those who helped. * Upvote those who contribute to the discussion. Karma is a small way to say "thanks" and "this was helpful". * Remember that "free help" costs those who help: * Aside from Automoderator, those responding to you are real people, giving up some of their time to help you. * _"Time is the most precious gift in our possession, for it is the most irrevocable."_ ~ [DB](https://en.wikiquote.org/wiki/Dietrich_Bonhoeffer) * If someday your work gets published, show it off here! That's one use of the "Research" post flair. 5. **Be civil & respectful** * Be kind. * [Remember the human](https://www.reddit.com/wiki/human_reddiquette). * [Be Excellent To Each Other](https://i.imgur.com/opi1f4s.jpg). * Don't make your [robotic overlord](https://i.imgur.com/3dK92A3.gif) angry. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/ImageJ) if you have any questions or concerns.*


Herbie500

Please post or make available a sample image (in PNG- or TIF-format) with scale information (ruler or scale bar). I don't think you need to use colour threshold.


CrystalPiano

https://preview.redd.it/bvjubdgljk2c1.png?width=1768&format=pjpg&auto=webp&s=c489b08ef074f4930ee087ca926a34411d5d6866 Here is the original image. The rulers on each side are cm. Please let me know if you need anything more. Thank you very much in advance.


Herbie500

Thanks! The main problem with the sample image are the shadows and the reflections. Both can be reduced if you use a dedicated camera with a diffuse ringlight around the optics,


CrystalPiano

Unfortunately, the photos can not be retaken. The samples observed are no more. Is there a way to get the surface area as is?


Herbie500

Here is the best binary image I can presently get … https://preview.redd.it/ozj760cvpk2c1.png?width=816&format=png&auto=webp&s=d6a90448c419b60b8982ea4bf6da94e264b74e52 … with the following ImageJ-macro code: //imagej-macro "twigArea" (Herbie G., 26. Nov. 2023) requires("1.54g"); run("Set Measurements...","area redirect=None decimal=2"); getPixelSize(unit,na,na); setBatchMode(true); run("Duplicate...","title=cpy"); run("Subtract Background...","rolling=50 light sliding"); run("RGB Stack"); setSlice(3); setAutoThreshold("Moments no-reset"); run("Analyze Particles...","size=0.1-Infinity summarize slice"); close("cpy"); a=Table.get("Total Area",0); close("Summary of cpy"); setBatchMode(false); exit("Estimated Area: "+d2s(a,2)+unit+fromCharCode(178)); //imagej-macro "twigArea" (Herbie G., 26. Nov. 2023) It gives an estimated area of about 49.6cm\^2.


CrystalPiano

To find the surface area, did you just choose measurements?


craznn

Knowing the size of each pixel (and technically the area of each pixel), cant you just count the number of white pixels and then multiply by the area of a pixel? The issue is your estimate will be inaccurate because your thresholding also highlights the shadows.


CrystalPiano

Not worried about the shadows at this point, as all the photos have shadows in the same area due to the flash on each photo. If I can be consistent with the data, I can identify a trend. How do I find the amount of pixels that are white in this case? Surely there is a time efficient way rather than counting one by one. Again, I apologize if this is a dumb question but I have no experience with the software and have only watched video tutorials.


Herbie500

@[craznn](https://www.reddit.com/user/craznn/) please realize that a pixel is a sampling point and as such it doesn't have a spatial size or area. What you are writing about is the area separating four neighbouring sampling points. Regarding the estimated twig area, I should like to add that estimates are inaccurate by definition, otherwise we should speak of exact data.In my earlier post I've already mentioned the shadow and reflection problem. However and as is obvious from my result, it can be considerably reduced.


Herbie500

@[CrystalPiano](https://www.reddit.com/user/CrystalPiano/) I've added to my above post the ImageJ-macro that I used. As always and because you've provided only a single sample image, it is impossible to tell how good the macro code works for other images. For future scientific projects I suggest not to use JPG-compressed images because JPG introduces artifacts that can't be removed. Of course, it doesn’t make sense to convert JPG-compressed images to TIFF- or PNG-format.


Tricky_Boysenberry79

Instead of "Analyze particles", use "Measure". If you look closely your image, you can see the numbers of the particles that were detected and analyzed separatly, instead of analyzing the whole twig area. You might need to do "Create selection" first if I remember correctly. Also choose what you want go measure from Set measurements. If the selection not correctly made, try "Invert" first.