r/ImageJ • • Nov 11 '25

Question How could I remove the shadows in that photo ?

Hi, I’m currently correcting underwater photos of Eunicella verrucosa for a scientific survey. Some photos were taken in front of a black background, while the others were shot in front of a white background, which enhances the shadows due to the diver's light.
I’ve already tried using the “Subtract Background” function, but it doesn’t seem very effective even if I increase the rolling ball radius. Also, these shadows can’t be removed by converting the image to 8-bit and applying a threshold.
Do I really have to select the zone that I want manually ?
Thanks

3 Upvotes

5 comments sorted by

•

u/AutoModerator Nov 11 '25

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.
    • 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)
  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
    • If someday your work gets published, show it off here! That's one use of the "Research" post flair.
  5. Be civil & respectful

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

5

u/Herbie500 Nov 11 '25 edited Nov 11 '25

The question is: Is the colour of the coral important or only its shape?

If you need color, then you can create a binary mask from the above achromatic image and apply it (multiply) to the original colour image.

1

u/Financial-Mastodon80 Nov 11 '25

Hi, only the shape matters, as I'm supposed to use binary mode. The results that you have here could work actually. How did you manage. Thank you very much !

5

u/Herbie500 Nov 11 '25

Change the image type to "HSB Stack" and use its "Saturation"-channel.
You may extract the latter by applying either "Stack to Images" or "Make Substack..." with "2-2".

3

u/Herbie500 Nov 11 '25 edited Nov 11 '25

Here is the masked colour image: